1 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
3 * cxx-pretty-print.h (cxx_pretty_printer::constant): Now a member
4 function, overriding c_pretty_printer::constant.
5 * cxx-pretty-print.c (cxx_pretty_printer::constant): Rename from
6 pp_cxx_constant. Adjust.
7 (cxx_pretty_printer::cxx_pretty_printer): Do not assign to constant.
9 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutiobs.net>
11 * cp-objcp-common.c (cxx_initialize_diagnostics): Call a
12 destructor for the early printer.
13 * error.c (type_to_string): Use pp_buffer.
15 2013-08-22 Paolo Carlini <paolo.carlini@oracle.com>
18 * class.c (check_field_decls): Check for const mutable and const
19 reference data members.
21 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
23 * error.c (init_error): Remove calls to pp_construct and
24 pp_cxx_pretty_printer_init. Initialize cxx_pp with placement-new.
25 * cxx-pretty-print.h (cxx_pretty_printer::cxx_pretty_printer): Declare.
26 (cxx_pretty_printer_init): Remove.
27 * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer):
28 Rename from cxx_pretty_printer_init. Adjust.
29 * cp-objcp-common.c (cxx_initialize_diagnostics): Simplify
30 initialization of C++ diagnostics pretty printer.
32 2013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
34 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
35 * cp-tree.h (REFERENCE_REF_P): Likewise.
36 * semantics.c (finish_offsetof): Likewise.
38 2013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
41 * semantics.c (finish_id_expression): Handle deprecated references.
43 2013-08-20 Jason Merrill <jason@redhat.com>
46 * cvt.c (build_expr_type_conversion): Don't complain about a
47 template that can't match the desired type category.
49 2013-08-20 Gabriel Dos Reis <gdr@integrable-solutions.net>
51 * error.c (pp_ggc_formatted_text): New.
52 (type_as_string): Use it in lieu of pp_formatted_text.
53 (type_as_string_translate): Likewise.
54 (expr_as_string): Likewise.
55 (decl_as_string): Likewise.
56 (decl_as_string_translate): Likewise.
57 (lang_decl_name): Likewise.
58 (decl_to_string): Likewise.
59 (expr_to_string): Likewise.
60 (fndecl_to_string): Likewise.
61 (parm_to_string): Likewise.
62 (type_to_string): Likewise.
63 (args_to_string): Likewise.
64 (subst_to_string): Likewise.
66 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
69 * cp-array-notation.c (cp_expand_cond_array_notations): Added a
70 check for truth values.
71 (expand_array_notation_exprs): Added truth values case. Removed an
72 unwanted else. Added for-loop to walk through subtrees in default
74 * call.c (build_cxx_call): Inherited the type of the array notation for
75 certain built-in array notation functions.
77 2013-08-19 Paolo Carlini <paolo.carlini@oracle.com>
79 * parser.c (cp_parser_lambda_introducer, cp_parser_decltype_expr):
80 Use cp_parser_lookup_name_simple.
82 2013-08-19 Paolo Carlini <paolo.carlini@oracle.com>
84 * name-lookup.h (pop_bindings_and_leave_scope): Declare.
85 * name-lookup.c (pop_bindings_and_leave_scope): Define.
86 * parser.c (cp_parser_lambda_declarator_opt,
87 cp_parser_direct_declarator, cp_parser_cache_defarg): Use it.
89 2013-08-17 Jason Merrill <jason@redhat.com>
92 * name-lookup.c (push_class_level_binding_1): It's OK to push a
93 lambda type after the enclosing type is complete.
95 2013-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
97 * error.c (dump_scope): Add a cxx_pretty_printer parameter.
99 (dump_template_argument): Likewise.
100 (dump_template_argument_list): Likewise.
101 (dump_template_parameter): Likewise.
102 (dump_template_bindings): Likewise.
103 (dump_alias_template_specialization): Likewise.
104 (dump_type): Likewise.
105 (dump_typename): Likewise.
106 (dump_aggr_type): Likewise.
107 (dump_type_prefix): Likewise.
108 (dump_type_suffix): Likewise.
109 (dump_global_iord): Likewise.
110 (dump_simple_decl): Likewise.
111 (dump_decl): Likewise.
112 (dump_template_decl): Likewise.
113 (dump_function_decl): Likewise.
114 (dump_parameters): Likewise.
115 (dump_ref_qualifier): Likewise.
116 (dump_exception_spec): Likewise.
117 (dump_function_name): Likewise.
118 (dump_template_parms): Likewise.
119 (dump_call_expr_args): Likewise.
120 (dump_aggr_init_expr_args): Likewise.
121 (dump_expr_list): Likewise.
122 (dump_expr_init_vec): Likewise.
123 (dump_expr): Likewise.
124 (dump_binary_op): Likewise.
125 (dump_unary_op): Likewise.
127 2013-08-14 Paolo Carlini <paolo.carlini@oracle.com>
130 * cp-tree.h (LOOKUP_NO_NON_INTEGRAL): Add.
131 * decl.c (case_conversion): Use it.
132 * call.c (standard_conversion): Likewise.
133 (implicit_conversion): Adjust.
135 2013-08-13 Adam Butcher <adam@jessamine.co.uk>
137 * pt.c: Grammar fix in comments ("it's" to "its").
139 2013-08-12 Paolo Carlini <paolo.carlini@oracle.com>
141 * decl.c (warn_extern_redeclared_static, duplicate_decls,
142 check_elaborated_type_specifier): Use error + inform.
143 * friend.c (make_friend_class): Likewise.
144 * semantics.c (finish_id_expression): Likewise.
146 2013-08-09 Paolo Carlini <paolo.carlini@oracle.com>
149 2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
152 * name-lookup.c (lookup_name_real_1): Handle iter->type before
155 2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
158 * name-lookup.c (lookup_name_real_1): Handle iter->type before
161 2013-08-06 Caroline Tice <cmtice@google.com>
163 * Make-lang.in (*CXX_AND_OBJCXX_OBJS): Add vtable-class-hierarchy.o to
165 (vtable-class-hierarchy.o): Add build rule.
166 * cp-tree.h (vtv_start_verification_constructor_init_function): New
167 extern function decl.
168 (vtv_finish_verification_constructor_init_function): New extern
170 (build_vtbl_address): New extern function decl.
171 (get_mangled_vtable_map_var_name): New extern function decl.
172 (vtv_compute_class_hierarchy_transitive_closure): New extern function
174 (vtv_generate_init_routine): New extern function decl.
175 (vtv_save_class_info): New extern function decl.
176 (vtv_recover_class_info): New extern function decl.
177 (vtv_build_vtable_verify_fndecl): New extern function decl.
178 * class.c (finish_struct_1): Add call to vtv_save_class_info if
179 flag_vtable_verify is true.
180 * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list.
181 * vtable-class-hierarchy.c: New file.
182 * mangle.c (get_mangled_vtable_map_var_name): New function.
183 * decl2.c (start_objects): Update function comment.
184 (cp_write_global_declarations): Call vtv_recover_class_info,
185 vtv_compute_class_hierarchy_transitive_closure and
186 vtv_build_vtable_verify_fndecl, before calling
187 finalize_compilation_unit, and call vtv_generate_init_rount after, IFF
188 flag_vtable_verify is true.
189 (vtv_start_verification_constructor_init_function): New function.
190 (vtv_finish_verification_constructor_init_function): New function.
191 * init.c (build_vtbl_address): Remove static qualifier from function.
193 2013-08-06 Jason Merrill <jason@redhat.com>
196 * tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.
198 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
201 * typeck.c (cp_pointer_int_sum): Add tsubst_flags_t parameter.
202 (cp_build_binary_op): Adjust.
204 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
206 * cxx-pretty-print.h (pp_c_base): Remove.
207 (cxx_pretty_printer): Derive from c_pretty_printer.
208 Adjust macros using pp_c_base.
209 * cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base.
210 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise.
211 (pp_cxx_colon_colon): Likewise.
212 (pp_cxx_separate_with): Likewise.
213 (pp_cxx_storage_class_specifier): Do not call pp_c_base.
214 (pp_cxx_expression_list): Likewise.
215 (pp_cxx_space_for_pointer_operator): Likewise.
216 (pp_cxx_init_declarator): Likewise.
217 (pp_cxx_call_argument_list): Likewise.
218 (pp_cxx_constant): Likewise.
219 (pp_cxx_postfix_expression): Likewise.
220 (pp_cxx_new_expression): Likewise.
221 (pp_cxx_unary_expression): Likewise.
222 (pp_cxx_cast_expression): Likewise.
223 (pp_cxx_conditional_expression): Likewise.
224 (pp_cxx_assignment_expression): Likewise.
225 (pp_cxx_expression): Likewise.
226 (pp_cxx_function_specifier): Likewise.
227 (pp_cxx_decl_specifier_seq): Likewise.
228 (pp_cxx_simple_type_specifier): Likewise.
229 (pp_cxx_type_specifier_seq): Likewise.
230 (pp_cxx_ptr_operator): Likewise.
231 (pp_cxx_parameter_declaration_clause): Likewise.
232 (pp_cxx_direct_declarator): Likewise.
233 (pp_cxx_direct_abstract_declarator): Likewise.
234 (pp_cxx_type_id): Likewise.
235 (pp_cxx_statement): Likewise.
236 (pp_cxx_pretty_printer_init): Tidy.
237 * error.c (init_error): Do not use pp_base.
238 (dump_aggr_type): Likewise.
239 (dump_type_prefix): Likewise.
240 (dump_type_suffix): Likewise.
241 (dump_global_iord): Likewise.
242 (dump_decl): Likewise.
243 (dump_function_decl): Likewise.
244 (dump_ref_qualifier): Likewise.
245 (reinit_cxx_pp): Likewise.
246 (decl_as_dwarf_string): Likewise.
247 (lang_decl_dwarf_name): Likewise.
248 (type_to_string): Likewise.
249 (cv_to_string): Likewise.
250 (cxx_print_error_function): Likewise.
251 (cp_diagnostic_starter): Likewise.
252 (cp_diagnostic_finalizer): Likewise.
253 (cp_print_error_function): Likewise.
254 (print_instantiation_context): Likewise.
255 (cp_printer): Likewise.
257 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
259 * error.c (dump_type_prefix): Use specialized pretty printer
260 functions instead of pp_string or operators and punctuators.
261 (dump_decl): Likewise.
262 (dump_expr): Likewise.
264 2013-08-03 Jason Merrill <jason@redhat.com>
267 * pt.c (get_underlying_template): New.
268 (convert_template_argument, lookup_template_class_1): Use it.
272 * pt.c (pack_expansion_args_count): Rename from
273 any_pack_expanson_args_p.
274 (coerce_template_parms): Reject pack expansion to
275 non-pack template parameter of alias template.
277 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
279 * error.c (dump_aggr_type): Use specialized pretty printer
280 functions instead of pp_character.
281 (dump_type_prefix): Likewise.
282 (dump_simple_decl): Likewise.
283 (type_to_string): Likewise.
285 2013-08-02 Paolo Carlini <paolo.carlini@oracle.com>
287 * cp-tree.h (finish_stmt): Do not declare.
288 * decl.c (finish_stmt): Do not define.
289 * parser.c (cp_parser_expression_statement,
290 cp_parser_declaration_statement,
291 cp_parser_transaction_cancel): Don't call finish_stmt.
292 * semantics.c (finish_expr_stmt, finish_if_stmt,
293 finish_while_stmt, finish_do_stmt, finish_return_stmt,
294 finish_for_stmt, finish_switch_stmt, finish_compound_stmt,
295 finish_transaction_stmt): Likewise.
297 2013-08-01 Fabien Chêne <fabien@gcc.gnu.org>
300 * cp-tree.h: Check OVL_USED with OVERLOAD_CHECK.
301 * name-lookup.c (do_nonmember_using_decl): Make sure we have an
302 OVERLOAD before calling OVL_USED. Call diagnose_name_conflict
303 instead of issuing an error without mentioning the conflicting
306 2013-07-31 Paolo Carlini <paolo.carlini@oracle.com>
308 * parser.c (cp_parser_sizeof_pack): Check cp_parser_identifier
309 return value for error_mark_node.
311 2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
314 * parser.c (cp_parser_cache_defarg): In an NSDMI don't stop when
315 token->type == CPP_ELLIPSIS.
317 2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
320 * call.c (is_std_init_list): Return false if cxx_dialect == cxx98.
322 2013-07-29 Jason Merrill <jason@redhat.com>
325 * semantics.c (build_data_member_initialization, constexpr_fn_retval):
326 Use break_out_target_exprs instead of unshare_expr.
328 2013-07-29 Paolo Carlini <paolo.carlini@oracle.com>
331 * call.c (initialize_reference): Don't crash when reference_binding
332 returns a conv with conv->kind == ck_ambig.
334 2013-07-29 Jason Merrill <jason@redhat.com>
336 * mangle.c (write_name): Check for null context.
337 (write_unscoped_name): Allow PARM_DECL context.
339 2013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
342 * decl.c (check_default_argument): Take a tsubst_flags_t parameter.
344 * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
345 * pt.c (tsubst_default_argument, tsubst_default_arguments): Take
346 a tsubst_flags_t parameter.
347 (tsubst_decl): Adjust.
348 * call.c (convert_default_arg): Likewise.
349 * cp-tree.h (check_default_argument, tsubst_default_argument):
352 2013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
355 * parser.c (cp_parser_operator, case CPP_WSTRING, CPP_STRING16,
356 CPP_STRING32, CPP_UTF8STRING, CPP_WSTRING_USERDEF,
357 CPP_STRING16_USERDEF, CPP_STRING32_USERDEF, CPP_UTF8STRING_USERDEF):
358 Fix string_len management, tidy.
360 2013-07-24 Paolo Carlini <paolo.carlini@oracle.com>
363 * typeck.c (ptr_reasonably_similar): Use COMPARE_STRICT if either
364 target type is incomplete; return a bool, not an int.
365 * cp-tree.h (ptr_reasonably_similar): Adjust declaration.
367 2013-07-22 Paolo Carlini <paolo.carlini@oracle.com>
369 * cp-tree.h (DERIVED_FROM_P): Pass tf_none to lookup_base, not
372 2013-07-21 OndÃ…
\99ej BÃÂlka <neleai@seznam.cz>
374 * class.c: Fix typos.
375 * cp-array-notation.c: Likewise.
376 * cp-objcp-common.c: Likewise.
379 * mangle.c: Likewise.
380 * parser.c: Likewise.
382 * semantics.c: Likewise.
384 2013-07-14 Adam Butcher <adam@jessamine.co.uk>
386 * semantics.c (build_lambda_expr),
387 (build_lambda_object), (begin_lambda_type), (lambda_return_type),
388 (lambda_function), (lambda_capture_field_type), (is_capture_proxy),
389 (is_normal_capture_proxy), (insert_capture_proxy),
390 (insert_pending_capture_proxies), (lambda_proxy_type),
391 (build_capture_proxy), (vla_capture_type),
392 (register_capture_members), (add_default_capture),
393 (lambda_expr_this_capture), (maybe_resolve_dummy),
394 (nonlambda_method_basetype), (maybe_add_lambda_conv_op) and
395 (is_lambda_ignored_entity): Moved definitions into ...
396 * lambda.c: ... this new file.
398 2013-07-14 Marc Glisse <marc.glisse@inria.fr>
400 * call.c (build_conditional_expr_1): Handle the case with 1 vector
401 and 2 scalars. Call save_expr before building a vector.
402 * typeck.c (cp_build_binary_op): Check complain before complaining.
404 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
407 * init.c (build_aggr_init): Check for warn_unused attribute.
408 * decl.c (poplevel): Likewise.
410 2013-07-13 Jason Merrill <jason@redhat.com>
413 * init.c (build_vec_init): Use {} for arrays of class type.
414 (build_vec_delete): Don't take the address of the array.
417 * class.c (layout_class_type): Check for too-large class.
419 * call.c (can_convert): Allow user-defined conversions.
420 (can_convert_standard): New.
421 * cp-tree.h: Declare it.
422 * cvt.c (convert_to_reference): Use it.
423 * pt.c (convert_nontype_argument): Likewise.
424 * search.c (check_final_overrider): Likewise.
425 Don't worry about user-defined conversions.
427 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
430 * typeck.c (build_reinterpret_cast_1): With -Wconditionally-supported
431 warn about casting between pointer-to-function and pointer-to-object.
433 2013-07-09 Jason Merrill <jason@redhat.com>
436 * init.c (build_vec_init): Don't take shortcuts when initializing
440 * parser.c (cp_parser_sizeof_pack): Clear parser scopes.
443 * semantics.c (finish_id_expression): Return the id for an
444 unevaluated outer variable.
447 * semantics.c (lambda_capture_field_type): Build a DECLTYPE_TYPE
448 if the variable type uses 'auto'.
451 * typeck.c (check_return_expr): Lambda proxies aren't eligible
452 for nrv or return by move.
455 * parser.c (cp_parser_ref_qualifier_opt): Don't tentatively parse
456 a ref-qualifier in C++98 mode.
459 * pt.c (convert_nontype_argument) [INTEGER_CST]: Force the
460 argument to have the exact type of the parameter.
463 * semantics.c (cxx_eval_indirect_ref): Don't try to look through
464 a POINTER_PLUS_EXPR for type punning diagnostic.
467 * pt.c (tsubst_copy): Handle USING_DECL.
469 2013-07-09 Marc Glisse <marc.glisse@inria.fr>
472 * semantics.c (cxx_eval_bit_field_ref): Handle VECTOR_CST.
474 2013-07-09 Marc Glisse <marc.glisse@inria.fr>
477 * call.c (build_conditional_expr_1): Preserve xvalues.
479 2013-07-09 Paolo Carlini <paolo.carlini@oracle.com>
482 * parser.c (cp_parser_simple_declaration): Before calling shadow_tag
483 also check declares_class_or_enum.
485 2013-07-08 Jason Merrill <jason@redhat.com>
488 * pt.c (fn_type_unification): Only defer during substitution.
489 (type_unification_real): Defer during defarg substitution,
490 add checks parm to pass back deferred checks.
491 (unify, do_auto_deduction): Adjust.
492 * semantics.c (reopen_deferring_access_checks): New.
493 * cp-tree.h: Declare it.
495 2013-07-06 Paolo Carlini <paolo.carlini@oracle.com>
498 * parser.c (cp_parser_init_declarator): If we are parsing a typedef
499 set parser->default_arg_ok_p to false before cp_parser_declarator.
501 2013-07-05 Paolo Carlini <paolo.carlini@oracle.com>
504 * class.c (build_base_path): Improve diagnostic.
506 2013-07-04 Paolo Carlini <paolo.carlini@oracle.com>
509 * decl.c (start_preparsed_function): Return a bool, false if
510 push_template_decl fails.
511 (start_function): Adjust.
514 2013-07-03 Jakub Jelinek <jakub@redhat.com>
517 * parser.c (cp_parser_postfix_expression) <case RID_STATCAST>
518 Temporarily set parser->greater_than_is_operator_p for
519 cp_parser_expression and restore from saved value afterwards.
521 2013-06-28 Ed Smith-Rowland <3dw4rd@verizon.net>
523 * cp-tree.h (UDLIT_OP_ANSI_PREFIX): Remove space.
524 * parser.c (cp_parser_operator()): Parse user-defined string
525 literal as literal operator.
527 2013-06-28 Paolo Carlini <paolo.carlini@oracle.com>
530 * class.c (deduce_noexcept_on_destructors): Save, set, and restore
531 TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
534 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
536 * parser.c (cp_parser_array_notation): Removed rejection array notation
537 of type function pointers. Added handling of array expressions when
538 Cilk Plus is enabled. Took out type-checking.
539 (cp_parser_postfix_open_square_expression): Moved normal array expr.
540 parsing into cp_parser_array_notation when cilkplus is enabled.
541 (cp_parser_compound_statement): Removed expansion of array notations.
542 (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
543 (cp_parser_function_definition_after_declarator): Likewise.
544 (cp_parser_selection_statement): Removed error reporting.
545 (cp_parser_iteration_statement): Likewise.
546 (cp_parser_direct_declarator): Removed error checking/reporting if
547 array notations are used in the declarator.
548 * pt.c (instantiate_decl): Likewise.
549 (type_unification_real): Removed a check for ARRAY_NOTATION_REF.
550 (cxx_eval_constant_expression): Removed ARRAY_NOTATION_REF case.
551 (potential_constant_expression_1): Returned false for
552 ARRAY_NOTATION_REF case.
553 * cp-gimplify.c (cp_genericize): Added expansion of array notation
555 * cp-array-notation.c (make_triplet_val_inv): Removed loc and cry
556 parameters. Replaced build_decls with get_temp_regvar with type as
558 (create_array_refs): Made the type-casting to ptrdiff_type.
559 (replace_invariant_var): Added a check for void return type before
560 creating new var. Replaced build_decl and build_min_nt_loc with
562 (expand_an_in_modify_expr): Ditto. Replaced body of redundant else
563 with gcc_unreachable. Removed few unwanted checks. Made induction
564 variable type as ptrdiff_type. Removed loc and complain arguments
565 passed into make_triplet_val_inv. Replaced all modify expression's
566 code from NOP EXPR to INIT EXPR. Replaced all forceful appending
567 into stmt. list with the non-forceful one. Replaced some integer
568 conversion and equality-checking to using tree_int_cst_equal.
569 (expand_sec_reduce_builtin): All changes mentioned in above function
570 expand_an_in_modify_expr. Made the new variable type of
571 SEC_REDUCE_ANY/ALL_{NON}ZERO intrinsic functions as bool.
572 (expand_array_notation_exprs): Removed SWITCH_EXPR case. Moved all
573 the error reporting from parser to this function. Removed unwanted
574 statements and checks from SWITCH_STMT, WHILE_STMT, and DO_STMT cases.
575 (cilkplus_an_triplet_types_ok_p): Removed rejection of array notation
576 in function pointers.
577 (cp_expand_cond_array_notations): Added a new if statements to check
578 if condition has a zero rank. If so, then just return.
579 (expand_return_expr): Added a check for return expressions with a rank.
580 Replaced get_tmp_regvar with a create_temporary_var.
581 (build_array_notation_ref): Simplified and removed unwanted if-stmts.
582 Moved common code outside if-statements. Moved type-checking from
584 * semantics.c (finish_return_stmt): Removed a check for return exprs.
586 * call.c (convert_like_real): Removed a check for array notation
587 expression in a function.
588 (build_over_call): Likewise.
589 (magic_varargs_p): Added a check for builtin array notation function.
590 Made this function non-static and removed its prototype.
591 * cp-tree.h (magic_varargs_p): New prototype.
592 * typeck.c (cp_build_function_call_vec): Removed automatic setting of
593 nargs to the param->length when builtin reduction function is used.
594 (convert_arguments): Replaced check for a constant_p function with
595 margic_varargs_p function call.
596 (cp_build_binary_op): Removed calling of the function
597 find_correct_array_notation_type.
598 (cp_build_addr_expr_1): Removed an unwanted if-statement.
599 (convert_for_assignment): Removed automatic return of rhs when array
600 notation builtin function is used.
602 2013-06-28 Paolo Carlini <paolo.carlini@oracle.com>
605 * parser.c (cp_parser_save_member_function_body): Handle correctly
606 curly braces in function-try-block mem-initializers.
608 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
611 * typeck.c (cp_build_vec_perm_expr): New function.
612 * cp-tree.h: Declare it.
613 * parser.c (cp_parser_postfix_expression): Call it.
614 * pt.c (tsubst_copy): Handle VEC_PERM_EXPR.
615 (tsubst_copy_and_build): Likewise.
617 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
620 * pt.c (more_specialized_fn): If both arguments are references,
621 give priority to an lvalue.
623 2013-06-26 Jason Merrill <jason@redhat.com>
625 * typeck2.c (store_init_value): Diagnose a non-constant
626 initializer for in-class static.
629 * semantics.c (add_capture): Set type to error_mark_node after
632 2013-06-25 Ed Smith-Rowland <3dw4rd@verizon.net>
635 * parser.c (cp_parser_unqualified_id): Add declarator_p to checks
636 to trigger warning, (cp_literal_operator_id): Remove bogus TODO comment.
638 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
640 * call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x.
641 * class.c (add_implicitly_declared_members): Likewise.
642 (check_field_decl): Likewise.
643 (finalize_literal_type_property): Likewise.
644 (check_bases_and_members): Likewise.
645 * decl.c (poplevel): Likewise.
646 (case_conversion): Likewise.
647 (check_initializer): Likewise.
648 (grokfndecl): Likewise.
649 (check_static_variable_definition): Likewise.
650 (compute_array_index_type): Likewise.
651 (grokdeclarator): Likewise.
652 (build_enumerator): Likewise.
653 * friend.c (make_friend_class): Likewise.
654 * lex.c (init_reswords): Likewise.
655 * method.c (synthesized_method_walk): Likewise.
656 (implicitly_declare_fn): Likewise.
657 * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
658 (cp_parser_constant_expression): Likewise.
659 (cp_parser_for_init_statement): Likewise.
660 (cp_parser_block_declaration): Likewise.
661 (cp_parser_type_name): Likewise.
662 (cp_parser_enum_specifier): Likewise.
663 (cp_parser_enumerator_list): Likewise.
664 (cp_parser_member_declaration): Likewise.
665 (cp_nth_tokens_can_be_std_attribute_p): Likewise.
666 (cp_parser_template_declaration_after_export): Likewise.
667 * pt.c (convert_nontype_argument_function): Likewise.
668 (convert_nontype_argument): Likewise.
669 (convert_template_argument): Likewise.
670 (tsubst_copy_and_build): Likewise.
671 (build_non_dependent_expr): Likewise.
672 * semantics.c (non_const_var_error): Likewise.
673 (potential_constant_expression_1): Likewise.
674 * tree.c (lvalue_kind): Likewise.
675 (build_vec_init_expr): Likewise.
676 (cast_valid_in_integral_constant_expression_p): Likewise.
677 * typeck.c (build_x_conditional_expr): Likewise.
678 * typeck2.c (check_narrowing): Likewise.
680 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
682 * cp-array-notation.c (cp_length_mismatch_in_expr_p): Remove.
683 (expand_an_in_modify_expr): Changed a function call from the above
684 removed function to length_mismatch_in_expr_p.
686 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
688 * call.c (convert_like_real): Added a check if array notation is present
689 in expression. If so, then no conversion of arguments is necessary.
690 (build_over_call): Likewise.
691 * typeck.c (cp_build_function_call_vec): Likewise.
692 (convert_for_assignment): Likewise.
693 (cp_build_array_ref): Reject array notations with a rank greater than 1
695 (cp_build_binary_op): If array notations are preent in op, then call
696 find_correct_array_notation_type.
697 (cp_build_addr_expr_1): Handle ARRAY_NOTATION_REF similar to ARRAY_REF.
698 * cp-array-notation.c: New file.
699 * cp-objcp-common.c (cp_common_init_ts): Marked ARRAY_NOTATION_REF tree
701 * cp-tree.h (fix_array_notation_exprs): New prototype.
702 * semantics.c (finish_return_stmt): Reject array notations as
704 (cxx_eval_constant_expression): Added ARRAY_NOTATION_REF case.
705 (potential_constant_expression_1): Likewise.
706 * tree.c (lvalue_kind): Likewise.
707 * error.c (dump_decl): Likewise.
708 (dump_expr): Likewise.
709 * pt.c (ARRAY_NOTATION_REF): Likewise.
710 (type_unification_real): Do not unify any arguments if array notations
712 (instantiate_decl): Added a check for array notaitons inside the
713 function body. If so, then expand them.
714 * parser.c (cp_parser_array_notation): New function.
715 (cp_parser_postfix_open_square_expression): Added a check for colons
716 inside square braces. If found, then handle the array access as an
717 array notation access. Also, disable auto-correction from a single
718 colon to scope when Cilk Plus is enabled.
719 (cp_parser_compound_statement): Added a check for array notations
720 inside the statement. If found, then expand them.
721 (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
722 (cp_parser_function_definition_after_declarator): Likewise.
723 (cp_parser_selection_statement): Searched for array notations inside
724 condition. If so, then emit an error.
725 (cp_parser_iteration_statement): Likewise.
726 (cp_parser_direct_declarator): Reject array notations inside a
727 variable or array declaration.
728 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Added cp/cp-array-notation.o.
730 2013-06-20 Jason Merrill <jason@redhat.com>
733 * decl.c (compute_array_index_type): Don't reject VLAs in SFINAE
734 context if we're in C++14 mode.
735 * tree.c (array_of_runtime_bound_p): Return true for a dependent
736 bound that is not potentually constant.
737 * cp-tree.h (DECL_VLA_CAPTURE_P, REFERENCE_VLA_OK): New.
738 * pt.c (tsubst) [REFERENCE_TYPE]: Check REFERENCE_VLA_OK.
739 * semantics.c (build_lambda_object): Don't rvalue a VLA capture.
740 (build_capture_proxy): Set REFERENCE_VLA_OK.
741 (vla_capture_type): Make it a proper C++ class.
742 (add_capture): Set DECL_VLA_CAPTURE_P. Don't pre-digest the
745 * decl.c (compute_array_index_type): Use size_one_node.
747 * pt.c (process_partial_specialization): Build a TEMPLATE_DECL for
748 a partial specialization.
749 (tsubst_decl): Don't clobber CLASSTYPE_TI_TEMPLATE of a partial
751 (most_specialized_class): Adjust.
753 * cp-tree.h (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT)
754 (DECL_TEMPLATE_INSTANTIATIONS, DECL_TEMPLATE_SPECIALIZATIONS): Use
757 2013-06-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
760 * pt.c (unify, [TEMPLATE_PARM_INDEX]): Pass to unify_type_mismatch
761 TREE_TYPE (arg), not arg itself.
763 2013-06-18 Paolo Carlini <paolo.carlini@oracle.com>
766 * pt.c (type_dependent_expression_p): Handle an array of unknown
767 bound depending on a variadic parameter.
768 * parser.c (cp_parser_range_for): Revert PR56794 changes.
770 2013-06-17 Richard Biener <rguenther@suse.de>
772 * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h.
774 2013-06-17 Paolo Carlini <paolo.carlini@oracle.com>
777 * parser.c (cp_parser_expression_statement): Check whether
778 cp_parser_expression returns error_mark_node.
780 2013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
783 * semantics.c (finish_offsetof): Handle INDIRECT_REF as expr.
785 2013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
788 * rtti.c (build_dynamic_cast_1): In case of cast to an unambiguous
789 accessible base simply forward to build_static_cast.
791 2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
794 * decl.c (poplevel): For the benefit of -Wunused-variable see
797 2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
799 * parser.c (cp_parser_nested_name_specifier_opt): Fix typo in comment.
801 2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
804 * parser.c (cp_parser_nested_name_specifier_opt): Avoid emitting
805 again diagnostic already emitted by cp_parser_lookup_name.
807 2013-06-11 Jan Hubicka <jh@suse.cz>
810 * cp/pt.c (mark_decl_instantiated): Do not export explicit
811 instantiations of anonymous namespace templates.
813 2013-06-10 Jason Merrill <jason@redhat.com>
815 * name-lookup.c (add_decl_to_level): Add decls in an anonymous
816 namespace to static_decls.
818 2013-06-07 Sriraman Tallam <tmsriram@google.com>
821 * call.c (build_over_call): Check if current_function_decl is
824 2013-06-07 Paolo Carlini <paolo.carlini@oracle.com>
827 * pt.c (lookup_template_class_1): Consistently use TYPE_MAIN_DECL,
828 not TYPE_STUB_DECL, to access the _DECL for a _TYPE.
830 2013-06-06 Jason Merrill <jason@redhat.com>
833 * semantics.c (add_capture): Diagnose capture of variable-size
834 type that is not a C++1y array of runtime bound.
836 * decl.c (grokdeclarator): Keep a decl with error type.
837 (grokfield, grokbitfield): Likewise.
838 * pt.c (instantiate_class_template_1): Likewise.
839 (tsubst_decl): Drop redundant error.
840 * class.c (walk_subobject_offsets): Handle erroneous fields.
841 * typeck2.c (process_init_constructor_record): Likewise.
843 2013-06-05 Paolo Carlini <paolo.carlini@oracle.com>
846 * parser.c (cp_parser_postfix_expression [RID_*CAST]): Set
847 parser->in_type_id_in_expr_p before calling cp_parser_type_id.
849 2013-06-03 Jan Hubicka <jh@suse.cz>
851 * decl2.c (maybe_make_one_only): Use forced_by_abi instead of
852 mark_decl_referenced.
853 (mark_needed): Likewise.
855 2013-06-03 Jason Merrill <jason@redhat.com>
857 * class.c (mark_type_abi_tags): New.
858 (check_abi_tags): Use it.
860 2013-06-03 Paolo Carlini <paolo.carlini@oracle.com>
863 * decl2.c (mark_used): Add overload taking a tsubst_flags_t too.
864 * semantics.c (finish_qualified_id_expr): Use it.
867 2013-06-01 Jan Hubicka <jh@suse.cz>
869 * decl2.c (cp_write_global_declarations): Replace same_body_alias
870 by symbol.cpp_implicit_alias.
872 2013-05-30 Jason Merrill <jason@redhat.com>
875 * cp-lang.c (cp_classify_record): Handle structs without
879 * class.c (common_enclosing_class): New.
880 * cp-tree.h: Declare it.
881 * init.c (sort_mem_initializers): Don't splice out a union member
884 2013-05-29 Jan Hubicka <jh@suse.cz>
886 * tree.c (cp_fix_function_decl_p): Update for new symtab flags.
887 * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise.
889 2013-05-25 Paolo Carlini <paolo.carlini@oracle.com>
892 * decl2.c (check_classfn): Check for destructors declared as member
895 2013-05-24 Jason Merrill <jason@redhat.com>
898 * pt.c (any_template_arguments_need_structural_equality_p): A
899 TEMPLATE_TEMPLATE_PARM can require structural type comparison.
901 2013-05-24 Paolo Carlini <paolo.carlini@oracle.com>
904 * class.c (check_bitfield_decl): Warn for bool and enum bitfields
905 with width exceeding the type.
907 2013-05-24 Jason Merrill <jason@redhat.com>
910 * semantics.c (cxx_eval_constant_expression): Handle FMA_EXPR.
911 (cxx_eval_trinary_expression): Rename from cxx_eval_vec_perm_expr.
913 2013-05-23 Jason Merrill <jason@redhat.com>
916 * tree.c (build_ref_qualified_type): Clear
917 FUNCTION_RVALUE_QUALIFIED for lvalue ref-qualifier.
919 2013-05-22 Jason Merrill <jason@redhat.com>
922 * call.c (convert_like_real): Use cp_convert_and_check.
923 * cvt.c (cp_convert_and_check): Use maybe_constant_value.
924 * semantics.c (cxx_eval_constant_expression): Handle LTGT_EXPR.
925 (potential_constant_expression_1): Handle OMP_ATOMIC*.
928 * semantics.c (maybe_add_lambda_conv_op): Give up if the call op
931 2013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
934 * parser.c (cp_parser_conversion_type_id): Set up
935 parser->type_definition_forbidden_message before calling
936 cp_parser_type_specifier_seq.
938 2013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
941 * method.c (defaultable_fn_check): Avoid do_warn_unused_parameter
942 warnings about defaulted functions.
944 2013-05-21 Paolo Carlini <paolo.carlini@oracle.com>
946 * call.c (build_conditional_expr_1): Add location_t parameter.
947 (build_conditional_expr): Likewise.
948 * typeck.c (rationalize_conditional_expr, cp_build_array_ref,
949 get_member_function_from_ptrfunc, build_x_conditional_expr,
950 cp_build_modify_expr): Update.
951 * init.c (build_new_1): Likewise.
952 * cp-tree.h: Update declaration.
954 2013-05-20 Jason Merrill <jason@redhat.com>
957 * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Only check type2
961 * decl.c (fndecl_declared_return_type): Also look in
962 DECL_SAVED_FUNCTION_DATA.
964 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
967 * parser.c (cp_parser_parameter_declaration): Check return value
968 of cp_parser_parse_and_diagnose_invalid_type_name.
970 2013-05-20 Jason Merrill <jason@redhat.com>
973 * class.c (vbase_has_user_provided_move_assign): New.
974 * method.c (synthesized_method_walk): Check it.
975 * cp-tree.h: Declare it.
978 * tree.c (build_cplus_array_type): Copy layout info if element
981 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
984 * call.c (build_new_op_1): Propagate loc to cp_build_binary_op.
986 2013-05-20 Jason Merrill <jason@redhat.com>
989 * decl2.c (determine_visibility): Use PRIMARY_TEMPLATE_P to decide
990 whether a template has its own args.
992 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
995 * pt.c (unify_no_common_base): Swap arg and parm arguments to inform.
997 2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1000 * parser.c (cp_parser_postfix_expression): Use cp_parser_braced_list
1001 instead of cp_parser_initializer_list for compound-literals.
1003 2013-05-20 Marc Glisse <marc.glisse@inria.fr>
1006 * typeck.c (check_return_expr): Reverse the alignment comparison.
1008 2013-05-17 Paolo Carlini <paolo.carlini@oracle.com>
1011 * parser.c (cp_parser_sizeof_operand): As a GNU Extension, parse
1012 correctly sizeof compound-literal; update comments.
1014 2013-05-16 Marc Glisse <marc.glisse@inria.fr>
1016 * call.c (build_conditional_expr_1): Use cp_build_binary_op
1017 instead of directly calling fold_build2.
1019 2013-05-16 Jason Merrill <jason@redhat.com>
1021 * Make-lang.in (cc1plus$(exeext)): Use link mutex.
1024 * decl.c (grokdeclarator): Allow member function qualifiers in
1025 TYPENAME context in C++11 mode.
1027 2013-05-16 Dodji Seketeli <dodji@redhat.com>
1029 PR c++/56782 - Regression with empty pack expansions
1030 * pt.c (use_pack_expansion_extra_args_p): When at least a
1031 parameter pack has an empty argument pack, and another parameter
1032 pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
1035 2013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
1037 * name-lookup.c (pushdecl_maybe_friend_1): Replace pairs of
1038 warning_at and permerror with warning_at/inform and permerror/
1039 inform, respectively.
1041 2013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
1044 * name-lookup.c (pushdecl_maybe_friend_1): Diagnose illegal
1047 2013-05-14 Jason Merrill <jason@redhat.com>
1050 * parser.c (cp_parser_range_for): Call complete_type.
1053 * pt.c (tsubst_copy_and_build): Don't recur into a designator.
1055 2013-05-14 Paolo Carlini <paolo.carlini@oracle.com>
1058 * method.c (defaulted_late_check): Check for compatible exception
1059 specification out of class explicitly defaulted functions too.
1061 2013-05-14 Jason Merrill <jason@redhat.com>
1064 * semantics.c (potential_constant_expression_1): Make sure the
1065 called function is potentially constant.
1066 * call.c (null_ptr_cst_p): Revert earlier change.
1068 2013-05-13 Jason Merrill <jason@redhat.com>
1071 * call.c (null_ptr_cst_p): An expression with side-effects can't
1072 be a C++03 null pointer constant.
1075 * decl.c (reshape_init_class): Handle error_mark_node.
1078 * typeck.c (merge_types): Propagate ref-qualifier
1079 in METHOD_TYPE case.
1082 * decl.c (grokdeclarator): Apply ref-qualifier
1083 in the TYPENAME case.
1086 * decl.c (decls_match): Compare ref-qualifiers.
1088 2013-05-10 Jason Merrill <jason@redhat.com>
1091 * pt.c (convert_template_argument): Use dependent_template_arg_p,
1092 not uses_template_parms.
1095 * semantics.c (cxx_fold_indirect_ref): Fix thinko.
1098 * semantics.c (add_capture): Error rather than abort on copy
1100 * typeck.c (maybe_warn_about_returning_address_of_local): Don't
1101 warn about capture proxy.
1103 2013-05-09 Jason Merrill <jason@redhat.com>
1105 * decl.c (cp_finish_decl): Only check VLA bound in C++1y mode.
1108 * pt.c (lookup_template_class_1): Handle getting a template
1109 template parameter as D1.
1111 N3639 C++1y VLA diagnostics
1112 * decl.c (grokdeclarator): Complain about reference, pointer, or
1114 (create_array_type_for_decl): Complain about array of VLA.
1115 * pt.c (tsubst): Likewise.
1116 * rtti.c (get_tinfo_decl): Talk about "array of runtime bound".
1117 * semantics.c (finish_decltype_type): Complain about decltype of VLA.
1118 * typeck.c (cp_build_addr_expr_1): Complain about VLA.
1119 (cxx_sizeof_or_alignof_type): Likewise.
1121 N3639 C++1y VLA support
1122 * decl.c (compute_array_index_type): Allow VLAs in C++1y mode.
1123 (check_array_initializer): Allow VLA init.
1124 (reshape_init_array_1): Adjust.
1125 (cp_finish_decl): Check for invalid VLA length.
1126 * typeck2.c (process_init_constructor_array): Adjust.
1127 (store_init_value): Use build_vec_init for VLAs.
1128 * semantics.c (add_capture): Capture VLA as ptr+len.
1129 (vla_capture_type): New.
1130 (build_capture_proxy): Rebuild the VLA.
1131 * typeck.c (build_simple_component_ref): Split out from...
1132 (build_ptrmemfunc_access_expr): ...here.
1133 * tree.c (array_of_runtime_bound_p): New.
1134 * init.c (throw_bad_array_length): New.
1135 (build_vec_init): Use it.
1136 * parser.c (cp_convert_range_for): When iterating over a VLA,
1137 use it directly rather than bind a reference.
1138 * cp-tree.h: Declare new functions.
1140 2013-05-08 Jason Merrill <jason@redhat.com>
1142 * except.c (is_admissible_throw_operand_or_catch_parameter): Check
1143 variably_modified_type_p.
1144 (expand_start_catch_block): Mark the typeinfo used here.
1145 * semantics.c (finish_handler_parms): Not here.
1147 * error.c (dump_type_suffix): Try harder on VLA length.
1150 * init.c (throw_bad_array_new_length): New.
1151 (build_new_1): Use it. Don't warn about braced-init-list.
1152 (build_vec_init): Use it.
1153 * call.c (build_operator_new_call): Use it.
1156 * decl.c (grokdeclarator): Warn about ref-qualifiers here.
1157 * parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
1158 * error.c (maybe_warn_cpp0x): s/0x/11/.
1160 2013-05-08 Paolo Carlini <paolo.carlini@oracle.com>
1163 * parser.c (cp_parser_enum_specifier): Handle nested_name_specifier
1166 2013-05-06 Marc Glisse <marc.glisse@inria.fr>
1168 * typeck.c (cp_build_binary_op): Call save_expr before
1169 build_vector_from_val.
1171 2013-05-06 Paolo Carlini <paolo.carlini@oracle.com>
1174 * decl.c (cp_finish_decl): After do_auto_deduction copy the
1175 qualifers with cp_apply_type_quals_to_decl.
1177 2013-05-05 Paolo Carlini <paolo.carlini@oracle.com>
1179 * pt.c (convert_nontype_argument): Add missing whitespace in
1182 2013-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1185 * decl.c (build_enumerator): Improve error message.
1187 2013-05-03 Paolo Carlini <paolo.carlini@oracle.com>
1190 * parser.c (cp_parser_diagnose_invalid_type_name): Improve error
1191 messages for template types and fix column numbers.
1193 2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
1196 * pt.c (tsubst_copy_and_build, MODOP_EXPR): Increase / decrease
1197 c_inhibit_evaluation_warnings around build_x_modify_expr call.
1199 2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
1202 * semantics.c (finish_decltype_type): Handle instantiated template
1205 2013-04-28 Paolo Carlini <paolo.carlini@oracle.com>
1208 * semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
1210 2013-04-26 Jakub Jelinek <jakub@redhat.com>
1212 * error.c (cp_print_error_function): Adjust file_name_as_prefix
1215 2013-04-25 Jason Merrill <jason@redhat.com>
1218 * typeck.c (cxx_alignas_expr): Handle value-dependence properly.
1221 * init.c (perform_member_init): Call reshape_init.
1223 2013-04-24 Jason Merrill <jason@redhat.com>
1226 * parser.c (cp_parser_postfix_dot_deref_expression): Fix thinko.
1228 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1230 * typeck.c (cxx_sizeof_or_alignof_type): Change -Wpointer-arith
1231 pedwarn to simply use OPT_Wpointer_arith.
1232 (cp_build_unary_op): Likewise.
1234 2013-04-24 Jason Merrill <jason@redhat.com>
1236 N3648: init-captures are named.
1237 * semantics.c (add_capture): Don't prepend "__" to init-captures.
1238 (build_capture_proxy): Adjust.
1239 * error.c (dump_simple_decl): Check DECL_NORMAL_CAPTURE_P.
1241 N3648: Allow braced and parenthesized initializers.
1242 * parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer.
1243 * pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE.
1244 * semantics.c (lambda_capture_field_type): Use do_auto_deduction.
1245 (add_capture): Collapse a parenthesized initializer into a single
1247 * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New.
1249 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1252 * init.c (build_offset_ref): Add tsubst_flags_t parameter.
1253 * semantics.c (finish_qualified_id_expr): Likewise.
1254 (finish_id_expression): Update.
1255 * typeck.c (cp_build_addr_expr_1): Likewise.
1256 * pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
1257 * cp-tree.h: Update declarations.
1259 2013-04-22 Jason Merrill <jason@redhat.com>
1262 * parser.c (cp_parser_unqualified_id): Handle ~auto.
1263 (cp_parser_pseudo_destructor_name): Likewise.
1264 (cp_parser_postfix_dot_deref_expression): Adjust.
1265 (cp_lexer_nth_token_is_keyword): New.
1266 * semantics.c (finish_pseudo_destructor_expr): Handle ~auto.
1267 * typeck.c (lookup_destructor): Handle ~auto.
1269 * pt.c (fn_type_unification): Push tinst level around
1270 type_unification_real if we aren't explaining.
1271 * cp-tree.h (TFF_NO_TEMPLATE_BINDINGS): New.
1272 * error.c (dump_function_decl): Respect it.
1273 (subst_to_string): Pass it.
1276 * rtti.c (get_typeid): Diagnose qualified function type.
1277 * pt.c (tsubst) [POINTER_TYPE]: Likewise.
1279 * error.c (dump_aggr_type): Fix lambda detection.
1280 (dump_simple_decl): Pretty-print capture field.
1283 * cvt.c (build_expr_type_conversion): Two conversions that return
1284 the same type aren't necessarily ambiguous.
1287 * parser.c (cp_parser_lambda_introducer): Make lambda capture init
1288 pedwarn unconditional except in C++1y mode.
1290 * semantics.c (potential_constant_expression_1): Don't crash on
1294 * semantics.c (finish_id_expression): Reject capture of anonymous
1298 * decl2.c (check_default_args): Check for pack expansion.
1300 * mangle.c (write_type): Mangle decltype(auto).
1302 2013-04-19 Jason Merrill <jason@redhat.com>
1304 N3638 changes to return type deduction
1305 * decl.c (undeduced_auto_decl): New.
1306 (require_deduced_type): New.
1307 (fndecl_declared_return_type): New.
1308 (decls_match): Use it.
1309 (duplicate_decls): Don't check for auto return.
1310 (grokdeclarator): Reject virtual auto.
1311 * class.c (resolve_address_of_overloaded_function): Handle
1312 auto function templates.
1313 * decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type.
1314 * cp-tree.h: Declare new fns.
1315 * error.c (dump_function_decl): Use fndecl_declared_return_type.
1316 * search.c (check_final_overrider): Likewise.
1317 * pt.c (make_decltype_auto): New.
1318 (do_auto_deduction): Require plain decltype(auto).
1322 * decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
1323 template specializations.
1325 2013-04-16 Ed Smith-Rowland <3dw4rd@verizon.net>
1327 Implement n3599 - Literal operator templates for strings.
1328 * parser.c (make_string_pack (tree value)): New function.
1329 (cp_parser_userdef_string_literal (cp_token *)): Use it
1330 to construct calls to character string literal operator templates.
1331 (cp_parser_template_declaration_after_export): Check for new string
1332 literal operator template parameter form.
1334 2013-04-15 Jason Merrill <jason@redhat.com>
1336 * pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build.
1339 * pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
1340 rather than a destructor name, it isn't an unqualified-name.
1341 (tsubst_copy_and_build): Pass down decltype_flag to operator
1345 * semantics.c (insert_capture_proxy): Just use index 1 in the
1348 2013-04-12 Jakub Jelinek <jakub@redhat.com>
1350 * error.c (cp_print_error_function,
1351 print_instantiation_partial_context_line,
1352 maybe_print_constexpr_context): Colorize locus strings.
1354 2013-04-11 Jason Merrill <jason@redhat.com>
1357 * parser.c (complain_flags): New.
1358 (cp_parser_postfix_expression): Use it.
1359 (cp_parser_unary_expression): Likewise.
1360 (cp_parser_binary_expression): Likewise.
1361 (cp_parser_assignment_expression): Likewise.
1362 (cp_parser_expression): Likewise.
1363 (cp_parser_postfix_open_square_expression): Take decltype_p.
1364 (cp_parser_builtin_offsetof): Adjust.
1365 (cp_convert_range_for): Pass complain to finish_unary_op_expr.
1366 * decl2.c (grok_array_decl): Add decltype_p parm.
1367 * cp-tree.h: Adjust prototype.
1368 * semantics.c (finish_unary_op_expr): Add complain parm.
1370 2013-04-11 Jakub Jelinek <jakub@redhat.com>
1373 * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
1374 calling maybe_constant_value for C++98.
1376 2013-04-11 Jason Merrill <jason@redhat.com>
1379 * semantics.c (lambda_capture_field_type, lambda_proxy_type):
1380 Strip references before checking WILDCARD_TYPE_P.
1382 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
1384 * call.c (build_conditional_expr_1, build_over_call): Protect
1385 error calls with complain & tf_error.
1386 * typeck.c (finish_class_member_access_expr, cp_build_binary_op,
1387 build_x_unary_op, cp_build_unary_op, cp_build_compound_expr,
1388 build_ptrmemfunc): Likewise.
1389 (lookup_destructor): Take tsubst_flags_t parameter, adjust.
1391 * cvt.c (warn_ref_binding): Rename to diagnose_ref_binding.
1392 (convert_to_reference): Adjust.
1394 2013-04-11 Jason Merrill <jason@redhat.com>
1396 * pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for
1397 local variables, look them up instead.
1398 (tsubst_decl) [VAR_DECL]: Remove handling for anonymous union
1399 proxies and substitution in unevaluated context.
1400 (tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY
1401 before the iterators.
1404 * pt.c (uses_deducible_template_parms): New.
1405 (deducible_array_bound, deducible_expression): New.
1406 (deducible_template_args): New.
1407 (unify_one_argument): Call uses_deducible_template_parms.
1409 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
1412 * typeck2.c (build_m_component_ref): Protect error calls with
1413 (complain & tf_error).
1415 2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
1418 * parser.c (cp_parser_enum_specifier): Check for empty
1419 anonymous enums and anonymous scoped enums.
1421 2013-04-10 Jakub Jelinek <jakub@redhat.com>
1424 * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
1425 first before calling maybe_constant_value for warn_for_div_by_zero
1426 or invalid shift count warning purposes.
1428 2013-04-09 Jason Merrill <jason@redhat.com>
1431 * rtti.c (build_typeid): Check the address of the argument
1432 rather than looking for an INDIRECT_REF.
1434 2013-04-04 Jason Merrill <jason@redhat.com>
1438 * typeck2.c (abstract_virtuals_error_sfinae): Disable
1439 complete_type again.
1441 2013-04-08 Paolo Carlini <paolo.carlini@oracle.com>
1444 * decl.c (validate_constexpr_redeclaration): Allow an explicit
1445 specialization to be different wrt the constexpr specifier.
1447 2013-04-06 Jason Merrill <jason@redhat.com>
1449 * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
1452 2013-04-05 Ed Smith-Rowland <3dw4rd@verizon.net>
1454 * parser.c (cp_parser_ref_qualifier_seq_opt): Move to
1455 cp_parser_ref_qualifier_opt. Error if more than one ref-qual found.
1457 2013-04-03 Jason Merrill <jason@redhat.com>
1459 * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
1460 (TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
1461 (FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.
1463 * mangle.c (write_type): When writing a function type with
1464 function-cv-quals, don't add the unqualified type as a
1465 substitution candidate.
1467 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
1470 * typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
1473 2013-04-03 Jakub Jelinek <jakub@redhat.com>
1476 * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
1477 from args to new_args.
1478 (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
1479 r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
1481 2013-04-02 Jason Merrill <jason@redhat.com>
1484 * mangle.c (write_function_type): Mangle ref-qualifier.
1485 (write_nested_name): Likewise.
1486 (canonicalize_for_substitution): Preserve ref-qualifier.
1487 (write_type): Likewise.
1490 * decl.c (begin_destructor_body): Clobber the object in a cleanup.
1492 2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
1494 * friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
1495 * pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
1496 (for_each_template_parm_r): Use TYPE_TI_ARGS.
1498 2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
1500 * cp-tree.h (TAGGED_TYPE_P): Remove.
1501 (IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
1502 (TYPE_ANONYMOUS_P): Adjust.
1503 * call.c (build_new_op_1): Likewise.
1504 * class.c (find_abi_tags_r): Likewise.
1505 * decl.c (warn_misplaced_attr_for_class_type, start_decl,
1506 type_is_deprecated): Likewise.
1507 * decl2.c (grokfield, min_vis_r): Likewise.
1508 * pt.c (get_template_info): Likewise.
1509 * tree.c (handle_abi_tag_attribute): Likewise.
1511 2013-04-01 Jason Merrill <jason@redhat.com>
1513 * semantics.c (maybe_constant_value): Check
1514 instantiation_dependent_expression_p.
1515 * pt.c (build_non_dependent_expr): Don't check it here.
1518 * init.c (build_new): Don't try to process an array initializer
1519 at template definition time.
1522 * typeck.c (finish_class_member_access_expr): Handle enum scope.
1525 * parser.c (cp_parser_range_for): Don't try to do auto deduction
1526 in a template if the type of the range is incomplete.
1528 * call.c (add_function_candidate): Take the address of 'this' here.
1529 (build_over_call): And here.
1530 (build_new_method_call_1, build_op_call_1): Not here.
1531 (build_user_type_conversion_1): Or here.
1532 (add_candidates): Adjust.
1534 * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
1535 * class.c (same_signature_p): Use type_memfn_quals.
1536 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
1537 FUNCTION_OR_METHOD_TYPE_CHECK.
1538 * error.c (dump_type_suffix): Add padding before cv-qualifiers.
1539 * pt.c (unify): Use static_fn_type.
1541 2013-04-01 Bronek Kozicki <b.kozicki@gmail.com>
1542 Jason Merrill <jason@redhat.com>
1544 Implement N2439 (ref-qualifiers for 'this')
1545 * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
1546 (FUNCTION_RVALUE_QUALIFIED): New.
1547 (FUNCTION_OR_METHOD_TYPE_CHECK): New.
1548 (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
1549 (cp_ref_qualifier): New enum.
1550 (cp_declarator): Add ref_qualifier.
1551 * parser.c (cp_parser_ref_qualifier_seq_opt): New.
1552 (cp_parser_direct_declarator): Use it.
1553 (make_call_declarator): Adjust.
1554 (cp_parser_lambda_declarator_opt): Adjust.
1555 * call.c (add_function_candidate): Handle ref-qualifier overload
1556 resolution semantics.
1557 (standard_conversion): Adjust.
1558 * class.c (add_method, same_signature_p): Compare ref-qualifiers.
1559 * decl.c (grokdeclarator): Handle ref-qualifiers.
1560 (grokfndecl): Check for invalid ref-qualifiers.
1561 (static_fn_type, revert_static_member_fn): Adjust.
1562 * decl2.c (build_memfn_type): Handle ref-qualifiers.
1563 (check_classfn): Check them.
1564 (cp_reconstruct_complex_type): Retain them.
1565 * error.c (dump_ref_qualifier): New.
1566 (dump_type_suffix, dump_function_decl): Use it.
1567 (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
1568 * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
1569 (unify): Retain them.
1570 * tree.c (cp_check_qualified_type): New.
1571 (cp_build_qualified_type_real): Keep exception spec and ref-qual.
1572 (build_ref_qualified_type): New.
1573 (strip_typedefs, build_exception_variant): Keep ref-qualifier.
1574 (cp_build_type_attribute_variant): Keep ref-qualifier.
1575 * typeck.c (merge_types): Keep ref-qualifier.
1576 (structural_comptypes): Compare ref-qualifier.
1577 (type_memfn_rqual): New.
1578 (apply_memfn_quals): Take ref-qual argument.
1579 * typeck2.c (build_m_component_ref): Check ref-qualifier.
1581 2013-04-01 Paolo Carlini <paolo.carlini@oracle.com>
1583 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
1584 (DECL_FUNCTION_TEMPLATE_P): Adjust.
1586 * cxx-pretty-print.c (pp_cxx_nested_name_specifier,
1587 pp_cxx_qualified_id): Use get_containing_scope.
1588 * parser.c (cp_parser_class_head): Likewise.
1589 * pt.c (push_template_decl_real): Likewise.
1591 * decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
1592 * pt.c (unify): Use CP_INTEGRAL_TYPE_P.
1594 2013-03-31 Paolo Carlini <paolo.carlini@oracle.com>
1596 * decl2.c (collect_candidates_for_java_method_aliases): Use
1598 * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
1599 (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
1600 * decl.c (duplicate_decls): Likewise.
1601 * parser.c (cp_parser_template_declaration_after_export): Likewise,
1602 also DECL_DECLARES_TYPE_P.
1603 * pt.c (instantiate_class_template_1): Likewise.
1604 * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
1605 (lookup_field_r): Likewise.
1606 (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
1607 (lookup_fnfields_slot_nolazy): Likewise.
1608 * semantics.c (finish_member_declaration): Likewise.
1609 * typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
1611 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1613 * pt.c (template_parms_to_args): Fix typo in comment.
1615 2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
1617 * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
1619 2013-03-29 Paolo Carlini <paolo.carlini@oracle.com>
1621 * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
1622 (build_op_call_1): Likewise.
1623 (build_over_call): Likewise.
1624 (compare_ics): Likewise.
1625 * class.c (build_base_path): Likewise.
1626 (resolve_address_of_overloaded_function): Likewise.
1627 * cp-tree.h: Likewise.
1628 * cvt.c (cp_convert_to_pointer): Likewise.
1629 (convert_to_reference): Likewise.
1630 (ocp_convert): Likewise.
1631 (convert_force): Likewise, tidy.
1632 * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
1633 (pp_cxx_ptr_operator): Likewise.
1634 * decl.c (duplicate_decls): Likewise.
1635 (start_decl): Likewise.
1636 (grok_op_properties): Likewise.
1637 (start_preparsed_function): Likewise.
1638 (store_parm_decls): Likewise.
1639 (finish_function): Likewise.
1640 * decl2.c (delete_sanity): Likewise.
1641 (acceptable_java_type): Likewise.
1642 (grokbitfield): Likewise.
1643 (cp_reconstruct_complex_type): Likewise.
1644 * error.c (dump_type_prefix): Likewise.
1645 (dump_expr): Likewise.
1646 * except.c (push_eh_cleanup): Likewise.
1647 (complete_ptr_ref_or_void_ptr_p): Likewise.
1648 (can_convert_eh): Likewise.
1649 * init.c (build_new_1): Likewise.
1650 (build_delete): Likewise.
1651 (build_vec_delete): Likewise.
1652 * mangle.c (write_type): Likewise.
1653 * parser.c (lookup_literal_operator): Likewise.
1654 * pt.c (convert_nontype_argument_function): Likewise.
1655 (convert_nontype_argument): Likewise.
1658 (dependent_type_p_r): Likewise.
1659 * rtti.c (build_headof): Likewise.
1660 (build_typeid): Likewise.
1661 (build_dynamic_cast_1): Likewise.
1662 (target_incomplete_p): Likewise.
1663 (typeinfo_in_lib_p): Likewise.
1664 * semantics.c (finish_omp_for): Likewise.
1665 (cxx_eval_call_expression): Likewise.
1666 (maybe_resolve_dummy): Likewise.
1667 * tree.c (build_target_expr): Likewise.
1668 (cp_build_qualified_type_real): Likewise.
1669 * typeck.c (composite_pointer_type_r): Likewise.
1670 (composite_pointer_type): Likewise.
1671 (comp_except_types): Likewise.
1672 (cxx_sizeof_nowarn): Likewise.
1673 (string_conv_p): Likewise.
1674 (cp_build_array_ref): Likewise.
1675 (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
1676 (pointer_diff): Likewise.
1677 (cp_build_addr_expr_1): Likewise.
1678 (cp_build_unary_op): Likewise.
1679 (build_static_cast_1): Likewise.
1680 (cp_build_c_cast): Likewise.
1681 (comp_ptr_ttypes_real): Likewise.
1682 (ptr_reasonably_similar): Likewise.
1683 (comp_ptr_ttypes_const): Likewise.
1684 (casts_away_constness): Likewise.
1685 (check_literal_operator_args): Likewise.
1686 * typeck2.c (build_x_arrow): Likewise.
1687 (add_exception_specifier): Likewise.
1689 2013-03-29 Jason Merrill <jason@redhat.com>
1692 * cp-tree.h (AUTO_IS_DECLTYPE): New.
1693 * parser.c (cp_parser_decltype): Handle decltype(auto).
1694 (cp_parser_type_id_1): Allow auto without a late-specified
1696 (cp_parser_primary_expression): Use the return value of
1697 finish_parenthesized_expr.
1698 (cp_parser_transaction_expression): Likewise.
1699 * semantics.c (force_paren_expr): New.
1700 (finish_parenthesized_expr): Use it.
1701 * call.c (build_conditional_expr_1): Likewise.
1702 * pt.c (do_auto_deduction): Handle decltype(auto).
1703 (tsubst_copy): Handle PAREN_EXPR.
1704 (tsubst_copy_and_build): Likewise.
1705 * error.c (dump_expr): Handle PAREN_EXPR.
1706 * cxx-pretty-print.c (pp_cxx_expression): Likewise.
1707 * mangle.c (write_expression): Ignore PAREN_EXPR.
1709 * parser.c (cp_parser_decltype_expr): Split out...
1710 (cp_parser_decltype): ...from here.
1714 * pt.c (unify_pack_expansion): Fix indexing.
1716 2013-03-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1718 * call.c (build_java_interface_fn_ref): Likewise.
1719 (make_temporary_var_for_ref_to_temp): Likewise.
1720 * class.c (check_field_decls): Likewise.
1721 (layout_class_type): Likewise.
1722 (finish_struct_1): Likewise.
1723 (fixed_type_or_null): Likewise.
1724 (get_vtbl_decl_for_binfo): Likewise.
1725 * cp-gimplify.c (omp_var_to_track): Likewise.
1726 (cp_genericize_r): Likewise.
1727 * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
1728 * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
1729 (DECL_DISCRIMINATOR_P): Likewise.
1730 * decl.c (poplevel): Likewise.
1731 (decls_match): Likewise.
1732 (duplicate_decls): Likewise.
1733 (decl_jump_unsafe): Likewise.
1734 (start_decl): Likewise.
1735 (check_for_uninitialized_const_var): Likewise.
1736 (make_rtl_for_nonlocal_decl): Likewise.
1737 (cp_finish_decl): Likewise.
1738 (expand_static_init): Likewise.
1739 (local_variable_p): Likewise.
1740 (maybe_register_incomplete_var): Likewise.
1741 * decl2.c (grokfield): Likewise.
1742 (comdat_linkage): Likewise.
1743 (determine_visibility): Likewise.
1744 (import_export_decl): Likewise.
1745 (prune_vars_needing_no_initialization): Likewise.
1746 (decl_maybe_constant_var_p): Likewise.
1747 * error.c (dump_simple_decl): Likewise.
1748 (dump_template_decl): Likewise.
1749 (cp_printer): Likewise.
1750 * except.c (build_throw): Likewise.
1751 * init.c (build_vtbl_address): Likewise.
1752 (member_init_ok_or_else): Likewise.
1753 (build_aggr_init): Likewise.
1754 (expand_aggr_init_1): Likewise.
1755 (build_offset_ref): Likewise.
1756 (constant_value_1): Likewise.
1757 * mangle.c (write_mangled_name): Likewise.
1758 (write_prefix): Likewise.
1759 * name-lookup.c (supplement_binding_1): Likewise.
1760 (add_decl_to_level): Likewise.
1761 (pushdecl_maybe_friend_1): Likewise.
1762 (check_for_out_of_scope_variable): Likewise.
1763 (validate_nonmember_using_decl): Likewise.
1764 (lookup_name_innermost_nonclass_level_1): Likewise.
1765 (lookup_arg_dependent_1): Likewise.
1766 * parser.c (cp_parser_lambda_introducer): Likewise.
1767 (cp_parser_template_argument): Likewise.
1768 (cp_parser_single_declaration): Likewise.
1769 * pt.c (convert_nontype_argument): Likewise.
1770 (instantiate_class_template_1): Likewise.
1771 (tsubst_decl): Likewise.
1772 (tsubst_expr): Likewise.
1773 (do_decl_instantiation): Likewise.
1774 (do_type_instantiation): Likewise.
1775 (regenerate_decl_from_template): Likewise.
1776 (always_instantiate_p): Likewise.
1777 (instantiate_decl): Likewise.
1778 (type_dependent_expression_p): Likewise.
1779 (build_non_dependent_expr): Likewise.
1780 * repo.c (repo_emit_p): Likewise.
1781 * rtti.c (build_dynamic_cast_1): Likewise.
1782 * search.c (shared_member_p): Likewise.
1783 * semantics.c (outer_var_p): Likewise.
1784 (finish_id_expression): Likewise.
1785 (finish_omp_clauses): Likewise.
1786 (finish_decltype_type): Likewise.
1787 (ensure_literal_type_for_constexpr_object): Likewise.
1788 * tree.c (lvalue_kind): Likewise.
1789 (bot_replace): Likewise.
1790 (cp_tree_equal): Likewise.
1791 (handle_init_priority_attribute): Likewise.
1792 (decl_storage_duration): Likewise.
1793 * typeck.c (cxx_sizeof_expr): Likewise.
1794 (cxx_alignof_expr): Likewise.
1795 (decay_conversion): Likewise.
1796 (build_class_member_access_expr): Likewise.
1797 (cp_build_array_ref): Likewise.
1798 (cxx_mark_addressable): Likewise.
1799 (maybe_warn_about_returning_address_of_local): Likewise.
1800 (check_return_expr): Likewise.
1801 * typeck2.c (cxx_readonly_error): Likewise.
1802 (abstract_virtuals_error_sfinae): Likewise.
1803 (cxx_incomplete_type_diagnostic): Likewise.
1805 2013-03-28 Lawrence Crowl <crowl@google.com>
1808 (CXX_PARSER_H): Add header dependence.
1810 (extern debug (cp_binding_level &)): New.
1811 (extern debug (cp_binding_level *)): New.
1813 (debug (cp_binding_level &)): New.
1814 (debug (cp_binding_level *)): New.
1816 (debug (cp_parser &)): New.
1817 (debug (cp_parser *)): New.
1818 (debug (cp_token &)): New.
1819 (debug (cp_token *)): New.
1820 (debug (vec<cp_token, va_gc> &)): New.
1821 (debug (vec<cp_token, va_gc> *)): New.
1822 * parser.c: Add header dependence.
1823 (extern debug (cp_parser &)): New.
1824 (extern debug (cp_parser *)): New.
1825 (extern debug (cp_token &)): New.
1826 (extern debug (cp_token *)): New.
1827 (extern debug (vec<cp_token, va_gc> &)): New.
1828 (extern debug (vec<cp_token, va_gc> *)): New.
1830 2013-03-28 Jason Merrill <jason@redhat.com>
1834 * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
1835 the type if tf_decltype is set.
1836 * pt.c (fn_type_unification): Add decltype_p parm.
1837 (get_bindings): Adjust.
1838 * cp-tree.h: Adjust.
1839 * class.c (resolve_address_of_overloaded_function): Adjust.
1840 * call.c (add_template_candidate_real, print_z_candidate): Adjust.
1843 * parser.c (cp_parser_sizeof_pack): Split out from...
1844 (cp_parser_sizeof_operand): ...here. Require (id).
1847 * semantics.c (finish_this_expr): 'this' is an rvalue.
1848 * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
1851 * semantics.c (finish_member_declaration): Don't push closure
1854 * name-lookup.c (pushdecl_maybe_friend_1): Use
1855 nonlambda_method_basetype and current_nonlambda_class_type.
1858 * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
1859 conversion from integer to pointer.
1860 (cxx_eval_constant_expression): Likewise.
1861 (cxx_eval_indirect_ref): Use the folded operand if we still think
1862 this might be constant.
1864 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
1865 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1868 * call.c (convert_like_real): Change series of two permerrors
1869 to permerror + inform (and likewise for two errors).
1870 (build_new_method_call_1): Likewise.
1871 * typeck.c (convert_for_initialization): Change additional
1872 warning or error to inform.
1874 2013-03-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
1876 * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
1877 (first_aggr_init_expr): Likewise.
1878 (more_aggr_init_expr_args_p): Likewise.
1879 (type_of_this_parm): Likewise.
1880 (class_of_this_parm): Likewise.
1881 * name-lookup.h (get_global_value_if_present): Likewise.
1882 (is_typename_at_global_scope): Likewise.
1884 2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
1886 * call.c (joust): Don't call inform for a permerror returning false.
1887 * parser.c (cp_parser_check_class_key): Likewise.
1888 * pt.c (tsubst_copy_and_build): Likewise.
1890 2013-03-27 Jason Merrill <jason@redhat.com>
1893 * semantics.c (finish_qualified_id_expr): Return early
1896 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
1898 * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
1899 * cvt.c (convert_to_void): Likewise.
1900 * error.c (dump_expr): Likewise.
1901 * mangle.c (write_expression): Likewise.
1902 * parser.c (cp_parser_template_argument): Likewise.
1903 * pt.c (convert_nontype_argument): Likewise.
1904 (tsubst_copy_and_build): Likewise.
1905 * rtti.c (build_typeid): Likewise.
1906 * semantics.c (finish_call_expr): Likewise.
1907 (finish_decltype_type): Likewise.
1908 (build_data_member_initialization): Likewise.
1909 * tree.c (is_dummy_object): Likewise.
1910 * typeck.c (decay_conversion): Likewise.
1911 (build_class_member_access_expr): Likewise.
1912 (cp_build_addr_expr_1): Likewise.
1913 (unary_complex_lvalue): Likewise.
1914 (check_return_expr): Likewise.
1915 * typeck2.c (cxx_readonly_error): Likewise.
1917 2013-03-26 Jason Merrill <jason@redhat.com>
1920 * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn. Take tree.
1921 * semantics.c (finish_decltype_type): Check it before type_unknown_p.
1922 * cp-tree.h: Adjust prototype.
1925 * typeck2.c (build_m_component_ref): Handle prvalue object.
1927 2013-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
1929 * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
1930 * decl.c (duplicate_decls): Likewise.
1931 (cp_finish_decl): Likewise.
1932 (check_class_member_definition_namespace): Likewise.
1933 * decl2.c (grokfield): Likewise.
1934 (decl_needed_p): Likewise.
1935 (import_export_decl): Likewise.
1936 (mark_used): Likewise.
1937 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
1938 * pt.c (push_access_scope): Likewise.
1939 (instantiate_decl): Likewise.
1940 * ptree.c (cxx_print_decl): Likewise.
1941 * repo.c (repo_emit_p): Likewise.
1942 * semantics.c (note_decl_for_pch): Likewise.
1943 * tree.c (decl_linkage): Likewise.
1945 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
1948 * decl.c (check_array_designated_initializer): Handle CONST_DECL
1951 2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
1953 * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
1956 * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
1958 2013-03-25 Jason Merrill <jason@redhat.com>
1961 * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
1962 class is derived from the type of the object.
1965 * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
1966 unevaluated context.
1968 2013-03-25 Paolo Carlini <paolo.carlini@oracle.com>
1971 * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
1972 DECL_TEMPLATE_INSTANTIATION.
1974 2013-03-22 Jason Merrill <jason@redhat.com>
1977 * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
1980 2013-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1982 * cp-tree.h (identifier_p): New.
1983 * call.c: Throughout, call identifier_p insstead of direct
1984 comparaison of TREE_CODE against IDENTIFIER_NODE.
1985 * decl.c: Likewisse.
1986 * decl2.c: Likewise.
1988 * mangle.c: Likewise.
1989 * name-lookup.c: Likewise.
1990 * parser.c: Likewise.
1992 * search.c: Likewise.
1993 * semantics.c: Likewise.
1995 * typeck.c: Likewise.
1996 * typeck2.c: Likewise.
1998 2013-03-21 Jakub Jelinek <jakub@redhat.com>
2001 * pt.c (convert_nontype_argument): Count werrorcount as warnings.
2002 * call.c (build_temp): Likewise.
2003 * method.c (synthesize_method): Likewise.
2004 * typeck.c (convert_for_initialization): Likewise.
2006 2013-03-21 Marc Glisse <marc.glisse@inria.fr>
2008 * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
2010 2013-03-21 Richard Biener <rguenther@suse.de>
2012 * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
2013 DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2015 2013-03-20 Jason Merrill <jason@redhat.com>
2018 * parser.c (cp_parser_late_return_type_opt): Save and restore
2019 current_class_ptr/ref.
2022 * expr.c (cplus_expand_constant): Do nothing if the class is
2024 * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
2025 * typeck2.c (store_init_value): Use reduced_constant_expression_p.
2026 * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
2027 (complete_vars): Likewise.
2029 * name-lookup.c (get_anonymous_namespace_name): Never use
2030 get_file_function_name.
2032 * pt.c (retrieve_specialization): Handle null tmpl argument.
2036 * pt.c (tsubst_decl): Check return value of register_specialization.
2037 * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
2040 2013-03-17 Jason Merrill <jason@redhat.com>
2044 * parser.c (cp_parser_direct_declarator): Bail if we see a
2045 qualified-id not at namespace scope.
2049 * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
2052 2013-03-16 Jason Merrill <jason@redhat.com>
2054 * decl.c (grokdeclarator): Assert that we won't see a pointer to
2058 * cp-tree.h (WILDCARD_TYPE_P): Split out from...
2059 (MAYBE_CLASS_TYPE_P): ...here.
2060 * semantics.c (lambda_capture_field_type): Only build a
2061 magic decltype for wildcard types.
2062 (lambda_proxy_type): Likewise.
2063 (finish_non_static_data_member): Get the quals from
2067 * parser.c (cp_parser_template_argument): Don't
2068 fold_non_dependent_expr.
2070 * parser.c (cp_parser_lambda_declarator_opt): Use
2071 cp_parser_trailing_type_id.
2074 * parser.c (cp_parser_template_id): Don't forget access checks.
2077 * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
2081 * name-lookup.h (tag_scope): Add ts_lambda.
2082 * semantics.c (begin_lambda_type): Use it.
2083 * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
2084 * pt.c (check_default_tmpl_args): Ignore lambdas.
2085 (push_template_decl_real): Handle lambdas.
2086 * tree.c (no_linkage_check): Adjust lambda check.
2089 * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
2092 * parser.c (cp_parser_direct_declarator): Fix late return
2093 for out-of-class defn of member function.
2096 * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
2097 parms to avoid duplicate -Wshadow warnings.
2099 * search.c (lookup_base): Handle NULL_TREE.
2102 * semantics.c (potential_constant_expression_1): Use of 'this' in
2103 a non-constexpr function makes the expression not potentially
2108 * cp-tree.h (tsubst_flags): Add tf_decltype.
2109 * call.c (build_cxx_call): Don't build a temporary if it's set.
2110 (build_over_call): Make sure it's only passed to build_cxx_call.
2111 * parser.c (cp_parser_primary_expression): Add decltype_p parm.
2112 (cp_parser_unary_expression): Likewise.
2113 (cp_parser_cast_expression): Likewise.
2114 (cp_parser_binary_expression): Likewise.
2115 (cp_parser_assignment_expression): Likewise.
2116 (cp_parser_postfix_expression): Likewise. Pass tf_decltype.
2117 (cp_parser_expression): Add decltype_p. Force a
2118 temporary for a call on the LHS of a comma.
2119 (cp_parser_decltype): Pass true to decltype_p parms.
2120 * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
2121 (tsubst_copy_and_build): Pass tf_decltype down only for
2122 CALL_EXPR and the RHS of COMPOUND_EXPR.
2123 * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
2125 * cp-tree.h (abstract_class_use): New enum.
2126 * typeck2.c (pending_abstract_type): Add use field.
2127 (abstract_virtuals_error_sfinae): Add overloads taking
2128 abstract_class_use instead of tree.
2129 * typeck.c (build_static_cast_1): Call it.
2130 * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
2131 * pt.c: Adjust calls.
2132 * decl.c (cp_finish_decl): Don't handle functions specially.
2133 (grokdeclarator): Always check return type.
2134 * init.c (build_new_1): Adjust call.
2138 * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
2139 * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
2142 * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
2143 (tsubst_arg_types): Likewise.
2147 * call.c (convert_like_real): Check for explicit constructors
2148 even for value-initialization.
2151 * pt.c (convert_nontype_argument): Handle invalid pointer.
2153 * parser.c (cp_parser_lambda_expression): Use nreverse.
2157 * pt.c (instantiate_class_template_1): Instantiate lambda capture
2159 (tsubst_copy_and_build): Not here.
2162 * method.c (walk_field_subobs): Disallow copy of rvalue ref.
2165 * parser.c (parsing_nsdmi): New.
2166 * semantics.c (outer_automatic_var_p): Check it.
2167 (finish_id_expression): Likewise.
2168 * cp-tree.h: Declare it.
2171 * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
2173 * parser.c (lookup_literal_operator): Correct parm/arg naming
2177 * pt.c (fold_non_dependent_expr_sfinae): Check
2178 instantiation_dependent_expression_p.
2181 * class.c (resolve_address_of_overloaded_function): Accept a
2182 reference to function for target_type.
2183 (instantiate_type): Likewise.
2184 * pt.c (convert_nontype_argument): Pass it to
2185 convert_nontype_argument_function.
2187 2013-03-16 Jakub Jelinek <jakub@redhat.com>
2189 * tree.c (cp_tree_equal): Fix a pasto.
2192 * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
2193 pass op1 through maybe_constant_value first.
2195 2013-03-16 Paolo Carlini <paolo.carlini@oracle.com>
2198 * semantics.c (cxx_eval_array_reference): Check for negative index.
2200 2013-03-14 Jason Merrill <jason@redhat.com>
2203 * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
2206 * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
2207 dso_handle parm on targets without __cxa_atexit.
2209 2013-03-11 Jason Merrill <jason@redhat.com>
2212 * typeck.c (check_return_expr): Disallow returning init list here.
2213 * semantics.c (apply_deduced_return_type): Not here.
2215 2013-03-08 Paolo Carlini <paolo.carlini@oracle.com>
2218 * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
2219 * error.c (dump_expr): Likewise.
2221 2013-03-08 Jason Merrill <jason@redhat.com>
2224 * class.c (modify_all_vtables): Mangle the vtable name before
2227 * semantics.c (lambda_expr_this_capture): In unevaluated context,
2228 just return the nearest 'this'.
2233 * tree.c (maybe_dummy_object): Don't capture 'this'.
2234 * semantics.c (maybe_resolve_dummy): New.
2235 (finish_non_static_data_member): Use it.
2236 (finish_qualified_id_expr): Don't test is_dummy_object.
2237 * cp-tree.h: Declare maybe_resolve_dummy.
2238 * call.c (build_new_method_call_1): Use it.
2241 * semantics.c (apply_deduced_return_type): Don't allow returning
2242 std::initializer_list.
2244 2013-03-06 Paolo Carlini <paolo.carlini@oracle.com>
2247 * parser.c (cp_parser_elaborated_type_specifier): Don't call
2248 check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
2249 * decl.c (check_elaborated_type_specifier): Tidy.
2251 2013-03-06 Jakub Jelinek <jakub@redhat.com>
2254 * tree.c (strip_typedefs): Don't copy args if they are NULL.
2256 2013-03-05 Jakub Jelinek <jakub@redhat.com>
2258 * parser.c (cp_parser_braced_list): For {} initialize
2259 *non_constant_p to false.
2261 2013-03-04 Jason Merrill <jason@redhat.com>
2265 * semantics.c (lambda_expr_this_capture): Handle NSDMI
2266 and non-class scopes.
2268 2013-03-01 Paolo Carlini <paolo.carlini@oracle.com>
2270 * decl.c (grokdeclarator): Remove dead code.
2272 2013-02-28 Jason Merrill <jason@redhat.com>
2275 * semantics.c (potential_constant_expression_1): Use
2276 cxx_eval_outermost_constant_expr rather than maybe_constant_value.
2279 * call.c (build_over_call): Avoid virtual lookup in a template.
2281 2013-02-27 Jason Merrill <jason@redhat.com>
2285 * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
2286 of the base name for inheriting ctors.
2287 (push_class_level_binding_1): Remove inheriting ctor handling.
2288 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
2289 * class.c (add_implicitly_declared_members): Adjust.
2291 2013-02-26 David Binderman <dcb314@hotmail.com>
2294 * decl.c (grokdeclarator): Tidy publicp assignment.
2296 2013-02-25 Aldy Hernandez <aldyh@redhat.com>
2299 * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
2300 (build_transaction_expr): Same.
2302 2013-02-25 Jason Merrill <jason@redhat.com>
2305 * pt.c (fn_type_unification): Wait to call push_tinst_level until
2306 we know what args we're looking at.
2309 * semantics.c (potential_constant_expression_1): In C++98, a cast
2310 to non-integral type can't be a constant expression.
2312 2013-02-24 Jakub Jelinek <jakub@redhat.com>
2315 * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
2318 2013-02-22 Jason Merrill <jason@redhat.com>
2321 * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
2322 if we got the wrong number of template parms.
2325 * pt.c (fn_type_unification): Use explicit args in template
2326 instantiation context.
2329 * call.c (can_convert_arg): Discard access checks.
2332 * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
2335 2013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
2338 * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
2339 * cvt.c (ocp_convert): Use the latter.
2340 (cp_convert_to_pointer): Likewise.
2341 * decl.c (check_default_argument): Likewise.
2342 * typeck.c (cp_build_binary_op): Likewise.
2343 * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
2345 2013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
2346 Paolo Carlini <paolo.carlini@oracle.com>
2349 * decl2.c (grokbitfield): Allow scoped enumeration types.
2351 2013-02-15 Jason Merrill <jason@redhat.com>
2354 * semantics.c (finish_id_expression): Also return the identifier
2355 for an outer local static.
2358 * class.c (check_bases_and_members): Deduce noexcept after
2362 * semantics.c (finish_id_expression): In a template, return
2363 the identifier for a constant variable.
2365 2013-02-14 Jason Merrill <jason@redhat.com>
2368 * semantics.c (build_anon_member_initialization): New.
2369 (build_data_member_initialization): Use it.
2372 * decl.c (cp_finish_decl): Force instantiation of an
2373 auto static data member.
2376 * pt.c (unify): A pack expansion that is not the last template
2377 argument makes the entire template argument list non-deduced.
2380 * name-lookup.c (do_class_using_decl): Handle typedefs with
2381 inheriting constructors.
2382 (push_class_level_binding_1): Allow inheriting from template
2383 template parameter, too.
2384 * pt.c (tsubst_decl) [USING_DECL]: Likewise.
2387 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
2388 default argument scope.
2389 * mangle.c (write_name): Likewise.
2392 * error.c (find_typenames_r): Don't walk into a pack expansion.
2394 2013-02-13 Jason Merrill <jason@redhat.com>
2397 * parser.c (cp_parser_member_declaration): Check the declarator
2398 form when detecting a function declaration via typedef.
2401 * pt.c (maybe_process_partial_specialization): A lambda
2402 isn't what's being specialized.
2405 * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
2409 * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
2412 * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
2413 non-zero offsets, too.
2416 * decl.c (build_enumerator): Always convert the value to a
2417 fixed underlying type.
2420 * pt.c (tsubst_copy_and_build): Don't forget any new
2421 captures that arose from use of dependent names.
2423 2013-02-13 Jakub Jelinek <jakub@redhat.com>
2426 * semantics.c (finish_asm_stmt): If input constraints allow
2427 neither register nor memory, try maybe_constant_value to get
2428 a constant if possible.
2430 2013-02-12 Jason Merrill <jason@redhat.com>
2433 * method.c (add_one_base_init): Handle base constructor
2434 taking rvalue reference parm.
2437 * semantics.c (sort_constexpr_mem_initializers): Handle
2440 2013-02-09 Jason Merrill <jason@redhat.com>
2443 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
2444 maybe_instantiate_noexcept.
2447 * pt.c (eq_specializations): Set comparing_specializations.
2448 * tree.c (cp_tree_equal): Check it.
2449 * cp-tree.h: Declare it.
2451 * decl.c (decls_match): Check versions later.
2454 * pt.c (build_non_dependent_expr): Don't try to fold
2455 instantiation-dependent expressions.
2456 (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
2457 [BIND_EXPR]: Treat as dependent.
2459 2013-02-07 Jakub Jelinek <jakub@redhat.com>
2462 * init.c (build_vec_init): Don't append NULL values into new_vec.
2463 (build_zero_init_1): Don't push anything into v if recursive call
2465 (build_value_init_noctor): Don't push anything into v if
2466 build_value_init call returned NULL_TREE.
2469 * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
2470 (cp_parser_tokens_start_cast_expression): ... this. Change parameter
2471 to cp_parser *, call cp_lexer_peek_token first. For CPP_OPEN_PAREN,
2472 return true only if 2nd token isn't CPP_CLOSE_PAREN.
2473 (cp_parser_cast_expression): Adjust caller.
2476 * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
2477 only if DECL_DISCRIMINATOR_SET_P (t) rather than just
2478 DECL_LANG_SPECIFIC (t).
2480 2013-02-07 Jason Merrill <jason@redhat.com>
2483 * method.c (do_build_copy_constructor): Don't bother turning
2484 scalars from lvalues to xvalues.
2485 (do_build_copy_assign): Likewise.
2487 2013-02-06 Jason Merrill <jason@redhat.com>
2489 * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
2491 2013-02-05 Jason Merrill <jason@redhat.com>
2494 * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
2498 * decl.c (start_preparsed_function): Update restype if we change
2502 * pt.c (fn_type_unification): Discard any access checks from
2503 substituting explicit args.
2505 2013-01-31 Jason Merrill <jason@redhat.com>
2509 * typeck.c (get_member_function_from_ptrfunc): Fix
2510 ptrmemfunc_vbit_in_delta case.
2512 2013-01-29 Jason Merrill <jason@redhat.com>
2515 * class.c (build_ctor_vtbl_group): Give construction vtables
2518 2013-01-25 Jason Merrill <jason@redhat.com>
2521 * pt.c (convert_nontype_argument_function): Handle invalid input.
2522 (convert_nontype_argument): Likewise.
2525 * typeck.c (get_member_function_from_ptrfunc): Optimize if the
2526 dynamic type has no virtual functions.
2528 2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
2531 * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
2532 on TARGET_EXPR nodes.
2534 2013-01-22 Jason Merrill <jason@redhat.com>
2537 * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
2539 2013-01-22 Dodji Seketeli <dodji@redhat.com>
2542 * pt.c (argument_pack_element_is_expansion_p)
2543 (make_argument_pack_select, use_pack_expansion_extra_args_p)
2544 (gen_elem_of_pack_expansion_instantiation): New static functions.
2545 (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
2546 look through the possibly resulting pack expansion as well.
2547 (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
2548 generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
2549 Use gen_elem_of_pack_expansion_instantiation to build the
2550 instantiation piece-wise. Don't use arg_from_parm_pack_p anymore,
2551 as gen_elem_of_pack_expansion_instantiation and the change in
2552 tsubst above generalize this particular case.
2553 (arg_from_parm_pack_p): Remove this for it's not used by
2554 tsubst_pack_expansion anymore.
2556 2013-01-21 Jason Merrill <jason@redhat.com>
2559 * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
2560 template args count.
2562 2013-01-18 Jason Merrill <jason@redhat.com>
2565 * decl2.c (get_local_tls_init_fn): New.
2566 (get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
2567 with aliases for internal variables. Don't use weakrefs if
2568 the variable needs destruction.
2569 (generate_tls_wrapper): Mark the wrapper as const if no
2570 initialization is needed.
2571 (handle_tls_init): Don't require aliases.
2573 2013-01-15 Dodji Seketeli <dodji@redhat.com>
2576 * pt.c (coerce_innermost_template_parms): New static function.
2577 (instantiate_alias_template): Use it here.
2579 2013-01-09 Jason Merrill <jason@redhat.com>
2582 * rtti.c (build_typeid, get_typeid): Add complain parm.
2583 (get_tinfo_decl_dynamic): Likewise.
2584 * cp-tree.h, parser.c, pt.c: Adjust.
2587 * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
2590 2013-01-09 Jakub Jelinek <jakub@redhat.com>
2593 * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
2594 call maybe_constant_value for the negative or too big shift
2597 2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
2600 * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
2601 of the argument is true.
2603 2013-01-08 Joel Brobecker <brobecker@adacore.com>
2605 * parser.c (cp_parser_initializer_list): Move declaration
2606 of variable non_const to start of lexical block.
2608 2013-01-07 Jason Merrill <jason@redhat.com>
2611 * tree.c (build_aggr_init_expr): Do nothing in a template.
2612 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
2613 a FUNCTION_DECL before tsubsting.
2615 2013-01-04 Dodji Seketeli <dodji@redhat.com>
2618 * pt.c (check_instantiated_arg): Allow type template arguments.
2620 2013-01-04 Jason Merrill <jason@redhat.com>
2623 * decl.c (reset_type_linkage, bt_reset_linkage): New.
2624 (grokdeclarator): Use reset_type_linkage.
2625 * name-lookup.c (binding_table_foreach): Handle null table.
2626 * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
2628 2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
2630 PR c++/54526 (again)
2631 * parser.c (cp_parser_template_id): Revert core of previous change
2632 (keep adjusted inform message).
2634 2013-01-03 Jason Merrill <jason@redhat.com>
2638 * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
2642 * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
2645 * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
2648 * call.c (type_has_extended_temps): New.
2649 * cp-tree.h: Declare it.
2650 * decl.c (check_initializer): Use build_aggr_init for arrays
2652 * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
2654 2013-01-02 Jason Merrill <jason@redhat.com>
2657 * call.c (build_new_method_call_1): Don't use build_value_init for
2658 user-provided default constructors.
2660 * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
2664 * tree.c (build_cplus_array_type): Copy layout information
2665 to main variant if necessary.
2667 Copyright (C) 2013 Free Software Foundation, Inc.
2669 Copying and distribution of this file, with or without modification,
2670 are permitted in any medium without royalty provided the copyright
2671 notice and this notice are preserved.