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