c-pretty-print.h (c_pretty_printer::postfix_expression): Now a virtual member function.
[official-gcc.git] / gcc / cp / ChangeLog
blobcfc7dd997a87f595f2560b22842dfe682b4651a0
1 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3         * cxx-pretty-print.h (cxx_pretty_printer::postfix_expression):
4         Declare as overrider.
5         * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
6         Rename from pp_cxx_postfix_expression.  Adjust.
7         (pp_cxx_expression): Use pp_postfix_expression.
8         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
9         postfix_expression.
11 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
13         * cxx-pretty-print.h (cxx_pretty_printer::primary_expression): Now
14         an overrider of c_pretty_printer::primary_expression.
15         * cxx-pretty-print.c (cxx_pretty_printer::primary_expression):
16         Rename from pp_cxx_primary_expression.  Adjust.
17         (pp_cxx_postfix_expression): Use pp_primary_expression.
18         (pp_cxx_ctor_initializer): Likewise.
19         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
20         primary_expression.
22 2013-08-23  Jan Hubicka  <jh@suse.cz>
24         * cp-tree.h (struct lang_type_class): Free is_final bit.
25         (CLASSTYPE_FINAL): Define using TYPE_FINAL_P.
26         (DECL_FINAL_P): Remove.
27         * pt.c (instantiate_class_template_1): Guard that CLASSTYPE_FINAL
28         is called on CLASS_TYPE_P.
30 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
32         * cxx-pretty-print.c (M_): Remove.
33         (pp_cxx_unqualified_id): Use translate_string instead of M_.
34         (pp_cxx_canonical_template_parameter): Likewise.
36 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
38         * cxx-pretty-print.h (cxx_pretty_printer::id_expression): Declare.
39         * cxx-pretty-print.c (cxx_pretty_printer::id_expression): Rename
40         from pp_cxx_id_expression.  Adjust.
41         (pp_cxx_userdef_literal): Use pp_id_expression.
42         (pp_cxx_primary_expression): Likewise.
43         (pp_cxx_direct_declarator): Likewise.
44         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
45         id_expression.
47 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
49         * cxx-pretty-print.h (cxx_pretty_printer::constant): Now a member
50         function, overriding c_pretty_printer::constant.
51         * cxx-pretty-print.c (cxx_pretty_printer::constant): Rename from
52         pp_cxx_constant.  Adjust.
53         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to constant.
55 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutiobs.net>
57         * cp-objcp-common.c (cxx_initialize_diagnostics): Call a
58         destructor for the early printer.
59         * error.c (type_to_string): Use pp_buffer.
61 2013-08-22  Paolo Carlini  <paolo.carlini@oracle.com>
63         PR c++/56380
64         * class.c (check_field_decls): Check for const mutable and const
65         reference data members.
67 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
69         * error.c (init_error): Remove calls to pp_construct and
70         pp_cxx_pretty_printer_init.  Initialize cxx_pp with placement-new.
71         * cxx-pretty-print.h (cxx_pretty_printer::cxx_pretty_printer): Declare.
72         (cxx_pretty_printer_init): Remove.
73         * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer):
74         Rename from cxx_pretty_printer_init.  Adjust.
75         * cp-objcp-common.c (cxx_initialize_diagnostics): Simplify
76         initialization of C++ diagnostics pretty printer.
78 2013-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
80         * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
81         * cp-tree.h (REFERENCE_REF_P): Likewise.
82         * semantics.c (finish_offsetof): Likewise.
84 2013-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
86         PR c++/56130
87         * semantics.c (finish_id_expression): Handle deprecated references.
89 2013-08-20  Jason Merrill  <jason@redhat.com>
91         PR c++/58119
92         * cvt.c (build_expr_type_conversion): Don't complain about a
93         template that can't match the desired type category.
95 2013-08-20  Gabriel Dos Reis  <gdr@integrable-solutions.net>
97         * error.c (pp_ggc_formatted_text): New.
98         (type_as_string): Use it in lieu of pp_formatted_text.
99         (type_as_string_translate): Likewise.
100         (expr_as_string): Likewise.
101         (decl_as_string): Likewise.
102         (decl_as_string_translate): Likewise.
103         (lang_decl_name): Likewise.
104         (decl_to_string): Likewise.
105         (expr_to_string): Likewise.
106         (fndecl_to_string): Likewise.
107         (parm_to_string): Likewise.
108         (type_to_string): Likewise.
109         (args_to_string): Likewise.
110         (subst_to_string): Likewise.
112 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
114         PR c/57490
115         * cp-array-notation.c (cp_expand_cond_array_notations): Added a
116         check for truth values.
117         (expand_array_notation_exprs): Added truth values case.  Removed an
118         unwanted else.  Added for-loop to walk through subtrees in default
119         case.
120         * call.c (build_cxx_call): Inherited the type of the array notation for
121         certain built-in array notation functions.
123 2013-08-19  Paolo Carlini  <paolo.carlini@oracle.com>
125         * parser.c (cp_parser_lambda_introducer, cp_parser_decltype_expr):
126         Use cp_parser_lookup_name_simple.
128 2013-08-19  Paolo Carlini  <paolo.carlini@oracle.com>
130         * name-lookup.h (pop_bindings_and_leave_scope): Declare.
131         * name-lookup.c (pop_bindings_and_leave_scope): Define.
132         * parser.c (cp_parser_lambda_declarator_opt,
133         cp_parser_direct_declarator, cp_parser_cache_defarg): Use it.
135 2013-08-17  Jason Merrill  <jason@redhat.com>
137         PR c++/58083
138         * name-lookup.c (push_class_level_binding_1): It's OK to push a
139         lambda type after the enclosing type is complete.
141 2013-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
143         * error.c (dump_scope): Add a cxx_pretty_printer parameter.
144         Adjust callers.
145         (dump_template_argument): Likewise.
146         (dump_template_argument_list): Likewise.
147         (dump_template_parameter): Likewise.
148         (dump_template_bindings): Likewise.
149         (dump_alias_template_specialization): Likewise.
150         (dump_type): Likewise.
151         (dump_typename): Likewise.
152         (dump_aggr_type): Likewise.
153         (dump_type_prefix): Likewise.
154         (dump_type_suffix): Likewise.
155         (dump_global_iord): Likewise.
156         (dump_simple_decl): Likewise.
157         (dump_decl): Likewise.
158         (dump_template_decl): Likewise.
159         (dump_function_decl): Likewise.
160         (dump_parameters): Likewise.
161         (dump_ref_qualifier): Likewise.
162         (dump_exception_spec): Likewise.
163         (dump_function_name): Likewise.
164         (dump_template_parms): Likewise.
165         (dump_call_expr_args): Likewise.
166         (dump_aggr_init_expr_args): Likewise.
167         (dump_expr_list): Likewise.
168         (dump_expr_init_vec): Likewise.
169         (dump_expr): Likewise.
170         (dump_binary_op): Likewise.
171         (dump_unary_op): Likewise.
173 2013-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
175         PR c++/51912
176         * cp-tree.h (LOOKUP_NO_NON_INTEGRAL): Add.
177         * decl.c (case_conversion): Use it.
178         * call.c (standard_conversion): Likewise.
179         (implicit_conversion): Adjust.
181 2013-08-13  Adam Butcher  <adam@jessamine.co.uk>
183         * pt.c: Grammar fix in comments ("it's" to "its").
185 2013-08-12  Paolo Carlini  <paolo.carlini@oracle.com>
187         * decl.c (warn_extern_redeclared_static, duplicate_decls,
188         check_elaborated_type_specifier): Use error + inform.
189         * friend.c (make_friend_class): Likewise.
190         * semantics.c (finish_id_expression): Likewise.
192 2013-08-09  Paolo Carlini  <paolo.carlini@oracle.com>
194         Revert:
195         2013-08-07  Paolo Carlini  <paolo.carlini@oracle.com>
197         PR c++/46206
198         * name-lookup.c (lookup_name_real_1): Handle iter->type before
199         iter->value.
201 2013-08-07  Paolo Carlini  <paolo.carlini@oracle.com>
203         PR c++/46206
204         * name-lookup.c (lookup_name_real_1): Handle iter->type before
205         iter->value.
207 2013-08-06  Caroline Tice  <cmtice@google.com>
209         * Make-lang.in (*CXX_AND_OBJCXX_OBJS):  Add vtable-class-hierarchy.o to
210         list.
211         (vtable-class-hierarchy.o): Add build rule.
212         * cp-tree.h (vtv_start_verification_constructor_init_function): New
213         extern function decl.
214         (vtv_finish_verification_constructor_init_function): New extern
215         function decl.
216         (build_vtbl_address): New extern function decl.
217         (get_mangled_vtable_map_var_name): New extern function decl.
218         (vtv_compute_class_hierarchy_transitive_closure): New extern function
219         decl.
220         (vtv_generate_init_routine): New extern function decl.
221         (vtv_save_class_info): New extern function decl.
222         (vtv_recover_class_info): New extern function decl.
223         (vtv_build_vtable_verify_fndecl): New extern function decl.
224         * class.c (finish_struct_1): Add call to vtv_save_class_info if
225         flag_vtable_verify is true.
226         * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list.
227         * vtable-class-hierarchy.c: New file.
228         * mangle.c (get_mangled_vtable_map_var_name):  New function.
229         * decl2.c (start_objects): Update function comment.
230         (cp_write_global_declarations):  Call vtv_recover_class_info,
231         vtv_compute_class_hierarchy_transitive_closure and
232         vtv_build_vtable_verify_fndecl, before calling
233         finalize_compilation_unit, and call vtv_generate_init_rount after, IFF
234         flag_vtable_verify is true.
235         (vtv_start_verification_constructor_init_function): New function.
236         (vtv_finish_verification_constructor_init_function): New function.
237         * init.c (build_vtbl_address): Remove static qualifier from function.
239 2013-08-06  Jason Merrill  <jason@redhat.com>
241         PR c++/57825
242         * tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.
244 2013-08-05  Paolo Carlini  <paolo.carlini@oracle.com>
246         PR c++/58080
247         * typeck.c (cp_pointer_int_sum): Add tsubst_flags_t parameter.
248         (cp_build_binary_op): Adjust.
250 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
252         * cxx-pretty-print.h (pp_c_base): Remove.
253         (cxx_pretty_printer): Derive from c_pretty_printer.
254         Adjust macros using pp_c_base.
255         * cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base.
256         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise.
257         (pp_cxx_colon_colon): Likewise.
258         (pp_cxx_separate_with): Likewise.
259         (pp_cxx_storage_class_specifier): Do not call pp_c_base.
260         (pp_cxx_expression_list): Likewise.
261         (pp_cxx_space_for_pointer_operator): Likewise.
262         (pp_cxx_init_declarator): Likewise.
263         (pp_cxx_call_argument_list): Likewise.
264         (pp_cxx_constant): Likewise.
265         (pp_cxx_postfix_expression): Likewise.
266         (pp_cxx_new_expression): Likewise.
267         (pp_cxx_unary_expression): Likewise.
268         (pp_cxx_cast_expression): Likewise.
269         (pp_cxx_conditional_expression): Likewise.
270         (pp_cxx_assignment_expression): Likewise.
271         (pp_cxx_expression): Likewise.
272         (pp_cxx_function_specifier): Likewise.
273         (pp_cxx_decl_specifier_seq): Likewise.
274         (pp_cxx_simple_type_specifier): Likewise.
275         (pp_cxx_type_specifier_seq): Likewise.
276         (pp_cxx_ptr_operator): Likewise.
277         (pp_cxx_parameter_declaration_clause): Likewise.
278         (pp_cxx_direct_declarator): Likewise.
279         (pp_cxx_direct_abstract_declarator): Likewise.
280         (pp_cxx_type_id): Likewise.
281         (pp_cxx_statement): Likewise.
282         (pp_cxx_pretty_printer_init): Tidy.
283         * error.c (init_error): Do not use pp_base.
284         (dump_aggr_type): Likewise.
285         (dump_type_prefix): Likewise.
286         (dump_type_suffix): Likewise.
287         (dump_global_iord): Likewise.
288         (dump_decl): Likewise.
289         (dump_function_decl): Likewise.
290         (dump_ref_qualifier): Likewise.
291         (reinit_cxx_pp): Likewise.
292         (decl_as_dwarf_string): Likewise.
293         (lang_decl_dwarf_name): Likewise.
294         (type_to_string): Likewise.
295         (cv_to_string): Likewise.
296         (cxx_print_error_function): Likewise.
297         (cp_diagnostic_starter): Likewise.
298         (cp_diagnostic_finalizer): Likewise.
299         (cp_print_error_function): Likewise.
300         (print_instantiation_context): Likewise.
301         (cp_printer): Likewise.
303 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
305         * error.c (dump_type_prefix): Use specialized pretty printer
306         functions instead of pp_string or operators and punctuators.
307         (dump_decl): Likewise.
308         (dump_expr): Likewise.
310 2013-08-03  Jason Merrill  <jason@redhat.com>
312         DR 1286
313         * pt.c (get_underlying_template): New.
314         (convert_template_argument, lookup_template_class_1): Use it.
316         DR 1430
317         PR c++/51239
318         * pt.c (pack_expansion_args_count): Rename from
319         any_pack_expanson_args_p.
320         (coerce_template_parms): Reject pack expansion to
321         non-pack template parameter of alias template.
323 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
325         * error.c (dump_aggr_type): Use specialized pretty printer
326         functions instead of pp_character.
327         (dump_type_prefix): Likewise.
328         (dump_simple_decl): Likewise.
329         (type_to_string): Likewise.
331 2013-08-02  Paolo Carlini  <paolo.carlini@oracle.com>
333         * cp-tree.h (finish_stmt): Do not declare.
334         * decl.c (finish_stmt): Do not define.
335         * parser.c (cp_parser_expression_statement,
336         cp_parser_declaration_statement,
337         cp_parser_transaction_cancel): Don't call finish_stmt.
338         * semantics.c (finish_expr_stmt, finish_if_stmt,
339         finish_while_stmt, finish_do_stmt, finish_return_stmt,
340         finish_for_stmt, finish_switch_stmt, finish_compound_stmt,
341         finish_transaction_stmt): Likewise.
343 2013-08-01  Fabien Chêne  <fabien@gcc.gnu.org>
345         PR c++/54537
346         * cp-tree.h: Check OVL_USED with OVERLOAD_CHECK.
347         * name-lookup.c (do_nonmember_using_decl): Make sure we have an
348         OVERLOAD before calling OVL_USED. Call diagnose_name_conflict
349         instead of issuing an error without mentioning the conflicting
350         declaration.
352 2013-07-31  Paolo Carlini  <paolo.carlini@oracle.com>
354         * parser.c (cp_parser_sizeof_pack): Check cp_parser_identifier
355         return value for error_mark_node.
357 2013-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
359         PR c++/57673
360         * parser.c (cp_parser_cache_defarg): In an NSDMI don't stop when
361         token->type == CPP_ELLIPSIS.
363 2013-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
365         PR c++/57947
366         * call.c (is_std_init_list): Return false if cxx_dialect == cxx98.
368 2013-07-29  Jason Merrill  <jason@redhat.com>
370         PR c++/57901
371         * semantics.c (build_data_member_initialization, constexpr_fn_retval):
372         Use break_out_target_exprs instead of unshare_expr.
374 2013-07-29  Paolo Carlini  <paolo.carlini@oracle.com>
376         PR c++/57948
377         * call.c (initialize_reference): Don't crash when reference_binding
378         returns a conv with conv->kind == ck_ambig.
380 2013-07-29  Jason Merrill  <jason@redhat.com>
382         * mangle.c (write_name): Check for null context.
383         (write_unscoped_name): Allow PARM_DECL context.
385 2013-07-25  Paolo Carlini  <paolo.carlini@oracle.com>
387         PR c++/57981
388         * decl.c (check_default_argument): Take a tsubst_flags_t parameter.
389         (grokparms): Adjust.
390         * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
391         * pt.c (tsubst_default_argument, tsubst_default_arguments): Take
392         a tsubst_flags_t parameter.
393         (tsubst_decl): Adjust.
394         * call.c (convert_default_arg): Likewise.
395         * cp-tree.h (check_default_argument, tsubst_default_argument):
396         Update declarations.
398 2013-07-25  Paolo Carlini  <paolo.carlini@oracle.com>
400         PR c++/57880
401         * parser.c (cp_parser_operator, case CPP_WSTRING, CPP_STRING16,
402         CPP_STRING32, CPP_UTF8STRING, CPP_WSTRING_USERDEF,
403         CPP_STRING16_USERDEF, CPP_STRING32_USERDEF, CPP_UTF8STRING_USERDEF):
404         Fix string_len management, tidy.
406 2013-07-24  Paolo Carlini  <paolo.carlini@oracle.com>
408         PR c++/57942
409         * typeck.c (ptr_reasonably_similar): Use COMPARE_STRICT if either
410         target type is incomplete; return a bool, not an int.
411         * cp-tree.h (ptr_reasonably_similar): Adjust declaration.
413 2013-07-22  Paolo Carlini  <paolo.carlini@oracle.com>
415         * cp-tree.h (DERIVED_FROM_P): Pass tf_none to lookup_base, not
416         tf_warning_or_error.
418 2013-07-21   Ondřej Bílka  <neleai@seznam.cz>
420         * class.c: Fix typos.
421         * cp-array-notation.c: Likewise.
422         * cp-objcp-common.c: Likewise.
423         * decl.c: Likewise.
424         * init.c: Likewise.
425         * mangle.c: Likewise.
426         * parser.c: Likewise.
427         * pt.c: Likewise.
428         * semantics.c: Likewise.
430 2013-07-14  Adam Butcher  <adam@jessamine.co.uk>
432         * semantics.c (build_lambda_expr),
433         (build_lambda_object), (begin_lambda_type), (lambda_return_type),
434         (lambda_function), (lambda_capture_field_type), (is_capture_proxy),
435         (is_normal_capture_proxy), (insert_capture_proxy),
436         (insert_pending_capture_proxies), (lambda_proxy_type),
437         (build_capture_proxy), (vla_capture_type),
438         (register_capture_members), (add_default_capture),
439         (lambda_expr_this_capture), (maybe_resolve_dummy),
440         (nonlambda_method_basetype), (maybe_add_lambda_conv_op) and
441         (is_lambda_ignored_entity): Moved definitions into ...
442         * lambda.c: ... this new file.
444 2013-07-14  Marc Glisse  <marc.glisse@inria.fr>
446         * call.c (build_conditional_expr_1): Handle the case with 1 vector
447         and 2 scalars. Call save_expr before building a vector.
448         * typeck.c (cp_build_binary_op): Check complain before complaining.
450 2013-07-13  Lubos Lunak  <l.lunak@suse.cz>
452         PR c++/55203
453         * init.c (build_aggr_init): Check for warn_unused attribute.
454         * decl.c (poplevel): Likewise.
456 2013-07-13  Jason Merrill  <jason@redhat.com>
458         PR c++/57402
459         * init.c (build_vec_init): Use {} for arrays of class type.
460         (build_vec_delete): Don't take the address of the array.
462         PR c++/57793
463         * class.c (layout_class_type): Check for too-large class.
465         * call.c (can_convert): Allow user-defined conversions.
466         (can_convert_standard): New.
467         * cp-tree.h: Declare it.
468         * cvt.c (convert_to_reference): Use it.
469         * pt.c (convert_nontype_argument): Likewise.
470         * search.c (check_final_overrider): Likewise.
471         Don't worry about user-defined conversions.
473 2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
475         PR c++/57869
476         * typeck.c (build_reinterpret_cast_1): With -Wconditionally-supported
477         warn about casting between pointer-to-function and pointer-to-object.
479 2013-07-09  Jason Merrill  <jason@redhat.com>
481         PR c++/57402
482         * init.c (build_vec_init): Don't take shortcuts when initializing
483         a VLA.
485         PR c++/57471
486         * parser.c (cp_parser_sizeof_pack): Clear parser scopes.
488         PR c++/57658
489         * semantics.c (finish_id_expression): Return the id for an
490         unevaluated outer variable.
492         PR c++/57526
493         * semantics.c (lambda_capture_field_type): Build a DECLTYPE_TYPE
494         if the variable type uses 'auto'.
496         PR c++/57437
497         * typeck.c (check_return_expr): Lambda proxies aren't eligible
498         for nrv or return by move.
500         PR c++/57532
501         * parser.c (cp_parser_ref_qualifier_opt): Don't tentatively parse
502         a ref-qualifier in C++98 mode.
504         PR c++/57545
505         * pt.c (convert_nontype_argument) [INTEGER_CST]: Force the
506         argument to have the exact type of the parameter.
508         PR c++/57551
509         * semantics.c (cxx_eval_indirect_ref): Don't try to look through
510         a POINTER_PLUS_EXPR for type punning diagnostic.
512         PR c++/57831
513         * pt.c (tsubst_copy): Handle USING_DECL.
515 2013-07-09  Marc Glisse  <marc.glisse@inria.fr>
517         PR c++/53094
518         * semantics.c (cxx_eval_bit_field_ref): Handle VECTOR_CST.
520 2013-07-09  Marc Glisse  <marc.glisse@inria.fr>
522         PR c++/53000
523         * call.c (build_conditional_expr_1): Preserve xvalues.
525 2013-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
527         PR c++/51786
528         * parser.c (cp_parser_simple_declaration): Before calling shadow_tag
529         also check declares_class_or_enum.
531 2013-07-08  Jason Merrill  <jason@redhat.com>
533         PR c++/57550
534         * pt.c (fn_type_unification): Only defer during substitution.
535         (type_unification_real): Defer during defarg substitution,
536         add checks parm to pass back deferred checks.
537         (unify, do_auto_deduction): Adjust.
538         * semantics.c (reopen_deferring_access_checks): New.
539         * cp-tree.h: Declare it.
541 2013-07-06  Paolo Carlini  <paolo.carlini@oracle.com>
543         PR c++/28262
544         * parser.c (cp_parser_init_declarator): If we are parsing a typedef
545         set parser->default_arg_ok_p to false before cp_parser_declarator.
547 2013-07-05  Paolo Carlini  <paolo.carlini@oracle.com>
549         PR c++/14263
550         * class.c (build_base_path): Improve diagnostic.
552 2013-07-04  Paolo Carlini  <paolo.carlini@oracle.com>
554         PR c++/38634
555         * decl.c (start_preparsed_function): Return a bool, false if
556         push_template_decl fails.
557         (start_function): Adjust.
558         * cp-tree.h: Update.
560 2013-07-03  Jakub Jelinek  <jakub@redhat.com>
562         PR c++/57771
563         * parser.c (cp_parser_postfix_expression) <case RID_STATCAST>
564         Temporarily set parser->greater_than_is_operator_p for
565         cp_parser_expression and restore from saved value afterwards.
567 2013-06-28  Ed Smith-Rowland  <3dw4rd@verizon.net>
569         * cp-tree.h (UDLIT_OP_ANSI_PREFIX): Remove space.
570         * parser.c (cp_parser_operator()): Parse user-defined string
571         literal as literal operator.
573 2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>
575         PR c++/57645
576         * class.c (deduce_noexcept_on_destructors): Save, set, and restore
577         TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
578         destructors.
580 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
582         * parser.c (cp_parser_array_notation): Removed rejection array notation
583         of type function pointers. Added handling of array expressions when
584         Cilk Plus is enabled.  Took out type-checking.
585         (cp_parser_postfix_open_square_expression): Moved normal array expr.
586         parsing into cp_parser_array_notation when cilkplus is enabled.
587         (cp_parser_compound_statement): Removed expansion of array notations.
588         (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
589         (cp_parser_function_definition_after_declarator): Likewise.
590         (cp_parser_selection_statement): Removed error reporting.
591         (cp_parser_iteration_statement): Likewise.
592         (cp_parser_direct_declarator): Removed error checking/reporting if
593         array notations are used in the declarator.
594         * pt.c (instantiate_decl): Likewise.
595         (type_unification_real): Removed a check for ARRAY_NOTATION_REF.
596         (cxx_eval_constant_expression): Removed ARRAY_NOTATION_REF case.
597         (potential_constant_expression_1): Returned false for
598         ARRAY_NOTATION_REF case.
599         * cp-gimplify.c (cp_genericize): Added expansion of array notation
600         expressions here.
601         * cp-array-notation.c (make_triplet_val_inv): Removed loc and cry 
602         parameters.  Replaced build_decls with get_temp_regvar with type as
603         ptrdiff.
604         (create_array_refs): Made the type-casting to ptrdiff_type.
605         (replace_invariant_var): Added a check for void return type before 
606         creating new var.  Replaced build_decl and build_min_nt_loc with
607         get_temp_regvar.
608         (expand_an_in_modify_expr): Ditto.  Replaced body of redundant else 
609         with gcc_unreachable.  Removed few unwanted checks.  Made induction 
610         variable type as ptrdiff_type.  Removed loc and complain arguments 
611         passed into make_triplet_val_inv.  Replaced all modify expression's 
612         code from NOP EXPR to INIT EXPR.  Replaced all forceful appending 
613         into stmt. list with the non-forceful one.  Replaced some integer 
614         conversion and equality-checking to using tree_int_cst_equal.
615         (expand_sec_reduce_builtin): All changes mentioned in above function
616         expand_an_in_modify_expr.  Made the new variable type of
617         SEC_REDUCE_ANY/ALL_{NON}ZERO intrinsic functions as bool.
618         (expand_array_notation_exprs): Removed SWITCH_EXPR case.  Moved all
619         the error reporting from parser to this function.  Removed unwanted
620         statements and checks from SWITCH_STMT, WHILE_STMT, and DO_STMT cases.
621         (cilkplus_an_triplet_types_ok_p): Removed rejection of array notation
622         in function pointers.
623         (cp_expand_cond_array_notations): Added a new if statements to check
624         if condition has a zero rank.  If so, then just return.
625         (expand_return_expr): Added a check for return expressions with a rank.
626         Replaced get_tmp_regvar with a create_temporary_var.
627         (build_array_notation_ref): Simplified and removed unwanted if-stmts.
628         Moved common code outside if-statements.  Moved type-checking from
629         parser to here.
630         * semantics.c (finish_return_stmt): Removed a check for return exprs.
631         with a rank.
632         * call.c (convert_like_real): Removed a check for array notation
633         expression in a function.
634         (build_over_call): Likewise.
635         (magic_varargs_p): Added a check for builtin array notation function.
636         Made this function non-static and removed its prototype.
637         * cp-tree.h (magic_varargs_p): New prototype.
638         * typeck.c (cp_build_function_call_vec): Removed automatic setting of
639         nargs to the param->length when builtin reduction function is used.
640         (convert_arguments): Replaced check for a constant_p function with
641         margic_varargs_p function call.
642         (cp_build_binary_op): Removed calling of the function
643         find_correct_array_notation_type.
644         (cp_build_addr_expr_1): Removed an unwanted if-statement.
645         (convert_for_assignment): Removed automatic return of rhs when array
646         notation builtin function is used.
648 2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>
650         PR c++/57682
651         * parser.c (cp_parser_save_member_function_body): Handle correctly
652         curly braces in function-try-block mem-initializers.
654 2013-06-27  Marc Glisse  <marc.glisse@inria.fr>
656         PR c++/57509
657         * typeck.c (cp_build_vec_perm_expr): New function.
658         * cp-tree.h: Declare it.
659         * parser.c (cp_parser_postfix_expression): Call it.
660         * pt.c (tsubst_copy): Handle VEC_PERM_EXPR.
661         (tsubst_copy_and_build): Likewise.
663 2013-06-27  Marc Glisse  <marc.glisse@inria.fr>
665         PR c++/57172
666         * pt.c (more_specialized_fn): If both arguments are references,
667         give priority to an lvalue.
669 2013-06-26  Jason Merrill  <jason@redhat.com>
671         * typeck2.c (store_init_value): Diagnose a non-constant
672         initializer for in-class static.
674         PR c++/57408
675         * semantics.c (add_capture): Set type to error_mark_node after
676         error.
678 2013-06-25  Ed Smith-Rowland  <3dw4rd@verizon.net>
680         PR c++/57640
681         * parser.c (cp_parser_unqualified_id): Add declarator_p to checks
682         to trigger warning, (cp_literal_operator_id): Remove bogus TODO comment.
684 2013-06-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
686         * call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x.
687         * class.c (add_implicitly_declared_members): Likewise.
688         (check_field_decl): Likewise.
689         (finalize_literal_type_property): Likewise.
690         (check_bases_and_members): Likewise.
691         * decl.c (poplevel): Likewise.
692         (case_conversion): Likewise.
693         (check_initializer): Likewise.
694         (grokfndecl): Likewise.
695         (check_static_variable_definition): Likewise.
696         (compute_array_index_type): Likewise.
697         (grokdeclarator): Likewise.
698         (build_enumerator): Likewise.
699         * friend.c (make_friend_class): Likewise.
700         * lex.c (init_reswords): Likewise.
701         * method.c (synthesized_method_walk): Likewise.
702         (implicitly_declare_fn): Likewise.
703         * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
704         (cp_parser_constant_expression): Likewise.
705         (cp_parser_for_init_statement): Likewise.
706         (cp_parser_block_declaration): Likewise.
707         (cp_parser_type_name): Likewise.
708         (cp_parser_enum_specifier): Likewise.
709         (cp_parser_enumerator_list): Likewise.
710         (cp_parser_member_declaration): Likewise.
711         (cp_nth_tokens_can_be_std_attribute_p): Likewise.
712         (cp_parser_template_declaration_after_export): Likewise.
713         * pt.c (convert_nontype_argument_function): Likewise.
714         (convert_nontype_argument): Likewise.
715         (convert_template_argument): Likewise.
716         (tsubst_copy_and_build): Likewise.
717         (build_non_dependent_expr): Likewise.
718         * semantics.c (non_const_var_error): Likewise.
719         (potential_constant_expression_1): Likewise.
720         * tree.c (lvalue_kind): Likewise.
721         (build_vec_init_expr): Likewise.
722         (cast_valid_in_integral_constant_expression_p): Likewise.
723         * typeck.c (build_x_conditional_expr): Likewise.
724         * typeck2.c (check_narrowing): Likewise.
726 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
728         * cp-array-notation.c (cp_length_mismatch_in_expr_p): Remove.
729         (expand_an_in_modify_expr): Changed a function call from the above
730         removed function to length_mismatch_in_expr_p.
732 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
734         * call.c (convert_like_real): Added a check if array notation is present
735         in expression.  If so, then no conversion of arguments is necessary.
736         (build_over_call): Likewise.
737         * typeck.c (cp_build_function_call_vec): Likewise.
738         (convert_for_assignment): Likewise.
739         (cp_build_array_ref): Reject array notations with a rank greater than 1
740         as an array's index.
741         (cp_build_binary_op): If array notations are preent in op, then call
742         find_correct_array_notation_type.
743         (cp_build_addr_expr_1): Handle ARRAY_NOTATION_REF similar to ARRAY_REF.
744         * cp-array-notation.c: New file.
745         * cp-objcp-common.c (cp_common_init_ts): Marked ARRAY_NOTATION_REF tree
746         as typed.
747         * cp-tree.h (fix_array_notation_exprs): New prototype.
748         * semantics.c (finish_return_stmt): Reject array notations as
749         return value.
750         (cxx_eval_constant_expression): Added ARRAY_NOTATION_REF case.
751         (potential_constant_expression_1): Likewise.
752         * tree.c (lvalue_kind): Likewise.
753         * error.c (dump_decl): Likewise.
754         (dump_expr): Likewise.
755         * pt.c (ARRAY_NOTATION_REF): Likewise.
756         (type_unification_real): Do not unify any arguments if array notations
757         are found in arg.
758         (instantiate_decl): Added a check for array notaitons inside the
759         function body.  If so, then expand them.
760         * parser.c (cp_parser_array_notation): New function.
761         (cp_parser_postfix_open_square_expression): Added a check for colons
762         inside square braces.  If found, then handle the array access as an
763         array notation access.  Also, disable auto-correction from a single
764         colon to scope when Cilk Plus is enabled.
765         (cp_parser_compound_statement): Added a check for array notations
766         inside the statement.  If found, then expand them.
767         (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
768         (cp_parser_function_definition_after_declarator): Likewise.
769         (cp_parser_selection_statement): Searched for array notations inside
770         condition.  If so, then emit an error.
771         (cp_parser_iteration_statement): Likewise.
772         (cp_parser_direct_declarator): Reject array notations inside a
773         variable or array declaration.
774         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Added cp/cp-array-notation.o.
776 2013-06-20  Jason Merrill  <jason@redhat.com>
778         PR c++/55149
779         * decl.c (compute_array_index_type): Don't reject VLAs in SFINAE
780         context if we're in C++14 mode.
781         * tree.c (array_of_runtime_bound_p): Return true for a dependent
782         bound that is not potentually constant.
783         * cp-tree.h (DECL_VLA_CAPTURE_P, REFERENCE_VLA_OK): New.
784         * pt.c (tsubst) [REFERENCE_TYPE]: Check REFERENCE_VLA_OK.
785         * semantics.c (build_lambda_object): Don't rvalue a VLA capture.
786         (build_capture_proxy): Set REFERENCE_VLA_OK.
787         (vla_capture_type): Make it a proper C++ class.
788         (add_capture): Set DECL_VLA_CAPTURE_P.  Don't pre-digest the
789         initializer.
791         * decl.c (compute_array_index_type): Use size_one_node.
793         * pt.c (process_partial_specialization): Build a TEMPLATE_DECL for
794         a partial specialization.
795         (tsubst_decl): Don't clobber CLASSTYPE_TI_TEMPLATE of a partial
796         specialization.
797         (most_specialized_class): Adjust.
799         * cp-tree.h (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT)
800         (DECL_TEMPLATE_INSTANTIATIONS, DECL_TEMPLATE_SPECIALIZATIONS): Use
801         TEMPLATE_DECL_CHECK.
803 2013-06-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
805         PR c++/57638
806         * pt.c (unify, [TEMPLATE_PARM_INDEX]): Pass to unify_type_mismatch
807         TREE_TYPE (arg), not arg itself.
809 2013-06-18  Paolo Carlini  <paolo.carlini@oracle.com>
811         PR c++/53211
812         * pt.c (type_dependent_expression_p): Handle an array of unknown
813         bound depending on a variadic parameter.
814         * parser.c (cp_parser_range_for): Revert PR56794 changes.
816 2013-06-17  Richard Biener  <rguenther@suse.de>
818         * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h.
820 2013-06-17  Paolo Carlini  <paolo.carlini@oracle.com>
822         PR c++/16128
823         * parser.c (cp_parser_expression_statement): Check whether
824         cp_parser_expression returns error_mark_node.
826 2013-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
828         PR c++/51413
829         * semantics.c (finish_offsetof): Handle INDIRECT_REF as expr.
831 2013-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
833         PR c++/57599
834         * rtti.c (build_dynamic_cast_1): In case of cast to an unambiguous
835         accessible base simply forward to build_static_cast.
837 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
839         PR c++/38958
840         * decl.c (poplevel): For the benefit of -Wunused-variable see
841         through references.
843 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
845         * parser.c (cp_parser_nested_name_specifier_opt): Fix typo in comment.
847 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
849         PR c++/42021
850         * parser.c (cp_parser_nested_name_specifier_opt): Avoid emitting
851         again diagnostic already emitted by cp_parser_lookup_name.
853 2013-06-11  Jan Hubicka  <jh@suse.cz>
855         PR c++/57551
856         * cp/pt.c (mark_decl_instantiated): Do not export explicit
857         instantiations of anonymous namespace templates.
859 2013-06-10  Jason Merrill  <jason@redhat.com>
861         * name-lookup.c (add_decl_to_level): Add decls in an anonymous
862         namespace to static_decls.
864 2013-06-07  Sriraman Tallam  <tmsriram@google.com>
866         PR c++/57548
867         * call.c (build_over_call):  Check if current_function_decl is
868         NULL.
870 2013-06-07  Paolo Carlini  <paolo.carlini@oracle.com>
872         PR c++/53658
873         * pt.c (lookup_template_class_1): Consistently use TYPE_MAIN_DECL,
874         not TYPE_STUB_DECL, to access the _DECL for a _TYPE.
876 2013-06-06  Jason Merrill  <jason@redhat.com>
878         PR c++/55520
879         * semantics.c (add_capture): Diagnose capture of variable-size
880         type that is not a C++1y array of runtime bound.
882         * decl.c (grokdeclarator): Keep a decl with error type.
883         (grokfield, grokbitfield): Likewise.
884         * pt.c (instantiate_class_template_1): Likewise.
885         (tsubst_decl): Drop redundant error.
886         * class.c (walk_subobject_offsets): Handle erroneous fields.
887         * typeck2.c (process_init_constructor_record): Likewise.
889 2013-06-05  Paolo Carlini  <paolo.carlini@oracle.com>
891         PR c++/51908
892         * parser.c (cp_parser_postfix_expression [RID_*CAST]): Set
893         parser->in_type_id_in_expr_p before calling cp_parser_type_id.
895 2013-06-03  Jan Hubicka  <jh@suse.cz>
897         * decl2.c (maybe_make_one_only): Use forced_by_abi instead of
898         mark_decl_referenced.
899         (mark_needed): Likewise.
901 2013-06-03  Jason Merrill  <jason@redhat.com>
903         * class.c (mark_type_abi_tags): New.
904         (check_abi_tags): Use it.
906 2013-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
908         PR c++/57419
909         * decl2.c (mark_used): Add overload taking a tsubst_flags_t too.
910         * semantics.c (finish_qualified_id_expr): Use it.
911         * cp-tree.h: Update.
913 2013-06-01  Jan Hubicka  <jh@suse.cz>
915         * decl2.c (cp_write_global_declarations): Replace same_body_alias
916         by symbol.cpp_implicit_alias.
918 2013-05-30  Jason Merrill  <jason@redhat.com>
920         PR c++/57404
921         * cp-lang.c (cp_classify_record): Handle structs without
922         TYPE_LANG_SPECIFIC.
924         PR c++/52377
925         * class.c (common_enclosing_class): New.
926         * cp-tree.h: Declare it.
927         * init.c (sort_mem_initializers): Don't splice out a union member
928         with an NSDMI.
930 2013-05-29  Jan Hubicka  <jh@suse.cz>
932         * tree.c (cp_fix_function_decl_p): Update for new symtab flags.
933         * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise.
935 2013-05-25  Paolo Carlini  <paolo.carlini@oracle.com>
937         PR c++/25666
938         * decl2.c (check_classfn): Check for destructors declared as member
939         templates.
941 2013-05-24  Jason Merrill  <jason@redhat.com>
943         PR c++/56971
944         * pt.c (any_template_arguments_need_structural_equality_p): A
945         TEMPLATE_TEMPLATE_PARM can require structural type comparison.
947 2013-05-24  Paolo Carlini  <paolo.carlini@oracle.com>
949         PR c++/19618
950         * class.c (check_bitfield_decl): Warn for bool and enum bitfields
951         with width exceeding the type.
953 2013-05-24  Jason Merrill  <jason@redhat.com>
955         PR c++/57391
956         * semantics.c (cxx_eval_constant_expression): Handle FMA_EXPR.
957         (cxx_eval_trinary_expression): Rename from cxx_eval_vec_perm_expr.
959 2013-05-23  Jason Merrill  <jason@redhat.com>
961         PR c++/57388
962         * tree.c (build_ref_qualified_type): Clear
963         FUNCTION_RVALUE_QUALIFIED for lvalue ref-qualifier.
965 2013-05-22  Jason Merrill  <jason@redhat.com>
967         PR c++/56930
968         * call.c (convert_like_real): Use cp_convert_and_check.
969         * cvt.c (cp_convert_and_check): Use maybe_constant_value.
970         * semantics.c (cxx_eval_constant_expression): Handle LTGT_EXPR.
971         (potential_constant_expression_1): Handle OMP_ATOMIC*.
973         PR c++/56915
974         * semantics.c (maybe_add_lambda_conv_op): Give up if the call op
975         isn't defined.
977 2013-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
979         PR c++/57352
980         * parser.c (cp_parser_conversion_type_id): Set up
981         parser->type_definition_forbidden_message before calling
982         cp_parser_type_specifier_seq.
984 2013-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
986         PR c++/57211
987         * method.c (defaultable_fn_check): Avoid do_warn_unused_parameter
988         warnings about defaulted functions.
990 2013-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
992         * call.c (build_conditional_expr_1): Add location_t parameter.
993         (build_conditional_expr): Likewise.
994         * typeck.c (rationalize_conditional_expr, cp_build_array_ref,
995         get_member_function_from_ptrfunc, build_x_conditional_expr,
996         cp_build_modify_expr): Update.
997         * init.c (build_new_1): Likewise.
998         * cp-tree.h: Update declaration.
1000 2013-05-20  Jason Merrill  <jason@redhat.com>
1002         PR c++/57016
1003         * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Only check type2
1004         if there is one.
1006         PR c++/57102
1007         * decl.c (fndecl_declared_return_type): Also look in
1008         DECL_SAVED_FUNCTION_DATA.
1010 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1012         PR c++/12288
1013         * parser.c (cp_parser_parameter_declaration): Check return value
1014         of cp_parser_parse_and_diagnose_invalid_type_name.
1016 2013-05-20  Jason Merrill  <jason@redhat.com>
1018         PR c++/57319
1019         * class.c (vbase_has_user_provided_move_assign): New.
1020         * method.c (synthesized_method_walk): Check it.
1021         * cp-tree.h: Declare it.
1023         PR c++/57325
1024         * tree.c (build_cplus_array_type): Copy layout info if element
1025         type is complete.
1027 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1029         PR c++/23608
1030         * call.c (build_new_op_1): Propagate loc to cp_build_binary_op.
1032 2013-05-20  Jason Merrill  <jason@redhat.com>
1034         PR c++/57317
1035         * decl2.c (determine_visibility): Use PRIMARY_TEMPLATE_P to decide
1036         whether a template has its own args.
1038 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1040         PR c++/57327
1041         * pt.c (unify_no_common_base): Swap arg and parm arguments to inform.
1043 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1045         PR c++/10207
1046         * parser.c (cp_parser_postfix_expression): Use cp_parser_braced_list
1047         instead of cp_parser_initializer_list for compound-literals.
1049 2013-05-20  Marc Glisse  <marc.glisse@inria.fr>
1051         PR c++/57175
1052         * typeck.c (check_return_expr): Reverse the alignment comparison.
1054 2013-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
1056         PR c++/18126
1057         * parser.c (cp_parser_sizeof_operand): As a GNU Extension, parse
1058         correctly sizeof compound-literal; update comments.
1060 2013-05-16  Marc Glisse  <marc.glisse@inria.fr>
1062         * call.c (build_conditional_expr_1): Use cp_build_binary_op
1063         instead of directly calling fold_build2.
1065 2013-05-16  Jason Merrill  <jason@redhat.com>
1067         * Make-lang.in (cc1plus$(exeext)): Use link mutex.
1069         PR c++/57279
1070         * decl.c (grokdeclarator): Allow member function qualifiers in
1071         TYPENAME context in C++11 mode.
1073 2013-05-16  Dodji Seketeli  <dodji@redhat.com>
1075         PR c++/56782 - Regression with empty pack expansions
1076         * pt.c (use_pack_expansion_extra_args_p): When at least a
1077         parameter pack has an empty argument pack, and another parameter
1078         pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
1079         mechanism.
1081 2013-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
1083         * name-lookup.c (pushdecl_maybe_friend_1): Replace pairs of
1084         warning_at and permerror with warning_at/inform and permerror/
1085         inform, respectively.
1087 2013-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
1089         PR c++/31952
1090         * name-lookup.c (pushdecl_maybe_friend_1): Diagnose illegal
1091         redeclarations.
1093 2013-05-14  Jason Merrill  <jason@redhat.com>
1095         PR c++/57243
1096         * parser.c (cp_parser_range_for): Call complete_type.
1098         PR c++/57041
1099         * pt.c (tsubst_copy_and_build): Don't recur into a designator.
1101 2013-05-14  Paolo Carlini  <paolo.carlini@oracle.com>
1103         PR c++/53903
1104         * method.c (defaulted_late_check): Check for compatible exception
1105         specification out of class explicitly defaulted functions too.
1107 2013-05-14  Jason Merrill  <jason@redhat.com>
1109         PR c++/56998
1110         * semantics.c (potential_constant_expression_1): Make sure the
1111         called function is potentially constant.
1112         * call.c (null_ptr_cst_p): Revert earlier change.
1114 2013-05-13  Jason Merrill  <jason@redhat.com>
1116         PR c++/56998
1117         * call.c (null_ptr_cst_p): An expression with side-effects can't
1118         be a C++03 null pointer constant.
1120         PR c++/57041
1121         * decl.c (reshape_init_class): Handle error_mark_node.
1123         PR c++/57254
1124         * typeck.c (merge_types): Propagate ref-qualifier
1125         in METHOD_TYPE case.
1127         PR c++/57253
1128         * decl.c (grokdeclarator): Apply ref-qualifier
1129         in the TYPENAME case.
1131         PR c++/57252
1132         * decl.c (decls_match): Compare ref-qualifiers.
1134 2013-05-10  Jason Merrill  <jason@redhat.com>
1136         PR c++/57196
1137         * pt.c (convert_template_argument): Use dependent_template_arg_p,
1138         not uses_template_parms.
1140         PR c++/57047
1141         * semantics.c (cxx_fold_indirect_ref): Fix thinko.
1143         PR c++/55149
1144         * semantics.c (add_capture): Error rather than abort on copy
1145         capture of VLA.
1146         * typeck.c (maybe_warn_about_returning_address_of_local): Don't
1147         warn about capture proxy.
1149 2013-05-09  Jason Merrill  <jason@redhat.com>
1151         * decl.c (cp_finish_decl): Only check VLA bound in C++1y mode.
1153         PR c++/57222
1154         * pt.c (lookup_template_class_1): Handle getting a template
1155         template parameter as D1.
1157         N3639 C++1y VLA diagnostics
1158         * decl.c (grokdeclarator): Complain about reference, pointer, or
1159         typedef to VLA.
1160         (create_array_type_for_decl): Complain about array of VLA.
1161         * pt.c (tsubst): Likewise.
1162         * rtti.c (get_tinfo_decl): Talk about "array of runtime bound".
1163         * semantics.c (finish_decltype_type): Complain about decltype of VLA.
1164         * typeck.c (cp_build_addr_expr_1): Complain about VLA.
1165         (cxx_sizeof_or_alignof_type): Likewise.
1167         N3639 C++1y VLA support
1168         * decl.c (compute_array_index_type): Allow VLAs in C++1y mode.
1169         (check_array_initializer): Allow VLA init.
1170         (reshape_init_array_1): Adjust.
1171         (cp_finish_decl): Check for invalid VLA length.
1172         * typeck2.c (process_init_constructor_array): Adjust.
1173         (store_init_value): Use build_vec_init for VLAs.
1174         * semantics.c (add_capture): Capture VLA as ptr+len.
1175         (vla_capture_type): New.
1176         (build_capture_proxy): Rebuild the VLA.
1177         * typeck.c (build_simple_component_ref): Split out from...
1178         (build_ptrmemfunc_access_expr): ...here.
1179         * tree.c (array_of_runtime_bound_p): New.
1180         * init.c (throw_bad_array_length): New.
1181         (build_vec_init): Use it.
1182         * parser.c (cp_convert_range_for): When iterating over a VLA,
1183         use it directly rather than bind a reference.
1184         * cp-tree.h: Declare new functions.
1186 2013-05-08  Jason Merrill  <jason@redhat.com>
1188         * except.c (is_admissible_throw_operand_or_catch_parameter): Check
1189         variably_modified_type_p.
1190         (expand_start_catch_block): Mark the typeinfo used here.
1191         * semantics.c (finish_handler_parms): Not here.
1193         * error.c (dump_type_suffix): Try harder on VLA length.
1195         Core 624/N2932
1196         * init.c (throw_bad_array_new_length): New.
1197         (build_new_1): Use it.  Don't warn about braced-init-list.
1198         (build_vec_init): Use it.
1199         * call.c (build_operator_new_call): Use it.
1201         PR c++/57068
1202         * decl.c (grokdeclarator): Warn about ref-qualifiers here.
1203         * parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
1204         * error.c (maybe_warn_cpp0x): s/0x/11/.
1206 2013-05-08  Paolo Carlini  <paolo.carlini@oracle.com>
1208         PR c++/51226
1209         * parser.c (cp_parser_enum_specifier): Handle nested_name_specifier
1210         == error_mark_node.
1212 2013-05-06  Marc Glisse  <marc.glisse@inria.fr>
1214         * typeck.c (cp_build_binary_op): Call save_expr before
1215         build_vector_from_val.
1217 2013-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
1219         PR c++/57183
1220         * decl.c (cp_finish_decl): After do_auto_deduction copy the
1221         qualifers with cp_apply_type_quals_to_decl.
1223 2013-05-05  Paolo Carlini  <paolo.carlini@oracle.com>
1225         * pt.c (convert_nontype_argument): Add missing whitespace in
1226         error message.
1228 2013-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
1230         PR c++/53745
1231         * decl.c (build_enumerator): Improve error message.
1233 2013-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
1235         PR c++/14283
1236         * parser.c (cp_parser_diagnose_invalid_type_name): Improve error
1237         messages for template types and fix column numbers.
1239 2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
1241         PR c++/57132
1242         * pt.c (tsubst_copy_and_build, MODOP_EXPR): Increase / decrease
1243         c_inhibit_evaluation_warnings around build_x_modify_expr call.
1245 2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
1247         PR c++/57092
1248         * semantics.c (finish_decltype_type): Handle instantiated template
1249         non-type arguments.
1251 2013-04-28  Paolo Carlini  <paolo.carlini@oracle.com>
1253         PR c++/56450
1254         * semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
1256 2013-04-26  Jakub Jelinek  <jakub@redhat.com>
1258         * error.c (cp_print_error_function): Adjust file_name_as_prefix
1259         caller.
1261 2013-04-25  Jason Merrill  <jason@redhat.com>
1263         PR c++/56859
1264         * typeck.c (cxx_alignas_expr): Handle value-dependence properly.
1266         PR c++/50261
1267         * init.c (perform_member_init): Call reshape_init.
1269 2013-04-24  Jason Merrill  <jason@redhat.com>
1271         PR c++/53721
1272         * parser.c (cp_parser_postfix_dot_deref_expression): Fix thinko.
1274 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
1276         * typeck.c (cxx_sizeof_or_alignof_type): Change -Wpointer-arith
1277         pedwarn to simply use OPT_Wpointer_arith.
1278         (cp_build_unary_op): Likewise.
1280 2013-04-24  Jason Merrill  <jason@redhat.com>
1282         N3648: init-captures are named.
1283         * semantics.c (add_capture): Don't prepend "__" to init-captures.
1284         (build_capture_proxy): Adjust.
1285         * error.c (dump_simple_decl): Check DECL_NORMAL_CAPTURE_P.
1287         N3648: Allow braced and parenthesized initializers.
1288         * parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer.
1289         * pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE.
1290         * semantics.c (lambda_capture_field_type): Use do_auto_deduction.
1291         (add_capture): Collapse a parenthesized initializer into a single
1292         expression.
1293         * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New.
1295 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
1297         PR c++/56970
1298         * init.c (build_offset_ref): Add tsubst_flags_t parameter.
1299         * semantics.c (finish_qualified_id_expr): Likewise.
1300         (finish_id_expression): Update.
1301         * typeck.c (cp_build_addr_expr_1): Likewise.
1302         * pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
1303         * cp-tree.h: Update declarations.
1305 2013-04-22  Jason Merrill  <jason@redhat.com>
1307         Core 1586
1308         * parser.c (cp_parser_unqualified_id): Handle ~auto.
1309         (cp_parser_pseudo_destructor_name): Likewise.
1310         (cp_parser_postfix_dot_deref_expression): Adjust.
1311         (cp_lexer_nth_token_is_keyword): New.
1312         * semantics.c (finish_pseudo_destructor_expr): Handle ~auto.
1313         * typeck.c (lookup_destructor): Handle ~auto.
1315         * pt.c (fn_type_unification): Push tinst level around
1316         type_unification_real if we aren't explaining.
1317         * cp-tree.h (TFF_NO_TEMPLATE_BINDINGS): New.
1318         * error.c (dump_function_decl): Respect it.
1319         (subst_to_string): Pass it.
1321         PR c++/48665
1322         * rtti.c (get_typeid): Diagnose qualified function type.
1323         * pt.c (tsubst) [POINTER_TYPE]: Likewise.
1325         * error.c (dump_aggr_type): Fix lambda detection.
1326         (dump_simple_decl): Pretty-print capture field.
1328         N3323
1329         * cvt.c (build_expr_type_conversion): Two conversions that return
1330         the same type aren't necessarily ambiguous.
1332         N3648
1333         * parser.c (cp_parser_lambda_introducer): Make lambda capture init
1334         pedwarn unconditional except in C++1y mode.
1336         * semantics.c (potential_constant_expression_1): Don't crash on
1337         'this' in NSDMI.
1339         Core 1612
1340         * semantics.c (finish_id_expression): Reject capture of anonymous
1341         union member.
1343         Core 1609
1344         * decl2.c (check_default_args): Check for pack expansion.
1346         * mangle.c (write_type): Mangle decltype(auto).
1348 2013-04-19  Jason Merrill  <jason@redhat.com>
1350         N3638 changes to return type deduction
1351         * decl.c (undeduced_auto_decl): New.
1352         (require_deduced_type): New.
1353         (fndecl_declared_return_type): New.
1354         (decls_match): Use it.
1355         (duplicate_decls): Don't check for auto return.
1356         (grokdeclarator): Reject virtual auto.
1357         * class.c (resolve_address_of_overloaded_function): Handle
1358         auto function templates.
1359         * decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type.
1360         * cp-tree.h: Declare new fns.
1361         * error.c (dump_function_decl): Use fndecl_declared_return_type.
1362         * search.c (check_final_overrider): Likewise.
1363         * pt.c (make_decltype_auto): New.
1364         (do_auto_deduction): Require plain decltype(auto).
1365         (is_auto): Adjust.
1367         DR 941
1368         * decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
1369         template specializations.
1371 2013-04-16  Ed Smith-Rowland  <3dw4rd@verizon.net>
1373         Implement n3599 - Literal operator templates for strings.
1374         * parser.c (make_string_pack (tree value)): New function.
1375         (cp_parser_userdef_string_literal (cp_token *)): Use it
1376         to construct calls to character string literal operator templates.
1377         (cp_parser_template_declaration_after_export): Check for new string
1378         literal operator template parameter form.
1380 2013-04-15  Jason Merrill  <jason@redhat.com>
1382         * pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build.
1384         PR c++/52748
1385         * pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
1386         rather than a destructor name, it isn't an unqualified-name.
1387         (tsubst_copy_and_build): Pass down decltype_flag to operator
1388         handling code, too.
1390         PR c++/56388
1391         * semantics.c (insert_capture_proxy): Just use index 1 in the
1392         stmt_list_stack.
1394 2013-04-12  Jakub Jelinek  <jakub@redhat.com>
1396         * error.c (cp_print_error_function,
1397         print_instantiation_partial_context_line,
1398         maybe_print_constexpr_context): Colorize locus strings.
1400 2013-04-11  Jason Merrill  <jason@redhat.com>
1402         PR c++/52748
1403         * parser.c (complain_flags): New.
1404         (cp_parser_postfix_expression): Use it.
1405         (cp_parser_unary_expression): Likewise.
1406         (cp_parser_binary_expression): Likewise.
1407         (cp_parser_assignment_expression): Likewise.
1408         (cp_parser_expression): Likewise.
1409         (cp_parser_postfix_open_square_expression): Take decltype_p.
1410         (cp_parser_builtin_offsetof): Adjust.
1411         (cp_convert_range_for): Pass complain to finish_unary_op_expr.
1412         * decl2.c (grok_array_decl): Add decltype_p parm.
1413         * cp-tree.h: Adjust prototype.
1414         * semantics.c (finish_unary_op_expr): Add complain parm.
1416 2013-04-11  Jakub Jelinek  <jakub@redhat.com>
1418         PR c++/56895
1419         * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
1420         calling maybe_constant_value for C++98.
1422 2013-04-11  Jason Merrill  <jason@redhat.com>
1424         PR c++/56901
1425         * semantics.c (lambda_capture_field_type, lambda_proxy_type):
1426         Strip references before checking WILDCARD_TYPE_P.
1428 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
1430         * call.c (build_conditional_expr_1, build_over_call): Protect
1431         error calls with complain & tf_error.
1432         * typeck.c (finish_class_member_access_expr, cp_build_binary_op,
1433         build_x_unary_op, cp_build_unary_op, cp_build_compound_expr,
1434         build_ptrmemfunc): Likewise.
1435         (lookup_destructor): Take tsubst_flags_t parameter, adjust.
1437         * cvt.c (warn_ref_binding): Rename to diagnose_ref_binding.
1438         (convert_to_reference): Adjust.
1440 2013-04-11  Jason Merrill  <jason@redhat.com>
1442         * pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for
1443         local variables, look them up instead.
1444         (tsubst_decl) [VAR_DECL]: Remove handling for anonymous union
1445         proxies and substitution in unevaluated context.
1446         (tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY
1447         before the iterators.
1449         PR c++/23055
1450         * pt.c (uses_deducible_template_parms): New.
1451         (deducible_array_bound, deducible_expression): New.
1452         (deducible_template_args): New.
1453         (unify_one_argument): Call uses_deducible_template_parms.
1455 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
1457         PR c++/56913
1458         * typeck2.c (build_m_component_ref): Protect error calls with
1459         (complain & tf_error).
1461 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
1463         PR c++/54216
1464         * parser.c (cp_parser_enum_specifier): Check for empty
1465         anonymous enums and anonymous scoped enums.
1467 2013-04-10  Jakub Jelinek  <jakub@redhat.com>
1469         PR c++/56895
1470         * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
1471         first before calling maybe_constant_value for warn_for_div_by_zero
1472         or invalid shift count warning purposes.
1474 2013-04-09  Jason Merrill  <jason@redhat.com>
1476         PR c++/25466
1477         * rtti.c (build_typeid): Check the address of the argument
1478         rather than looking for an INDIRECT_REF.
1480 2013-04-04  Jason Merrill  <jason@redhat.com>
1482         PR c++/56838
1483         PR c++/17232
1484         * typeck2.c (abstract_virtuals_error_sfinae): Disable
1485         complete_type again.
1487 2013-04-08  Paolo Carlini  <paolo.carlini@oracle.com>
1489         PR c++/56871
1490         * decl.c (validate_constexpr_redeclaration): Allow an explicit
1491         specialization to be different wrt the constexpr specifier.
1493 2013-04-06  Jason Merrill  <jason@redhat.com>
1495         * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
1496         noreturn attribute.
1498 2013-04-05  Ed Smith-Rowland  <3dw4rd@verizon.net>
1500         * parser.c (cp_parser_ref_qualifier_seq_opt): Move to
1501         cp_parser_ref_qualifier_opt.  Error if more than one ref-qual found.
1503 2013-04-03  Jason Merrill  <jason@redhat.com>
1505         * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
1506         (TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
1507         (FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.
1509         * mangle.c (write_type): When writing a function type with
1510         function-cv-quals, don't add the unqualified type as a
1511         substitution candidate.
1513 2013-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
1515         PR c++/56815
1516         * typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
1517         pedwarn.
1519 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
1521         PR debug/56819
1522         * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
1523         from args to new_args.
1524         (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
1525         r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
1527 2013-04-02  Jason Merrill  <jason@redhat.com>
1529         PR c++/56821
1530         * mangle.c (write_function_type): Mangle ref-qualifier.
1531         (write_nested_name): Likewise.
1532         (canonicalize_for_substitution): Preserve ref-qualifier.
1533         (write_type): Likewise.
1535         PR c++/34949
1536         * decl.c (begin_destructor_body): Clobber the object in a cleanup.
1538 2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>
1540         * friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
1541         * pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
1542         (for_each_template_parm_r): Use TYPE_TI_ARGS.
1544 2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>
1546         * cp-tree.h (TAGGED_TYPE_P): Remove.
1547         (IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
1548         (TYPE_ANONYMOUS_P): Adjust.
1549         * call.c (build_new_op_1): Likewise.
1550         * class.c (find_abi_tags_r): Likewise.
1551         * decl.c (warn_misplaced_attr_for_class_type, start_decl,
1552         type_is_deprecated): Likewise.
1553         * decl2.c (grokfield, min_vis_r): Likewise.
1554         * pt.c (get_template_info): Likewise.
1555         * tree.c (handle_abi_tag_attribute): Likewise.
1557 2013-04-01  Jason Merrill  <jason@redhat.com>
1559         * semantics.c (maybe_constant_value): Check
1560         instantiation_dependent_expression_p.
1561         * pt.c (build_non_dependent_expr): Don't check it here.
1563         PR c++/56772
1564         * init.c (build_new): Don't try to process an array initializer
1565         at template definition time.
1567         PR c++/56793
1568         * typeck.c (finish_class_member_access_expr): Handle enum scope.
1570         PR c++/56794
1571         * parser.c (cp_parser_range_for): Don't try to do auto deduction
1572         in a template if the type of the range is incomplete.
1574         * call.c (add_function_candidate): Take the address of 'this' here.
1575         (build_over_call): And here.
1576         (build_new_method_call_1, build_op_call_1): Not here.
1577         (build_user_type_conversion_1): Or here.
1578         (add_candidates): Adjust.
1580         * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
1581         * class.c (same_signature_p): Use type_memfn_quals.
1582         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
1583         FUNCTION_OR_METHOD_TYPE_CHECK.
1584         * error.c (dump_type_suffix): Add padding before cv-qualifiers.
1585         * pt.c (unify): Use static_fn_type.
1587 2013-04-01  Bronek Kozicki <b.kozicki@gmail.com>
1588             Jason Merrill  <jason@redhat.com>
1590         Implement N2439 (ref-qualifiers for 'this')
1591         * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
1592         (FUNCTION_RVALUE_QUALIFIED): New.
1593         (FUNCTION_OR_METHOD_TYPE_CHECK): New.
1594         (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
1595         (cp_ref_qualifier): New enum.
1596         (cp_declarator): Add ref_qualifier.
1597         * parser.c (cp_parser_ref_qualifier_seq_opt): New.
1598         (cp_parser_direct_declarator): Use it.
1599         (make_call_declarator): Adjust.
1600         (cp_parser_lambda_declarator_opt): Adjust.
1601         * call.c (add_function_candidate): Handle ref-qualifier overload
1602         resolution semantics.
1603         (standard_conversion): Adjust.
1604         * class.c (add_method, same_signature_p): Compare ref-qualifiers.
1605         * decl.c (grokdeclarator): Handle ref-qualifiers.
1606         (grokfndecl): Check for invalid ref-qualifiers.
1607         (static_fn_type, revert_static_member_fn): Adjust.
1608         * decl2.c (build_memfn_type): Handle ref-qualifiers.
1609         (check_classfn): Check them.
1610         (cp_reconstruct_complex_type): Retain them.
1611         * error.c (dump_ref_qualifier): New.
1612         (dump_type_suffix, dump_function_decl): Use it.
1613         (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
1614         * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
1615         (unify): Retain them.
1616         * tree.c (cp_check_qualified_type): New.
1617         (cp_build_qualified_type_real): Keep exception spec and ref-qual.
1618         (build_ref_qualified_type): New.
1619         (strip_typedefs, build_exception_variant): Keep ref-qualifier.
1620         (cp_build_type_attribute_variant): Keep ref-qualifier.
1621         * typeck.c (merge_types): Keep ref-qualifier.
1622         (structural_comptypes): Compare ref-qualifier.
1623         (type_memfn_rqual): New.
1624         (apply_memfn_quals): Take ref-qual argument.
1625         * typeck2.c (build_m_component_ref): Check ref-qualifier.
1627 2013-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
1629         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
1630         (DECL_FUNCTION_TEMPLATE_P): Adjust.
1632         * cxx-pretty-print.c (pp_cxx_nested_name_specifier,
1633         pp_cxx_qualified_id): Use get_containing_scope.
1634         * parser.c (cp_parser_class_head): Likewise.
1635         * pt.c (push_template_decl_real): Likewise.
1637         * decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
1638         * pt.c (unify): Use CP_INTEGRAL_TYPE_P.
1640 2013-03-31  Paolo Carlini  <paolo.carlini@oracle.com>
1642         * decl2.c (collect_candidates_for_java_method_aliases): Use
1643         DECL_CLASS_SCOPE_P.
1644         * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
1645         (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
1646         * decl.c (duplicate_decls): Likewise.
1647         * parser.c (cp_parser_template_declaration_after_export): Likewise,
1648         also DECL_DECLARES_TYPE_P.
1649         * pt.c (instantiate_class_template_1): Likewise.
1650         * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
1651         (lookup_field_r): Likewise.
1652         (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
1653         (lookup_fnfields_slot_nolazy): Likewise.
1654         * semantics.c (finish_member_declaration): Likewise.
1655         * typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
1657 2013-03-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1659         * pt.c (template_parms_to_args): Fix typo in comment.
1661 2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
1663         * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
1665 2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
1667         * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
1668         (build_op_call_1): Likewise.
1669         (build_over_call): Likewise.
1670         (compare_ics): Likewise.
1671         * class.c (build_base_path): Likewise.
1672         (resolve_address_of_overloaded_function): Likewise.
1673         * cp-tree.h: Likewise.
1674         * cvt.c (cp_convert_to_pointer): Likewise.
1675         (convert_to_reference): Likewise.
1676         (ocp_convert): Likewise.
1677         (convert_force): Likewise, tidy.
1678         * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
1679         (pp_cxx_ptr_operator): Likewise.
1680         * decl.c (duplicate_decls): Likewise.
1681         (start_decl): Likewise.
1682         (grok_op_properties): Likewise.
1683         (start_preparsed_function): Likewise.
1684         (store_parm_decls): Likewise.
1685         (finish_function): Likewise.
1686         * decl2.c (delete_sanity): Likewise.
1687         (acceptable_java_type): Likewise.
1688         (grokbitfield): Likewise.
1689         (cp_reconstruct_complex_type): Likewise.
1690         * error.c (dump_type_prefix): Likewise.
1691         (dump_expr): Likewise.
1692         * except.c (push_eh_cleanup): Likewise.
1693         (complete_ptr_ref_or_void_ptr_p): Likewise.
1694         (can_convert_eh): Likewise.
1695         * init.c (build_new_1): Likewise.
1696         (build_delete): Likewise.
1697         (build_vec_delete): Likewise.
1698         * mangle.c (write_type): Likewise.
1699         * parser.c (lookup_literal_operator): Likewise.
1700         * pt.c (convert_nontype_argument_function): Likewise.
1701         (convert_nontype_argument): Likewise.
1702         (tsubst): Likewise.
1703         (unify): Likewise.
1704         (dependent_type_p_r): Likewise.
1705         * rtti.c (build_headof): Likewise.
1706         (build_typeid): Likewise.
1707         (build_dynamic_cast_1): Likewise.
1708         (target_incomplete_p): Likewise.
1709         (typeinfo_in_lib_p): Likewise.
1710         * semantics.c (finish_omp_for): Likewise.
1711         (cxx_eval_call_expression): Likewise.
1712         (maybe_resolve_dummy): Likewise.
1713         * tree.c (build_target_expr): Likewise.
1714         (cp_build_qualified_type_real): Likewise.
1715         * typeck.c (composite_pointer_type_r): Likewise.
1716         (composite_pointer_type): Likewise.
1717         (comp_except_types): Likewise.
1718         (cxx_sizeof_nowarn): Likewise.
1719         (string_conv_p): Likewise.
1720         (cp_build_array_ref): Likewise.
1721         (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
1722         (pointer_diff): Likewise.
1723         (cp_build_addr_expr_1): Likewise.
1724         (cp_build_unary_op): Likewise.
1725         (build_static_cast_1): Likewise.
1726         (cp_build_c_cast): Likewise.
1727         (comp_ptr_ttypes_real): Likewise.
1728         (ptr_reasonably_similar): Likewise.
1729         (comp_ptr_ttypes_const): Likewise.
1730         (casts_away_constness): Likewise.
1731         (check_literal_operator_args): Likewise.
1732         * typeck2.c (build_x_arrow): Likewise.
1733         (add_exception_specifier): Likewise.
1735 2013-03-29  Jason Merrill  <jason@redhat.com>
1737         N3582
1738         * cp-tree.h (AUTO_IS_DECLTYPE): New.
1739         * parser.c (cp_parser_decltype): Handle decltype(auto).
1740         (cp_parser_type_id_1): Allow auto without a late-specified
1741         return in C++1y.
1742         (cp_parser_primary_expression): Use the return value of
1743         finish_parenthesized_expr.
1744         (cp_parser_transaction_expression): Likewise.
1745         * semantics.c (force_paren_expr): New.
1746         (finish_parenthesized_expr): Use it.
1747         * call.c (build_conditional_expr_1): Likewise.
1748         * pt.c (do_auto_deduction): Handle decltype(auto).
1749         (tsubst_copy): Handle PAREN_EXPR.
1750         (tsubst_copy_and_build): Likewise.
1751         * error.c (dump_expr): Handle PAREN_EXPR.
1752         * cxx-pretty-print.c (pp_cxx_expression): Likewise.
1753         * mangle.c (write_expression): Ignore PAREN_EXPR.
1755         * parser.c (cp_parser_decltype_expr): Split out...
1756         (cp_parser_decltype): ...from here.
1758         PR c++/56774
1759         PR c++/35722
1760         * pt.c (unify_pack_expansion): Fix indexing.
1762 2013-03-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1764         * call.c (build_java_interface_fn_ref): Likewise.
1765         (make_temporary_var_for_ref_to_temp): Likewise.
1766         * class.c (check_field_decls): Likewise.
1767         (layout_class_type): Likewise.
1768         (finish_struct_1): Likewise.
1769         (fixed_type_or_null): Likewise.
1770         (get_vtbl_decl_for_binfo): Likewise.
1771         * cp-gimplify.c (omp_var_to_track): Likewise.
1772         (cp_genericize_r): Likewise.
1773         * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
1774         * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
1775         (DECL_DISCRIMINATOR_P): Likewise.
1776         * decl.c (poplevel): Likewise.
1777         (decls_match): Likewise.
1778         (duplicate_decls): Likewise.
1779         (decl_jump_unsafe): Likewise.
1780         (start_decl): Likewise.
1781         (check_for_uninitialized_const_var): Likewise.
1782         (make_rtl_for_nonlocal_decl): Likewise.
1783         (cp_finish_decl): Likewise.
1784         (expand_static_init): Likewise.
1785         (local_variable_p): Likewise.
1786         (maybe_register_incomplete_var): Likewise.
1787         * decl2.c (grokfield): Likewise.
1788         (comdat_linkage): Likewise.
1789         (determine_visibility): Likewise.
1790         (import_export_decl): Likewise.
1791         (prune_vars_needing_no_initialization): Likewise.
1792         (decl_maybe_constant_var_p): Likewise.
1793         * error.c (dump_simple_decl): Likewise.
1794         (dump_template_decl): Likewise.
1795         (cp_printer): Likewise.
1796         * except.c (build_throw): Likewise.
1797         * init.c (build_vtbl_address): Likewise.
1798         (member_init_ok_or_else): Likewise.
1799         (build_aggr_init): Likewise.
1800         (expand_aggr_init_1): Likewise.
1801         (build_offset_ref): Likewise.
1802         (constant_value_1): Likewise.
1803         * mangle.c (write_mangled_name): Likewise.
1804         (write_prefix): Likewise.
1805         * name-lookup.c (supplement_binding_1): Likewise.
1806         (add_decl_to_level): Likewise.
1807         (pushdecl_maybe_friend_1): Likewise.
1808         (check_for_out_of_scope_variable): Likewise.
1809         (validate_nonmember_using_decl): Likewise.
1810         (lookup_name_innermost_nonclass_level_1): Likewise.
1811         (lookup_arg_dependent_1): Likewise.
1812         * parser.c (cp_parser_lambda_introducer): Likewise.
1813         (cp_parser_template_argument): Likewise.
1814         (cp_parser_single_declaration): Likewise.
1815         * pt.c (convert_nontype_argument): Likewise.
1816         (instantiate_class_template_1): Likewise.
1817         (tsubst_decl): Likewise.
1818         (tsubst_expr): Likewise.
1819         (do_decl_instantiation): Likewise.
1820         (do_type_instantiation): Likewise.
1821         (regenerate_decl_from_template): Likewise.
1822         (always_instantiate_p): Likewise.
1823         (instantiate_decl): Likewise.
1824         (type_dependent_expression_p): Likewise.
1825         (build_non_dependent_expr): Likewise.
1826         * repo.c (repo_emit_p): Likewise.
1827         * rtti.c (build_dynamic_cast_1): Likewise.
1828         * search.c (shared_member_p): Likewise.
1829         * semantics.c (outer_var_p): Likewise.
1830         (finish_id_expression): Likewise.
1831         (finish_omp_clauses): Likewise.
1832         (finish_decltype_type): Likewise.
1833         (ensure_literal_type_for_constexpr_object): Likewise.
1834         * tree.c (lvalue_kind): Likewise.
1835         (bot_replace): Likewise.
1836         (cp_tree_equal): Likewise.
1837         (handle_init_priority_attribute): Likewise.
1838         (decl_storage_duration): Likewise.
1839         * typeck.c (cxx_sizeof_expr): Likewise.
1840         (cxx_alignof_expr): Likewise.
1841         (decay_conversion): Likewise.
1842         (build_class_member_access_expr): Likewise.
1843         (cp_build_array_ref): Likewise.
1844         (cxx_mark_addressable): Likewise.
1845         (maybe_warn_about_returning_address_of_local): Likewise.
1846         (check_return_expr): Likewise.
1847         * typeck2.c (cxx_readonly_error): Likewise.
1848         (abstract_virtuals_error_sfinae): Likewise.
1849         (cxx_incomplete_type_diagnostic): Likewise.
1851 2013-03-28  Lawrence Crowl  <crowl@google.com>
1853         * Make-lang.in
1854         (CXX_PARSER_H): Add header dependence.
1855         * cp-tree.h
1856         (extern debug (cp_binding_level &)): New.
1857         (extern debug (cp_binding_level *)): New.
1858         * name-lookup.h
1859         (debug (cp_binding_level &)): New.
1860         (debug (cp_binding_level *)): New.
1861         * parser.c
1862         (debug (cp_parser &)): New.
1863         (debug (cp_parser *)): New.
1864         (debug (cp_token &)): New.
1865         (debug (cp_token *)): New.
1866         (debug (vec<cp_token, va_gc> &)): New.
1867         (debug (vec<cp_token, va_gc> *)): New.
1868         * parser.c: Add header dependence.
1869         (extern debug (cp_parser &)): New.
1870         (extern debug (cp_parser *)): New.
1871         (extern debug (cp_token &)): New.
1872         (extern debug (cp_token *)): New.
1873         (extern debug (vec<cp_token, va_gc> &)): New.
1874         (extern debug (vec<cp_token, va_gc> *)): New.
1876 2013-03-28  Jason Merrill  <jason@redhat.com>
1878         PR c++/17232
1879         PR c++/52748
1880         * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
1881         the type if tf_decltype is set.
1882         * pt.c (fn_type_unification): Add decltype_p parm.
1883         (get_bindings): Adjust.
1884         * cp-tree.h: Adjust.
1885         * class.c (resolve_address_of_overloaded_function): Adjust.
1886         * call.c (add_template_candidate_real, print_z_candidate): Adjust.
1888         PR c++/56679
1889         * parser.c (cp_parser_sizeof_pack): Split out from...
1890         (cp_parser_sizeof_operand): ...here.  Require (id).
1892         PR c++/56701
1893         * semantics.c (finish_this_expr): 'this' is an rvalue.
1894         * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
1896         PR c++/56710
1897         * semantics.c (finish_member_declaration): Don't push closure
1898         members.
1900         * name-lookup.c (pushdecl_maybe_friend_1): Use
1901         nonlambda_method_basetype and current_nonlambda_class_type.
1903         PR c++/56728
1904         * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
1905         conversion from integer to pointer.
1906         (cxx_eval_constant_expression): Likewise.
1907         (cxx_eval_indirect_ref): Use the folded operand if we still think
1908         this might be constant.
1910 2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
1911             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1913         PR c++/56725
1914         * call.c (convert_like_real): Change series of two permerrors
1915         to permerror + inform (and likewise for two errors).
1916         (build_new_method_call_1): Likewise.
1917         * typeck.c (convert_for_initialization): Change additional
1918         warning or error to inform.
1920 2013-03-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1922         * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
1923         (first_aggr_init_expr): Likewise.
1924         (more_aggr_init_expr_args_p): Likewise.
1925         (type_of_this_parm): Likewise.
1926         (class_of_this_parm): Likewise.
1927         * name-lookup.h (get_global_value_if_present): Likewise.
1928         (is_typename_at_global_scope): Likewise.
1930 2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
1932         * call.c (joust): Don't call inform for a permerror returning false.
1933         * parser.c (cp_parser_check_class_key): Likewise.
1934         * pt.c (tsubst_copy_and_build): Likewise.
1936 2013-03-27  Jason Merrill  <jason@redhat.com>
1938         PR c++/56749
1939         * semantics.c (finish_qualified_id_expr): Return early
1940         for enum scope.
1942 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1944         * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
1945         * cvt.c (convert_to_void): Likewise.
1946         * error.c (dump_expr): Likewise.
1947         * mangle.c (write_expression): Likewise.
1948         * parser.c (cp_parser_template_argument): Likewise.
1949         * pt.c (convert_nontype_argument): Likewise.
1950         (tsubst_copy_and_build): Likewise.
1951         * rtti.c (build_typeid): Likewise.
1952         * semantics.c (finish_call_expr): Likewise.
1953         (finish_decltype_type): Likewise.
1954         (build_data_member_initialization): Likewise.
1955         * tree.c (is_dummy_object): Likewise.
1956         * typeck.c (decay_conversion): Likewise.
1957         (build_class_member_access_expr): Likewise.
1958         (cp_build_addr_expr_1): Likewise.
1959         (unary_complex_lvalue): Likewise.
1960         (check_return_expr): Likewise.
1961         * typeck2.c (cxx_readonly_error): Likewise.
1963 2013-03-26  Jason Merrill  <jason@redhat.com>
1965         PR c++/52597
1966         * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn.  Take tree.
1967         * semantics.c (finish_decltype_type): Check it before type_unknown_p.
1968         * cp-tree.h: Adjust prototype.
1970         PR c++/45282
1971         * typeck2.c (build_m_component_ref): Handle prvalue object.
1973 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1975         * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
1976         * decl.c (duplicate_decls): Likewise.
1977         (cp_finish_decl): Likewise.
1978         (check_class_member_definition_namespace): Likewise.
1979         * decl2.c (grokfield): Likewise.
1980         (decl_needed_p): Likewise.
1981         (import_export_decl): Likewise.
1982         (mark_used): Likewise.
1983         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
1984         * pt.c (push_access_scope): Likewise.
1985         (instantiate_decl): Likewise.
1986         * ptree.c (cxx_print_decl): Likewise.
1987         * repo.c (repo_emit_p): Likewise.
1988         * semantics.c (note_decl_for_pch): Likewise.
1989         * tree.c (decl_linkage): Likewise.
1991 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
1993         PR c++/55951
1994         * decl.c (check_array_designated_initializer): Handle CONST_DECL
1995         as ce->index.
1997 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
1999         * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
2000         error messages.
2002         * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
2004 2013-03-25  Jason Merrill  <jason@redhat.com>
2006         PR c++/56699
2007         * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
2008         class is derived from the type of the object.
2010         PR c++/52014
2011         * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
2012         unevaluated context.
2014 2013-03-25  Paolo Carlini  <paolo.carlini@oracle.com>
2016         PR c++/56722
2017         * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
2018         DECL_TEMPLATE_INSTANTIATION.
2020 2013-03-22  Jason Merrill  <jason@redhat.com>
2022         PR c++/56684
2023         * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
2024         and CONST_DECL.
2026 2013-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2028         * cp-tree.h (identifier_p): New.
2029         * call.c: Throughout, call identifier_p insstead of direct
2030         comparaison of TREE_CODE against IDENTIFIER_NODE.
2031         * decl.c: Likewisse.
2032         * decl2.c: Likewise.
2033         * init.c: Likewise.
2034         * mangle.c: Likewise.
2035         * name-lookup.c: Likewise.
2036         * parser.c: Likewise.
2037         * pt.c: Likewise.
2038         * search.c: Likewise.
2039         * semantics.c: Likewise.
2040         * tree.c: Likewise.
2041         * typeck.c: Likewise.
2042         * typeck2.c: Likewise.
2044 2013-03-21  Jakub Jelinek  <jakub@redhat.com>
2046         PR middle-end/48087
2047         * pt.c (convert_nontype_argument): Count werrorcount as warnings.
2048         * call.c (build_temp): Likewise.
2049         * method.c (synthesize_method): Likewise.
2050         * typeck.c (convert_for_initialization): Likewise.
2052 2013-03-21  Marc Glisse  <marc.glisse@inria.fr>
2054         * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
2056 2013-03-21  Richard Biener  <rguenther@suse.de>
2058         * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
2059         DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
2061 2013-03-20  Jason Merrill  <jason@redhat.com>
2063         PR c++/56646
2064         * parser.c (cp_parser_late_return_type_opt): Save and restore
2065         current_class_ptr/ref.
2067         PR c++/54532
2068         * expr.c (cplus_expand_constant): Do nothing if the class is
2069         incomplete.
2070         * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
2071         * typeck2.c (store_init_value): Use reduced_constant_expression_p.
2072         * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
2073         (complete_vars): Likewise.
2075         * name-lookup.c (get_anonymous_namespace_name): Never use
2076         get_file_function_name.
2078         * pt.c (retrieve_specialization): Handle null tmpl argument.
2080         PR c++/17232
2081         PR c++/56642
2082         * pt.c (tsubst_decl): Check return value of register_specialization.
2083         * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
2084         change.
2086 2013-03-17  Jason Merrill  <jason@redhat.com>
2088         PR c++/54359
2089         PR c++/56639
2090         * parser.c (cp_parser_direct_declarator): Bail if we see a
2091         qualified-id not at namespace scope.
2093         PR c++/17232
2094         PR c++/56642
2095         * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
2096         change for now.
2098 2013-03-16  Jason Merrill  <jason@redhat.com>
2100         * decl.c (grokdeclarator): Assert that we won't see a pointer to
2101         METHOD_TYPE.
2103         PR c++/54277
2104         * cp-tree.h (WILDCARD_TYPE_P): Split out from...
2105         (MAYBE_CLASS_TYPE_P): ...here.
2106         * semantics.c (lambda_capture_field_type): Only build a
2107         magic decltype for wildcard types.
2108         (lambda_proxy_type): Likewise.
2109         (finish_non_static_data_member): Get the quals from
2110         the object.
2112         PR c++/55931
2113         * parser.c (cp_parser_template_argument): Don't
2114         fold_non_dependent_expr.
2116         * parser.c (cp_parser_lambda_declarator_opt): Use
2117         cp_parser_trailing_type_id.
2119         PR c++/45917
2120         * parser.c (cp_parser_template_id): Don't forget access checks.
2122         PR c++/52374
2123         * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
2125         PR c++/54764
2126         PR c++/55972
2127         * name-lookup.h (tag_scope): Add ts_lambda.
2128         * semantics.c (begin_lambda_type): Use it.
2129         * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
2130         * pt.c (check_default_tmpl_args): Ignore lambdas.
2131         (push_template_decl_real): Handle lambdas.
2132         * tree.c (no_linkage_check): Adjust lambda check.
2134         PR c++/56039
2135         * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
2137         PR c++/54359
2138         * parser.c (cp_parser_direct_declarator): Fix late return
2139         for out-of-class defn of member function.
2141         PR c++/55357
2142         * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
2143         parms to avoid duplicate -Wshadow warnings.
2145         * search.c (lookup_base): Handle NULL_TREE.
2147         PR c++/56481
2148         * semantics.c (potential_constant_expression_1): Use of 'this' in
2149         a non-constexpr function makes the expression not potentially
2150         constant.
2152         N3276
2153         PR c++/52748
2154         * cp-tree.h (tsubst_flags): Add tf_decltype.
2155         * call.c (build_cxx_call): Don't build a temporary if it's set.
2156         (build_over_call): Make sure it's only passed to build_cxx_call.
2157         * parser.c (cp_parser_primary_expression): Add decltype_p parm.
2158         (cp_parser_unary_expression): Likewise.
2159         (cp_parser_cast_expression): Likewise.
2160         (cp_parser_binary_expression): Likewise.
2161         (cp_parser_assignment_expression): Likewise.
2162         (cp_parser_postfix_expression): Likewise.  Pass tf_decltype.
2163         (cp_parser_expression): Add decltype_p.  Force a
2164         temporary for a call on the LHS of a comma.
2165         (cp_parser_decltype): Pass true to decltype_p parms.
2166         * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
2167         (tsubst_copy_and_build): Pass tf_decltype down only for
2168         CALL_EXPR and the RHS of COMPOUND_EXPR.
2169         * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
2171         * cp-tree.h (abstract_class_use): New enum.
2172         * typeck2.c (pending_abstract_type): Add use field.
2173         (abstract_virtuals_error_sfinae): Add overloads taking
2174         abstract_class_use instead of tree.
2175         * typeck.c (build_static_cast_1): Call it.
2176         * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
2177         * pt.c: Adjust calls.
2178         * decl.c (cp_finish_decl): Don't handle functions specially.
2179         (grokdeclarator): Always check return type.
2180         * init.c (build_new_1): Adjust call.
2182         DR 337
2183         PR c++/17232
2184         * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
2185         * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
2187         DR 657
2188         * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
2189         (tsubst_arg_types): Likewise.
2191         DR 1518
2192         PR c++/54835
2193         * call.c (convert_like_real): Check for explicit constructors
2194         even for value-initialization.
2196         PR c++/54946
2197         * pt.c (convert_nontype_argument): Handle invalid pointer.
2199         * parser.c (cp_parser_lambda_expression): Use nreverse.
2201         PR c++/56447
2202         PR c++/55532
2203         * pt.c (instantiate_class_template_1): Instantiate lambda capture
2204         list here.
2205         (tsubst_copy_and_build): Not here.
2207         PR c++/55017
2208         * method.c (walk_field_subobs): Disallow copy of rvalue ref.
2210         PR c++/55240
2211         * parser.c (parsing_nsdmi): New.
2212         * semantics.c (outer_automatic_var_p): Check it.
2213         (finish_id_expression): Likewise.
2214         * cp-tree.h: Declare it.
2216         PR c++/55241
2217         * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
2219         * parser.c (lookup_literal_operator): Correct parm/arg naming
2220         mixup.
2222         PR c++/56238
2223         * pt.c (fold_non_dependent_expr_sfinae): Check
2224         instantiation_dependent_expression_p.
2226         PR c++/56095
2227         * class.c (resolve_address_of_overloaded_function): Accept a
2228         reference to function for target_type.
2229         (instantiate_type): Likewise.
2230         * pt.c (convert_nontype_argument): Pass it to
2231         convert_nontype_argument_function.
2233 2013-03-16  Jakub Jelinek  <jakub@redhat.com>
2235         * tree.c (cp_tree_equal): Fix a pasto.
2237         PR c++/56607
2238         * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
2239         pass op1 through maybe_constant_value first.
2241 2013-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
2243         PR c++/56582
2244         * semantics.c (cxx_eval_array_reference): Check for negative index.
2246 2013-03-14  Jason Merrill  <jason@redhat.com>
2248         PR c++/56614
2249         * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
2251         PR c++/56346
2252         * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
2253         dso_handle parm on targets without __cxa_atexit.
2255 2013-03-11  Jason Merrill  <jason@redhat.com>
2257         PR c++/56567
2258         * typeck.c (check_return_expr): Disallow returning init list here.
2259         * semantics.c (apply_deduced_return_type): Not here.
2261 2013-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
2263         PR c++/51412
2264         * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
2265         * error.c (dump_expr): Likewise.
2267 2013-03-08  Jason Merrill  <jason@redhat.com>
2269         PR c++/51884
2270         * class.c (modify_all_vtables): Mangle the vtable name before
2271         entering dfs_walk.
2273         * semantics.c (lambda_expr_this_capture): In unevaluated context,
2274         just return the nearest 'this'.
2276         PR c++/51494
2277         PR c++/52183
2278         PR c++/56222
2279         * tree.c (maybe_dummy_object): Don't capture 'this'.
2280         * semantics.c (maybe_resolve_dummy): New.
2281         (finish_non_static_data_member): Use it.
2282         (finish_qualified_id_expr): Don't test is_dummy_object.
2283         * cp-tree.h: Declare maybe_resolve_dummy.
2284         * call.c (build_new_method_call_1): Use it.
2286         PR c++/56567
2287         * semantics.c (apply_deduced_return_type): Don't allow returning
2288         std::initializer_list.
2290 2013-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
2292         PR c++/56534
2293         * parser.c (cp_parser_elaborated_type_specifier): Don't call
2294         check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
2295         * decl.c (check_elaborated_type_specifier): Tidy.
2297 2013-03-06  Jakub Jelinek  <jakub@redhat.com>
2299         PR c++/56543
2300         * tree.c (strip_typedefs): Don't copy args if they are NULL.
2302 2013-03-05  Jakub Jelinek  <jakub@redhat.com>
2304         * parser.c (cp_parser_braced_list): For {} initialize
2305         *non_constant_p to false.
2307 2013-03-04  Jason Merrill  <jason@redhat.com>
2309         PR c++/56464
2310         PR c++/54383
2311         * semantics.c (lambda_expr_this_capture): Handle NSDMI
2312         and non-class scopes.
2314 2013-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
2316         * decl.c (grokdeclarator): Remove dead code.
2318 2013-02-28  Jason Merrill  <jason@redhat.com>
2320         PR c++/56481
2321         * semantics.c (potential_constant_expression_1): Use
2322         cxx_eval_outermost_constant_expr rather than maybe_constant_value.
2324         PR c++/56243
2325         * call.c (build_over_call): Avoid virtual lookup in a template.
2327 2013-02-27  Jason Merrill  <jason@redhat.com>
2329         PR c++/56358
2330         PR c++/56323
2331         * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
2332         of the base name for inheriting ctors.
2333         (push_class_level_binding_1): Remove inheriting ctor handling.
2334         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
2335         * class.c (add_implicitly_declared_members): Adjust.
2337 2013-02-26  David Binderman  <dcb314@hotmail.com>
2339         PR c++/55632
2340         * decl.c (grokdeclarator): Tidy publicp assignment.
2342 2013-02-25  Aldy Hernandez  <aldyh@redhat.com>
2344         PR c++/56419
2345         * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
2346         (build_transaction_expr): Same.
2348 2013-02-25  Jason Merrill  <jason@redhat.com>
2350         PR c++/56377
2351         * pt.c (fn_type_unification): Wait to call push_tinst_level until
2352         we know what args we're looking at.
2354         PR c++/56438
2355         * semantics.c (potential_constant_expression_1): In C++98, a cast
2356         to non-integral type can't be a constant expression.
2358 2013-02-24  Jakub Jelinek  <jakub@redhat.com>
2360         PR c++/56403
2361         * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
2362         of CLASS_TYPE_P.
2364 2013-02-22  Jason Merrill  <jason@redhat.com>
2366         PR c++/40405
2367         * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
2368         if we got the wrong number of template parms.
2370         PR c++/56377
2371         * pt.c (fn_type_unification): Use explicit args in template
2372         instantiation context.
2374         PR c++/56359
2375         * call.c (can_convert_arg): Discard access checks.
2377         PR c++/56395
2378         * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
2379         args.
2381 2013-02-20  Paolo Carlini  <paolo.carlini@oracle.com>
2383         PR c++/56373
2384         * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
2385         * cvt.c (ocp_convert): Use the latter.
2386         (cp_convert_to_pointer): Likewise.
2387         * decl.c (check_default_argument): Likewise.
2388         * typeck.c (cp_build_binary_op): Likewise.
2389         * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
2391 2013-02-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
2392             Paolo Carlini  <paolo.carlini@oracle.com>
2394         PR c++/51242
2395         * decl2.c (grokbitfield): Allow scoped enumeration types.
2397 2013-02-15  Jason Merrill  <jason@redhat.com>
2399         PR c++/54276
2400         * semantics.c (finish_id_expression): Also return the identifier
2401         for an outer local static.
2403         PR c++/56343
2404         * class.c (check_bases_and_members): Deduce noexcept after
2405         checking bases.
2407         PR c++/52026
2408         * semantics.c (finish_id_expression): In a template, return
2409         the identifier for a constant variable.
2411 2013-02-14  Jason Merrill  <jason@redhat.com>
2413         PR c++/54922
2414         * semantics.c (build_anon_member_initialization): New.
2415         (build_data_member_initialization): Use it.
2417         PR c++/55003
2418         * decl.c (cp_finish_decl): Force instantiation of an
2419         auto static data member.
2421         PR c++/55220
2422         * pt.c (unify): A pack expansion that is not the last template
2423         argument makes the entire template argument list non-deduced.
2425         PR c++/56323
2426         * name-lookup.c (do_class_using_decl): Handle typedefs with
2427         inheriting constructors.
2428         (push_class_level_binding_1): Allow inheriting from template
2429         template parameter, too.
2430         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
2432         PR c++/55223
2433         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
2434         default argument scope.
2435         * mangle.c (write_name): Likewise.
2437         PR c++/55232
2438         * error.c (find_typenames_r): Don't walk into a pack expansion.
2440 2013-02-13  Jason Merrill  <jason@redhat.com>
2442         PR c++/55670
2443         * parser.c (cp_parser_member_declaration): Check the declarator
2444         form when detecting a function declaration via typedef.
2446         PR c++/55680
2447         * pt.c (maybe_process_partial_specialization): A lambda
2448         isn't what's being specialized.
2450         PR c++/55710
2451         * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
2452         TREE_USED.
2454         PR c++/55879
2455         * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
2457         PR c++/55993
2458         * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
2459         non-zero offsets, too.
2461         PR c++/56155
2462         * decl.c (build_enumerator): Always convert the value to a
2463         fixed underlying type.
2465         PR c++/56135
2466         * pt.c (tsubst_copy_and_build): Don't forget any new
2467         captures that arose from use of dependent names.
2469 2013-02-13  Jakub Jelinek  <jakub@redhat.com>
2471         PR c++/56302
2472         * semantics.c (finish_asm_stmt): If input constraints allow
2473         neither register nor memory, try maybe_constant_value to get
2474         a constant if possible.
2476 2013-02-12  Jason Merrill  <jason@redhat.com>
2478         PR c++/56285
2479         * method.c (add_one_base_init): Handle base constructor
2480         taking rvalue reference parm.
2482         PR c++/56291
2483         * semantics.c (sort_constexpr_mem_initializers): Handle
2484         vptr out of order.
2486 2013-02-09  Jason Merrill  <jason@redhat.com>
2488         PR c++/56268
2489         * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
2490         maybe_instantiate_noexcept.
2492         PR c++/56247
2493         * pt.c (eq_specializations): Set comparing_specializations.
2494         * tree.c (cp_tree_equal): Check it.
2495         * cp-tree.h: Declare it.
2497         * decl.c (decls_match): Check versions later.
2499         PR c++/56238
2500         * pt.c (build_non_dependent_expr): Don't try to fold
2501         instantiation-dependent expressions.
2502         (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
2503         [BIND_EXPR]: Treat as dependent.
2505 2013-02-07  Jakub Jelinek  <jakub@redhat.com>
2507         PR c++/56241
2508         * init.c (build_vec_init): Don't append NULL values into new_vec.
2509         (build_zero_init_1): Don't push anything into v if recursive call
2510         returned NULL_TREE.
2511         (build_value_init_noctor): Don't push anything into v if
2512         build_value_init call returned NULL_TREE.
2514         PR c++/56239
2515         * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
2516         (cp_parser_tokens_start_cast_expression): ... this.  Change parameter
2517         to cp_parser *, call cp_lexer_peek_token first.  For CPP_OPEN_PAREN,
2518         return true only if 2nd token isn't CPP_CLOSE_PAREN.
2519         (cp_parser_cast_expression): Adjust caller.
2521         PR c++/56237
2522         * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
2523         only if DECL_DISCRIMINATOR_SET_P (t) rather than just
2524         DECL_LANG_SPECIFIC (t).
2526 2013-02-07  Jason Merrill  <jason@redhat.com>
2528         PR c++/56235
2529         * method.c (do_build_copy_constructor): Don't bother turning
2530         scalars from lvalues to xvalues.
2531         (do_build_copy_assign): Likewise.
2533 2013-02-06  Jason Merrill  <jason@redhat.com>
2535         * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
2537 2013-02-05  Jason Merrill  <jason@redhat.com>
2539         PR c++/54122
2540         * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
2541         METHOD_TYPE.
2543         PR c++/56177
2544         * decl.c (start_preparsed_function): Update restype if we change
2545         decl1.
2547         PR c++/56208
2548         * pt.c (fn_type_unification): Discard any access checks from
2549         substituting explicit args.
2551 2013-01-31  Jason Merrill  <jason@redhat.com>
2553         PR c++/56162
2554         PR c++/56104
2555         * typeck.c (get_member_function_from_ptrfunc): Fix
2556         ptrmemfunc_vbit_in_delta case.
2558 2013-01-29  Jason Merrill  <jason@redhat.com>
2560         PR libstdc++/54314
2561         * class.c (build_ctor_vtbl_group): Give construction vtables
2562         hidden visibility.
2564 2013-01-25  Jason Merrill  <jason@redhat.com>
2566         PR c++/56095
2567         * pt.c (convert_nontype_argument_function): Handle invalid input.
2568         (convert_nontype_argument): Likewise.
2570         PR c++/56104
2571         * typeck.c (get_member_function_from_ptrfunc): Optimize if the
2572         dynamic type has no virtual functions.
2574 2013-01-22  Paolo Carlini  <paolo.carlini@oracle.com>
2576         PR c++/55944
2577         * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
2578         on TARGET_EXPR nodes.
2580 2013-01-22  Jason Merrill  <jason@redhat.com>
2582         PR c++/56071
2583         * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
2585 2013-01-22  Dodji Seketeli  <dodji@redhat.com>
2587         PR c++/53609
2588         * pt.c (argument_pack_element_is_expansion_p)
2589         (make_argument_pack_select, use_pack_expansion_extra_args_p)
2590         (gen_elem_of_pack_expansion_instantiation): New static functions.
2591         (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
2592         look through the possibly resulting pack expansion as well.
2593         (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
2594         generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
2595         Use gen_elem_of_pack_expansion_instantiation to build the
2596         instantiation piece-wise.  Don't use arg_from_parm_pack_p anymore,
2597         as gen_elem_of_pack_expansion_instantiation and the change in
2598         tsubst above generalize this particular case.
2599         (arg_from_parm_pack_p): Remove this for it's not used by
2600         tsubst_pack_expansion anymore.
2602 2013-01-21  Jason Merrill  <jason@redhat.com>
2604         PR c++/56059
2605         * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
2606         template args count.
2608 2013-01-18  Jason Merrill  <jason@redhat.com>
2610         PR target/54908
2611         * decl2.c (get_local_tls_init_fn): New.
2612         (get_tls_init_fn): Handle flag_extern_tls_init.  Don't bother
2613         with aliases for internal variables.  Don't use weakrefs if
2614         the variable needs destruction.
2615         (generate_tls_wrapper): Mark the wrapper as const if no
2616         initialization is needed.
2617         (handle_tls_init): Don't require aliases.
2619 2013-01-15  Dodji Seketeli  <dodji@redhat.com>
2621         PR c++/55663
2622         * pt.c (coerce_innermost_template_parms): New static function.
2623         (instantiate_alias_template):  Use it here.
2625 2013-01-09  Jason Merrill  <jason@redhat.com>
2627         PR c++/55878
2628         * rtti.c (build_typeid, get_typeid): Add complain parm.
2629         (get_tinfo_decl_dynamic): Likewise.
2630         * cp-tree.h, parser.c, pt.c: Adjust.
2632         PR c++/55893
2633         * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
2634         needs destruction.
2636 2013-01-09  Jakub Jelinek  <jakub@redhat.com>
2638         PR c/48418
2639         * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
2640         call maybe_constant_value for the negative or too big shift
2641         count warnings.
2643 2013-01-09  Paolo Carlini  <paolo.carlini@oracle.com>
2645         PR c++/55801
2646         * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
2647         of the argument is true.
2649 2013-01-08  Joel Brobecker  <brobecker@adacore.com>
2651         * parser.c (cp_parser_initializer_list): Move declaration
2652         of variable non_const to start of lexical block.
2654 2013-01-07  Jason Merrill  <jason@redhat.com>
2656         PR c++/55753
2657         * tree.c (build_aggr_init_expr): Do nothing in a template.
2658         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
2659         a FUNCTION_DECL before tsubsting.
2661 2013-01-04  Dodji Seketeli  <dodji@redhat.com>
2663         PR c++/52343
2664         * pt.c (check_instantiated_arg): Allow type template arguments.
2666 2013-01-04  Jason Merrill  <jason@redhat.com>
2668         PR c++/55877
2669         * decl.c (reset_type_linkage, bt_reset_linkage): New.
2670         (grokdeclarator): Use reset_type_linkage.
2671         * name-lookup.c (binding_table_foreach): Handle null table.
2672         * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
2674 2013-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
2676         PR c++/54526 (again)
2677         * parser.c (cp_parser_template_id): Revert core of previous change
2678         (keep adjusted inform message).
2680 2013-01-03  Jason Merrill  <jason@redhat.com>
2682         PR c++/55419
2683         PR c++/55753
2684         * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
2685         TREE_CONSTANT.
2687         PR c++/55842
2688         * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
2690         PR c++/55856
2691         * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
2693         PR c++/53650
2694         * call.c (type_has_extended_temps): New.
2695         * cp-tree.h: Declare it.
2696         * decl.c (check_initializer): Use build_aggr_init for arrays
2697         if it is false.
2698         * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
2700 2013-01-02  Jason Merrill  <jason@redhat.com>
2702         PR c++/54325
2703         * call.c (build_new_method_call_1): Don't use build_value_init for
2704         user-provided default constructors.
2706         * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
2708         PR c++/55032
2709         PR c++/55245
2710         * tree.c (build_cplus_array_type): Copy layout information
2711         to main variant if necessary.
2713 Copyright (C) 2013 Free Software Foundation, Inc.
2715 Copying and distribution of this file, with or without modification,
2716 are permitted in any medium without royalty provided the copyright
2717 notice and this notice are preserved.