gcc/c-family:
[official-gcc.git] / gcc / cp / ChangeLog
blobaf230f5704b922d8a1f4a3b285b27367cc303c02
1 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
3         * typeck.c (cp_build_binary_op): Use vector_types_compatible_elements_p.
5 2013-09-04  Paolo Carlini  <paolo.carlini@oracle.com>
7         PR c++/24926
8         * class.c (finish_struct_anon_r): New.
9         (finish_struct_anon): Use it.
11 2013-09-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
13         * cxx-pretty-print.h (cxx_pretty_printer::simple_type_specifier):
14         Declare as overrider.
15         * cxx-pretty-print.c (cxx_pretty_printer::simple_type_specifier):
16         Rename from pp_cxx_simple_type_specifier.
17         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
18         simple_type_specifier.
20 2013-09-03  Paolo Carlini  <paolo.carlini@oracle.com>
22         PR c++/58305
23         * typeck2.c (build_functional_cast): Maybe warn_deprecated_use.
25 2013-09-03  Mike Stump  <mikestump@comcast.net>
27         * Make-lang.in (cp/lambda.o): Add dependencies.
29 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
31         * cxx-pretty-print.h (cxx_pretty_printer::type_id): Declare as
32         overrider.
33         * cxx-pretty-print.c (pp_cxx_storage_class_specifier): Remove.
34         (pp_cxx_userdef_literal): Tidy.
35         (pp_cxx_template_argument_list): Likewise.
36         (pp_cxx_typeid_expression): Likewise.
37         (pp_cxx_offsetof_expression_1): Likewise.
38         (cxx_pretty_printer::postfix_expression): Likewise.
39         (cxx_pretty_printer::unary_expression): Likewise.
40         (cxx_pretty_printer::statement): Likewise.
41         (cxx_pretty_printer::type_id): Rename from pp_cxx_type_id.
42         (c_pretty_printer::cxx_pretty_printer): Do not assign to type_id.
43         * error.c (dump_decl): Tidy.
44         (dump_expr): Likewise.
46 2013-09-02  Paolo Carlini  <paolo.carlini@oracle.com>
48         PR c++/21682, implement DR 565
49         * name-lookup.c (compparms_for_decl_and_using_decl): New.
50         (push_overloaded_decl_1, do_nonmember_using_decl): Use it.
52 2013-08-30  Marek Polacek  <polacek@redhat.com>
54         * typeck.c (cp_build_binary_op): Add division by zero and shift
55         instrumentation.
56         * error.c (dump_expr): Special-case ubsan builtins.
58 2013-08-30  Paolo Carlini  <paolo.carlini@oracle.com>
60         PR c++/51424
61         * cp-tree.h (LOOKUP_DELEGATING_CONS): Add.
62         * init.c (perform_target_ctor): Use it.
63         * call.c (build_special_member_call): Diagnose self-delegating
64         constructors.
66 2013-08-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
68         * cxx-pretty-print.h (cxx_pretty_printer::declaration): Declare as
69         overrider.
70         (cxx_pretty_printer::declaration_specifiers): Likewise.
71         (cxx_pretty_printer::function_specifier): Likewise.
72         (cxx_pretty_printer::declarator): Likewise.
73         (cxx_pretty_printer::direct_declarator): Likewise.
74         (cxx_pretty_printer::abstract_declarator): Likewise.
75         (cxx_pretty_printer::direct_abstract_declarator): Likewise.
76         (pp_cxx_declaration): Remove.
77         * cxx-pretty-print.c (cxx_pretty_printer::function_specifier):
78         Rename from pp_cxx_function_specifier.  Adjust.
79         (cxx_pretty_printer::declaration_specifiers): Rename from
80         pp_cxx_decl_specifier_seq.  Adjust.
81         (cxx_pretty_printer::direct_declarator): Rename from
82         pp_cxx_direct_declarator.  Adjust.
83         (cxx_pretty_printer::declarator): Rename from pp_cxx_declarator.
84         Adjust.
85         (cxx_pretty_printer::abstract_declarator): Rename from
86         pp_cxx_abstract_declarator.  Adjust.
87         (cxx_pretty_printer::direct_abstract_declarator): Rename from
88         pp_cxx_direct_abstract_declarator.  Adjust.
89         (cxx_pretty_printer::declaration): Rename from
90         pp_cxx_declaration.  Adjust.
91         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
92         declaration, declaration_specifiers, function_specifier,
93         declarator, direct_declarator, abstract_declarator,
94         direct_abstract_declarator.
95         * error.c (dump_decl): Adjust.
97 2013-08-29  Jan Hubicka  <jh@suse.cz>
99         Correct previous patch to not mark terminate as LEAF.
100         * class.c (build_vtbl_initializer): Drop LEAF
101         * decl.c (cxx_init_decl_processing): Likewise.
102         (push_throw_library_fn): Likewise.
103         * except.c (init_exception_processing): Likewise.
104         (do_begin_catch): Likewise.
105         (do_end_catch): Likewise.
106         (do_allocate_exception): Likewise.
108 2013-08-29  Jan Hubicka  <jh@suse.cz>
110         * class.c (build_vtbl_initializer): Make __cxa_deleted_virtual
111         ECF_NORETURN | ECF_LEAF
112         * cp-tree.h (build_library_fn_ptr, build_cp_library_fn_ptr,
113         push_library_fn, push_void_library_fn): Update prototype.
114         * decl.c (build_library_fn_1): Remove.
115         (push_cp_library_fn, build_cp_library_fn): Update to take ECF flags.
116         (cxx_init_decl_processing): Update; global_delete_fndecl is ECF_NOTROW;
117         __cxa_pure_virtual is ECF_NORETURN | ECF_NORETURN | ECF_LEAF.
118         (build_library_fn_1): Add ecf_flags argument; rename to ...
119         (build_library_fn): ... this one.
120         (build_cp_library_fn): Take ecf_flags; do not copy NOTHROW flag.
121         (build_library_fn_ptr): Take ecf_flags.
122         (build_cp_library_fn_ptr): Likewise.
123         (push_library_fn): Likewise.
124         (push_cp_library_fn): Likewise.
125         (push_void_library_fn): Likewise.
126         (push_throw_library_fn): All throws are ECF_NORETURN.
127         (__cxa_atexit, __cxa_thread_atexit): Add ECF_LEAF | ECF_NOTHROW attributes.
128         (expand_static_init): __cxa_guard_acquire, __cxa_guard_release,
129         __cxa_guard_abort are ECF_NOTHROW | ECF_LEAF.
130         * except.c (init_exception_processing): terminate is
131         ECF_NOTHROW | ECF_NORETURN | ECF_LEAF.
132         (declare_nothrow_library_fn): Add ecf_flags parameter.
133         (__cxa_get_exception_ptr): Is ECF_NOTHROW | ECF_PURE | ECF_LEAF |
134         ECF_TM_PURE.
135         (do_begin_catch): cxa_begin_catch and _ITM_cxa_begin_catch
136         are ECF_NOTHROW | ECF_LEAF.
137         (do_end_catch): __cxa_end_catch and _ITM_cxa_end_catch is
138         ECF_LEAF.
139         (do_allocate_exception): _cxa_allocate_exception
140         and _ITM_cxa_allocate_exception are ECF_NOTHROW | ECF_MALLOC
141         | ECF_LEAF
142         (do_free_exception): __cxa_free_exception is
143         ECF_NOTHROW | ECF_LEAF.
144         * rtti.c (build_dynamic_cast_1): __dynamic_cast
145         is ECF_LEAF | ECF_PURE | ECF_NOTHROW.
147 2013-08-29  Adam Butcher  <adam@jessamine.co.uk>
149         * error.c (dump_lambda_function): New function, dependent on ...
150         (dump_substitution): ... this new function, factored out of ...
151         (subst_to_string): ... here and ...
152         (dump_function_decl): ... here.  Updated to early-out with call to
153         dump_lambda_function after determining template bindings.
155 2013-08-28  Paolo Carlini  <paolo.carlini@oracle.com>
157         PR c++/58255
158         * init.c (build_aggr_init): When init == void_type_node do not
159         set LOOKUP_ONLYCONVERTING.
161 2013-08-27  Caroline Tice  <cmtice@google.com>
163         * vtable-class-hierarchy.c: Remove unnecessary include statements.
164         (MAX_SET_SIZE): Remove unnecessary constant.
165         (register_construction_vtables):  Make vtable_ptr_array parameter
166         into a vector; remove num_args parameter. Change array accesses to
167         vector accesses.
168         (register_other_binfo_vtables): Ditto.
169         (insert_call_to_register_set): Ditto.
170         (insert_call_to_register_pair): Ditto.
171         (output_set_info):  Ditto.  Also change warning calls to warning_at
172         calls, and fix format of warning messages.
173         (register_all_pairs): Change vtbl_ptr_array from an array into a
174         vector.  Remove num_vtable_args (replace with calls to vector length).
175         Change array stores & accesses to vector functions. Change calls to
176         register_construction_vtables, register_other_binfo_vtables,
177         insert_call_to_register_set, insert_call_to_register_pair and
178         output_set_info to match their new signatures.  Change warning to
179         warning_at and fix the format of the warning message.
181 2013-08-27  Jakub Jelinek  <jakub@redhat.com>
182             Aldy Hernandez  <aldyh@redhat.com>
184         * cp-tree.h (CP_OMP_CLAUSE_INFO): Adjust range for new clauses.
186 2013-08-27  Paolo Carlini  <paolo.carlini@oracle.com>
188         * decl.c (grokfndecl): Remove old bison hack.
190 2013-08-26  Jan Hubicka  <jh@suse.cz>
192         * cp-tree.h (DECL_CONSTRUCTOR_P, DECL_DESTRUCTOR_P): Use
193         middle-end flag.
195 2013-08-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
197         * cxx-pretty-print.h (cxx_pretty_printer::unary_expression):
198         Declare as overrider.
199         (cxx_pretty_printer::multiplicative_expression): Likewise.
200         (cxx_pretty_printer::conditional_expression): Likewise.
201         (cxx_pretty_printer::assignment_expression): Likewise.
202         (cxx_pretty_printer::expression): Likewise.
203         * cxx-pretty-print.c (cxx_pretty_printer::unary_expression):
204         Rename from pp_cxx_unary_expression.  Adjust.
205         (cxx_pretty_printer::multiplicative_expression): Rename from
206         pp_cxx_multiplicative_expression.  Adjust.
207         (cxx_pretty_printer::conditional_expression): Rename from
208         pp_cxx_conditional_expression.  Adjust.
209         (cxx_pretty_printer::assignment_expression): Rename from
210         pp_cxx_assignment_expression.  Adjust.
211         (cxx_pretty_printer::expression): Rename from pp_cxx_expression.
212         Adjust.
213         (cxx_pretty_printer::cxx_pretty_printer): Dot not assign to
214         unary_expression, multiplicative_expression,
215         conditional_expression, assignment_expression, expression.
217 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
219         * cxx-pretty-print.h (cxx_pretty_printer::postfix_expression):
220         Declare as overrider.
221         * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
222         Rename from pp_cxx_postfix_expression.  Adjust.
223         (pp_cxx_expression): Use pp_postfix_expression.
224         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
225         postfix_expression.
227 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
229         * cxx-pretty-print.h (cxx_pretty_printer::primary_expression): Now
230         an overrider of c_pretty_printer::primary_expression.
231         * cxx-pretty-print.c (cxx_pretty_printer::primary_expression):
232         Rename from pp_cxx_primary_expression.  Adjust.
233         (pp_cxx_postfix_expression): Use pp_primary_expression.
234         (pp_cxx_ctor_initializer): Likewise.
235         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
236         primary_expression.
238 2013-08-23  Jan Hubicka  <jh@suse.cz>
240         * cp-tree.h (struct lang_type_class): Free is_final bit.
241         (CLASSTYPE_FINAL): Define using TYPE_FINAL_P.
242         (DECL_FINAL_P): Remove.
243         * pt.c (instantiate_class_template_1): Guard that CLASSTYPE_FINAL
244         is called on CLASS_TYPE_P.
246 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
248         * cxx-pretty-print.c (M_): Remove.
249         (pp_cxx_unqualified_id): Use translate_string instead of M_.
250         (pp_cxx_canonical_template_parameter): Likewise.
252 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
254         * cxx-pretty-print.h (cxx_pretty_printer::id_expression): Declare.
255         * cxx-pretty-print.c (cxx_pretty_printer::id_expression): Rename
256         from pp_cxx_id_expression.  Adjust.
257         (pp_cxx_userdef_literal): Use pp_id_expression.
258         (pp_cxx_primary_expression): Likewise.
259         (pp_cxx_direct_declarator): Likewise.
260         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
261         id_expression.
263 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
265         * cxx-pretty-print.h (cxx_pretty_printer::constant): Now a member
266         function, overriding c_pretty_printer::constant.
267         * cxx-pretty-print.c (cxx_pretty_printer::constant): Rename from
268         pp_cxx_constant.  Adjust.
269         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to constant.
271 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutiobs.net>
273         * cp-objcp-common.c (cxx_initialize_diagnostics): Call a
274         destructor for the early printer.
275         * error.c (type_to_string): Use pp_buffer.
277 2013-08-22  Paolo Carlini  <paolo.carlini@oracle.com>
279         PR c++/56380
280         * class.c (check_field_decls): Check for const mutable and const
281         reference data members.
283 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
285         * error.c (init_error): Remove calls to pp_construct and
286         pp_cxx_pretty_printer_init.  Initialize cxx_pp with placement-new.
287         * cxx-pretty-print.h (cxx_pretty_printer::cxx_pretty_printer): Declare.
288         (cxx_pretty_printer_init): Remove.
289         * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer):
290         Rename from cxx_pretty_printer_init.  Adjust.
291         * cp-objcp-common.c (cxx_initialize_diagnostics): Simplify
292         initialization of C++ diagnostics pretty printer.
294 2013-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
296         * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
297         * cp-tree.h (REFERENCE_REF_P): Likewise.
298         * semantics.c (finish_offsetof): Likewise.
300 2013-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
302         PR c++/56130
303         * semantics.c (finish_id_expression): Handle deprecated references.
305 2013-08-20  Jason Merrill  <jason@redhat.com>
307         PR c++/58119
308         * cvt.c (build_expr_type_conversion): Don't complain about a
309         template that can't match the desired type category.
311 2013-08-20  Gabriel Dos Reis  <gdr@integrable-solutions.net>
313         * error.c (pp_ggc_formatted_text): New.
314         (type_as_string): Use it in lieu of pp_formatted_text.
315         (type_as_string_translate): Likewise.
316         (expr_as_string): Likewise.
317         (decl_as_string): Likewise.
318         (decl_as_string_translate): Likewise.
319         (lang_decl_name): Likewise.
320         (decl_to_string): Likewise.
321         (expr_to_string): Likewise.
322         (fndecl_to_string): Likewise.
323         (parm_to_string): Likewise.
324         (type_to_string): Likewise.
325         (args_to_string): Likewise.
326         (subst_to_string): Likewise.
328 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
330         PR c/57490
331         * cp-array-notation.c (cp_expand_cond_array_notations): Added a
332         check for truth values.
333         (expand_array_notation_exprs): Added truth values case.  Removed an
334         unwanted else.  Added for-loop to walk through subtrees in default
335         case.
336         * call.c (build_cxx_call): Inherited the type of the array notation for
337         certain built-in array notation functions.
339 2013-08-19  Paolo Carlini  <paolo.carlini@oracle.com>
341         * parser.c (cp_parser_lambda_introducer, cp_parser_decltype_expr):
342         Use cp_parser_lookup_name_simple.
344 2013-08-19  Paolo Carlini  <paolo.carlini@oracle.com>
346         * name-lookup.h (pop_bindings_and_leave_scope): Declare.
347         * name-lookup.c (pop_bindings_and_leave_scope): Define.
348         * parser.c (cp_parser_lambda_declarator_opt,
349         cp_parser_direct_declarator, cp_parser_cache_defarg): Use it.
351 2013-08-17  Jason Merrill  <jason@redhat.com>
353         PR c++/58083
354         * name-lookup.c (push_class_level_binding_1): It's OK to push a
355         lambda type after the enclosing type is complete.
357 2013-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
359         * error.c (dump_scope): Add a cxx_pretty_printer parameter.
360         Adjust callers.
361         (dump_template_argument): Likewise.
362         (dump_template_argument_list): Likewise.
363         (dump_template_parameter): Likewise.
364         (dump_template_bindings): Likewise.
365         (dump_alias_template_specialization): Likewise.
366         (dump_type): Likewise.
367         (dump_typename): Likewise.
368         (dump_aggr_type): Likewise.
369         (dump_type_prefix): Likewise.
370         (dump_type_suffix): Likewise.
371         (dump_global_iord): Likewise.
372         (dump_simple_decl): Likewise.
373         (dump_decl): Likewise.
374         (dump_template_decl): Likewise.
375         (dump_function_decl): Likewise.
376         (dump_parameters): Likewise.
377         (dump_ref_qualifier): Likewise.
378         (dump_exception_spec): Likewise.
379         (dump_function_name): Likewise.
380         (dump_template_parms): Likewise.
381         (dump_call_expr_args): Likewise.
382         (dump_aggr_init_expr_args): Likewise.
383         (dump_expr_list): Likewise.
384         (dump_expr_init_vec): Likewise.
385         (dump_expr): Likewise.
386         (dump_binary_op): Likewise.
387         (dump_unary_op): Likewise.
389 2013-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
391         PR c++/51912
392         * cp-tree.h (LOOKUP_NO_NON_INTEGRAL): Add.
393         * decl.c (case_conversion): Use it.
394         * call.c (standard_conversion): Likewise.
395         (implicit_conversion): Adjust.
397 2013-08-13  Adam Butcher  <adam@jessamine.co.uk>
399         * pt.c: Grammar fix in comments ("it's" to "its").
401 2013-08-12  Paolo Carlini  <paolo.carlini@oracle.com>
403         * decl.c (warn_extern_redeclared_static, duplicate_decls,
404         check_elaborated_type_specifier): Use error + inform.
405         * friend.c (make_friend_class): Likewise.
406         * semantics.c (finish_id_expression): Likewise.
408 2013-08-09  Paolo Carlini  <paolo.carlini@oracle.com>
410         Revert:
411         2013-08-07  Paolo Carlini  <paolo.carlini@oracle.com>
413         PR c++/46206
414         * name-lookup.c (lookup_name_real_1): Handle iter->type before
415         iter->value.
417 2013-08-07  Paolo Carlini  <paolo.carlini@oracle.com>
419         PR c++/46206
420         * name-lookup.c (lookup_name_real_1): Handle iter->type before
421         iter->value.
423 2013-08-06  Caroline Tice  <cmtice@google.com>
425         * Make-lang.in (*CXX_AND_OBJCXX_OBJS):  Add vtable-class-hierarchy.o to
426         list.
427         (vtable-class-hierarchy.o): Add build rule.
428         * cp-tree.h (vtv_start_verification_constructor_init_function): New
429         extern function decl.
430         (vtv_finish_verification_constructor_init_function): New extern
431         function decl.
432         (build_vtbl_address): New extern function decl.
433         (get_mangled_vtable_map_var_name): New extern function decl.
434         (vtv_compute_class_hierarchy_transitive_closure): New extern function
435         decl.
436         (vtv_generate_init_routine): New extern function decl.
437         (vtv_save_class_info): New extern function decl.
438         (vtv_recover_class_info): New extern function decl.
439         (vtv_build_vtable_verify_fndecl): New extern function decl.
440         * class.c (finish_struct_1): Add call to vtv_save_class_info if
441         flag_vtable_verify is true.
442         * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list.
443         * vtable-class-hierarchy.c: New file.
444         * mangle.c (get_mangled_vtable_map_var_name):  New function.
445         * decl2.c (start_objects): Update function comment.
446         (cp_write_global_declarations):  Call vtv_recover_class_info,
447         vtv_compute_class_hierarchy_transitive_closure and
448         vtv_build_vtable_verify_fndecl, before calling
449         finalize_compilation_unit, and call vtv_generate_init_rount after, IFF
450         flag_vtable_verify is true.
451         (vtv_start_verification_constructor_init_function): New function.
452         (vtv_finish_verification_constructor_init_function): New function.
453         * init.c (build_vtbl_address): Remove static qualifier from function.
455 2013-08-06  Jason Merrill  <jason@redhat.com>
457         PR c++/57825
458         * tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.
460 2013-08-05  Paolo Carlini  <paolo.carlini@oracle.com>
462         PR c++/58080
463         * typeck.c (cp_pointer_int_sum): Add tsubst_flags_t parameter.
464         (cp_build_binary_op): Adjust.
466 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
468         * cxx-pretty-print.h (pp_c_base): Remove.
469         (cxx_pretty_printer): Derive from c_pretty_printer.
470         Adjust macros using pp_c_base.
471         * cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base.
472         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise.
473         (pp_cxx_colon_colon): Likewise.
474         (pp_cxx_separate_with): Likewise.
475         (pp_cxx_storage_class_specifier): Do not call pp_c_base.
476         (pp_cxx_expression_list): Likewise.
477         (pp_cxx_space_for_pointer_operator): Likewise.
478         (pp_cxx_init_declarator): Likewise.
479         (pp_cxx_call_argument_list): Likewise.
480         (pp_cxx_constant): Likewise.
481         (pp_cxx_postfix_expression): Likewise.
482         (pp_cxx_new_expression): Likewise.
483         (pp_cxx_unary_expression): Likewise.
484         (pp_cxx_cast_expression): Likewise.
485         (pp_cxx_conditional_expression): Likewise.
486         (pp_cxx_assignment_expression): Likewise.
487         (pp_cxx_expression): Likewise.
488         (pp_cxx_function_specifier): Likewise.
489         (pp_cxx_decl_specifier_seq): Likewise.
490         (pp_cxx_simple_type_specifier): Likewise.
491         (pp_cxx_type_specifier_seq): Likewise.
492         (pp_cxx_ptr_operator): Likewise.
493         (pp_cxx_parameter_declaration_clause): Likewise.
494         (pp_cxx_direct_declarator): Likewise.
495         (pp_cxx_direct_abstract_declarator): Likewise.
496         (pp_cxx_type_id): Likewise.
497         (pp_cxx_statement): Likewise.
498         (pp_cxx_pretty_printer_init): Tidy.
499         * error.c (init_error): Do not use pp_base.
500         (dump_aggr_type): Likewise.
501         (dump_type_prefix): Likewise.
502         (dump_type_suffix): Likewise.
503         (dump_global_iord): Likewise.
504         (dump_decl): Likewise.
505         (dump_function_decl): Likewise.
506         (dump_ref_qualifier): Likewise.
507         (reinit_cxx_pp): Likewise.
508         (decl_as_dwarf_string): Likewise.
509         (lang_decl_dwarf_name): Likewise.
510         (type_to_string): Likewise.
511         (cv_to_string): Likewise.
512         (cxx_print_error_function): Likewise.
513         (cp_diagnostic_starter): Likewise.
514         (cp_diagnostic_finalizer): Likewise.
515         (cp_print_error_function): Likewise.
516         (print_instantiation_context): Likewise.
517         (cp_printer): Likewise.
519 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
521         * error.c (dump_type_prefix): Use specialized pretty printer
522         functions instead of pp_string or operators and punctuators.
523         (dump_decl): Likewise.
524         (dump_expr): Likewise.
526 2013-08-03  Jason Merrill  <jason@redhat.com>
528         DR 1286
529         * pt.c (get_underlying_template): New.
530         (convert_template_argument, lookup_template_class_1): Use it.
532         DR 1430
533         PR c++/51239
534         * pt.c (pack_expansion_args_count): Rename from
535         any_pack_expanson_args_p.
536         (coerce_template_parms): Reject pack expansion to
537         non-pack template parameter of alias template.
539 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
541         * error.c (dump_aggr_type): Use specialized pretty printer
542         functions instead of pp_character.
543         (dump_type_prefix): Likewise.
544         (dump_simple_decl): Likewise.
545         (type_to_string): Likewise.
547 2013-08-02  Paolo Carlini  <paolo.carlini@oracle.com>
549         * cp-tree.h (finish_stmt): Do not declare.
550         * decl.c (finish_stmt): Do not define.
551         * parser.c (cp_parser_expression_statement,
552         cp_parser_declaration_statement,
553         cp_parser_transaction_cancel): Don't call finish_stmt.
554         * semantics.c (finish_expr_stmt, finish_if_stmt,
555         finish_while_stmt, finish_do_stmt, finish_return_stmt,
556         finish_for_stmt, finish_switch_stmt, finish_compound_stmt,
557         finish_transaction_stmt): Likewise.
559 2013-08-01  Fabien Chêne  <fabien@gcc.gnu.org>
561         PR c++/54537
562         * cp-tree.h: Check OVL_USED with OVERLOAD_CHECK.
563         * name-lookup.c (do_nonmember_using_decl): Make sure we have an
564         OVERLOAD before calling OVL_USED. Call diagnose_name_conflict
565         instead of issuing an error without mentioning the conflicting
566         declaration.
568 2013-07-31  Paolo Carlini  <paolo.carlini@oracle.com>
570         * parser.c (cp_parser_sizeof_pack): Check cp_parser_identifier
571         return value for error_mark_node.
573 2013-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
575         PR c++/57673
576         * parser.c (cp_parser_cache_defarg): In an NSDMI don't stop when
577         token->type == CPP_ELLIPSIS.
579 2013-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
581         PR c++/57947
582         * call.c (is_std_init_list): Return false if cxx_dialect == cxx98.
584 2013-07-29  Jason Merrill  <jason@redhat.com>
586         PR c++/57901
587         * semantics.c (build_data_member_initialization, constexpr_fn_retval):
588         Use break_out_target_exprs instead of unshare_expr.
590 2013-07-29  Paolo Carlini  <paolo.carlini@oracle.com>
592         PR c++/57948
593         * call.c (initialize_reference): Don't crash when reference_binding
594         returns a conv with conv->kind == ck_ambig.
596 2013-07-29  Jason Merrill  <jason@redhat.com>
598         * mangle.c (write_name): Check for null context.
599         (write_unscoped_name): Allow PARM_DECL context.
601 2013-07-25  Paolo Carlini  <paolo.carlini@oracle.com>
603         PR c++/57981
604         * decl.c (check_default_argument): Take a tsubst_flags_t parameter.
605         (grokparms): Adjust.
606         * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
607         * pt.c (tsubst_default_argument, tsubst_default_arguments): Take
608         a tsubst_flags_t parameter.
609         (tsubst_decl): Adjust.
610         * call.c (convert_default_arg): Likewise.
611         * cp-tree.h (check_default_argument, tsubst_default_argument):
612         Update declarations.
614 2013-07-25  Paolo Carlini  <paolo.carlini@oracle.com>
616         PR c++/57880
617         * parser.c (cp_parser_operator, case CPP_WSTRING, CPP_STRING16,
618         CPP_STRING32, CPP_UTF8STRING, CPP_WSTRING_USERDEF,
619         CPP_STRING16_USERDEF, CPP_STRING32_USERDEF, CPP_UTF8STRING_USERDEF):
620         Fix string_len management, tidy.
622 2013-07-24  Paolo Carlini  <paolo.carlini@oracle.com>
624         PR c++/57942
625         * typeck.c (ptr_reasonably_similar): Use COMPARE_STRICT if either
626         target type is incomplete; return a bool, not an int.
627         * cp-tree.h (ptr_reasonably_similar): Adjust declaration.
629 2013-07-22  Paolo Carlini  <paolo.carlini@oracle.com>
631         * cp-tree.h (DERIVED_FROM_P): Pass tf_none to lookup_base, not
632         tf_warning_or_error.
634 2013-07-21   Ondřej Bílka  <neleai@seznam.cz>
636         * class.c: Fix typos.
637         * cp-array-notation.c: Likewise.
638         * cp-objcp-common.c: Likewise.
639         * decl.c: Likewise.
640         * init.c: Likewise.
641         * mangle.c: Likewise.
642         * parser.c: Likewise.
643         * pt.c: Likewise.
644         * semantics.c: Likewise.
646 2013-07-14  Adam Butcher  <adam@jessamine.co.uk>
648         * semantics.c (build_lambda_expr),
649         (build_lambda_object), (begin_lambda_type), (lambda_return_type),
650         (lambda_function), (lambda_capture_field_type), (is_capture_proxy),
651         (is_normal_capture_proxy), (insert_capture_proxy),
652         (insert_pending_capture_proxies), (lambda_proxy_type),
653         (build_capture_proxy), (vla_capture_type),
654         (register_capture_members), (add_default_capture),
655         (lambda_expr_this_capture), (maybe_resolve_dummy),
656         (nonlambda_method_basetype), (maybe_add_lambda_conv_op) and
657         (is_lambda_ignored_entity): Moved definitions into ...
658         * lambda.c: ... this new file.
660 2013-07-14  Marc Glisse  <marc.glisse@inria.fr>
662         * call.c (build_conditional_expr_1): Handle the case with 1 vector
663         and 2 scalars. Call save_expr before building a vector.
664         * typeck.c (cp_build_binary_op): Check complain before complaining.
666 2013-07-13  Lubos Lunak  <l.lunak@suse.cz>
668         PR c++/55203
669         * init.c (build_aggr_init): Check for warn_unused attribute.
670         * decl.c (poplevel): Likewise.
672 2013-07-13  Jason Merrill  <jason@redhat.com>
674         PR c++/57402
675         * init.c (build_vec_init): Use {} for arrays of class type.
676         (build_vec_delete): Don't take the address of the array.
678         PR c++/57793
679         * class.c (layout_class_type): Check for too-large class.
681         * call.c (can_convert): Allow user-defined conversions.
682         (can_convert_standard): New.
683         * cp-tree.h: Declare it.
684         * cvt.c (convert_to_reference): Use it.
685         * pt.c (convert_nontype_argument): Likewise.
686         * search.c (check_final_overrider): Likewise.
687         Don't worry about user-defined conversions.
689 2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
691         PR c++/57869
692         * typeck.c (build_reinterpret_cast_1): With -Wconditionally-supported
693         warn about casting between pointer-to-function and pointer-to-object.
695 2013-07-09  Jason Merrill  <jason@redhat.com>
697         PR c++/57402
698         * init.c (build_vec_init): Don't take shortcuts when initializing
699         a VLA.
701         PR c++/57471
702         * parser.c (cp_parser_sizeof_pack): Clear parser scopes.
704         PR c++/57658
705         * semantics.c (finish_id_expression): Return the id for an
706         unevaluated outer variable.
708         PR c++/57526
709         * semantics.c (lambda_capture_field_type): Build a DECLTYPE_TYPE
710         if the variable type uses 'auto'.
712         PR c++/57437
713         * typeck.c (check_return_expr): Lambda proxies aren't eligible
714         for nrv or return by move.
716         PR c++/57532
717         * parser.c (cp_parser_ref_qualifier_opt): Don't tentatively parse
718         a ref-qualifier in C++98 mode.
720         PR c++/57545
721         * pt.c (convert_nontype_argument) [INTEGER_CST]: Force the
722         argument to have the exact type of the parameter.
724         PR c++/57551
725         * semantics.c (cxx_eval_indirect_ref): Don't try to look through
726         a POINTER_PLUS_EXPR for type punning diagnostic.
728         PR c++/57831
729         * pt.c (tsubst_copy): Handle USING_DECL.
731 2013-07-09  Marc Glisse  <marc.glisse@inria.fr>
733         PR c++/53094
734         * semantics.c (cxx_eval_bit_field_ref): Handle VECTOR_CST.
736 2013-07-09  Marc Glisse  <marc.glisse@inria.fr>
738         PR c++/53000
739         * call.c (build_conditional_expr_1): Preserve xvalues.
741 2013-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
743         PR c++/51786
744         * parser.c (cp_parser_simple_declaration): Before calling shadow_tag
745         also check declares_class_or_enum.
747 2013-07-08  Jason Merrill  <jason@redhat.com>
749         PR c++/57550
750         * pt.c (fn_type_unification): Only defer during substitution.
751         (type_unification_real): Defer during defarg substitution,
752         add checks parm to pass back deferred checks.
753         (unify, do_auto_deduction): Adjust.
754         * semantics.c (reopen_deferring_access_checks): New.
755         * cp-tree.h: Declare it.
757 2013-07-06  Paolo Carlini  <paolo.carlini@oracle.com>
759         PR c++/28262
760         * parser.c (cp_parser_init_declarator): If we are parsing a typedef
761         set parser->default_arg_ok_p to false before cp_parser_declarator.
763 2013-07-05  Paolo Carlini  <paolo.carlini@oracle.com>
765         PR c++/14263
766         * class.c (build_base_path): Improve diagnostic.
768 2013-07-04  Paolo Carlini  <paolo.carlini@oracle.com>
770         PR c++/38634
771         * decl.c (start_preparsed_function): Return a bool, false if
772         push_template_decl fails.
773         (start_function): Adjust.
774         * cp-tree.h: Update.
776 2013-07-03  Jakub Jelinek  <jakub@redhat.com>
778         PR c++/57771
779         * parser.c (cp_parser_postfix_expression) <case RID_STATCAST>
780         Temporarily set parser->greater_than_is_operator_p for
781         cp_parser_expression and restore from saved value afterwards.
783 2013-06-28  Ed Smith-Rowland  <3dw4rd@verizon.net>
785         * cp-tree.h (UDLIT_OP_ANSI_PREFIX): Remove space.
786         * parser.c (cp_parser_operator()): Parse user-defined string
787         literal as literal operator.
789 2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>
791         PR c++/57645
792         * class.c (deduce_noexcept_on_destructors): Save, set, and restore
793         TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
794         destructors.
796 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
798         * parser.c (cp_parser_array_notation): Removed rejection array notation
799         of type function pointers. Added handling of array expressions when
800         Cilk Plus is enabled.  Took out type-checking.
801         (cp_parser_postfix_open_square_expression): Moved normal array expr.
802         parsing into cp_parser_array_notation when cilkplus is enabled.
803         (cp_parser_compound_statement): Removed expansion of array notations.
804         (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
805         (cp_parser_function_definition_after_declarator): Likewise.
806         (cp_parser_selection_statement): Removed error reporting.
807         (cp_parser_iteration_statement): Likewise.
808         (cp_parser_direct_declarator): Removed error checking/reporting if
809         array notations are used in the declarator.
810         * pt.c (instantiate_decl): Likewise.
811         (type_unification_real): Removed a check for ARRAY_NOTATION_REF.
812         (cxx_eval_constant_expression): Removed ARRAY_NOTATION_REF case.
813         (potential_constant_expression_1): Returned false for
814         ARRAY_NOTATION_REF case.
815         * cp-gimplify.c (cp_genericize): Added expansion of array notation
816         expressions here.
817         * cp-array-notation.c (make_triplet_val_inv): Removed loc and cry 
818         parameters.  Replaced build_decls with get_temp_regvar with type as
819         ptrdiff.
820         (create_array_refs): Made the type-casting to ptrdiff_type.
821         (replace_invariant_var): Added a check for void return type before 
822         creating new var.  Replaced build_decl and build_min_nt_loc with
823         get_temp_regvar.
824         (expand_an_in_modify_expr): Ditto.  Replaced body of redundant else 
825         with gcc_unreachable.  Removed few unwanted checks.  Made induction 
826         variable type as ptrdiff_type.  Removed loc and complain arguments 
827         passed into make_triplet_val_inv.  Replaced all modify expression's 
828         code from NOP EXPR to INIT EXPR.  Replaced all forceful appending 
829         into stmt. list with the non-forceful one.  Replaced some integer 
830         conversion and equality-checking to using tree_int_cst_equal.
831         (expand_sec_reduce_builtin): All changes mentioned in above function
832         expand_an_in_modify_expr.  Made the new variable type of
833         SEC_REDUCE_ANY/ALL_{NON}ZERO intrinsic functions as bool.
834         (expand_array_notation_exprs): Removed SWITCH_EXPR case.  Moved all
835         the error reporting from parser to this function.  Removed unwanted
836         statements and checks from SWITCH_STMT, WHILE_STMT, and DO_STMT cases.
837         (cilkplus_an_triplet_types_ok_p): Removed rejection of array notation
838         in function pointers.
839         (cp_expand_cond_array_notations): Added a new if statements to check
840         if condition has a zero rank.  If so, then just return.
841         (expand_return_expr): Added a check for return expressions with a rank.
842         Replaced get_tmp_regvar with a create_temporary_var.
843         (build_array_notation_ref): Simplified and removed unwanted if-stmts.
844         Moved common code outside if-statements.  Moved type-checking from
845         parser to here.
846         * semantics.c (finish_return_stmt): Removed a check for return exprs.
847         with a rank.
848         * call.c (convert_like_real): Removed a check for array notation
849         expression in a function.
850         (build_over_call): Likewise.
851         (magic_varargs_p): Added a check for builtin array notation function.
852         Made this function non-static and removed its prototype.
853         * cp-tree.h (magic_varargs_p): New prototype.
854         * typeck.c (cp_build_function_call_vec): Removed automatic setting of
855         nargs to the param->length when builtin reduction function is used.
856         (convert_arguments): Replaced check for a constant_p function with
857         margic_varargs_p function call.
858         (cp_build_binary_op): Removed calling of the function
859         find_correct_array_notation_type.
860         (cp_build_addr_expr_1): Removed an unwanted if-statement.
861         (convert_for_assignment): Removed automatic return of rhs when array
862         notation builtin function is used.
864 2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>
866         PR c++/57682
867         * parser.c (cp_parser_save_member_function_body): Handle correctly
868         curly braces in function-try-block mem-initializers.
870 2013-06-27  Marc Glisse  <marc.glisse@inria.fr>
872         PR c++/57509
873         * typeck.c (cp_build_vec_perm_expr): New function.
874         * cp-tree.h: Declare it.
875         * parser.c (cp_parser_postfix_expression): Call it.
876         * pt.c (tsubst_copy): Handle VEC_PERM_EXPR.
877         (tsubst_copy_and_build): Likewise.
879 2013-06-27  Marc Glisse  <marc.glisse@inria.fr>
881         PR c++/57172
882         * pt.c (more_specialized_fn): If both arguments are references,
883         give priority to an lvalue.
885 2013-06-26  Jason Merrill  <jason@redhat.com>
887         * typeck2.c (store_init_value): Diagnose a non-constant
888         initializer for in-class static.
890         PR c++/57408
891         * semantics.c (add_capture): Set type to error_mark_node after
892         error.
894 2013-06-25  Ed Smith-Rowland  <3dw4rd@verizon.net>
896         PR c++/57640
897         * parser.c (cp_parser_unqualified_id): Add declarator_p to checks
898         to trigger warning, (cp_literal_operator_id): Remove bogus TODO comment.
900 2013-06-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
902         * call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x.
903         * class.c (add_implicitly_declared_members): Likewise.
904         (check_field_decl): Likewise.
905         (finalize_literal_type_property): Likewise.
906         (check_bases_and_members): Likewise.
907         * decl.c (poplevel): Likewise.
908         (case_conversion): Likewise.
909         (check_initializer): Likewise.
910         (grokfndecl): Likewise.
911         (check_static_variable_definition): Likewise.
912         (compute_array_index_type): Likewise.
913         (grokdeclarator): Likewise.
914         (build_enumerator): Likewise.
915         * friend.c (make_friend_class): Likewise.
916         * lex.c (init_reswords): Likewise.
917         * method.c (synthesized_method_walk): Likewise.
918         (implicitly_declare_fn): Likewise.
919         * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
920         (cp_parser_constant_expression): Likewise.
921         (cp_parser_for_init_statement): Likewise.
922         (cp_parser_block_declaration): Likewise.
923         (cp_parser_type_name): Likewise.
924         (cp_parser_enum_specifier): Likewise.
925         (cp_parser_enumerator_list): Likewise.
926         (cp_parser_member_declaration): Likewise.
927         (cp_nth_tokens_can_be_std_attribute_p): Likewise.
928         (cp_parser_template_declaration_after_export): Likewise.
929         * pt.c (convert_nontype_argument_function): Likewise.
930         (convert_nontype_argument): Likewise.
931         (convert_template_argument): Likewise.
932         (tsubst_copy_and_build): Likewise.
933         (build_non_dependent_expr): Likewise.
934         * semantics.c (non_const_var_error): Likewise.
935         (potential_constant_expression_1): Likewise.
936         * tree.c (lvalue_kind): Likewise.
937         (build_vec_init_expr): Likewise.
938         (cast_valid_in_integral_constant_expression_p): Likewise.
939         * typeck.c (build_x_conditional_expr): Likewise.
940         * typeck2.c (check_narrowing): Likewise.
942 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
944         * cp-array-notation.c (cp_length_mismatch_in_expr_p): Remove.
945         (expand_an_in_modify_expr): Changed a function call from the above
946         removed function to length_mismatch_in_expr_p.
948 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
950         * call.c (convert_like_real): Added a check if array notation is present
951         in expression.  If so, then no conversion of arguments is necessary.
952         (build_over_call): Likewise.
953         * typeck.c (cp_build_function_call_vec): Likewise.
954         (convert_for_assignment): Likewise.
955         (cp_build_array_ref): Reject array notations with a rank greater than 1
956         as an array's index.
957         (cp_build_binary_op): If array notations are preent in op, then call
958         find_correct_array_notation_type.
959         (cp_build_addr_expr_1): Handle ARRAY_NOTATION_REF similar to ARRAY_REF.
960         * cp-array-notation.c: New file.
961         * cp-objcp-common.c (cp_common_init_ts): Marked ARRAY_NOTATION_REF tree
962         as typed.
963         * cp-tree.h (fix_array_notation_exprs): New prototype.
964         * semantics.c (finish_return_stmt): Reject array notations as
965         return value.
966         (cxx_eval_constant_expression): Added ARRAY_NOTATION_REF case.
967         (potential_constant_expression_1): Likewise.
968         * tree.c (lvalue_kind): Likewise.
969         * error.c (dump_decl): Likewise.
970         (dump_expr): Likewise.
971         * pt.c (ARRAY_NOTATION_REF): Likewise.
972         (type_unification_real): Do not unify any arguments if array notations
973         are found in arg.
974         (instantiate_decl): Added a check for array notaitons inside the
975         function body.  If so, then expand them.
976         * parser.c (cp_parser_array_notation): New function.
977         (cp_parser_postfix_open_square_expression): Added a check for colons
978         inside square braces.  If found, then handle the array access as an
979         array notation access.  Also, disable auto-correction from a single
980         colon to scope when Cilk Plus is enabled.
981         (cp_parser_compound_statement): Added a check for array notations
982         inside the statement.  If found, then expand them.
983         (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
984         (cp_parser_function_definition_after_declarator): Likewise.
985         (cp_parser_selection_statement): Searched for array notations inside
986         condition.  If so, then emit an error.
987         (cp_parser_iteration_statement): Likewise.
988         (cp_parser_direct_declarator): Reject array notations inside a
989         variable or array declaration.
990         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Added cp/cp-array-notation.o.
992 2013-06-20  Jason Merrill  <jason@redhat.com>
994         PR c++/55149
995         * decl.c (compute_array_index_type): Don't reject VLAs in SFINAE
996         context if we're in C++14 mode.
997         * tree.c (array_of_runtime_bound_p): Return true for a dependent
998         bound that is not potentually constant.
999         * cp-tree.h (DECL_VLA_CAPTURE_P, REFERENCE_VLA_OK): New.
1000         * pt.c (tsubst) [REFERENCE_TYPE]: Check REFERENCE_VLA_OK.
1001         * semantics.c (build_lambda_object): Don't rvalue a VLA capture.
1002         (build_capture_proxy): Set REFERENCE_VLA_OK.
1003         (vla_capture_type): Make it a proper C++ class.
1004         (add_capture): Set DECL_VLA_CAPTURE_P.  Don't pre-digest the
1005         initializer.
1007         * decl.c (compute_array_index_type): Use size_one_node.
1009         * pt.c (process_partial_specialization): Build a TEMPLATE_DECL for
1010         a partial specialization.
1011         (tsubst_decl): Don't clobber CLASSTYPE_TI_TEMPLATE of a partial
1012         specialization.
1013         (most_specialized_class): Adjust.
1015         * cp-tree.h (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT)
1016         (DECL_TEMPLATE_INSTANTIATIONS, DECL_TEMPLATE_SPECIALIZATIONS): Use
1017         TEMPLATE_DECL_CHECK.
1019 2013-06-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1021         PR c++/57638
1022         * pt.c (unify, [TEMPLATE_PARM_INDEX]): Pass to unify_type_mismatch
1023         TREE_TYPE (arg), not arg itself.
1025 2013-06-18  Paolo Carlini  <paolo.carlini@oracle.com>
1027         PR c++/53211
1028         * pt.c (type_dependent_expression_p): Handle an array of unknown
1029         bound depending on a variadic parameter.
1030         * parser.c (cp_parser_range_for): Revert PR56794 changes.
1032 2013-06-17  Richard Biener  <rguenther@suse.de>
1034         * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h.
1036 2013-06-17  Paolo Carlini  <paolo.carlini@oracle.com>
1038         PR c++/16128
1039         * parser.c (cp_parser_expression_statement): Check whether
1040         cp_parser_expression returns error_mark_node.
1042 2013-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
1044         PR c++/51413
1045         * semantics.c (finish_offsetof): Handle INDIRECT_REF as expr.
1047 2013-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
1049         PR c++/57599
1050         * rtti.c (build_dynamic_cast_1): In case of cast to an unambiguous
1051         accessible base simply forward to build_static_cast.
1053 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
1055         PR c++/38958
1056         * decl.c (poplevel): For the benefit of -Wunused-variable see
1057         through references.
1059 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
1061         * parser.c (cp_parser_nested_name_specifier_opt): Fix typo in comment.
1063 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
1065         PR c++/42021
1066         * parser.c (cp_parser_nested_name_specifier_opt): Avoid emitting
1067         again diagnostic already emitted by cp_parser_lookup_name.
1069 2013-06-11  Jan Hubicka  <jh@suse.cz>
1071         PR c++/57551
1072         * cp/pt.c (mark_decl_instantiated): Do not export explicit
1073         instantiations of anonymous namespace templates.
1075 2013-06-10  Jason Merrill  <jason@redhat.com>
1077         * name-lookup.c (add_decl_to_level): Add decls in an anonymous
1078         namespace to static_decls.
1080 2013-06-07  Sriraman Tallam  <tmsriram@google.com>
1082         PR c++/57548
1083         * call.c (build_over_call):  Check if current_function_decl is
1084         NULL.
1086 2013-06-07  Paolo Carlini  <paolo.carlini@oracle.com>
1088         PR c++/53658
1089         * pt.c (lookup_template_class_1): Consistently use TYPE_MAIN_DECL,
1090         not TYPE_STUB_DECL, to access the _DECL for a _TYPE.
1092 2013-06-06  Jason Merrill  <jason@redhat.com>
1094         PR c++/55520
1095         * semantics.c (add_capture): Diagnose capture of variable-size
1096         type that is not a C++1y array of runtime bound.
1098         * decl.c (grokdeclarator): Keep a decl with error type.
1099         (grokfield, grokbitfield): Likewise.
1100         * pt.c (instantiate_class_template_1): Likewise.
1101         (tsubst_decl): Drop redundant error.
1102         * class.c (walk_subobject_offsets): Handle erroneous fields.
1103         * typeck2.c (process_init_constructor_record): Likewise.
1105 2013-06-05  Paolo Carlini  <paolo.carlini@oracle.com>
1107         PR c++/51908
1108         * parser.c (cp_parser_postfix_expression [RID_*CAST]): Set
1109         parser->in_type_id_in_expr_p before calling cp_parser_type_id.
1111 2013-06-03  Jan Hubicka  <jh@suse.cz>
1113         * decl2.c (maybe_make_one_only): Use forced_by_abi instead of
1114         mark_decl_referenced.
1115         (mark_needed): Likewise.
1117 2013-06-03  Jason Merrill  <jason@redhat.com>
1119         * class.c (mark_type_abi_tags): New.
1120         (check_abi_tags): Use it.
1122 2013-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
1124         PR c++/57419
1125         * decl2.c (mark_used): Add overload taking a tsubst_flags_t too.
1126         * semantics.c (finish_qualified_id_expr): Use it.
1127         * cp-tree.h: Update.
1129 2013-06-01  Jan Hubicka  <jh@suse.cz>
1131         * decl2.c (cp_write_global_declarations): Replace same_body_alias
1132         by symbol.cpp_implicit_alias.
1134 2013-05-30  Jason Merrill  <jason@redhat.com>
1136         PR c++/57404
1137         * cp-lang.c (cp_classify_record): Handle structs without
1138         TYPE_LANG_SPECIFIC.
1140         PR c++/52377
1141         * class.c (common_enclosing_class): New.
1142         * cp-tree.h: Declare it.
1143         * init.c (sort_mem_initializers): Don't splice out a union member
1144         with an NSDMI.
1146 2013-05-29  Jan Hubicka  <jh@suse.cz>
1148         * tree.c (cp_fix_function_decl_p): Update for new symtab flags.
1149         * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise.
1151 2013-05-25  Paolo Carlini  <paolo.carlini@oracle.com>
1153         PR c++/25666
1154         * decl2.c (check_classfn): Check for destructors declared as member
1155         templates.
1157 2013-05-24  Jason Merrill  <jason@redhat.com>
1159         PR c++/56971
1160         * pt.c (any_template_arguments_need_structural_equality_p): A
1161         TEMPLATE_TEMPLATE_PARM can require structural type comparison.
1163 2013-05-24  Paolo Carlini  <paolo.carlini@oracle.com>
1165         PR c++/19618
1166         * class.c (check_bitfield_decl): Warn for bool and enum bitfields
1167         with width exceeding the type.
1169 2013-05-24  Jason Merrill  <jason@redhat.com>
1171         PR c++/57391
1172         * semantics.c (cxx_eval_constant_expression): Handle FMA_EXPR.
1173         (cxx_eval_trinary_expression): Rename from cxx_eval_vec_perm_expr.
1175 2013-05-23  Jason Merrill  <jason@redhat.com>
1177         PR c++/57388
1178         * tree.c (build_ref_qualified_type): Clear
1179         FUNCTION_RVALUE_QUALIFIED for lvalue ref-qualifier.
1181 2013-05-22  Jason Merrill  <jason@redhat.com>
1183         PR c++/56930
1184         * call.c (convert_like_real): Use cp_convert_and_check.
1185         * cvt.c (cp_convert_and_check): Use maybe_constant_value.
1186         * semantics.c (cxx_eval_constant_expression): Handle LTGT_EXPR.
1187         (potential_constant_expression_1): Handle OMP_ATOMIC*.
1189         PR c++/56915
1190         * semantics.c (maybe_add_lambda_conv_op): Give up if the call op
1191         isn't defined.
1193 2013-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
1195         PR c++/57352
1196         * parser.c (cp_parser_conversion_type_id): Set up
1197         parser->type_definition_forbidden_message before calling
1198         cp_parser_type_specifier_seq.
1200 2013-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
1202         PR c++/57211
1203         * method.c (defaultable_fn_check): Avoid do_warn_unused_parameter
1204         warnings about defaulted functions.
1206 2013-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
1208         * call.c (build_conditional_expr_1): Add location_t parameter.
1209         (build_conditional_expr): Likewise.
1210         * typeck.c (rationalize_conditional_expr, cp_build_array_ref,
1211         get_member_function_from_ptrfunc, build_x_conditional_expr,
1212         cp_build_modify_expr): Update.
1213         * init.c (build_new_1): Likewise.
1214         * cp-tree.h: Update declaration.
1216 2013-05-20  Jason Merrill  <jason@redhat.com>
1218         PR c++/57016
1219         * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Only check type2
1220         if there is one.
1222         PR c++/57102
1223         * decl.c (fndecl_declared_return_type): Also look in
1224         DECL_SAVED_FUNCTION_DATA.
1226 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1228         PR c++/12288
1229         * parser.c (cp_parser_parameter_declaration): Check return value
1230         of cp_parser_parse_and_diagnose_invalid_type_name.
1232 2013-05-20  Jason Merrill  <jason@redhat.com>
1234         PR c++/57319
1235         * class.c (vbase_has_user_provided_move_assign): New.
1236         * method.c (synthesized_method_walk): Check it.
1237         * cp-tree.h: Declare it.
1239         PR c++/57325
1240         * tree.c (build_cplus_array_type): Copy layout info if element
1241         type is complete.
1243 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1245         PR c++/23608
1246         * call.c (build_new_op_1): Propagate loc to cp_build_binary_op.
1248 2013-05-20  Jason Merrill  <jason@redhat.com>
1250         PR c++/57317
1251         * decl2.c (determine_visibility): Use PRIMARY_TEMPLATE_P to decide
1252         whether a template has its own args.
1254 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1256         PR c++/57327
1257         * pt.c (unify_no_common_base): Swap arg and parm arguments to inform.
1259 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1261         PR c++/10207
1262         * parser.c (cp_parser_postfix_expression): Use cp_parser_braced_list
1263         instead of cp_parser_initializer_list for compound-literals.
1265 2013-05-20  Marc Glisse  <marc.glisse@inria.fr>
1267         PR c++/57175
1268         * typeck.c (check_return_expr): Reverse the alignment comparison.
1270 2013-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
1272         PR c++/18126
1273         * parser.c (cp_parser_sizeof_operand): As a GNU Extension, parse
1274         correctly sizeof compound-literal; update comments.
1276 2013-05-16  Marc Glisse  <marc.glisse@inria.fr>
1278         * call.c (build_conditional_expr_1): Use cp_build_binary_op
1279         instead of directly calling fold_build2.
1281 2013-05-16  Jason Merrill  <jason@redhat.com>
1283         * Make-lang.in (cc1plus$(exeext)): Use link mutex.
1285         PR c++/57279
1286         * decl.c (grokdeclarator): Allow member function qualifiers in
1287         TYPENAME context in C++11 mode.
1289 2013-05-16  Dodji Seketeli  <dodji@redhat.com>
1291         PR c++/56782 - Regression with empty pack expansions
1292         * pt.c (use_pack_expansion_extra_args_p): When at least a
1293         parameter pack has an empty argument pack, and another parameter
1294         pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
1295         mechanism.
1297 2013-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
1299         * name-lookup.c (pushdecl_maybe_friend_1): Replace pairs of
1300         warning_at and permerror with warning_at/inform and permerror/
1301         inform, respectively.
1303 2013-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
1305         PR c++/31952
1306         * name-lookup.c (pushdecl_maybe_friend_1): Diagnose illegal
1307         redeclarations.
1309 2013-05-14  Jason Merrill  <jason@redhat.com>
1311         PR c++/57243
1312         * parser.c (cp_parser_range_for): Call complete_type.
1314         PR c++/57041
1315         * pt.c (tsubst_copy_and_build): Don't recur into a designator.
1317 2013-05-14  Paolo Carlini  <paolo.carlini@oracle.com>
1319         PR c++/53903
1320         * method.c (defaulted_late_check): Check for compatible exception
1321         specification out of class explicitly defaulted functions too.
1323 2013-05-14  Jason Merrill  <jason@redhat.com>
1325         PR c++/56998
1326         * semantics.c (potential_constant_expression_1): Make sure the
1327         called function is potentially constant.
1328         * call.c (null_ptr_cst_p): Revert earlier change.
1330 2013-05-13  Jason Merrill  <jason@redhat.com>
1332         PR c++/56998
1333         * call.c (null_ptr_cst_p): An expression with side-effects can't
1334         be a C++03 null pointer constant.
1336         PR c++/57041
1337         * decl.c (reshape_init_class): Handle error_mark_node.
1339         PR c++/57254
1340         * typeck.c (merge_types): Propagate ref-qualifier
1341         in METHOD_TYPE case.
1343         PR c++/57253
1344         * decl.c (grokdeclarator): Apply ref-qualifier
1345         in the TYPENAME case.
1347         PR c++/57252
1348         * decl.c (decls_match): Compare ref-qualifiers.
1350 2013-05-10  Jason Merrill  <jason@redhat.com>
1352         PR c++/57196
1353         * pt.c (convert_template_argument): Use dependent_template_arg_p,
1354         not uses_template_parms.
1356         PR c++/57047
1357         * semantics.c (cxx_fold_indirect_ref): Fix thinko.
1359         PR c++/55149
1360         * semantics.c (add_capture): Error rather than abort on copy
1361         capture of VLA.
1362         * typeck.c (maybe_warn_about_returning_address_of_local): Don't
1363         warn about capture proxy.
1365 2013-05-09  Jason Merrill  <jason@redhat.com>
1367         * decl.c (cp_finish_decl): Only check VLA bound in C++1y mode.
1369         PR c++/57222
1370         * pt.c (lookup_template_class_1): Handle getting a template
1371         template parameter as D1.
1373         N3639 C++1y VLA diagnostics
1374         * decl.c (grokdeclarator): Complain about reference, pointer, or
1375         typedef to VLA.
1376         (create_array_type_for_decl): Complain about array of VLA.
1377         * pt.c (tsubst): Likewise.
1378         * rtti.c (get_tinfo_decl): Talk about "array of runtime bound".
1379         * semantics.c (finish_decltype_type): Complain about decltype of VLA.
1380         * typeck.c (cp_build_addr_expr_1): Complain about VLA.
1381         (cxx_sizeof_or_alignof_type): Likewise.
1383         N3639 C++1y VLA support
1384         * decl.c (compute_array_index_type): Allow VLAs in C++1y mode.
1385         (check_array_initializer): Allow VLA init.
1386         (reshape_init_array_1): Adjust.
1387         (cp_finish_decl): Check for invalid VLA length.
1388         * typeck2.c (process_init_constructor_array): Adjust.
1389         (store_init_value): Use build_vec_init for VLAs.
1390         * semantics.c (add_capture): Capture VLA as ptr+len.
1391         (vla_capture_type): New.
1392         (build_capture_proxy): Rebuild the VLA.
1393         * typeck.c (build_simple_component_ref): Split out from...
1394         (build_ptrmemfunc_access_expr): ...here.
1395         * tree.c (array_of_runtime_bound_p): New.
1396         * init.c (throw_bad_array_length): New.
1397         (build_vec_init): Use it.
1398         * parser.c (cp_convert_range_for): When iterating over a VLA,
1399         use it directly rather than bind a reference.
1400         * cp-tree.h: Declare new functions.
1402 2013-05-08  Jason Merrill  <jason@redhat.com>
1404         * except.c (is_admissible_throw_operand_or_catch_parameter): Check
1405         variably_modified_type_p.
1406         (expand_start_catch_block): Mark the typeinfo used here.
1407         * semantics.c (finish_handler_parms): Not here.
1409         * error.c (dump_type_suffix): Try harder on VLA length.
1411         Core 624/N2932
1412         * init.c (throw_bad_array_new_length): New.
1413         (build_new_1): Use it.  Don't warn about braced-init-list.
1414         (build_vec_init): Use it.
1415         * call.c (build_operator_new_call): Use it.
1417         PR c++/57068
1418         * decl.c (grokdeclarator): Warn about ref-qualifiers here.
1419         * parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
1420         * error.c (maybe_warn_cpp0x): s/0x/11/.
1422 2013-05-08  Paolo Carlini  <paolo.carlini@oracle.com>
1424         PR c++/51226
1425         * parser.c (cp_parser_enum_specifier): Handle nested_name_specifier
1426         == error_mark_node.
1428 2013-05-06  Marc Glisse  <marc.glisse@inria.fr>
1430         * typeck.c (cp_build_binary_op): Call save_expr before
1431         build_vector_from_val.
1433 2013-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
1435         PR c++/57183
1436         * decl.c (cp_finish_decl): After do_auto_deduction copy the
1437         qualifers with cp_apply_type_quals_to_decl.
1439 2013-05-05  Paolo Carlini  <paolo.carlini@oracle.com>
1441         * pt.c (convert_nontype_argument): Add missing whitespace in
1442         error message.
1444 2013-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
1446         PR c++/53745
1447         * decl.c (build_enumerator): Improve error message.
1449 2013-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
1451         PR c++/14283
1452         * parser.c (cp_parser_diagnose_invalid_type_name): Improve error
1453         messages for template types and fix column numbers.
1455 2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
1457         PR c++/57132
1458         * pt.c (tsubst_copy_and_build, MODOP_EXPR): Increase / decrease
1459         c_inhibit_evaluation_warnings around build_x_modify_expr call.
1461 2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
1463         PR c++/57092
1464         * semantics.c (finish_decltype_type): Handle instantiated template
1465         non-type arguments.
1467 2013-04-28  Paolo Carlini  <paolo.carlini@oracle.com>
1469         PR c++/56450
1470         * semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
1472 2013-04-26  Jakub Jelinek  <jakub@redhat.com>
1474         * error.c (cp_print_error_function): Adjust file_name_as_prefix
1475         caller.
1477 2013-04-25  Jason Merrill  <jason@redhat.com>
1479         PR c++/56859
1480         * typeck.c (cxx_alignas_expr): Handle value-dependence properly.
1482         PR c++/50261
1483         * init.c (perform_member_init): Call reshape_init.
1485 2013-04-24  Jason Merrill  <jason@redhat.com>
1487         PR c++/53721
1488         * parser.c (cp_parser_postfix_dot_deref_expression): Fix thinko.
1490 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
1492         * typeck.c (cxx_sizeof_or_alignof_type): Change -Wpointer-arith
1493         pedwarn to simply use OPT_Wpointer_arith.
1494         (cp_build_unary_op): Likewise.
1496 2013-04-24  Jason Merrill  <jason@redhat.com>
1498         N3648: init-captures are named.
1499         * semantics.c (add_capture): Don't prepend "__" to init-captures.
1500         (build_capture_proxy): Adjust.
1501         * error.c (dump_simple_decl): Check DECL_NORMAL_CAPTURE_P.
1503         N3648: Allow braced and parenthesized initializers.
1504         * parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer.
1505         * pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE.
1506         * semantics.c (lambda_capture_field_type): Use do_auto_deduction.
1507         (add_capture): Collapse a parenthesized initializer into a single
1508         expression.
1509         * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New.
1511 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
1513         PR c++/56970
1514         * init.c (build_offset_ref): Add tsubst_flags_t parameter.
1515         * semantics.c (finish_qualified_id_expr): Likewise.
1516         (finish_id_expression): Update.
1517         * typeck.c (cp_build_addr_expr_1): Likewise.
1518         * pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
1519         * cp-tree.h: Update declarations.
1521 2013-04-22  Jason Merrill  <jason@redhat.com>
1523         Core 1586
1524         * parser.c (cp_parser_unqualified_id): Handle ~auto.
1525         (cp_parser_pseudo_destructor_name): Likewise.
1526         (cp_parser_postfix_dot_deref_expression): Adjust.
1527         (cp_lexer_nth_token_is_keyword): New.
1528         * semantics.c (finish_pseudo_destructor_expr): Handle ~auto.
1529         * typeck.c (lookup_destructor): Handle ~auto.
1531         * pt.c (fn_type_unification): Push tinst level around
1532         type_unification_real if we aren't explaining.
1533         * cp-tree.h (TFF_NO_TEMPLATE_BINDINGS): New.
1534         * error.c (dump_function_decl): Respect it.
1535         (subst_to_string): Pass it.
1537         PR c++/48665
1538         * rtti.c (get_typeid): Diagnose qualified function type.
1539         * pt.c (tsubst) [POINTER_TYPE]: Likewise.
1541         * error.c (dump_aggr_type): Fix lambda detection.
1542         (dump_simple_decl): Pretty-print capture field.
1544         N3323
1545         * cvt.c (build_expr_type_conversion): Two conversions that return
1546         the same type aren't necessarily ambiguous.
1548         N3648
1549         * parser.c (cp_parser_lambda_introducer): Make lambda capture init
1550         pedwarn unconditional except in C++1y mode.
1552         * semantics.c (potential_constant_expression_1): Don't crash on
1553         'this' in NSDMI.
1555         Core 1612
1556         * semantics.c (finish_id_expression): Reject capture of anonymous
1557         union member.
1559         Core 1609
1560         * decl2.c (check_default_args): Check for pack expansion.
1562         * mangle.c (write_type): Mangle decltype(auto).
1564 2013-04-19  Jason Merrill  <jason@redhat.com>
1566         N3638 changes to return type deduction
1567         * decl.c (undeduced_auto_decl): New.
1568         (require_deduced_type): New.
1569         (fndecl_declared_return_type): New.
1570         (decls_match): Use it.
1571         (duplicate_decls): Don't check for auto return.
1572         (grokdeclarator): Reject virtual auto.
1573         * class.c (resolve_address_of_overloaded_function): Handle
1574         auto function templates.
1575         * decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type.
1576         * cp-tree.h: Declare new fns.
1577         * error.c (dump_function_decl): Use fndecl_declared_return_type.
1578         * search.c (check_final_overrider): Likewise.
1579         * pt.c (make_decltype_auto): New.
1580         (do_auto_deduction): Require plain decltype(auto).
1581         (is_auto): Adjust.
1583         DR 941
1584         * decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
1585         template specializations.
1587 2013-04-16  Ed Smith-Rowland  <3dw4rd@verizon.net>
1589         Implement n3599 - Literal operator templates for strings.
1590         * parser.c (make_string_pack (tree value)): New function.
1591         (cp_parser_userdef_string_literal (cp_token *)): Use it
1592         to construct calls to character string literal operator templates.
1593         (cp_parser_template_declaration_after_export): Check for new string
1594         literal operator template parameter form.
1596 2013-04-15  Jason Merrill  <jason@redhat.com>
1598         * pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build.
1600         PR c++/52748
1601         * pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
1602         rather than a destructor name, it isn't an unqualified-name.
1603         (tsubst_copy_and_build): Pass down decltype_flag to operator
1604         handling code, too.
1606         PR c++/56388
1607         * semantics.c (insert_capture_proxy): Just use index 1 in the
1608         stmt_list_stack.
1610 2013-04-12  Jakub Jelinek  <jakub@redhat.com>
1612         * error.c (cp_print_error_function,
1613         print_instantiation_partial_context_line,
1614         maybe_print_constexpr_context): Colorize locus strings.
1616 2013-04-11  Jason Merrill  <jason@redhat.com>
1618         PR c++/52748
1619         * parser.c (complain_flags): New.
1620         (cp_parser_postfix_expression): Use it.
1621         (cp_parser_unary_expression): Likewise.
1622         (cp_parser_binary_expression): Likewise.
1623         (cp_parser_assignment_expression): Likewise.
1624         (cp_parser_expression): Likewise.
1625         (cp_parser_postfix_open_square_expression): Take decltype_p.
1626         (cp_parser_builtin_offsetof): Adjust.
1627         (cp_convert_range_for): Pass complain to finish_unary_op_expr.
1628         * decl2.c (grok_array_decl): Add decltype_p parm.
1629         * cp-tree.h: Adjust prototype.
1630         * semantics.c (finish_unary_op_expr): Add complain parm.
1632 2013-04-11  Jakub Jelinek  <jakub@redhat.com>
1634         PR c++/56895
1635         * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
1636         calling maybe_constant_value for C++98.
1638 2013-04-11  Jason Merrill  <jason@redhat.com>
1640         PR c++/56901
1641         * semantics.c (lambda_capture_field_type, lambda_proxy_type):
1642         Strip references before checking WILDCARD_TYPE_P.
1644 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
1646         * call.c (build_conditional_expr_1, build_over_call): Protect
1647         error calls with complain & tf_error.
1648         * typeck.c (finish_class_member_access_expr, cp_build_binary_op,
1649         build_x_unary_op, cp_build_unary_op, cp_build_compound_expr,
1650         build_ptrmemfunc): Likewise.
1651         (lookup_destructor): Take tsubst_flags_t parameter, adjust.
1653         * cvt.c (warn_ref_binding): Rename to diagnose_ref_binding.
1654         (convert_to_reference): Adjust.
1656 2013-04-11  Jason Merrill  <jason@redhat.com>
1658         * pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for
1659         local variables, look them up instead.
1660         (tsubst_decl) [VAR_DECL]: Remove handling for anonymous union
1661         proxies and substitution in unevaluated context.
1662         (tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY
1663         before the iterators.
1665         PR c++/23055
1666         * pt.c (uses_deducible_template_parms): New.
1667         (deducible_array_bound, deducible_expression): New.
1668         (deducible_template_args): New.
1669         (unify_one_argument): Call uses_deducible_template_parms.
1671 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
1673         PR c++/56913
1674         * typeck2.c (build_m_component_ref): Protect error calls with
1675         (complain & tf_error).
1677 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
1679         PR c++/54216
1680         * parser.c (cp_parser_enum_specifier): Check for empty
1681         anonymous enums and anonymous scoped enums.
1683 2013-04-10  Jakub Jelinek  <jakub@redhat.com>
1685         PR c++/56895
1686         * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
1687         first before calling maybe_constant_value for warn_for_div_by_zero
1688         or invalid shift count warning purposes.
1690 2013-04-09  Jason Merrill  <jason@redhat.com>
1692         PR c++/25466
1693         * rtti.c (build_typeid): Check the address of the argument
1694         rather than looking for an INDIRECT_REF.
1696 2013-04-04  Jason Merrill  <jason@redhat.com>
1698         PR c++/56838
1699         PR c++/17232
1700         * typeck2.c (abstract_virtuals_error_sfinae): Disable
1701         complete_type again.
1703 2013-04-08  Paolo Carlini  <paolo.carlini@oracle.com>
1705         PR c++/56871
1706         * decl.c (validate_constexpr_redeclaration): Allow an explicit
1707         specialization to be different wrt the constexpr specifier.
1709 2013-04-06  Jason Merrill  <jason@redhat.com>
1711         * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
1712         noreturn attribute.
1714 2013-04-05  Ed Smith-Rowland  <3dw4rd@verizon.net>
1716         * parser.c (cp_parser_ref_qualifier_seq_opt): Move to
1717         cp_parser_ref_qualifier_opt.  Error if more than one ref-qual found.
1719 2013-04-03  Jason Merrill  <jason@redhat.com>
1721         * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
1722         (TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
1723         (FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.
1725         * mangle.c (write_type): When writing a function type with
1726         function-cv-quals, don't add the unqualified type as a
1727         substitution candidate.
1729 2013-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
1731         PR c++/56815
1732         * typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
1733         pedwarn.
1735 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
1737         PR debug/56819
1738         * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
1739         from args to new_args.
1740         (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
1741         r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
1743 2013-04-02  Jason Merrill  <jason@redhat.com>
1745         PR c++/56821
1746         * mangle.c (write_function_type): Mangle ref-qualifier.
1747         (write_nested_name): Likewise.
1748         (canonicalize_for_substitution): Preserve ref-qualifier.
1749         (write_type): Likewise.
1751         PR c++/34949
1752         * decl.c (begin_destructor_body): Clobber the object in a cleanup.
1754 2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>
1756         * friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
1757         * pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
1758         (for_each_template_parm_r): Use TYPE_TI_ARGS.
1760 2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>
1762         * cp-tree.h (TAGGED_TYPE_P): Remove.
1763         (IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
1764         (TYPE_ANONYMOUS_P): Adjust.
1765         * call.c (build_new_op_1): Likewise.
1766         * class.c (find_abi_tags_r): Likewise.
1767         * decl.c (warn_misplaced_attr_for_class_type, start_decl,
1768         type_is_deprecated): Likewise.
1769         * decl2.c (grokfield, min_vis_r): Likewise.
1770         * pt.c (get_template_info): Likewise.
1771         * tree.c (handle_abi_tag_attribute): Likewise.
1773 2013-04-01  Jason Merrill  <jason@redhat.com>
1775         * semantics.c (maybe_constant_value): Check
1776         instantiation_dependent_expression_p.
1777         * pt.c (build_non_dependent_expr): Don't check it here.
1779         PR c++/56772
1780         * init.c (build_new): Don't try to process an array initializer
1781         at template definition time.
1783         PR c++/56793
1784         * typeck.c (finish_class_member_access_expr): Handle enum scope.
1786         PR c++/56794
1787         * parser.c (cp_parser_range_for): Don't try to do auto deduction
1788         in a template if the type of the range is incomplete.
1790         * call.c (add_function_candidate): Take the address of 'this' here.
1791         (build_over_call): And here.
1792         (build_new_method_call_1, build_op_call_1): Not here.
1793         (build_user_type_conversion_1): Or here.
1794         (add_candidates): Adjust.
1796         * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
1797         * class.c (same_signature_p): Use type_memfn_quals.
1798         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
1799         FUNCTION_OR_METHOD_TYPE_CHECK.
1800         * error.c (dump_type_suffix): Add padding before cv-qualifiers.
1801         * pt.c (unify): Use static_fn_type.
1803 2013-04-01  Bronek Kozicki <b.kozicki@gmail.com>
1804             Jason Merrill  <jason@redhat.com>
1806         Implement N2439 (ref-qualifiers for 'this')
1807         * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
1808         (FUNCTION_RVALUE_QUALIFIED): New.
1809         (FUNCTION_OR_METHOD_TYPE_CHECK): New.
1810         (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
1811         (cp_ref_qualifier): New enum.
1812         (cp_declarator): Add ref_qualifier.
1813         * parser.c (cp_parser_ref_qualifier_seq_opt): New.
1814         (cp_parser_direct_declarator): Use it.
1815         (make_call_declarator): Adjust.
1816         (cp_parser_lambda_declarator_opt): Adjust.
1817         * call.c (add_function_candidate): Handle ref-qualifier overload
1818         resolution semantics.
1819         (standard_conversion): Adjust.
1820         * class.c (add_method, same_signature_p): Compare ref-qualifiers.
1821         * decl.c (grokdeclarator): Handle ref-qualifiers.
1822         (grokfndecl): Check for invalid ref-qualifiers.
1823         (static_fn_type, revert_static_member_fn): Adjust.
1824         * decl2.c (build_memfn_type): Handle ref-qualifiers.
1825         (check_classfn): Check them.
1826         (cp_reconstruct_complex_type): Retain them.
1827         * error.c (dump_ref_qualifier): New.
1828         (dump_type_suffix, dump_function_decl): Use it.
1829         (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
1830         * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
1831         (unify): Retain them.
1832         * tree.c (cp_check_qualified_type): New.
1833         (cp_build_qualified_type_real): Keep exception spec and ref-qual.
1834         (build_ref_qualified_type): New.
1835         (strip_typedefs, build_exception_variant): Keep ref-qualifier.
1836         (cp_build_type_attribute_variant): Keep ref-qualifier.
1837         * typeck.c (merge_types): Keep ref-qualifier.
1838         (structural_comptypes): Compare ref-qualifier.
1839         (type_memfn_rqual): New.
1840         (apply_memfn_quals): Take ref-qual argument.
1841         * typeck2.c (build_m_component_ref): Check ref-qualifier.
1843 2013-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
1845         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
1846         (DECL_FUNCTION_TEMPLATE_P): Adjust.
1848         * cxx-pretty-print.c (pp_cxx_nested_name_specifier,
1849         pp_cxx_qualified_id): Use get_containing_scope.
1850         * parser.c (cp_parser_class_head): Likewise.
1851         * pt.c (push_template_decl_real): Likewise.
1853         * decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
1854         * pt.c (unify): Use CP_INTEGRAL_TYPE_P.
1856 2013-03-31  Paolo Carlini  <paolo.carlini@oracle.com>
1858         * decl2.c (collect_candidates_for_java_method_aliases): Use
1859         DECL_CLASS_SCOPE_P.
1860         * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
1861         (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
1862         * decl.c (duplicate_decls): Likewise.
1863         * parser.c (cp_parser_template_declaration_after_export): Likewise,
1864         also DECL_DECLARES_TYPE_P.
1865         * pt.c (instantiate_class_template_1): Likewise.
1866         * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
1867         (lookup_field_r): Likewise.
1868         (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
1869         (lookup_fnfields_slot_nolazy): Likewise.
1870         * semantics.c (finish_member_declaration): Likewise.
1871         * typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
1873 2013-03-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1875         * pt.c (template_parms_to_args): Fix typo in comment.
1877 2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
1879         * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
1881 2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
1883         * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
1884         (build_op_call_1): Likewise.
1885         (build_over_call): Likewise.
1886         (compare_ics): Likewise.
1887         * class.c (build_base_path): Likewise.
1888         (resolve_address_of_overloaded_function): Likewise.
1889         * cp-tree.h: Likewise.
1890         * cvt.c (cp_convert_to_pointer): Likewise.
1891         (convert_to_reference): Likewise.
1892         (ocp_convert): Likewise.
1893         (convert_force): Likewise, tidy.
1894         * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
1895         (pp_cxx_ptr_operator): Likewise.
1896         * decl.c (duplicate_decls): Likewise.
1897         (start_decl): Likewise.
1898         (grok_op_properties): Likewise.
1899         (start_preparsed_function): Likewise.
1900         (store_parm_decls): Likewise.
1901         (finish_function): Likewise.
1902         * decl2.c (delete_sanity): Likewise.
1903         (acceptable_java_type): Likewise.
1904         (grokbitfield): Likewise.
1905         (cp_reconstruct_complex_type): Likewise.
1906         * error.c (dump_type_prefix): Likewise.
1907         (dump_expr): Likewise.
1908         * except.c (push_eh_cleanup): Likewise.
1909         (complete_ptr_ref_or_void_ptr_p): Likewise.
1910         (can_convert_eh): Likewise.
1911         * init.c (build_new_1): Likewise.
1912         (build_delete): Likewise.
1913         (build_vec_delete): Likewise.
1914         * mangle.c (write_type): Likewise.
1915         * parser.c (lookup_literal_operator): Likewise.
1916         * pt.c (convert_nontype_argument_function): Likewise.
1917         (convert_nontype_argument): Likewise.
1918         (tsubst): Likewise.
1919         (unify): Likewise.
1920         (dependent_type_p_r): Likewise.
1921         * rtti.c (build_headof): Likewise.
1922         (build_typeid): Likewise.
1923         (build_dynamic_cast_1): Likewise.
1924         (target_incomplete_p): Likewise.
1925         (typeinfo_in_lib_p): Likewise.
1926         * semantics.c (finish_omp_for): Likewise.
1927         (cxx_eval_call_expression): Likewise.
1928         (maybe_resolve_dummy): Likewise.
1929         * tree.c (build_target_expr): Likewise.
1930         (cp_build_qualified_type_real): Likewise.
1931         * typeck.c (composite_pointer_type_r): Likewise.
1932         (composite_pointer_type): Likewise.
1933         (comp_except_types): Likewise.
1934         (cxx_sizeof_nowarn): Likewise.
1935         (string_conv_p): Likewise.
1936         (cp_build_array_ref): Likewise.
1937         (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
1938         (pointer_diff): Likewise.
1939         (cp_build_addr_expr_1): Likewise.
1940         (cp_build_unary_op): Likewise.
1941         (build_static_cast_1): Likewise.
1942         (cp_build_c_cast): Likewise.
1943         (comp_ptr_ttypes_real): Likewise.
1944         (ptr_reasonably_similar): Likewise.
1945         (comp_ptr_ttypes_const): Likewise.
1946         (casts_away_constness): Likewise.
1947         (check_literal_operator_args): Likewise.
1948         * typeck2.c (build_x_arrow): Likewise.
1949         (add_exception_specifier): Likewise.
1951 2013-03-29  Jason Merrill  <jason@redhat.com>
1953         N3582
1954         * cp-tree.h (AUTO_IS_DECLTYPE): New.
1955         * parser.c (cp_parser_decltype): Handle decltype(auto).
1956         (cp_parser_type_id_1): Allow auto without a late-specified
1957         return in C++1y.
1958         (cp_parser_primary_expression): Use the return value of
1959         finish_parenthesized_expr.
1960         (cp_parser_transaction_expression): Likewise.
1961         * semantics.c (force_paren_expr): New.
1962         (finish_parenthesized_expr): Use it.
1963         * call.c (build_conditional_expr_1): Likewise.
1964         * pt.c (do_auto_deduction): Handle decltype(auto).
1965         (tsubst_copy): Handle PAREN_EXPR.
1966         (tsubst_copy_and_build): Likewise.
1967         * error.c (dump_expr): Handle PAREN_EXPR.
1968         * cxx-pretty-print.c (pp_cxx_expression): Likewise.
1969         * mangle.c (write_expression): Ignore PAREN_EXPR.
1971         * parser.c (cp_parser_decltype_expr): Split out...
1972         (cp_parser_decltype): ...from here.
1974         PR c++/56774
1975         PR c++/35722
1976         * pt.c (unify_pack_expansion): Fix indexing.
1978 2013-03-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1980         * call.c (build_java_interface_fn_ref): Likewise.
1981         (make_temporary_var_for_ref_to_temp): Likewise.
1982         * class.c (check_field_decls): Likewise.
1983         (layout_class_type): Likewise.
1984         (finish_struct_1): Likewise.
1985         (fixed_type_or_null): Likewise.
1986         (get_vtbl_decl_for_binfo): Likewise.
1987         * cp-gimplify.c (omp_var_to_track): Likewise.
1988         (cp_genericize_r): Likewise.
1989         * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
1990         * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
1991         (DECL_DISCRIMINATOR_P): Likewise.
1992         * decl.c (poplevel): Likewise.
1993         (decls_match): Likewise.
1994         (duplicate_decls): Likewise.
1995         (decl_jump_unsafe): Likewise.
1996         (start_decl): Likewise.
1997         (check_for_uninitialized_const_var): Likewise.
1998         (make_rtl_for_nonlocal_decl): Likewise.
1999         (cp_finish_decl): Likewise.
2000         (expand_static_init): Likewise.
2001         (local_variable_p): Likewise.
2002         (maybe_register_incomplete_var): Likewise.
2003         * decl2.c (grokfield): Likewise.
2004         (comdat_linkage): Likewise.
2005         (determine_visibility): Likewise.
2006         (import_export_decl): Likewise.
2007         (prune_vars_needing_no_initialization): Likewise.
2008         (decl_maybe_constant_var_p): Likewise.
2009         * error.c (dump_simple_decl): Likewise.
2010         (dump_template_decl): Likewise.
2011         (cp_printer): Likewise.
2012         * except.c (build_throw): Likewise.
2013         * init.c (build_vtbl_address): Likewise.
2014         (member_init_ok_or_else): Likewise.
2015         (build_aggr_init): Likewise.
2016         (expand_aggr_init_1): Likewise.
2017         (build_offset_ref): Likewise.
2018         (constant_value_1): Likewise.
2019         * mangle.c (write_mangled_name): Likewise.
2020         (write_prefix): Likewise.
2021         * name-lookup.c (supplement_binding_1): Likewise.
2022         (add_decl_to_level): Likewise.
2023         (pushdecl_maybe_friend_1): Likewise.
2024         (check_for_out_of_scope_variable): Likewise.
2025         (validate_nonmember_using_decl): Likewise.
2026         (lookup_name_innermost_nonclass_level_1): Likewise.
2027         (lookup_arg_dependent_1): Likewise.
2028         * parser.c (cp_parser_lambda_introducer): Likewise.
2029         (cp_parser_template_argument): Likewise.
2030         (cp_parser_single_declaration): Likewise.
2031         * pt.c (convert_nontype_argument): Likewise.
2032         (instantiate_class_template_1): Likewise.
2033         (tsubst_decl): Likewise.
2034         (tsubst_expr): Likewise.
2035         (do_decl_instantiation): Likewise.
2036         (do_type_instantiation): Likewise.
2037         (regenerate_decl_from_template): Likewise.
2038         (always_instantiate_p): Likewise.
2039         (instantiate_decl): Likewise.
2040         (type_dependent_expression_p): Likewise.
2041         (build_non_dependent_expr): Likewise.
2042         * repo.c (repo_emit_p): Likewise.
2043         * rtti.c (build_dynamic_cast_1): Likewise.
2044         * search.c (shared_member_p): Likewise.
2045         * semantics.c (outer_var_p): Likewise.
2046         (finish_id_expression): Likewise.
2047         (finish_omp_clauses): Likewise.
2048         (finish_decltype_type): Likewise.
2049         (ensure_literal_type_for_constexpr_object): Likewise.
2050         * tree.c (lvalue_kind): Likewise.
2051         (bot_replace): Likewise.
2052         (cp_tree_equal): Likewise.
2053         (handle_init_priority_attribute): Likewise.
2054         (decl_storage_duration): Likewise.
2055         * typeck.c (cxx_sizeof_expr): Likewise.
2056         (cxx_alignof_expr): Likewise.
2057         (decay_conversion): Likewise.
2058         (build_class_member_access_expr): Likewise.
2059         (cp_build_array_ref): Likewise.
2060         (cxx_mark_addressable): Likewise.
2061         (maybe_warn_about_returning_address_of_local): Likewise.
2062         (check_return_expr): Likewise.
2063         * typeck2.c (cxx_readonly_error): Likewise.
2064         (abstract_virtuals_error_sfinae): Likewise.
2065         (cxx_incomplete_type_diagnostic): Likewise.
2067 2013-03-28  Lawrence Crowl  <crowl@google.com>
2069         * Make-lang.in
2070         (CXX_PARSER_H): Add header dependence.
2071         * cp-tree.h
2072         (extern debug (cp_binding_level &)): New.
2073         (extern debug (cp_binding_level *)): New.
2074         * name-lookup.h
2075         (debug (cp_binding_level &)): New.
2076         (debug (cp_binding_level *)): New.
2077         * parser.c
2078         (debug (cp_parser &)): New.
2079         (debug (cp_parser *)): New.
2080         (debug (cp_token &)): New.
2081         (debug (cp_token *)): New.
2082         (debug (vec<cp_token, va_gc> &)): New.
2083         (debug (vec<cp_token, va_gc> *)): New.
2084         * parser.c: Add header dependence.
2085         (extern debug (cp_parser &)): New.
2086         (extern debug (cp_parser *)): New.
2087         (extern debug (cp_token &)): New.
2088         (extern debug (cp_token *)): New.
2089         (extern debug (vec<cp_token, va_gc> &)): New.
2090         (extern debug (vec<cp_token, va_gc> *)): New.
2092 2013-03-28  Jason Merrill  <jason@redhat.com>
2094         PR c++/17232
2095         PR c++/52748
2096         * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
2097         the type if tf_decltype is set.
2098         * pt.c (fn_type_unification): Add decltype_p parm.
2099         (get_bindings): Adjust.
2100         * cp-tree.h: Adjust.
2101         * class.c (resolve_address_of_overloaded_function): Adjust.
2102         * call.c (add_template_candidate_real, print_z_candidate): Adjust.
2104         PR c++/56679
2105         * parser.c (cp_parser_sizeof_pack): Split out from...
2106         (cp_parser_sizeof_operand): ...here.  Require (id).
2108         PR c++/56701
2109         * semantics.c (finish_this_expr): 'this' is an rvalue.
2110         * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
2112         PR c++/56710
2113         * semantics.c (finish_member_declaration): Don't push closure
2114         members.
2116         * name-lookup.c (pushdecl_maybe_friend_1): Use
2117         nonlambda_method_basetype and current_nonlambda_class_type.
2119         PR c++/56728
2120         * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
2121         conversion from integer to pointer.
2122         (cxx_eval_constant_expression): Likewise.
2123         (cxx_eval_indirect_ref): Use the folded operand if we still think
2124         this might be constant.
2126 2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
2127             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2129         PR c++/56725
2130         * call.c (convert_like_real): Change series of two permerrors
2131         to permerror + inform (and likewise for two errors).
2132         (build_new_method_call_1): Likewise.
2133         * typeck.c (convert_for_initialization): Change additional
2134         warning or error to inform.
2136 2013-03-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2138         * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
2139         (first_aggr_init_expr): Likewise.
2140         (more_aggr_init_expr_args_p): Likewise.
2141         (type_of_this_parm): Likewise.
2142         (class_of_this_parm): Likewise.
2143         * name-lookup.h (get_global_value_if_present): Likewise.
2144         (is_typename_at_global_scope): Likewise.
2146 2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
2148         * call.c (joust): Don't call inform for a permerror returning false.
2149         * parser.c (cp_parser_check_class_key): Likewise.
2150         * pt.c (tsubst_copy_and_build): Likewise.
2152 2013-03-27  Jason Merrill  <jason@redhat.com>
2154         PR c++/56749
2155         * semantics.c (finish_qualified_id_expr): Return early
2156         for enum scope.
2158 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2160         * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
2161         * cvt.c (convert_to_void): Likewise.
2162         * error.c (dump_expr): Likewise.
2163         * mangle.c (write_expression): Likewise.
2164         * parser.c (cp_parser_template_argument): Likewise.
2165         * pt.c (convert_nontype_argument): Likewise.
2166         (tsubst_copy_and_build): Likewise.
2167         * rtti.c (build_typeid): Likewise.
2168         * semantics.c (finish_call_expr): Likewise.
2169         (finish_decltype_type): Likewise.
2170         (build_data_member_initialization): Likewise.
2171         * tree.c (is_dummy_object): Likewise.
2172         * typeck.c (decay_conversion): Likewise.
2173         (build_class_member_access_expr): Likewise.
2174         (cp_build_addr_expr_1): Likewise.
2175         (unary_complex_lvalue): Likewise.
2176         (check_return_expr): Likewise.
2177         * typeck2.c (cxx_readonly_error): Likewise.
2179 2013-03-26  Jason Merrill  <jason@redhat.com>
2181         PR c++/52597
2182         * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn.  Take tree.
2183         * semantics.c (finish_decltype_type): Check it before type_unknown_p.
2184         * cp-tree.h: Adjust prototype.
2186         PR c++/45282
2187         * typeck2.c (build_m_component_ref): Handle prvalue object.
2189 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2191         * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
2192         * decl.c (duplicate_decls): Likewise.
2193         (cp_finish_decl): Likewise.
2194         (check_class_member_definition_namespace): Likewise.
2195         * decl2.c (grokfield): Likewise.
2196         (decl_needed_p): Likewise.
2197         (import_export_decl): Likewise.
2198         (mark_used): Likewise.
2199         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2200         * pt.c (push_access_scope): Likewise.
2201         (instantiate_decl): Likewise.
2202         * ptree.c (cxx_print_decl): Likewise.
2203         * repo.c (repo_emit_p): Likewise.
2204         * semantics.c (note_decl_for_pch): Likewise.
2205         * tree.c (decl_linkage): Likewise.
2207 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
2209         PR c++/55951
2210         * decl.c (check_array_designated_initializer): Handle CONST_DECL
2211         as ce->index.
2213 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
2215         * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
2216         error messages.
2218         * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
2220 2013-03-25  Jason Merrill  <jason@redhat.com>
2222         PR c++/56699
2223         * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
2224         class is derived from the type of the object.
2226         PR c++/52014
2227         * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
2228         unevaluated context.
2230 2013-03-25  Paolo Carlini  <paolo.carlini@oracle.com>
2232         PR c++/56722
2233         * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
2234         DECL_TEMPLATE_INSTANTIATION.
2236 2013-03-22  Jason Merrill  <jason@redhat.com>
2238         PR c++/56684
2239         * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
2240         and CONST_DECL.
2242 2013-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2244         * cp-tree.h (identifier_p): New.
2245         * call.c: Throughout, call identifier_p insstead of direct
2246         comparaison of TREE_CODE against IDENTIFIER_NODE.
2247         * decl.c: Likewisse.
2248         * decl2.c: Likewise.
2249         * init.c: Likewise.
2250         * mangle.c: Likewise.
2251         * name-lookup.c: Likewise.
2252         * parser.c: Likewise.
2253         * pt.c: Likewise.
2254         * search.c: Likewise.
2255         * semantics.c: Likewise.
2256         * tree.c: Likewise.
2257         * typeck.c: Likewise.
2258         * typeck2.c: Likewise.
2260 2013-03-21  Jakub Jelinek  <jakub@redhat.com>
2262         PR middle-end/48087
2263         * pt.c (convert_nontype_argument): Count werrorcount as warnings.
2264         * call.c (build_temp): Likewise.
2265         * method.c (synthesize_method): Likewise.
2266         * typeck.c (convert_for_initialization): Likewise.
2268 2013-03-21  Marc Glisse  <marc.glisse@inria.fr>
2270         * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
2272 2013-03-21  Richard Biener  <rguenther@suse.de>
2274         * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
2275         DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
2277 2013-03-20  Jason Merrill  <jason@redhat.com>
2279         PR c++/56646
2280         * parser.c (cp_parser_late_return_type_opt): Save and restore
2281         current_class_ptr/ref.
2283         PR c++/54532
2284         * expr.c (cplus_expand_constant): Do nothing if the class is
2285         incomplete.
2286         * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
2287         * typeck2.c (store_init_value): Use reduced_constant_expression_p.
2288         * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
2289         (complete_vars): Likewise.
2291         * name-lookup.c (get_anonymous_namespace_name): Never use
2292         get_file_function_name.
2294         * pt.c (retrieve_specialization): Handle null tmpl argument.
2296         PR c++/17232
2297         PR c++/56642
2298         * pt.c (tsubst_decl): Check return value of register_specialization.
2299         * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
2300         change.
2302 2013-03-17  Jason Merrill  <jason@redhat.com>
2304         PR c++/54359
2305         PR c++/56639
2306         * parser.c (cp_parser_direct_declarator): Bail if we see a
2307         qualified-id not at namespace scope.
2309         PR c++/17232
2310         PR c++/56642
2311         * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
2312         change for now.
2314 2013-03-16  Jason Merrill  <jason@redhat.com>
2316         * decl.c (grokdeclarator): Assert that we won't see a pointer to
2317         METHOD_TYPE.
2319         PR c++/54277
2320         * cp-tree.h (WILDCARD_TYPE_P): Split out from...
2321         (MAYBE_CLASS_TYPE_P): ...here.
2322         * semantics.c (lambda_capture_field_type): Only build a
2323         magic decltype for wildcard types.
2324         (lambda_proxy_type): Likewise.
2325         (finish_non_static_data_member): Get the quals from
2326         the object.
2328         PR c++/55931
2329         * parser.c (cp_parser_template_argument): Don't
2330         fold_non_dependent_expr.
2332         * parser.c (cp_parser_lambda_declarator_opt): Use
2333         cp_parser_trailing_type_id.
2335         PR c++/45917
2336         * parser.c (cp_parser_template_id): Don't forget access checks.
2338         PR c++/52374
2339         * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
2341         PR c++/54764
2342         PR c++/55972
2343         * name-lookup.h (tag_scope): Add ts_lambda.
2344         * semantics.c (begin_lambda_type): Use it.
2345         * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
2346         * pt.c (check_default_tmpl_args): Ignore lambdas.
2347         (push_template_decl_real): Handle lambdas.
2348         * tree.c (no_linkage_check): Adjust lambda check.
2350         PR c++/56039
2351         * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
2353         PR c++/54359
2354         * parser.c (cp_parser_direct_declarator): Fix late return
2355         for out-of-class defn of member function.
2357         PR c++/55357
2358         * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
2359         parms to avoid duplicate -Wshadow warnings.
2361         * search.c (lookup_base): Handle NULL_TREE.
2363         PR c++/56481
2364         * semantics.c (potential_constant_expression_1): Use of 'this' in
2365         a non-constexpr function makes the expression not potentially
2366         constant.
2368         N3276
2369         PR c++/52748
2370         * cp-tree.h (tsubst_flags): Add tf_decltype.
2371         * call.c (build_cxx_call): Don't build a temporary if it's set.
2372         (build_over_call): Make sure it's only passed to build_cxx_call.
2373         * parser.c (cp_parser_primary_expression): Add decltype_p parm.
2374         (cp_parser_unary_expression): Likewise.
2375         (cp_parser_cast_expression): Likewise.
2376         (cp_parser_binary_expression): Likewise.
2377         (cp_parser_assignment_expression): Likewise.
2378         (cp_parser_postfix_expression): Likewise.  Pass tf_decltype.
2379         (cp_parser_expression): Add decltype_p.  Force a
2380         temporary for a call on the LHS of a comma.
2381         (cp_parser_decltype): Pass true to decltype_p parms.
2382         * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
2383         (tsubst_copy_and_build): Pass tf_decltype down only for
2384         CALL_EXPR and the RHS of COMPOUND_EXPR.
2385         * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
2387         * cp-tree.h (abstract_class_use): New enum.
2388         * typeck2.c (pending_abstract_type): Add use field.
2389         (abstract_virtuals_error_sfinae): Add overloads taking
2390         abstract_class_use instead of tree.
2391         * typeck.c (build_static_cast_1): Call it.
2392         * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
2393         * pt.c: Adjust calls.
2394         * decl.c (cp_finish_decl): Don't handle functions specially.
2395         (grokdeclarator): Always check return type.
2396         * init.c (build_new_1): Adjust call.
2398         DR 337
2399         PR c++/17232
2400         * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
2401         * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
2403         DR 657
2404         * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
2405         (tsubst_arg_types): Likewise.
2407         DR 1518
2408         PR c++/54835
2409         * call.c (convert_like_real): Check for explicit constructors
2410         even for value-initialization.
2412         PR c++/54946
2413         * pt.c (convert_nontype_argument): Handle invalid pointer.
2415         * parser.c (cp_parser_lambda_expression): Use nreverse.
2417         PR c++/56447
2418         PR c++/55532
2419         * pt.c (instantiate_class_template_1): Instantiate lambda capture
2420         list here.
2421         (tsubst_copy_and_build): Not here.
2423         PR c++/55017
2424         * method.c (walk_field_subobs): Disallow copy of rvalue ref.
2426         PR c++/55240
2427         * parser.c (parsing_nsdmi): New.
2428         * semantics.c (outer_automatic_var_p): Check it.
2429         (finish_id_expression): Likewise.
2430         * cp-tree.h: Declare it.
2432         PR c++/55241
2433         * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
2435         * parser.c (lookup_literal_operator): Correct parm/arg naming
2436         mixup.
2438         PR c++/56238
2439         * pt.c (fold_non_dependent_expr_sfinae): Check
2440         instantiation_dependent_expression_p.
2442         PR c++/56095
2443         * class.c (resolve_address_of_overloaded_function): Accept a
2444         reference to function for target_type.
2445         (instantiate_type): Likewise.
2446         * pt.c (convert_nontype_argument): Pass it to
2447         convert_nontype_argument_function.
2449 2013-03-16  Jakub Jelinek  <jakub@redhat.com>
2451         * tree.c (cp_tree_equal): Fix a pasto.
2453         PR c++/56607
2454         * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
2455         pass op1 through maybe_constant_value first.
2457 2013-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
2459         PR c++/56582
2460         * semantics.c (cxx_eval_array_reference): Check for negative index.
2462 2013-03-14  Jason Merrill  <jason@redhat.com>
2464         PR c++/56614
2465         * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
2467         PR c++/56346
2468         * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
2469         dso_handle parm on targets without __cxa_atexit.
2471 2013-03-11  Jason Merrill  <jason@redhat.com>
2473         PR c++/56567
2474         * typeck.c (check_return_expr): Disallow returning init list here.
2475         * semantics.c (apply_deduced_return_type): Not here.
2477 2013-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
2479         PR c++/51412
2480         * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
2481         * error.c (dump_expr): Likewise.
2483 2013-03-08  Jason Merrill  <jason@redhat.com>
2485         PR c++/51884
2486         * class.c (modify_all_vtables): Mangle the vtable name before
2487         entering dfs_walk.
2489         * semantics.c (lambda_expr_this_capture): In unevaluated context,
2490         just return the nearest 'this'.
2492         PR c++/51494
2493         PR c++/52183
2494         PR c++/56222
2495         * tree.c (maybe_dummy_object): Don't capture 'this'.
2496         * semantics.c (maybe_resolve_dummy): New.
2497         (finish_non_static_data_member): Use it.
2498         (finish_qualified_id_expr): Don't test is_dummy_object.
2499         * cp-tree.h: Declare maybe_resolve_dummy.
2500         * call.c (build_new_method_call_1): Use it.
2502         PR c++/56567
2503         * semantics.c (apply_deduced_return_type): Don't allow returning
2504         std::initializer_list.
2506 2013-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
2508         PR c++/56534
2509         * parser.c (cp_parser_elaborated_type_specifier): Don't call
2510         check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
2511         * decl.c (check_elaborated_type_specifier): Tidy.
2513 2013-03-06  Jakub Jelinek  <jakub@redhat.com>
2515         PR c++/56543
2516         * tree.c (strip_typedefs): Don't copy args if they are NULL.
2518 2013-03-05  Jakub Jelinek  <jakub@redhat.com>
2520         * parser.c (cp_parser_braced_list): For {} initialize
2521         *non_constant_p to false.
2523 2013-03-04  Jason Merrill  <jason@redhat.com>
2525         PR c++/56464
2526         PR c++/54383
2527         * semantics.c (lambda_expr_this_capture): Handle NSDMI
2528         and non-class scopes.
2530 2013-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
2532         * decl.c (grokdeclarator): Remove dead code.
2534 2013-02-28  Jason Merrill  <jason@redhat.com>
2536         PR c++/56481
2537         * semantics.c (potential_constant_expression_1): Use
2538         cxx_eval_outermost_constant_expr rather than maybe_constant_value.
2540         PR c++/56243
2541         * call.c (build_over_call): Avoid virtual lookup in a template.
2543 2013-02-27  Jason Merrill  <jason@redhat.com>
2545         PR c++/56358
2546         PR c++/56323
2547         * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
2548         of the base name for inheriting ctors.
2549         (push_class_level_binding_1): Remove inheriting ctor handling.
2550         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
2551         * class.c (add_implicitly_declared_members): Adjust.
2553 2013-02-26  David Binderman  <dcb314@hotmail.com>
2555         PR c++/55632
2556         * decl.c (grokdeclarator): Tidy publicp assignment.
2558 2013-02-25  Aldy Hernandez  <aldyh@redhat.com>
2560         PR c++/56419
2561         * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
2562         (build_transaction_expr): Same.
2564 2013-02-25  Jason Merrill  <jason@redhat.com>
2566         PR c++/56377
2567         * pt.c (fn_type_unification): Wait to call push_tinst_level until
2568         we know what args we're looking at.
2570         PR c++/56438
2571         * semantics.c (potential_constant_expression_1): In C++98, a cast
2572         to non-integral type can't be a constant expression.
2574 2013-02-24  Jakub Jelinek  <jakub@redhat.com>
2576         PR c++/56403
2577         * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
2578         of CLASS_TYPE_P.
2580 2013-02-22  Jason Merrill  <jason@redhat.com>
2582         PR c++/40405
2583         * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
2584         if we got the wrong number of template parms.
2586         PR c++/56377
2587         * pt.c (fn_type_unification): Use explicit args in template
2588         instantiation context.
2590         PR c++/56359
2591         * call.c (can_convert_arg): Discard access checks.
2593         PR c++/56395
2594         * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
2595         args.
2597 2013-02-20  Paolo Carlini  <paolo.carlini@oracle.com>
2599         PR c++/56373
2600         * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
2601         * cvt.c (ocp_convert): Use the latter.
2602         (cp_convert_to_pointer): Likewise.
2603         * decl.c (check_default_argument): Likewise.
2604         * typeck.c (cp_build_binary_op): Likewise.
2605         * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
2607 2013-02-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
2608             Paolo Carlini  <paolo.carlini@oracle.com>
2610         PR c++/51242
2611         * decl2.c (grokbitfield): Allow scoped enumeration types.
2613 2013-02-15  Jason Merrill  <jason@redhat.com>
2615         PR c++/54276
2616         * semantics.c (finish_id_expression): Also return the identifier
2617         for an outer local static.
2619         PR c++/56343
2620         * class.c (check_bases_and_members): Deduce noexcept after
2621         checking bases.
2623         PR c++/52026
2624         * semantics.c (finish_id_expression): In a template, return
2625         the identifier for a constant variable.
2627 2013-02-14  Jason Merrill  <jason@redhat.com>
2629         PR c++/54922
2630         * semantics.c (build_anon_member_initialization): New.
2631         (build_data_member_initialization): Use it.
2633         PR c++/55003
2634         * decl.c (cp_finish_decl): Force instantiation of an
2635         auto static data member.
2637         PR c++/55220
2638         * pt.c (unify): A pack expansion that is not the last template
2639         argument makes the entire template argument list non-deduced.
2641         PR c++/56323
2642         * name-lookup.c (do_class_using_decl): Handle typedefs with
2643         inheriting constructors.
2644         (push_class_level_binding_1): Allow inheriting from template
2645         template parameter, too.
2646         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
2648         PR c++/55223
2649         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
2650         default argument scope.
2651         * mangle.c (write_name): Likewise.
2653         PR c++/55232
2654         * error.c (find_typenames_r): Don't walk into a pack expansion.
2656 2013-02-13  Jason Merrill  <jason@redhat.com>
2658         PR c++/55670
2659         * parser.c (cp_parser_member_declaration): Check the declarator
2660         form when detecting a function declaration via typedef.
2662         PR c++/55680
2663         * pt.c (maybe_process_partial_specialization): A lambda
2664         isn't what's being specialized.
2666         PR c++/55710
2667         * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
2668         TREE_USED.
2670         PR c++/55879
2671         * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
2673         PR c++/55993
2674         * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
2675         non-zero offsets, too.
2677         PR c++/56155
2678         * decl.c (build_enumerator): Always convert the value to a
2679         fixed underlying type.
2681         PR c++/56135
2682         * pt.c (tsubst_copy_and_build): Don't forget any new
2683         captures that arose from use of dependent names.
2685 2013-02-13  Jakub Jelinek  <jakub@redhat.com>
2687         PR c++/56302
2688         * semantics.c (finish_asm_stmt): If input constraints allow
2689         neither register nor memory, try maybe_constant_value to get
2690         a constant if possible.
2692 2013-02-12  Jason Merrill  <jason@redhat.com>
2694         PR c++/56285
2695         * method.c (add_one_base_init): Handle base constructor
2696         taking rvalue reference parm.
2698         PR c++/56291
2699         * semantics.c (sort_constexpr_mem_initializers): Handle
2700         vptr out of order.
2702 2013-02-09  Jason Merrill  <jason@redhat.com>
2704         PR c++/56268
2705         * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
2706         maybe_instantiate_noexcept.
2708         PR c++/56247
2709         * pt.c (eq_specializations): Set comparing_specializations.
2710         * tree.c (cp_tree_equal): Check it.
2711         * cp-tree.h: Declare it.
2713         * decl.c (decls_match): Check versions later.
2715         PR c++/56238
2716         * pt.c (build_non_dependent_expr): Don't try to fold
2717         instantiation-dependent expressions.
2718         (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
2719         [BIND_EXPR]: Treat as dependent.
2721 2013-02-07  Jakub Jelinek  <jakub@redhat.com>
2723         PR c++/56241
2724         * init.c (build_vec_init): Don't append NULL values into new_vec.
2725         (build_zero_init_1): Don't push anything into v if recursive call
2726         returned NULL_TREE.
2727         (build_value_init_noctor): Don't push anything into v if
2728         build_value_init call returned NULL_TREE.
2730         PR c++/56239
2731         * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
2732         (cp_parser_tokens_start_cast_expression): ... this.  Change parameter
2733         to cp_parser *, call cp_lexer_peek_token first.  For CPP_OPEN_PAREN,
2734         return true only if 2nd token isn't CPP_CLOSE_PAREN.
2735         (cp_parser_cast_expression): Adjust caller.
2737         PR c++/56237
2738         * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
2739         only if DECL_DISCRIMINATOR_SET_P (t) rather than just
2740         DECL_LANG_SPECIFIC (t).
2742 2013-02-07  Jason Merrill  <jason@redhat.com>
2744         PR c++/56235
2745         * method.c (do_build_copy_constructor): Don't bother turning
2746         scalars from lvalues to xvalues.
2747         (do_build_copy_assign): Likewise.
2749 2013-02-06  Jason Merrill  <jason@redhat.com>
2751         * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
2753 2013-02-05  Jason Merrill  <jason@redhat.com>
2755         PR c++/54122
2756         * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
2757         METHOD_TYPE.
2759         PR c++/56177
2760         * decl.c (start_preparsed_function): Update restype if we change
2761         decl1.
2763         PR c++/56208
2764         * pt.c (fn_type_unification): Discard any access checks from
2765         substituting explicit args.
2767 2013-01-31  Jason Merrill  <jason@redhat.com>
2769         PR c++/56162
2770         PR c++/56104
2771         * typeck.c (get_member_function_from_ptrfunc): Fix
2772         ptrmemfunc_vbit_in_delta case.
2774 2013-01-29  Jason Merrill  <jason@redhat.com>
2776         PR libstdc++/54314
2777         * class.c (build_ctor_vtbl_group): Give construction vtables
2778         hidden visibility.
2780 2013-01-25  Jason Merrill  <jason@redhat.com>
2782         PR c++/56095
2783         * pt.c (convert_nontype_argument_function): Handle invalid input.
2784         (convert_nontype_argument): Likewise.
2786         PR c++/56104
2787         * typeck.c (get_member_function_from_ptrfunc): Optimize if the
2788         dynamic type has no virtual functions.
2790 2013-01-22  Paolo Carlini  <paolo.carlini@oracle.com>
2792         PR c++/55944
2793         * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
2794         on TARGET_EXPR nodes.
2796 2013-01-22  Jason Merrill  <jason@redhat.com>
2798         PR c++/56071
2799         * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
2801 2013-01-22  Dodji Seketeli  <dodji@redhat.com>
2803         PR c++/53609
2804         * pt.c (argument_pack_element_is_expansion_p)
2805         (make_argument_pack_select, use_pack_expansion_extra_args_p)
2806         (gen_elem_of_pack_expansion_instantiation): New static functions.
2807         (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
2808         look through the possibly resulting pack expansion as well.
2809         (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
2810         generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
2811         Use gen_elem_of_pack_expansion_instantiation to build the
2812         instantiation piece-wise.  Don't use arg_from_parm_pack_p anymore,
2813         as gen_elem_of_pack_expansion_instantiation and the change in
2814         tsubst above generalize this particular case.
2815         (arg_from_parm_pack_p): Remove this for it's not used by
2816         tsubst_pack_expansion anymore.
2818 2013-01-21  Jason Merrill  <jason@redhat.com>
2820         PR c++/56059
2821         * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
2822         template args count.
2824 2013-01-18  Jason Merrill  <jason@redhat.com>
2826         PR target/54908
2827         * decl2.c (get_local_tls_init_fn): New.
2828         (get_tls_init_fn): Handle flag_extern_tls_init.  Don't bother
2829         with aliases for internal variables.  Don't use weakrefs if
2830         the variable needs destruction.
2831         (generate_tls_wrapper): Mark the wrapper as const if no
2832         initialization is needed.
2833         (handle_tls_init): Don't require aliases.
2835 2013-01-15  Dodji Seketeli  <dodji@redhat.com>
2837         PR c++/55663
2838         * pt.c (coerce_innermost_template_parms): New static function.
2839         (instantiate_alias_template):  Use it here.
2841 2013-01-09  Jason Merrill  <jason@redhat.com>
2843         PR c++/55878
2844         * rtti.c (build_typeid, get_typeid): Add complain parm.
2845         (get_tinfo_decl_dynamic): Likewise.
2846         * cp-tree.h, parser.c, pt.c: Adjust.
2848         PR c++/55893
2849         * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
2850         needs destruction.
2852 2013-01-09  Jakub Jelinek  <jakub@redhat.com>
2854         PR c/48418
2855         * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
2856         call maybe_constant_value for the negative or too big shift
2857         count warnings.
2859 2013-01-09  Paolo Carlini  <paolo.carlini@oracle.com>
2861         PR c++/55801
2862         * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
2863         of the argument is true.
2865 2013-01-08  Joel Brobecker  <brobecker@adacore.com>
2867         * parser.c (cp_parser_initializer_list): Move declaration
2868         of variable non_const to start of lexical block.
2870 2013-01-07  Jason Merrill  <jason@redhat.com>
2872         PR c++/55753
2873         * tree.c (build_aggr_init_expr): Do nothing in a template.
2874         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
2875         a FUNCTION_DECL before tsubsting.
2877 2013-01-04  Dodji Seketeli  <dodji@redhat.com>
2879         PR c++/52343
2880         * pt.c (check_instantiated_arg): Allow type template arguments.
2882 2013-01-04  Jason Merrill  <jason@redhat.com>
2884         PR c++/55877
2885         * decl.c (reset_type_linkage, bt_reset_linkage): New.
2886         (grokdeclarator): Use reset_type_linkage.
2887         * name-lookup.c (binding_table_foreach): Handle null table.
2888         * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
2890 2013-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
2892         PR c++/54526 (again)
2893         * parser.c (cp_parser_template_id): Revert core of previous change
2894         (keep adjusted inform message).
2896 2013-01-03  Jason Merrill  <jason@redhat.com>
2898         PR c++/55419
2899         PR c++/55753
2900         * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
2901         TREE_CONSTANT.
2903         PR c++/55842
2904         * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
2906         PR c++/55856
2907         * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
2909         PR c++/53650
2910         * call.c (type_has_extended_temps): New.
2911         * cp-tree.h: Declare it.
2912         * decl.c (check_initializer): Use build_aggr_init for arrays
2913         if it is false.
2914         * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
2916 2013-01-02  Jason Merrill  <jason@redhat.com>
2918         PR c++/54325
2919         * call.c (build_new_method_call_1): Don't use build_value_init for
2920         user-provided default constructors.
2922         * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
2924         PR c++/55032
2925         PR c++/55245
2926         * tree.c (build_cplus_array_type): Copy layout information
2927         to main variant if necessary.
2929 Copyright (C) 2013 Free Software Foundation, Inc.
2931 Copying and distribution of this file, with or without modification,
2932 are permitted in any medium without royalty provided the copyright
2933 notice and this notice are preserved.