* arm.c (arm_get_frame_offsets): Validate architecture supports
[official-gcc.git] / gcc / cp / ChangeLog
blobd53fb51198b74409c1b6c3a0ee1e59cbb6a31614
1 2013-09-18  Marek Polacek  <polacek@redhat.com>
3         PR sanitize/58443
4         * typeck.c (cp_build_binary_op): Properly honor -fsanitize options.
5         Remove unnecessary check.
7 2013-09-18  Marek Polacek  <polacek@redhat.com>
9         PR sanitizer/58411
10         * typeck.c (cp_build_binary_op): Don't sanitize function if it has the
11         no_sanitize_undefined attribute.
13 2013-09-17  Paolo Carlini  <paolo.carlini@oracle.com>
15         PR c++/58435
16         * pt.c (tsubst, [BOUND_TEMPLATE_TEMPLATE_PARM]): Take into account
17         the cp_type_quals (r) too.
19 2013-09-16  Adam Butcher  <adam@jessamine.co.uk>
21         * cp-tree.h (type_uses_auto_or_concept): Declare.
22         (is_auto_or_concept): Declare.
23         * decl.c (grokdeclarator): Allow 'auto' parameters in lambdas with
24         -std=gnu++1y or -std=c++1y or, as a GNU extension, in plain functions.
25         * type-utils.h: New header defining ...
26         (find_type_usage): ... this new function based on pt.c (type_uses_auto)
27         for searching a type tree given a predicate.
28         * pt.c (type_uses_auto): Reimplement via type-utils.h (find_type_usage).
29         (is_auto_or_concept): New function.
30         (type_uses_auto_or_concept): New function.
31         * parser.h (struct cp_parser): Add fully_implicit_function_template_p.
32         * parser.c (cp_parser_new): Initialize
33         fully_implicit_function_template_p.
34         (cp_parser_new): Initialize fully_implicit_function_template_p.
35         (cp_parser_lambda_expression): Copy and restore value of
36         fully_implicit_function_template_p as per other parser fields.
37         (cp_parser_parameter_declaration_list): Count generic
38         parameters and call ...
39         (add_implicit_template_parms): ... this new function to synthesize them
40         with help from type-utils.h (find_type_usage), ...
41         (tree_type_is_auto_or_concept): ... this new static function and ...
42         (make_generic_type_name): ... this new static function.
43         (cp_parser_direct_declarator): Account for implicit template parameters.
44         (cp_parser_lambda_declarator_opt): Finish fully implicit template if
45         necessary by calling ...
46         (finish_fully_implicit_template): ... this new function.
47         (cp_parser_init_declarator): Likewise.
48         (cp_parser_function_definition_after_declarator): Likewise.
49         (cp_parser_member_declaration): Likewise.
50         * Make-lang.in (cp/pt.o): Add dependency on type-utils.h.
51         (cp/parser.o): Likewise.
53 2013-09-16  Adam Butcher  <adam@jessamine.co.uk>
55         * parser.c (cp_parser_lambda_declarator_opt): Accept template parameter
56         list with std=c++1y or std=gnu++1y.
57         (cp_parser_lambda_body): Don't call 'expand_or_defer_fn' for lambda call
58         operator template to avoid adding template result to symbol table.
59         * lambda.c (lambda_function): Return template result if call operator is
60         a template.
61         (maybe_add_lambda_conv_op): Move declarations to point of use.  Refactor
62         operator call building in order to support conversion of a non-capturing
63         lambda template to a function pointer with help from ...
64         (prepare_op_call): ... this new function.
65         * decl2.c (check_member_template): Don't reject lambda call operator
66         template in local [lambda] class.
67         * pt.c (instantiate_class_template_1): Don't instantiate lambda call
68         operator template when instantiating lambda class.
70 2013-09-16  Adam Butcher  <adam@jessamine.co.uk>
72         * pt.c (make_auto_1): Use input_location rather than BUILTINS_LOCATION.
74 2013-09-15  Jason Merrill  <jason@redhat.com>
76         Core DR 904
77         PR c++/41933
78         * parser.c (cp_parser_lambda_introducer): Handle variadic capture.
79         * lambda.c (add_capture): Handle variadic capture.
80         (add_default_capture, lambda_capture_field_type): Likewise.
81         (build_capture_proxy, register_capture_members): Likewise.
82         * pt.c (register_specialization): Allow FIELD_DECL.
83         (retrieve_specialization): Likewise.
84         (find_parameter_packs_r): Handle FIELD_DECL and VAR_DECL.
85         (tsubst_pack_expansion): Handle FIELD_DECL packs.
86         (gen_elem_of_pack_expansion_instantiation): Likewise.
87         (instantiate_class_template_1): Likewise.
88         (tsubst_decl, tsubst_copy): Likewise.
89         (tsubst_expr) [DECL_EXPR]: Handle capture proxy packs.
90         (tsubst_copy_and_build) [VAR_DECL]: Likewise.
91         * semantics.c (finish_non_static_data_member): Don't try to represent
92         the type of a COMPOUND_REF of a FIELD_DECL pack.
94         PR c++/41933
95         * cp-tree.h (DECL_PACK_P): Replace FUNCTION_PARAMETER_PACK_P.
96         * cxx-pretty-print.c (direct_declarator): Adjust.
97         * decl2.c (cp_build_parm_decl): Adjust.
98         * pt.c (function_parameter_pack_p): Adjust.
99         (find_parameter_packs_r, push_template_decl_real): Adjust.
100         (tsubst_pack_expansion, tsubst_decl): Adjust.
101         (regenerate_decl_from_template, instantiate_decl): Adjust.
103         * lambda.c (add_capture): Don't add DECL_LANG_SPECIFIC.
105 2013-09-13  Jason Merrill  <jason@redhat.com>
107         PR c++/58273
108         * pt.c (any_type_dependent_elements_p): Actually check for
109         type-dependence, not value-dependence.
111 2013-09-13  Jacek Caban  <jacek@codeweavers.com>
113         * decl.c: Use new cxx_implicit_extern_c hook
115 2013-09-12  Brooks Moses  <bmoses@google.com>
117         PR driver/42955
118         * Make-lang.in: Do not install driver binaries in $(target)/bin.
120 2013-09-12  Adam Butcher  <adam@jessamine.co.uk>
122         * pt.c (instantiate_decl): Save/restore cp_unevaluated_operand and
123         c_inhibit_evaluation_warnings.  Reset if instantiating within a
124         function-local template.
126 2013-09-12  Paolo Carlini  <paolo.carlini@oracle.com>
128         * semantics.c (finish_pseudo_destructor_expr): Add location_t
129         parameter.
130         * pt.c (unify_arg_conversion): Use EXPR_LOC_OR_HERE.
131         (tsubst_copy_and_build): Adjust finish_pseudo_destructor_expr
132         calls.
133         * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
134         (cp_parser_postfix_expression): Pass the proper location to
135         cp_parser_postfix_dot_deref_expression.
136         * cp-tree.h (finish_pseudo_destructor_expr): Update declaration.
138 2013-09-10  Jan Hubicka  <jh@suse.cz>
139             Paolo Carlini  <paolo.carlini@oracle.com>
141         * error.c (print_instantiation_partial_context_line): If
142         loc == UNKNOWN_LOCATION return immediately.
144 2013-09-09  Jakub Jelinek  <jakub@redhat.com>
146         PR c++/58325
147         * init.c (build_vec_delete): Call mark_rvalue_use on base.
149 2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
151         PR c++/43452
152         * init.c (build_vec_delete_1): When the type is incomplete emit a
153         warning, enabled by default (not an error).
154         (build_delete): Adjust to use OPT_Wdelete_incomplete.
156 2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
158         PR c++/58362
159         * error.c (location_of): Don't handle PARM_DECLs specially.
161 2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
163         * error.c (dump_expr, [PSEUDO_DTOR_EXPR]): Fix.
164         * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
165         Tweak, TREE_OPERAND (t, 1) may be null.
167 2013-09-08  Caroline Tice  <cmtice@google.com>
169         PR c++/58300
170         * vtable-class-hierarchy.c (vtv_generate_init_routine):  In
171         preinit case, move call to assemble_vtv_preinit_initializer to
172         after call to cgraph_process_new_functions.
174 2013-09-08  Tom de Vries  <tom@codesourcery.com>
176         PR c++/58282
177         * except.c (build_must_not_throw_expr): Handle
178         flag_exceptions.
180 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
182         * typeck.c (cp_build_binary_op): Use vector_types_compatible_elements_p.
184 2013-09-04  Paolo Carlini  <paolo.carlini@oracle.com>
186         PR c++/24926
187         * class.c (finish_struct_anon_r): New.
188         (finish_struct_anon): Use it.
190 2013-09-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
192         * cxx-pretty-print.h (cxx_pretty_printer::simple_type_specifier):
193         Declare as overrider.
194         * cxx-pretty-print.c (cxx_pretty_printer::simple_type_specifier):
195         Rename from pp_cxx_simple_type_specifier.
196         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
197         simple_type_specifier.
199 2013-09-03  Paolo Carlini  <paolo.carlini@oracle.com>
201         PR c++/58305
202         * typeck2.c (build_functional_cast): Maybe warn_deprecated_use.
204 2013-09-03  Mike Stump  <mikestump@comcast.net>
206         * Make-lang.in (cp/lambda.o): Add dependencies.
208 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
210         * cxx-pretty-print.h (cxx_pretty_printer::type_id): Declare as
211         overrider.
212         * cxx-pretty-print.c (pp_cxx_storage_class_specifier): Remove.
213         (pp_cxx_userdef_literal): Tidy.
214         (pp_cxx_template_argument_list): Likewise.
215         (pp_cxx_typeid_expression): Likewise.
216         (pp_cxx_offsetof_expression_1): Likewise.
217         (cxx_pretty_printer::postfix_expression): Likewise.
218         (cxx_pretty_printer::unary_expression): Likewise.
219         (cxx_pretty_printer::statement): Likewise.
220         (cxx_pretty_printer::type_id): Rename from pp_cxx_type_id.
221         (c_pretty_printer::cxx_pretty_printer): Do not assign to type_id.
222         * error.c (dump_decl): Tidy.
223         (dump_expr): Likewise.
225 2013-09-02  Paolo Carlini  <paolo.carlini@oracle.com>
227         PR c++/21682, implement DR 565
228         * name-lookup.c (compparms_for_decl_and_using_decl): New.
229         (push_overloaded_decl_1, do_nonmember_using_decl): Use it.
231 2013-08-30  Marek Polacek  <polacek@redhat.com>
233         * typeck.c (cp_build_binary_op): Add division by zero and shift
234         instrumentation.
235         * error.c (dump_expr): Special-case ubsan builtins.
237 2013-08-30  Paolo Carlini  <paolo.carlini@oracle.com>
239         PR c++/51424
240         * cp-tree.h (LOOKUP_DELEGATING_CONS): Add.
241         * init.c (perform_target_ctor): Use it.
242         * call.c (build_special_member_call): Diagnose self-delegating
243         constructors.
245 2013-08-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
247         * cxx-pretty-print.h (cxx_pretty_printer::declaration): Declare as
248         overrider.
249         (cxx_pretty_printer::declaration_specifiers): Likewise.
250         (cxx_pretty_printer::function_specifier): Likewise.
251         (cxx_pretty_printer::declarator): Likewise.
252         (cxx_pretty_printer::direct_declarator): Likewise.
253         (cxx_pretty_printer::abstract_declarator): Likewise.
254         (cxx_pretty_printer::direct_abstract_declarator): Likewise.
255         (pp_cxx_declaration): Remove.
256         * cxx-pretty-print.c (cxx_pretty_printer::function_specifier):
257         Rename from pp_cxx_function_specifier.  Adjust.
258         (cxx_pretty_printer::declaration_specifiers): Rename from
259         pp_cxx_decl_specifier_seq.  Adjust.
260         (cxx_pretty_printer::direct_declarator): Rename from
261         pp_cxx_direct_declarator.  Adjust.
262         (cxx_pretty_printer::declarator): Rename from pp_cxx_declarator.
263         Adjust.
264         (cxx_pretty_printer::abstract_declarator): Rename from
265         pp_cxx_abstract_declarator.  Adjust.
266         (cxx_pretty_printer::direct_abstract_declarator): Rename from
267         pp_cxx_direct_abstract_declarator.  Adjust.
268         (cxx_pretty_printer::declaration): Rename from
269         pp_cxx_declaration.  Adjust.
270         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
271         declaration, declaration_specifiers, function_specifier,
272         declarator, direct_declarator, abstract_declarator,
273         direct_abstract_declarator.
274         * error.c (dump_decl): Adjust.
276 2013-08-29  Jan Hubicka  <jh@suse.cz>
278         Correct previous patch to not mark terminate as LEAF.
279         * class.c (build_vtbl_initializer): Drop LEAF
280         * decl.c (cxx_init_decl_processing): Likewise.
281         (push_throw_library_fn): Likewise.
282         * except.c (init_exception_processing): Likewise.
283         (do_begin_catch): Likewise.
284         (do_end_catch): Likewise.
285         (do_allocate_exception): Likewise.
287 2013-08-29  Jan Hubicka  <jh@suse.cz>
289         * class.c (build_vtbl_initializer): Make __cxa_deleted_virtual
290         ECF_NORETURN | ECF_LEAF
291         * cp-tree.h (build_library_fn_ptr, build_cp_library_fn_ptr,
292         push_library_fn, push_void_library_fn): Update prototype.
293         * decl.c (build_library_fn_1): Remove.
294         (push_cp_library_fn, build_cp_library_fn): Update to take ECF flags.
295         (cxx_init_decl_processing): Update; global_delete_fndecl is ECF_NOTROW;
296         __cxa_pure_virtual is ECF_NORETURN | ECF_NORETURN | ECF_LEAF.
297         (build_library_fn_1): Add ecf_flags argument; rename to ...
298         (build_library_fn): ... this one.
299         (build_cp_library_fn): Take ecf_flags; do not copy NOTHROW flag.
300         (build_library_fn_ptr): Take ecf_flags.
301         (build_cp_library_fn_ptr): Likewise.
302         (push_library_fn): Likewise.
303         (push_cp_library_fn): Likewise.
304         (push_void_library_fn): Likewise.
305         (push_throw_library_fn): All throws are ECF_NORETURN.
306         (__cxa_atexit, __cxa_thread_atexit): Add ECF_LEAF | ECF_NOTHROW attributes.
307         (expand_static_init): __cxa_guard_acquire, __cxa_guard_release,
308         __cxa_guard_abort are ECF_NOTHROW | ECF_LEAF.
309         * except.c (init_exception_processing): terminate is
310         ECF_NOTHROW | ECF_NORETURN | ECF_LEAF.
311         (declare_nothrow_library_fn): Add ecf_flags parameter.
312         (__cxa_get_exception_ptr): Is ECF_NOTHROW | ECF_PURE | ECF_LEAF |
313         ECF_TM_PURE.
314         (do_begin_catch): cxa_begin_catch and _ITM_cxa_begin_catch
315         are ECF_NOTHROW | ECF_LEAF.
316         (do_end_catch): __cxa_end_catch and _ITM_cxa_end_catch is
317         ECF_LEAF.
318         (do_allocate_exception): _cxa_allocate_exception
319         and _ITM_cxa_allocate_exception are ECF_NOTHROW | ECF_MALLOC
320         | ECF_LEAF
321         (do_free_exception): __cxa_free_exception is
322         ECF_NOTHROW | ECF_LEAF.
323         * rtti.c (build_dynamic_cast_1): __dynamic_cast
324         is ECF_LEAF | ECF_PURE | ECF_NOTHROW.
326 2013-08-29  Adam Butcher  <adam@jessamine.co.uk>
328         * error.c (dump_lambda_function): New function, dependent on ...
329         (dump_substitution): ... this new function, factored out of ...
330         (subst_to_string): ... here and ...
331         (dump_function_decl): ... here.  Updated to early-out with call to
332         dump_lambda_function after determining template bindings.
334 2013-08-28  Paolo Carlini  <paolo.carlini@oracle.com>
336         PR c++/58255
337         * init.c (build_aggr_init): When init == void_type_node do not
338         set LOOKUP_ONLYCONVERTING.
340 2013-08-27  Caroline Tice  <cmtice@google.com>
342         * vtable-class-hierarchy.c: Remove unnecessary include statements.
343         (MAX_SET_SIZE): Remove unnecessary constant.
344         (register_construction_vtables):  Make vtable_ptr_array parameter
345         into a vector; remove num_args parameter. Change array accesses to
346         vector accesses.
347         (register_other_binfo_vtables): Ditto.
348         (insert_call_to_register_set): Ditto.
349         (insert_call_to_register_pair): Ditto.
350         (output_set_info):  Ditto.  Also change warning calls to warning_at
351         calls, and fix format of warning messages.
352         (register_all_pairs): Change vtbl_ptr_array from an array into a
353         vector.  Remove num_vtable_args (replace with calls to vector length).
354         Change array stores & accesses to vector functions. Change calls to
355         register_construction_vtables, register_other_binfo_vtables,
356         insert_call_to_register_set, insert_call_to_register_pair and
357         output_set_info to match their new signatures.  Change warning to
358         warning_at and fix the format of the warning message.
360 2013-08-27  Jakub Jelinek  <jakub@redhat.com>
361             Aldy Hernandez  <aldyh@redhat.com>
363         * cp-tree.h (CP_OMP_CLAUSE_INFO): Adjust range for new clauses.
365 2013-08-27  Paolo Carlini  <paolo.carlini@oracle.com>
367         * decl.c (grokfndecl): Remove old bison hack.
369 2013-08-26  Jan Hubicka  <jh@suse.cz>
371         * cp-tree.h (DECL_CONSTRUCTOR_P, DECL_DESTRUCTOR_P): Use
372         middle-end flag.
374 2013-08-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
376         * cxx-pretty-print.h (cxx_pretty_printer::unary_expression):
377         Declare as overrider.
378         (cxx_pretty_printer::multiplicative_expression): Likewise.
379         (cxx_pretty_printer::conditional_expression): Likewise.
380         (cxx_pretty_printer::assignment_expression): Likewise.
381         (cxx_pretty_printer::expression): Likewise.
382         * cxx-pretty-print.c (cxx_pretty_printer::unary_expression):
383         Rename from pp_cxx_unary_expression.  Adjust.
384         (cxx_pretty_printer::multiplicative_expression): Rename from
385         pp_cxx_multiplicative_expression.  Adjust.
386         (cxx_pretty_printer::conditional_expression): Rename from
387         pp_cxx_conditional_expression.  Adjust.
388         (cxx_pretty_printer::assignment_expression): Rename from
389         pp_cxx_assignment_expression.  Adjust.
390         (cxx_pretty_printer::expression): Rename from pp_cxx_expression.
391         Adjust.
392         (cxx_pretty_printer::cxx_pretty_printer): Dot not assign to
393         unary_expression, multiplicative_expression,
394         conditional_expression, assignment_expression, expression.
396 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
398         * cxx-pretty-print.h (cxx_pretty_printer::postfix_expression):
399         Declare as overrider.
400         * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
401         Rename from pp_cxx_postfix_expression.  Adjust.
402         (pp_cxx_expression): Use pp_postfix_expression.
403         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
404         postfix_expression.
406 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
408         * cxx-pretty-print.h (cxx_pretty_printer::primary_expression): Now
409         an overrider of c_pretty_printer::primary_expression.
410         * cxx-pretty-print.c (cxx_pretty_printer::primary_expression):
411         Rename from pp_cxx_primary_expression.  Adjust.
412         (pp_cxx_postfix_expression): Use pp_primary_expression.
413         (pp_cxx_ctor_initializer): Likewise.
414         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
415         primary_expression.
417 2013-08-23  Jan Hubicka  <jh@suse.cz>
419         * cp-tree.h (struct lang_type_class): Free is_final bit.
420         (CLASSTYPE_FINAL): Define using TYPE_FINAL_P.
421         (DECL_FINAL_P): Remove.
422         * pt.c (instantiate_class_template_1): Guard that CLASSTYPE_FINAL
423         is called on CLASS_TYPE_P.
425 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
427         * cxx-pretty-print.c (M_): Remove.
428         (pp_cxx_unqualified_id): Use translate_string instead of M_.
429         (pp_cxx_canonical_template_parameter): Likewise.
431 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
433         * cxx-pretty-print.h (cxx_pretty_printer::id_expression): Declare.
434         * cxx-pretty-print.c (cxx_pretty_printer::id_expression): Rename
435         from pp_cxx_id_expression.  Adjust.
436         (pp_cxx_userdef_literal): Use pp_id_expression.
437         (pp_cxx_primary_expression): Likewise.
438         (pp_cxx_direct_declarator): Likewise.
439         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
440         id_expression.
442 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
444         * cxx-pretty-print.h (cxx_pretty_printer::constant): Now a member
445         function, overriding c_pretty_printer::constant.
446         * cxx-pretty-print.c (cxx_pretty_printer::constant): Rename from
447         pp_cxx_constant.  Adjust.
448         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to constant.
450 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutiobs.net>
452         * cp-objcp-common.c (cxx_initialize_diagnostics): Call a
453         destructor for the early printer.
454         * error.c (type_to_string): Use pp_buffer.
456 2013-08-22  Paolo Carlini  <paolo.carlini@oracle.com>
458         PR c++/56380
459         * class.c (check_field_decls): Check for const mutable and const
460         reference data members.
462 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
464         * error.c (init_error): Remove calls to pp_construct and
465         pp_cxx_pretty_printer_init.  Initialize cxx_pp with placement-new.
466         * cxx-pretty-print.h (cxx_pretty_printer::cxx_pretty_printer): Declare.
467         (cxx_pretty_printer_init): Remove.
468         * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer):
469         Rename from cxx_pretty_printer_init.  Adjust.
470         * cp-objcp-common.c (cxx_initialize_diagnostics): Simplify
471         initialization of C++ diagnostics pretty printer.
473 2013-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
475         * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
476         * cp-tree.h (REFERENCE_REF_P): Likewise.
477         * semantics.c (finish_offsetof): Likewise.
479 2013-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
481         PR c++/56130
482         * semantics.c (finish_id_expression): Handle deprecated references.
484 2013-08-20  Jason Merrill  <jason@redhat.com>
486         PR c++/58119
487         * cvt.c (build_expr_type_conversion): Don't complain about a
488         template that can't match the desired type category.
490 2013-08-20  Gabriel Dos Reis  <gdr@integrable-solutions.net>
492         * error.c (pp_ggc_formatted_text): New.
493         (type_as_string): Use it in lieu of pp_formatted_text.
494         (type_as_string_translate): Likewise.
495         (expr_as_string): Likewise.
496         (decl_as_string): Likewise.
497         (decl_as_string_translate): Likewise.
498         (lang_decl_name): Likewise.
499         (decl_to_string): Likewise.
500         (expr_to_string): Likewise.
501         (fndecl_to_string): Likewise.
502         (parm_to_string): Likewise.
503         (type_to_string): Likewise.
504         (args_to_string): Likewise.
505         (subst_to_string): Likewise.
507 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
509         PR c/57490
510         * cp-array-notation.c (cp_expand_cond_array_notations): Added a
511         check for truth values.
512         (expand_array_notation_exprs): Added truth values case.  Removed an
513         unwanted else.  Added for-loop to walk through subtrees in default
514         case.
515         * call.c (build_cxx_call): Inherited the type of the array notation for
516         certain built-in array notation functions.
518 2013-08-19  Paolo Carlini  <paolo.carlini@oracle.com>
520         * parser.c (cp_parser_lambda_introducer, cp_parser_decltype_expr):
521         Use cp_parser_lookup_name_simple.
523 2013-08-19  Paolo Carlini  <paolo.carlini@oracle.com>
525         * name-lookup.h (pop_bindings_and_leave_scope): Declare.
526         * name-lookup.c (pop_bindings_and_leave_scope): Define.
527         * parser.c (cp_parser_lambda_declarator_opt,
528         cp_parser_direct_declarator, cp_parser_cache_defarg): Use it.
530 2013-08-17  Jason Merrill  <jason@redhat.com>
532         PR c++/58083
533         * name-lookup.c (push_class_level_binding_1): It's OK to push a
534         lambda type after the enclosing type is complete.
536 2013-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
538         * error.c (dump_scope): Add a cxx_pretty_printer parameter.
539         Adjust callers.
540         (dump_template_argument): Likewise.
541         (dump_template_argument_list): Likewise.
542         (dump_template_parameter): Likewise.
543         (dump_template_bindings): Likewise.
544         (dump_alias_template_specialization): Likewise.
545         (dump_type): Likewise.
546         (dump_typename): Likewise.
547         (dump_aggr_type): Likewise.
548         (dump_type_prefix): Likewise.
549         (dump_type_suffix): Likewise.
550         (dump_global_iord): Likewise.
551         (dump_simple_decl): Likewise.
552         (dump_decl): Likewise.
553         (dump_template_decl): Likewise.
554         (dump_function_decl): Likewise.
555         (dump_parameters): Likewise.
556         (dump_ref_qualifier): Likewise.
557         (dump_exception_spec): Likewise.
558         (dump_function_name): Likewise.
559         (dump_template_parms): Likewise.
560         (dump_call_expr_args): Likewise.
561         (dump_aggr_init_expr_args): Likewise.
562         (dump_expr_list): Likewise.
563         (dump_expr_init_vec): Likewise.
564         (dump_expr): Likewise.
565         (dump_binary_op): Likewise.
566         (dump_unary_op): Likewise.
568 2013-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
570         PR c++/51912
571         * cp-tree.h (LOOKUP_NO_NON_INTEGRAL): Add.
572         * decl.c (case_conversion): Use it.
573         * call.c (standard_conversion): Likewise.
574         (implicit_conversion): Adjust.
576 2013-08-13  Adam Butcher  <adam@jessamine.co.uk>
578         * pt.c: Grammar fix in comments ("it's" to "its").
580 2013-08-12  Paolo Carlini  <paolo.carlini@oracle.com>
582         * decl.c (warn_extern_redeclared_static, duplicate_decls,
583         check_elaborated_type_specifier): Use error + inform.
584         * friend.c (make_friend_class): Likewise.
585         * semantics.c (finish_id_expression): Likewise.
587 2013-08-09  Paolo Carlini  <paolo.carlini@oracle.com>
589         Revert:
590         2013-08-07  Paolo Carlini  <paolo.carlini@oracle.com>
592         PR c++/46206
593         * name-lookup.c (lookup_name_real_1): Handle iter->type before
594         iter->value.
596 2013-08-07  Paolo Carlini  <paolo.carlini@oracle.com>
598         PR c++/46206
599         * name-lookup.c (lookup_name_real_1): Handle iter->type before
600         iter->value.
602 2013-08-06  Caroline Tice  <cmtice@google.com>
604         * Make-lang.in (*CXX_AND_OBJCXX_OBJS):  Add vtable-class-hierarchy.o to
605         list.
606         (vtable-class-hierarchy.o): Add build rule.
607         * cp-tree.h (vtv_start_verification_constructor_init_function): New
608         extern function decl.
609         (vtv_finish_verification_constructor_init_function): New extern
610         function decl.
611         (build_vtbl_address): New extern function decl.
612         (get_mangled_vtable_map_var_name): New extern function decl.
613         (vtv_compute_class_hierarchy_transitive_closure): New extern function
614         decl.
615         (vtv_generate_init_routine): New extern function decl.
616         (vtv_save_class_info): New extern function decl.
617         (vtv_recover_class_info): New extern function decl.
618         (vtv_build_vtable_verify_fndecl): New extern function decl.
619         * class.c (finish_struct_1): Add call to vtv_save_class_info if
620         flag_vtable_verify is true.
621         * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list.
622         * vtable-class-hierarchy.c: New file.
623         * mangle.c (get_mangled_vtable_map_var_name):  New function.
624         * decl2.c (start_objects): Update function comment.
625         (cp_write_global_declarations):  Call vtv_recover_class_info,
626         vtv_compute_class_hierarchy_transitive_closure and
627         vtv_build_vtable_verify_fndecl, before calling
628         finalize_compilation_unit, and call vtv_generate_init_rount after, IFF
629         flag_vtable_verify is true.
630         (vtv_start_verification_constructor_init_function): New function.
631         (vtv_finish_verification_constructor_init_function): New function.
632         * init.c (build_vtbl_address): Remove static qualifier from function.
634 2013-08-06  Jason Merrill  <jason@redhat.com>
636         PR c++/57825
637         * tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.
639 2013-08-05  Paolo Carlini  <paolo.carlini@oracle.com>
641         PR c++/58080
642         * typeck.c (cp_pointer_int_sum): Add tsubst_flags_t parameter.
643         (cp_build_binary_op): Adjust.
645 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
647         * cxx-pretty-print.h (pp_c_base): Remove.
648         (cxx_pretty_printer): Derive from c_pretty_printer.
649         Adjust macros using pp_c_base.
650         * cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base.
651         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise.
652         (pp_cxx_colon_colon): Likewise.
653         (pp_cxx_separate_with): Likewise.
654         (pp_cxx_storage_class_specifier): Do not call pp_c_base.
655         (pp_cxx_expression_list): Likewise.
656         (pp_cxx_space_for_pointer_operator): Likewise.
657         (pp_cxx_init_declarator): Likewise.
658         (pp_cxx_call_argument_list): Likewise.
659         (pp_cxx_constant): Likewise.
660         (pp_cxx_postfix_expression): Likewise.
661         (pp_cxx_new_expression): Likewise.
662         (pp_cxx_unary_expression): Likewise.
663         (pp_cxx_cast_expression): Likewise.
664         (pp_cxx_conditional_expression): Likewise.
665         (pp_cxx_assignment_expression): Likewise.
666         (pp_cxx_expression): Likewise.
667         (pp_cxx_function_specifier): Likewise.
668         (pp_cxx_decl_specifier_seq): Likewise.
669         (pp_cxx_simple_type_specifier): Likewise.
670         (pp_cxx_type_specifier_seq): Likewise.
671         (pp_cxx_ptr_operator): Likewise.
672         (pp_cxx_parameter_declaration_clause): Likewise.
673         (pp_cxx_direct_declarator): Likewise.
674         (pp_cxx_direct_abstract_declarator): Likewise.
675         (pp_cxx_type_id): Likewise.
676         (pp_cxx_statement): Likewise.
677         (pp_cxx_pretty_printer_init): Tidy.
678         * error.c (init_error): Do not use pp_base.
679         (dump_aggr_type): Likewise.
680         (dump_type_prefix): Likewise.
681         (dump_type_suffix): Likewise.
682         (dump_global_iord): Likewise.
683         (dump_decl): Likewise.
684         (dump_function_decl): Likewise.
685         (dump_ref_qualifier): Likewise.
686         (reinit_cxx_pp): Likewise.
687         (decl_as_dwarf_string): Likewise.
688         (lang_decl_dwarf_name): Likewise.
689         (type_to_string): Likewise.
690         (cv_to_string): Likewise.
691         (cxx_print_error_function): Likewise.
692         (cp_diagnostic_starter): Likewise.
693         (cp_diagnostic_finalizer): Likewise.
694         (cp_print_error_function): Likewise.
695         (print_instantiation_context): Likewise.
696         (cp_printer): Likewise.
698 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
700         * error.c (dump_type_prefix): Use specialized pretty printer
701         functions instead of pp_string or operators and punctuators.
702         (dump_decl): Likewise.
703         (dump_expr): Likewise.
705 2013-08-03  Jason Merrill  <jason@redhat.com>
707         DR 1286
708         * pt.c (get_underlying_template): New.
709         (convert_template_argument, lookup_template_class_1): Use it.
711         DR 1430
712         PR c++/51239
713         * pt.c (pack_expansion_args_count): Rename from
714         any_pack_expanson_args_p.
715         (coerce_template_parms): Reject pack expansion to
716         non-pack template parameter of alias template.
718 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
720         * error.c (dump_aggr_type): Use specialized pretty printer
721         functions instead of pp_character.
722         (dump_type_prefix): Likewise.
723         (dump_simple_decl): Likewise.
724         (type_to_string): Likewise.
726 2013-08-02  Paolo Carlini  <paolo.carlini@oracle.com>
728         * cp-tree.h (finish_stmt): Do not declare.
729         * decl.c (finish_stmt): Do not define.
730         * parser.c (cp_parser_expression_statement,
731         cp_parser_declaration_statement,
732         cp_parser_transaction_cancel): Don't call finish_stmt.
733         * semantics.c (finish_expr_stmt, finish_if_stmt,
734         finish_while_stmt, finish_do_stmt, finish_return_stmt,
735         finish_for_stmt, finish_switch_stmt, finish_compound_stmt,
736         finish_transaction_stmt): Likewise.
738 2013-08-01  Fabien Chêne  <fabien@gcc.gnu.org>
740         PR c++/54537
741         * cp-tree.h: Check OVL_USED with OVERLOAD_CHECK.
742         * name-lookup.c (do_nonmember_using_decl): Make sure we have an
743         OVERLOAD before calling OVL_USED. Call diagnose_name_conflict
744         instead of issuing an error without mentioning the conflicting
745         declaration.
747 2013-07-31  Paolo Carlini  <paolo.carlini@oracle.com>
749         * parser.c (cp_parser_sizeof_pack): Check cp_parser_identifier
750         return value for error_mark_node.
752 2013-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
754         PR c++/57673
755         * parser.c (cp_parser_cache_defarg): In an NSDMI don't stop when
756         token->type == CPP_ELLIPSIS.
758 2013-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
760         PR c++/57947
761         * call.c (is_std_init_list): Return false if cxx_dialect == cxx98.
763 2013-07-29  Jason Merrill  <jason@redhat.com>
765         PR c++/57901
766         * semantics.c (build_data_member_initialization, constexpr_fn_retval):
767         Use break_out_target_exprs instead of unshare_expr.
769 2013-07-29  Paolo Carlini  <paolo.carlini@oracle.com>
771         PR c++/57948
772         * call.c (initialize_reference): Don't crash when reference_binding
773         returns a conv with conv->kind == ck_ambig.
775 2013-07-29  Jason Merrill  <jason@redhat.com>
777         * mangle.c (write_name): Check for null context.
778         (write_unscoped_name): Allow PARM_DECL context.
780 2013-07-25  Paolo Carlini  <paolo.carlini@oracle.com>
782         PR c++/57981
783         * decl.c (check_default_argument): Take a tsubst_flags_t parameter.
784         (grokparms): Adjust.
785         * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
786         * pt.c (tsubst_default_argument, tsubst_default_arguments): Take
787         a tsubst_flags_t parameter.
788         (tsubst_decl): Adjust.
789         * call.c (convert_default_arg): Likewise.
790         * cp-tree.h (check_default_argument, tsubst_default_argument):
791         Update declarations.
793 2013-07-25  Paolo Carlini  <paolo.carlini@oracle.com>
795         PR c++/57880
796         * parser.c (cp_parser_operator, case CPP_WSTRING, CPP_STRING16,
797         CPP_STRING32, CPP_UTF8STRING, CPP_WSTRING_USERDEF,
798         CPP_STRING16_USERDEF, CPP_STRING32_USERDEF, CPP_UTF8STRING_USERDEF):
799         Fix string_len management, tidy.
801 2013-07-24  Paolo Carlini  <paolo.carlini@oracle.com>
803         PR c++/57942
804         * typeck.c (ptr_reasonably_similar): Use COMPARE_STRICT if either
805         target type is incomplete; return a bool, not an int.
806         * cp-tree.h (ptr_reasonably_similar): Adjust declaration.
808 2013-07-22  Paolo Carlini  <paolo.carlini@oracle.com>
810         * cp-tree.h (DERIVED_FROM_P): Pass tf_none to lookup_base, not
811         tf_warning_or_error.
813 2013-07-21   Ondřej Bílka  <neleai@seznam.cz>
815         * class.c: Fix typos.
816         * cp-array-notation.c: Likewise.
817         * cp-objcp-common.c: Likewise.
818         * decl.c: Likewise.
819         * init.c: Likewise.
820         * mangle.c: Likewise.
821         * parser.c: Likewise.
822         * pt.c: Likewise.
823         * semantics.c: Likewise.
825 2013-07-14  Adam Butcher  <adam@jessamine.co.uk>
827         * semantics.c (build_lambda_expr),
828         (build_lambda_object), (begin_lambda_type), (lambda_return_type),
829         (lambda_function), (lambda_capture_field_type), (is_capture_proxy),
830         (is_normal_capture_proxy), (insert_capture_proxy),
831         (insert_pending_capture_proxies), (lambda_proxy_type),
832         (build_capture_proxy), (vla_capture_type),
833         (register_capture_members), (add_default_capture),
834         (lambda_expr_this_capture), (maybe_resolve_dummy),
835         (nonlambda_method_basetype), (maybe_add_lambda_conv_op) and
836         (is_lambda_ignored_entity): Moved definitions into ...
837         * lambda.c: ... this new file.
839 2013-07-14  Marc Glisse  <marc.glisse@inria.fr>
841         * call.c (build_conditional_expr_1): Handle the case with 1 vector
842         and 2 scalars. Call save_expr before building a vector.
843         * typeck.c (cp_build_binary_op): Check complain before complaining.
845 2013-07-13  Lubos Lunak  <l.lunak@suse.cz>
847         PR c++/55203
848         * init.c (build_aggr_init): Check for warn_unused attribute.
849         * decl.c (poplevel): Likewise.
851 2013-07-13  Jason Merrill  <jason@redhat.com>
853         PR c++/57402
854         * init.c (build_vec_init): Use {} for arrays of class type.
855         (build_vec_delete): Don't take the address of the array.
857         PR c++/57793
858         * class.c (layout_class_type): Check for too-large class.
860         * call.c (can_convert): Allow user-defined conversions.
861         (can_convert_standard): New.
862         * cp-tree.h: Declare it.
863         * cvt.c (convert_to_reference): Use it.
864         * pt.c (convert_nontype_argument): Likewise.
865         * search.c (check_final_overrider): Likewise.
866         Don't worry about user-defined conversions.
868 2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
870         PR c++/57869
871         * typeck.c (build_reinterpret_cast_1): With -Wconditionally-supported
872         warn about casting between pointer-to-function and pointer-to-object.
874 2013-07-09  Jason Merrill  <jason@redhat.com>
876         PR c++/57402
877         * init.c (build_vec_init): Don't take shortcuts when initializing
878         a VLA.
880         PR c++/57471
881         * parser.c (cp_parser_sizeof_pack): Clear parser scopes.
883         PR c++/57658
884         * semantics.c (finish_id_expression): Return the id for an
885         unevaluated outer variable.
887         PR c++/57526
888         * semantics.c (lambda_capture_field_type): Build a DECLTYPE_TYPE
889         if the variable type uses 'auto'.
891         PR c++/57437
892         * typeck.c (check_return_expr): Lambda proxies aren't eligible
893         for nrv or return by move.
895         PR c++/57532
896         * parser.c (cp_parser_ref_qualifier_opt): Don't tentatively parse
897         a ref-qualifier in C++98 mode.
899         PR c++/57545
900         * pt.c (convert_nontype_argument) [INTEGER_CST]: Force the
901         argument to have the exact type of the parameter.
903         PR c++/57551
904         * semantics.c (cxx_eval_indirect_ref): Don't try to look through
905         a POINTER_PLUS_EXPR for type punning diagnostic.
907         PR c++/57831
908         * pt.c (tsubst_copy): Handle USING_DECL.
910 2013-07-09  Marc Glisse  <marc.glisse@inria.fr>
912         PR c++/53094
913         * semantics.c (cxx_eval_bit_field_ref): Handle VECTOR_CST.
915 2013-07-09  Marc Glisse  <marc.glisse@inria.fr>
917         PR c++/53000
918         * call.c (build_conditional_expr_1): Preserve xvalues.
920 2013-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
922         PR c++/51786
923         * parser.c (cp_parser_simple_declaration): Before calling shadow_tag
924         also check declares_class_or_enum.
926 2013-07-08  Jason Merrill  <jason@redhat.com>
928         PR c++/57550
929         * pt.c (fn_type_unification): Only defer during substitution.
930         (type_unification_real): Defer during defarg substitution,
931         add checks parm to pass back deferred checks.
932         (unify, do_auto_deduction): Adjust.
933         * semantics.c (reopen_deferring_access_checks): New.
934         * cp-tree.h: Declare it.
936 2013-07-06  Paolo Carlini  <paolo.carlini@oracle.com>
938         PR c++/28262
939         * parser.c (cp_parser_init_declarator): If we are parsing a typedef
940         set parser->default_arg_ok_p to false before cp_parser_declarator.
942 2013-07-05  Paolo Carlini  <paolo.carlini@oracle.com>
944         PR c++/14263
945         * class.c (build_base_path): Improve diagnostic.
947 2013-07-04  Paolo Carlini  <paolo.carlini@oracle.com>
949         PR c++/38634
950         * decl.c (start_preparsed_function): Return a bool, false if
951         push_template_decl fails.
952         (start_function): Adjust.
953         * cp-tree.h: Update.
955 2013-07-03  Jakub Jelinek  <jakub@redhat.com>
957         PR c++/57771
958         * parser.c (cp_parser_postfix_expression) <case RID_STATCAST>
959         Temporarily set parser->greater_than_is_operator_p for
960         cp_parser_expression and restore from saved value afterwards.
962 2013-06-28  Ed Smith-Rowland  <3dw4rd@verizon.net>
964         * cp-tree.h (UDLIT_OP_ANSI_PREFIX): Remove space.
965         * parser.c (cp_parser_operator()): Parse user-defined string
966         literal as literal operator.
968 2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>
970         PR c++/57645
971         * class.c (deduce_noexcept_on_destructors): Save, set, and restore
972         TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
973         destructors.
975 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
977         * parser.c (cp_parser_array_notation): Removed rejection array notation
978         of type function pointers. Added handling of array expressions when
979         Cilk Plus is enabled.  Took out type-checking.
980         (cp_parser_postfix_open_square_expression): Moved normal array expr.
981         parsing into cp_parser_array_notation when cilkplus is enabled.
982         (cp_parser_compound_statement): Removed expansion of array notations.
983         (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
984         (cp_parser_function_definition_after_declarator): Likewise.
985         (cp_parser_selection_statement): Removed error reporting.
986         (cp_parser_iteration_statement): Likewise.
987         (cp_parser_direct_declarator): Removed error checking/reporting if
988         array notations are used in the declarator.
989         * pt.c (instantiate_decl): Likewise.
990         (type_unification_real): Removed a check for ARRAY_NOTATION_REF.
991         (cxx_eval_constant_expression): Removed ARRAY_NOTATION_REF case.
992         (potential_constant_expression_1): Returned false for
993         ARRAY_NOTATION_REF case.
994         * cp-gimplify.c (cp_genericize): Added expansion of array notation
995         expressions here.
996         * cp-array-notation.c (make_triplet_val_inv): Removed loc and cry 
997         parameters.  Replaced build_decls with get_temp_regvar with type as
998         ptrdiff.
999         (create_array_refs): Made the type-casting to ptrdiff_type.
1000         (replace_invariant_var): Added a check for void return type before 
1001         creating new var.  Replaced build_decl and build_min_nt_loc with
1002         get_temp_regvar.
1003         (expand_an_in_modify_expr): Ditto.  Replaced body of redundant else 
1004         with gcc_unreachable.  Removed few unwanted checks.  Made induction 
1005         variable type as ptrdiff_type.  Removed loc and complain arguments 
1006         passed into make_triplet_val_inv.  Replaced all modify expression's 
1007         code from NOP EXPR to INIT EXPR.  Replaced all forceful appending 
1008         into stmt. list with the non-forceful one.  Replaced some integer 
1009         conversion and equality-checking to using tree_int_cst_equal.
1010         (expand_sec_reduce_builtin): All changes mentioned in above function
1011         expand_an_in_modify_expr.  Made the new variable type of
1012         SEC_REDUCE_ANY/ALL_{NON}ZERO intrinsic functions as bool.
1013         (expand_array_notation_exprs): Removed SWITCH_EXPR case.  Moved all
1014         the error reporting from parser to this function.  Removed unwanted
1015         statements and checks from SWITCH_STMT, WHILE_STMT, and DO_STMT cases.
1016         (cilkplus_an_triplet_types_ok_p): Removed rejection of array notation
1017         in function pointers.
1018         (cp_expand_cond_array_notations): Added a new if statements to check
1019         if condition has a zero rank.  If so, then just return.
1020         (expand_return_expr): Added a check for return expressions with a rank.
1021         Replaced get_tmp_regvar with a create_temporary_var.
1022         (build_array_notation_ref): Simplified and removed unwanted if-stmts.
1023         Moved common code outside if-statements.  Moved type-checking from
1024         parser to here.
1025         * semantics.c (finish_return_stmt): Removed a check for return exprs.
1026         with a rank.
1027         * call.c (convert_like_real): Removed a check for array notation
1028         expression in a function.
1029         (build_over_call): Likewise.
1030         (magic_varargs_p): Added a check for builtin array notation function.
1031         Made this function non-static and removed its prototype.
1032         * cp-tree.h (magic_varargs_p): New prototype.
1033         * typeck.c (cp_build_function_call_vec): Removed automatic setting of
1034         nargs to the param->length when builtin reduction function is used.
1035         (convert_arguments): Replaced check for a constant_p function with
1036         margic_varargs_p function call.
1037         (cp_build_binary_op): Removed calling of the function
1038         find_correct_array_notation_type.
1039         (cp_build_addr_expr_1): Removed an unwanted if-statement.
1040         (convert_for_assignment): Removed automatic return of rhs when array
1041         notation builtin function is used.
1043 2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>
1045         PR c++/57682
1046         * parser.c (cp_parser_save_member_function_body): Handle correctly
1047         curly braces in function-try-block mem-initializers.
1049 2013-06-27  Marc Glisse  <marc.glisse@inria.fr>
1051         PR c++/57509
1052         * typeck.c (cp_build_vec_perm_expr): New function.
1053         * cp-tree.h: Declare it.
1054         * parser.c (cp_parser_postfix_expression): Call it.
1055         * pt.c (tsubst_copy): Handle VEC_PERM_EXPR.
1056         (tsubst_copy_and_build): Likewise.
1058 2013-06-27  Marc Glisse  <marc.glisse@inria.fr>
1060         PR c++/57172
1061         * pt.c (more_specialized_fn): If both arguments are references,
1062         give priority to an lvalue.
1064 2013-06-26  Jason Merrill  <jason@redhat.com>
1066         * typeck2.c (store_init_value): Diagnose a non-constant
1067         initializer for in-class static.
1069         PR c++/57408
1070         * semantics.c (add_capture): Set type to error_mark_node after
1071         error.
1073 2013-06-25  Ed Smith-Rowland  <3dw4rd@verizon.net>
1075         PR c++/57640
1076         * parser.c (cp_parser_unqualified_id): Add declarator_p to checks
1077         to trigger warning, (cp_literal_operator_id): Remove bogus TODO comment.
1079 2013-06-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1081         * call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x.
1082         * class.c (add_implicitly_declared_members): Likewise.
1083         (check_field_decl): Likewise.
1084         (finalize_literal_type_property): Likewise.
1085         (check_bases_and_members): Likewise.
1086         * decl.c (poplevel): Likewise.
1087         (case_conversion): Likewise.
1088         (check_initializer): Likewise.
1089         (grokfndecl): Likewise.
1090         (check_static_variable_definition): Likewise.
1091         (compute_array_index_type): Likewise.
1092         (grokdeclarator): Likewise.
1093         (build_enumerator): Likewise.
1094         * friend.c (make_friend_class): Likewise.
1095         * lex.c (init_reswords): Likewise.
1096         * method.c (synthesized_method_walk): Likewise.
1097         (implicitly_declare_fn): Likewise.
1098         * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
1099         (cp_parser_constant_expression): Likewise.
1100         (cp_parser_for_init_statement): Likewise.
1101         (cp_parser_block_declaration): Likewise.
1102         (cp_parser_type_name): Likewise.
1103         (cp_parser_enum_specifier): Likewise.
1104         (cp_parser_enumerator_list): Likewise.
1105         (cp_parser_member_declaration): Likewise.
1106         (cp_nth_tokens_can_be_std_attribute_p): Likewise.
1107         (cp_parser_template_declaration_after_export): Likewise.
1108         * pt.c (convert_nontype_argument_function): Likewise.
1109         (convert_nontype_argument): Likewise.
1110         (convert_template_argument): Likewise.
1111         (tsubst_copy_and_build): Likewise.
1112         (build_non_dependent_expr): Likewise.
1113         * semantics.c (non_const_var_error): Likewise.
1114         (potential_constant_expression_1): Likewise.
1115         * tree.c (lvalue_kind): Likewise.
1116         (build_vec_init_expr): Likewise.
1117         (cast_valid_in_integral_constant_expression_p): Likewise.
1118         * typeck.c (build_x_conditional_expr): Likewise.
1119         * typeck2.c (check_narrowing): Likewise.
1121 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1123         * cp-array-notation.c (cp_length_mismatch_in_expr_p): Remove.
1124         (expand_an_in_modify_expr): Changed a function call from the above
1125         removed function to length_mismatch_in_expr_p.
1127 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1129         * call.c (convert_like_real): Added a check if array notation is present
1130         in expression.  If so, then no conversion of arguments is necessary.
1131         (build_over_call): Likewise.
1132         * typeck.c (cp_build_function_call_vec): Likewise.
1133         (convert_for_assignment): Likewise.
1134         (cp_build_array_ref): Reject array notations with a rank greater than 1
1135         as an array's index.
1136         (cp_build_binary_op): If array notations are preent in op, then call
1137         find_correct_array_notation_type.
1138         (cp_build_addr_expr_1): Handle ARRAY_NOTATION_REF similar to ARRAY_REF.
1139         * cp-array-notation.c: New file.
1140         * cp-objcp-common.c (cp_common_init_ts): Marked ARRAY_NOTATION_REF tree
1141         as typed.
1142         * cp-tree.h (fix_array_notation_exprs): New prototype.
1143         * semantics.c (finish_return_stmt): Reject array notations as
1144         return value.
1145         (cxx_eval_constant_expression): Added ARRAY_NOTATION_REF case.
1146         (potential_constant_expression_1): Likewise.
1147         * tree.c (lvalue_kind): Likewise.
1148         * error.c (dump_decl): Likewise.
1149         (dump_expr): Likewise.
1150         * pt.c (ARRAY_NOTATION_REF): Likewise.
1151         (type_unification_real): Do not unify any arguments if array notations
1152         are found in arg.
1153         (instantiate_decl): Added a check for array notaitons inside the
1154         function body.  If so, then expand them.
1155         * parser.c (cp_parser_array_notation): New function.
1156         (cp_parser_postfix_open_square_expression): Added a check for colons
1157         inside square braces.  If found, then handle the array access as an
1158         array notation access.  Also, disable auto-correction from a single
1159         colon to scope when Cilk Plus is enabled.
1160         (cp_parser_compound_statement): Added a check for array notations
1161         inside the statement.  If found, then expand them.
1162         (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
1163         (cp_parser_function_definition_after_declarator): Likewise.
1164         (cp_parser_selection_statement): Searched for array notations inside
1165         condition.  If so, then emit an error.
1166         (cp_parser_iteration_statement): Likewise.
1167         (cp_parser_direct_declarator): Reject array notations inside a
1168         variable or array declaration.
1169         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Added cp/cp-array-notation.o.
1171 2013-06-20  Jason Merrill  <jason@redhat.com>
1173         PR c++/55149
1174         * decl.c (compute_array_index_type): Don't reject VLAs in SFINAE
1175         context if we're in C++14 mode.
1176         * tree.c (array_of_runtime_bound_p): Return true for a dependent
1177         bound that is not potentually constant.
1178         * cp-tree.h (DECL_VLA_CAPTURE_P, REFERENCE_VLA_OK): New.
1179         * pt.c (tsubst) [REFERENCE_TYPE]: Check REFERENCE_VLA_OK.
1180         * semantics.c (build_lambda_object): Don't rvalue a VLA capture.
1181         (build_capture_proxy): Set REFERENCE_VLA_OK.
1182         (vla_capture_type): Make it a proper C++ class.
1183         (add_capture): Set DECL_VLA_CAPTURE_P.  Don't pre-digest the
1184         initializer.
1186         * decl.c (compute_array_index_type): Use size_one_node.
1188         * pt.c (process_partial_specialization): Build a TEMPLATE_DECL for
1189         a partial specialization.
1190         (tsubst_decl): Don't clobber CLASSTYPE_TI_TEMPLATE of a partial
1191         specialization.
1192         (most_specialized_class): Adjust.
1194         * cp-tree.h (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT)
1195         (DECL_TEMPLATE_INSTANTIATIONS, DECL_TEMPLATE_SPECIALIZATIONS): Use
1196         TEMPLATE_DECL_CHECK.
1198 2013-06-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1200         PR c++/57638
1201         * pt.c (unify, [TEMPLATE_PARM_INDEX]): Pass to unify_type_mismatch
1202         TREE_TYPE (arg), not arg itself.
1204 2013-06-18  Paolo Carlini  <paolo.carlini@oracle.com>
1206         PR c++/53211
1207         * pt.c (type_dependent_expression_p): Handle an array of unknown
1208         bound depending on a variadic parameter.
1209         * parser.c (cp_parser_range_for): Revert PR56794 changes.
1211 2013-06-17  Richard Biener  <rguenther@suse.de>
1213         * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h.
1215 2013-06-17  Paolo Carlini  <paolo.carlini@oracle.com>
1217         PR c++/16128
1218         * parser.c (cp_parser_expression_statement): Check whether
1219         cp_parser_expression returns error_mark_node.
1221 2013-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
1223         PR c++/51413
1224         * semantics.c (finish_offsetof): Handle INDIRECT_REF as expr.
1226 2013-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
1228         PR c++/57599
1229         * rtti.c (build_dynamic_cast_1): In case of cast to an unambiguous
1230         accessible base simply forward to build_static_cast.
1232 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
1234         PR c++/38958
1235         * decl.c (poplevel): For the benefit of -Wunused-variable see
1236         through references.
1238 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
1240         * parser.c (cp_parser_nested_name_specifier_opt): Fix typo in comment.
1242 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
1244         PR c++/42021
1245         * parser.c (cp_parser_nested_name_specifier_opt): Avoid emitting
1246         again diagnostic already emitted by cp_parser_lookup_name.
1248 2013-06-11  Jan Hubicka  <jh@suse.cz>
1250         PR c++/57551
1251         * cp/pt.c (mark_decl_instantiated): Do not export explicit
1252         instantiations of anonymous namespace templates.
1254 2013-06-10  Jason Merrill  <jason@redhat.com>
1256         * name-lookup.c (add_decl_to_level): Add decls in an anonymous
1257         namespace to static_decls.
1259 2013-06-07  Sriraman Tallam  <tmsriram@google.com>
1261         PR c++/57548
1262         * call.c (build_over_call):  Check if current_function_decl is
1263         NULL.
1265 2013-06-07  Paolo Carlini  <paolo.carlini@oracle.com>
1267         PR c++/53658
1268         * pt.c (lookup_template_class_1): Consistently use TYPE_MAIN_DECL,
1269         not TYPE_STUB_DECL, to access the _DECL for a _TYPE.
1271 2013-06-06  Jason Merrill  <jason@redhat.com>
1273         PR c++/55520
1274         * semantics.c (add_capture): Diagnose capture of variable-size
1275         type that is not a C++1y array of runtime bound.
1277         * decl.c (grokdeclarator): Keep a decl with error type.
1278         (grokfield, grokbitfield): Likewise.
1279         * pt.c (instantiate_class_template_1): Likewise.
1280         (tsubst_decl): Drop redundant error.
1281         * class.c (walk_subobject_offsets): Handle erroneous fields.
1282         * typeck2.c (process_init_constructor_record): Likewise.
1284 2013-06-05  Paolo Carlini  <paolo.carlini@oracle.com>
1286         PR c++/51908
1287         * parser.c (cp_parser_postfix_expression [RID_*CAST]): Set
1288         parser->in_type_id_in_expr_p before calling cp_parser_type_id.
1290 2013-06-03  Jan Hubicka  <jh@suse.cz>
1292         * decl2.c (maybe_make_one_only): Use forced_by_abi instead of
1293         mark_decl_referenced.
1294         (mark_needed): Likewise.
1296 2013-06-03  Jason Merrill  <jason@redhat.com>
1298         * class.c (mark_type_abi_tags): New.
1299         (check_abi_tags): Use it.
1301 2013-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
1303         PR c++/57419
1304         * decl2.c (mark_used): Add overload taking a tsubst_flags_t too.
1305         * semantics.c (finish_qualified_id_expr): Use it.
1306         * cp-tree.h: Update.
1308 2013-06-01  Jan Hubicka  <jh@suse.cz>
1310         * decl2.c (cp_write_global_declarations): Replace same_body_alias
1311         by symbol.cpp_implicit_alias.
1313 2013-05-30  Jason Merrill  <jason@redhat.com>
1315         PR c++/57404
1316         * cp-lang.c (cp_classify_record): Handle structs without
1317         TYPE_LANG_SPECIFIC.
1319         PR c++/52377
1320         * class.c (common_enclosing_class): New.
1321         * cp-tree.h: Declare it.
1322         * init.c (sort_mem_initializers): Don't splice out a union member
1323         with an NSDMI.
1325 2013-05-29  Jan Hubicka  <jh@suse.cz>
1327         * tree.c (cp_fix_function_decl_p): Update for new symtab flags.
1328         * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise.
1330 2013-05-25  Paolo Carlini  <paolo.carlini@oracle.com>
1332         PR c++/25666
1333         * decl2.c (check_classfn): Check for destructors declared as member
1334         templates.
1336 2013-05-24  Jason Merrill  <jason@redhat.com>
1338         PR c++/56971
1339         * pt.c (any_template_arguments_need_structural_equality_p): A
1340         TEMPLATE_TEMPLATE_PARM can require structural type comparison.
1342 2013-05-24  Paolo Carlini  <paolo.carlini@oracle.com>
1344         PR c++/19618
1345         * class.c (check_bitfield_decl): Warn for bool and enum bitfields
1346         with width exceeding the type.
1348 2013-05-24  Jason Merrill  <jason@redhat.com>
1350         PR c++/57391
1351         * semantics.c (cxx_eval_constant_expression): Handle FMA_EXPR.
1352         (cxx_eval_trinary_expression): Rename from cxx_eval_vec_perm_expr.
1354 2013-05-23  Jason Merrill  <jason@redhat.com>
1356         PR c++/57388
1357         * tree.c (build_ref_qualified_type): Clear
1358         FUNCTION_RVALUE_QUALIFIED for lvalue ref-qualifier.
1360 2013-05-22  Jason Merrill  <jason@redhat.com>
1362         PR c++/56930
1363         * call.c (convert_like_real): Use cp_convert_and_check.
1364         * cvt.c (cp_convert_and_check): Use maybe_constant_value.
1365         * semantics.c (cxx_eval_constant_expression): Handle LTGT_EXPR.
1366         (potential_constant_expression_1): Handle OMP_ATOMIC*.
1368         PR c++/56915
1369         * semantics.c (maybe_add_lambda_conv_op): Give up if the call op
1370         isn't defined.
1372 2013-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
1374         PR c++/57352
1375         * parser.c (cp_parser_conversion_type_id): Set up
1376         parser->type_definition_forbidden_message before calling
1377         cp_parser_type_specifier_seq.
1379 2013-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
1381         PR c++/57211
1382         * method.c (defaultable_fn_check): Avoid do_warn_unused_parameter
1383         warnings about defaulted functions.
1385 2013-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
1387         * call.c (build_conditional_expr_1): Add location_t parameter.
1388         (build_conditional_expr): Likewise.
1389         * typeck.c (rationalize_conditional_expr, cp_build_array_ref,
1390         get_member_function_from_ptrfunc, build_x_conditional_expr,
1391         cp_build_modify_expr): Update.
1392         * init.c (build_new_1): Likewise.
1393         * cp-tree.h: Update declaration.
1395 2013-05-20  Jason Merrill  <jason@redhat.com>
1397         PR c++/57016
1398         * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Only check type2
1399         if there is one.
1401         PR c++/57102
1402         * decl.c (fndecl_declared_return_type): Also look in
1403         DECL_SAVED_FUNCTION_DATA.
1405 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1407         PR c++/12288
1408         * parser.c (cp_parser_parameter_declaration): Check return value
1409         of cp_parser_parse_and_diagnose_invalid_type_name.
1411 2013-05-20  Jason Merrill  <jason@redhat.com>
1413         PR c++/57319
1414         * class.c (vbase_has_user_provided_move_assign): New.
1415         * method.c (synthesized_method_walk): Check it.
1416         * cp-tree.h: Declare it.
1418         PR c++/57325
1419         * tree.c (build_cplus_array_type): Copy layout info if element
1420         type is complete.
1422 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1424         PR c++/23608
1425         * call.c (build_new_op_1): Propagate loc to cp_build_binary_op.
1427 2013-05-20  Jason Merrill  <jason@redhat.com>
1429         PR c++/57317
1430         * decl2.c (determine_visibility): Use PRIMARY_TEMPLATE_P to decide
1431         whether a template has its own args.
1433 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1435         PR c++/57327
1436         * pt.c (unify_no_common_base): Swap arg and parm arguments to inform.
1438 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1440         PR c++/10207
1441         * parser.c (cp_parser_postfix_expression): Use cp_parser_braced_list
1442         instead of cp_parser_initializer_list for compound-literals.
1444 2013-05-20  Marc Glisse  <marc.glisse@inria.fr>
1446         PR c++/57175
1447         * typeck.c (check_return_expr): Reverse the alignment comparison.
1449 2013-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
1451         PR c++/18126
1452         * parser.c (cp_parser_sizeof_operand): As a GNU Extension, parse
1453         correctly sizeof compound-literal; update comments.
1455 2013-05-16  Marc Glisse  <marc.glisse@inria.fr>
1457         * call.c (build_conditional_expr_1): Use cp_build_binary_op
1458         instead of directly calling fold_build2.
1460 2013-05-16  Jason Merrill  <jason@redhat.com>
1462         * Make-lang.in (cc1plus$(exeext)): Use link mutex.
1464         PR c++/57279
1465         * decl.c (grokdeclarator): Allow member function qualifiers in
1466         TYPENAME context in C++11 mode.
1468 2013-05-16  Dodji Seketeli  <dodji@redhat.com>
1470         PR c++/56782 - Regression with empty pack expansions
1471         * pt.c (use_pack_expansion_extra_args_p): When at least a
1472         parameter pack has an empty argument pack, and another parameter
1473         pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
1474         mechanism.
1476 2013-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
1478         * name-lookup.c (pushdecl_maybe_friend_1): Replace pairs of
1479         warning_at and permerror with warning_at/inform and permerror/
1480         inform, respectively.
1482 2013-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
1484         PR c++/31952
1485         * name-lookup.c (pushdecl_maybe_friend_1): Diagnose illegal
1486         redeclarations.
1488 2013-05-14  Jason Merrill  <jason@redhat.com>
1490         PR c++/57243
1491         * parser.c (cp_parser_range_for): Call complete_type.
1493         PR c++/57041
1494         * pt.c (tsubst_copy_and_build): Don't recur into a designator.
1496 2013-05-14  Paolo Carlini  <paolo.carlini@oracle.com>
1498         PR c++/53903
1499         * method.c (defaulted_late_check): Check for compatible exception
1500         specification out of class explicitly defaulted functions too.
1502 2013-05-14  Jason Merrill  <jason@redhat.com>
1504         PR c++/56998
1505         * semantics.c (potential_constant_expression_1): Make sure the
1506         called function is potentially constant.
1507         * call.c (null_ptr_cst_p): Revert earlier change.
1509 2013-05-13  Jason Merrill  <jason@redhat.com>
1511         PR c++/56998
1512         * call.c (null_ptr_cst_p): An expression with side-effects can't
1513         be a C++03 null pointer constant.
1515         PR c++/57041
1516         * decl.c (reshape_init_class): Handle error_mark_node.
1518         PR c++/57254
1519         * typeck.c (merge_types): Propagate ref-qualifier
1520         in METHOD_TYPE case.
1522         PR c++/57253
1523         * decl.c (grokdeclarator): Apply ref-qualifier
1524         in the TYPENAME case.
1526         PR c++/57252
1527         * decl.c (decls_match): Compare ref-qualifiers.
1529 2013-05-10  Jason Merrill  <jason@redhat.com>
1531         PR c++/57196
1532         * pt.c (convert_template_argument): Use dependent_template_arg_p,
1533         not uses_template_parms.
1535         PR c++/57047
1536         * semantics.c (cxx_fold_indirect_ref): Fix thinko.
1538         PR c++/55149
1539         * semantics.c (add_capture): Error rather than abort on copy
1540         capture of VLA.
1541         * typeck.c (maybe_warn_about_returning_address_of_local): Don't
1542         warn about capture proxy.
1544 2013-05-09  Jason Merrill  <jason@redhat.com>
1546         * decl.c (cp_finish_decl): Only check VLA bound in C++1y mode.
1548         PR c++/57222
1549         * pt.c (lookup_template_class_1): Handle getting a template
1550         template parameter as D1.
1552         N3639 C++1y VLA diagnostics
1553         * decl.c (grokdeclarator): Complain about reference, pointer, or
1554         typedef to VLA.
1555         (create_array_type_for_decl): Complain about array of VLA.
1556         * pt.c (tsubst): Likewise.
1557         * rtti.c (get_tinfo_decl): Talk about "array of runtime bound".
1558         * semantics.c (finish_decltype_type): Complain about decltype of VLA.
1559         * typeck.c (cp_build_addr_expr_1): Complain about VLA.
1560         (cxx_sizeof_or_alignof_type): Likewise.
1562         N3639 C++1y VLA support
1563         * decl.c (compute_array_index_type): Allow VLAs in C++1y mode.
1564         (check_array_initializer): Allow VLA init.
1565         (reshape_init_array_1): Adjust.
1566         (cp_finish_decl): Check for invalid VLA length.
1567         * typeck2.c (process_init_constructor_array): Adjust.
1568         (store_init_value): Use build_vec_init for VLAs.
1569         * semantics.c (add_capture): Capture VLA as ptr+len.
1570         (vla_capture_type): New.
1571         (build_capture_proxy): Rebuild the VLA.
1572         * typeck.c (build_simple_component_ref): Split out from...
1573         (build_ptrmemfunc_access_expr): ...here.
1574         * tree.c (array_of_runtime_bound_p): New.
1575         * init.c (throw_bad_array_length): New.
1576         (build_vec_init): Use it.
1577         * parser.c (cp_convert_range_for): When iterating over a VLA,
1578         use it directly rather than bind a reference.
1579         * cp-tree.h: Declare new functions.
1581 2013-05-08  Jason Merrill  <jason@redhat.com>
1583         * except.c (is_admissible_throw_operand_or_catch_parameter): Check
1584         variably_modified_type_p.
1585         (expand_start_catch_block): Mark the typeinfo used here.
1586         * semantics.c (finish_handler_parms): Not here.
1588         * error.c (dump_type_suffix): Try harder on VLA length.
1590         Core 624/N2932
1591         * init.c (throw_bad_array_new_length): New.
1592         (build_new_1): Use it.  Don't warn about braced-init-list.
1593         (build_vec_init): Use it.
1594         * call.c (build_operator_new_call): Use it.
1596         PR c++/57068
1597         * decl.c (grokdeclarator): Warn about ref-qualifiers here.
1598         * parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
1599         * error.c (maybe_warn_cpp0x): s/0x/11/.
1601 2013-05-08  Paolo Carlini  <paolo.carlini@oracle.com>
1603         PR c++/51226
1604         * parser.c (cp_parser_enum_specifier): Handle nested_name_specifier
1605         == error_mark_node.
1607 2013-05-06  Marc Glisse  <marc.glisse@inria.fr>
1609         * typeck.c (cp_build_binary_op): Call save_expr before
1610         build_vector_from_val.
1612 2013-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
1614         PR c++/57183
1615         * decl.c (cp_finish_decl): After do_auto_deduction copy the
1616         qualifers with cp_apply_type_quals_to_decl.
1618 2013-05-05  Paolo Carlini  <paolo.carlini@oracle.com>
1620         * pt.c (convert_nontype_argument): Add missing whitespace in
1621         error message.
1623 2013-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
1625         PR c++/53745
1626         * decl.c (build_enumerator): Improve error message.
1628 2013-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
1630         PR c++/14283
1631         * parser.c (cp_parser_diagnose_invalid_type_name): Improve error
1632         messages for template types and fix column numbers.
1634 2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
1636         PR c++/57132
1637         * pt.c (tsubst_copy_and_build, MODOP_EXPR): Increase / decrease
1638         c_inhibit_evaluation_warnings around build_x_modify_expr call.
1640 2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
1642         PR c++/57092
1643         * semantics.c (finish_decltype_type): Handle instantiated template
1644         non-type arguments.
1646 2013-04-28  Paolo Carlini  <paolo.carlini@oracle.com>
1648         PR c++/56450
1649         * semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
1651 2013-04-26  Jakub Jelinek  <jakub@redhat.com>
1653         * error.c (cp_print_error_function): Adjust file_name_as_prefix
1654         caller.
1656 2013-04-25  Jason Merrill  <jason@redhat.com>
1658         PR c++/56859
1659         * typeck.c (cxx_alignas_expr): Handle value-dependence properly.
1661         PR c++/50261
1662         * init.c (perform_member_init): Call reshape_init.
1664 2013-04-24  Jason Merrill  <jason@redhat.com>
1666         PR c++/53721
1667         * parser.c (cp_parser_postfix_dot_deref_expression): Fix thinko.
1669 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
1671         * typeck.c (cxx_sizeof_or_alignof_type): Change -Wpointer-arith
1672         pedwarn to simply use OPT_Wpointer_arith.
1673         (cp_build_unary_op): Likewise.
1675 2013-04-24  Jason Merrill  <jason@redhat.com>
1677         N3648: init-captures are named.
1678         * semantics.c (add_capture): Don't prepend "__" to init-captures.
1679         (build_capture_proxy): Adjust.
1680         * error.c (dump_simple_decl): Check DECL_NORMAL_CAPTURE_P.
1682         N3648: Allow braced and parenthesized initializers.
1683         * parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer.
1684         * pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE.
1685         * semantics.c (lambda_capture_field_type): Use do_auto_deduction.
1686         (add_capture): Collapse a parenthesized initializer into a single
1687         expression.
1688         * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New.
1690 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
1692         PR c++/56970
1693         * init.c (build_offset_ref): Add tsubst_flags_t parameter.
1694         * semantics.c (finish_qualified_id_expr): Likewise.
1695         (finish_id_expression): Update.
1696         * typeck.c (cp_build_addr_expr_1): Likewise.
1697         * pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
1698         * cp-tree.h: Update declarations.
1700 2013-04-22  Jason Merrill  <jason@redhat.com>
1702         Core 1586
1703         * parser.c (cp_parser_unqualified_id): Handle ~auto.
1704         (cp_parser_pseudo_destructor_name): Likewise.
1705         (cp_parser_postfix_dot_deref_expression): Adjust.
1706         (cp_lexer_nth_token_is_keyword): New.
1707         * semantics.c (finish_pseudo_destructor_expr): Handle ~auto.
1708         * typeck.c (lookup_destructor): Handle ~auto.
1710         * pt.c (fn_type_unification): Push tinst level around
1711         type_unification_real if we aren't explaining.
1712         * cp-tree.h (TFF_NO_TEMPLATE_BINDINGS): New.
1713         * error.c (dump_function_decl): Respect it.
1714         (subst_to_string): Pass it.
1716         PR c++/48665
1717         * rtti.c (get_typeid): Diagnose qualified function type.
1718         * pt.c (tsubst) [POINTER_TYPE]: Likewise.
1720         * error.c (dump_aggr_type): Fix lambda detection.
1721         (dump_simple_decl): Pretty-print capture field.
1723         N3323
1724         * cvt.c (build_expr_type_conversion): Two conversions that return
1725         the same type aren't necessarily ambiguous.
1727         N3648
1728         * parser.c (cp_parser_lambda_introducer): Make lambda capture init
1729         pedwarn unconditional except in C++1y mode.
1731         * semantics.c (potential_constant_expression_1): Don't crash on
1732         'this' in NSDMI.
1734         Core 1612
1735         * semantics.c (finish_id_expression): Reject capture of anonymous
1736         union member.
1738         Core 1609
1739         * decl2.c (check_default_args): Check for pack expansion.
1741         * mangle.c (write_type): Mangle decltype(auto).
1743 2013-04-19  Jason Merrill  <jason@redhat.com>
1745         N3638 changes to return type deduction
1746         * decl.c (undeduced_auto_decl): New.
1747         (require_deduced_type): New.
1748         (fndecl_declared_return_type): New.
1749         (decls_match): Use it.
1750         (duplicate_decls): Don't check for auto return.
1751         (grokdeclarator): Reject virtual auto.
1752         * class.c (resolve_address_of_overloaded_function): Handle
1753         auto function templates.
1754         * decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type.
1755         * cp-tree.h: Declare new fns.
1756         * error.c (dump_function_decl): Use fndecl_declared_return_type.
1757         * search.c (check_final_overrider): Likewise.
1758         * pt.c (make_decltype_auto): New.
1759         (do_auto_deduction): Require plain decltype(auto).
1760         (is_auto): Adjust.
1762         DR 941
1763         * decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
1764         template specializations.
1766 2013-04-16  Ed Smith-Rowland  <3dw4rd@verizon.net>
1768         Implement n3599 - Literal operator templates for strings.
1769         * parser.c (make_string_pack (tree value)): New function.
1770         (cp_parser_userdef_string_literal (cp_token *)): Use it
1771         to construct calls to character string literal operator templates.
1772         (cp_parser_template_declaration_after_export): Check for new string
1773         literal operator template parameter form.
1775 2013-04-15  Jason Merrill  <jason@redhat.com>
1777         * pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build.
1779         PR c++/52748
1780         * pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
1781         rather than a destructor name, it isn't an unqualified-name.
1782         (tsubst_copy_and_build): Pass down decltype_flag to operator
1783         handling code, too.
1785         PR c++/56388
1786         * semantics.c (insert_capture_proxy): Just use index 1 in the
1787         stmt_list_stack.
1789 2013-04-12  Jakub Jelinek  <jakub@redhat.com>
1791         * error.c (cp_print_error_function,
1792         print_instantiation_partial_context_line,
1793         maybe_print_constexpr_context): Colorize locus strings.
1795 2013-04-11  Jason Merrill  <jason@redhat.com>
1797         PR c++/52748
1798         * parser.c (complain_flags): New.
1799         (cp_parser_postfix_expression): Use it.
1800         (cp_parser_unary_expression): Likewise.
1801         (cp_parser_binary_expression): Likewise.
1802         (cp_parser_assignment_expression): Likewise.
1803         (cp_parser_expression): Likewise.
1804         (cp_parser_postfix_open_square_expression): Take decltype_p.
1805         (cp_parser_builtin_offsetof): Adjust.
1806         (cp_convert_range_for): Pass complain to finish_unary_op_expr.
1807         * decl2.c (grok_array_decl): Add decltype_p parm.
1808         * cp-tree.h: Adjust prototype.
1809         * semantics.c (finish_unary_op_expr): Add complain parm.
1811 2013-04-11  Jakub Jelinek  <jakub@redhat.com>
1813         PR c++/56895
1814         * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
1815         calling maybe_constant_value for C++98.
1817 2013-04-11  Jason Merrill  <jason@redhat.com>
1819         PR c++/56901
1820         * semantics.c (lambda_capture_field_type, lambda_proxy_type):
1821         Strip references before checking WILDCARD_TYPE_P.
1823 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
1825         * call.c (build_conditional_expr_1, build_over_call): Protect
1826         error calls with complain & tf_error.
1827         * typeck.c (finish_class_member_access_expr, cp_build_binary_op,
1828         build_x_unary_op, cp_build_unary_op, cp_build_compound_expr,
1829         build_ptrmemfunc): Likewise.
1830         (lookup_destructor): Take tsubst_flags_t parameter, adjust.
1832         * cvt.c (warn_ref_binding): Rename to diagnose_ref_binding.
1833         (convert_to_reference): Adjust.
1835 2013-04-11  Jason Merrill  <jason@redhat.com>
1837         * pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for
1838         local variables, look them up instead.
1839         (tsubst_decl) [VAR_DECL]: Remove handling for anonymous union
1840         proxies and substitution in unevaluated context.
1841         (tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY
1842         before the iterators.
1844         PR c++/23055
1845         * pt.c (uses_deducible_template_parms): New.
1846         (deducible_array_bound, deducible_expression): New.
1847         (deducible_template_args): New.
1848         (unify_one_argument): Call uses_deducible_template_parms.
1850 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
1852         PR c++/56913
1853         * typeck2.c (build_m_component_ref): Protect error calls with
1854         (complain & tf_error).
1856 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
1858         PR c++/54216
1859         * parser.c (cp_parser_enum_specifier): Check for empty
1860         anonymous enums and anonymous scoped enums.
1862 2013-04-10  Jakub Jelinek  <jakub@redhat.com>
1864         PR c++/56895
1865         * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
1866         first before calling maybe_constant_value for warn_for_div_by_zero
1867         or invalid shift count warning purposes.
1869 2013-04-09  Jason Merrill  <jason@redhat.com>
1871         PR c++/25466
1872         * rtti.c (build_typeid): Check the address of the argument
1873         rather than looking for an INDIRECT_REF.
1875 2013-04-04  Jason Merrill  <jason@redhat.com>
1877         PR c++/56838
1878         PR c++/17232
1879         * typeck2.c (abstract_virtuals_error_sfinae): Disable
1880         complete_type again.
1882 2013-04-08  Paolo Carlini  <paolo.carlini@oracle.com>
1884         PR c++/56871
1885         * decl.c (validate_constexpr_redeclaration): Allow an explicit
1886         specialization to be different wrt the constexpr specifier.
1888 2013-04-06  Jason Merrill  <jason@redhat.com>
1890         * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
1891         noreturn attribute.
1893 2013-04-05  Ed Smith-Rowland  <3dw4rd@verizon.net>
1895         * parser.c (cp_parser_ref_qualifier_seq_opt): Move to
1896         cp_parser_ref_qualifier_opt.  Error if more than one ref-qual found.
1898 2013-04-03  Jason Merrill  <jason@redhat.com>
1900         * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
1901         (TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
1902         (FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.
1904         * mangle.c (write_type): When writing a function type with
1905         function-cv-quals, don't add the unqualified type as a
1906         substitution candidate.
1908 2013-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
1910         PR c++/56815
1911         * typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
1912         pedwarn.
1914 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
1916         PR debug/56819
1917         * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
1918         from args to new_args.
1919         (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
1920         r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
1922 2013-04-02  Jason Merrill  <jason@redhat.com>
1924         PR c++/56821
1925         * mangle.c (write_function_type): Mangle ref-qualifier.
1926         (write_nested_name): Likewise.
1927         (canonicalize_for_substitution): Preserve ref-qualifier.
1928         (write_type): Likewise.
1930         PR c++/34949
1931         * decl.c (begin_destructor_body): Clobber the object in a cleanup.
1933 2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>
1935         * friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
1936         * pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
1937         (for_each_template_parm_r): Use TYPE_TI_ARGS.
1939 2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>
1941         * cp-tree.h (TAGGED_TYPE_P): Remove.
1942         (IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
1943         (TYPE_ANONYMOUS_P): Adjust.
1944         * call.c (build_new_op_1): Likewise.
1945         * class.c (find_abi_tags_r): Likewise.
1946         * decl.c (warn_misplaced_attr_for_class_type, start_decl,
1947         type_is_deprecated): Likewise.
1948         * decl2.c (grokfield, min_vis_r): Likewise.
1949         * pt.c (get_template_info): Likewise.
1950         * tree.c (handle_abi_tag_attribute): Likewise.
1952 2013-04-01  Jason Merrill  <jason@redhat.com>
1954         * semantics.c (maybe_constant_value): Check
1955         instantiation_dependent_expression_p.
1956         * pt.c (build_non_dependent_expr): Don't check it here.
1958         PR c++/56772
1959         * init.c (build_new): Don't try to process an array initializer
1960         at template definition time.
1962         PR c++/56793
1963         * typeck.c (finish_class_member_access_expr): Handle enum scope.
1965         PR c++/56794
1966         * parser.c (cp_parser_range_for): Don't try to do auto deduction
1967         in a template if the type of the range is incomplete.
1969         * call.c (add_function_candidate): Take the address of 'this' here.
1970         (build_over_call): And here.
1971         (build_new_method_call_1, build_op_call_1): Not here.
1972         (build_user_type_conversion_1): Or here.
1973         (add_candidates): Adjust.
1975         * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
1976         * class.c (same_signature_p): Use type_memfn_quals.
1977         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
1978         FUNCTION_OR_METHOD_TYPE_CHECK.
1979         * error.c (dump_type_suffix): Add padding before cv-qualifiers.
1980         * pt.c (unify): Use static_fn_type.
1982 2013-04-01  Bronek Kozicki <b.kozicki@gmail.com>
1983             Jason Merrill  <jason@redhat.com>
1985         Implement N2439 (ref-qualifiers for 'this')
1986         * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
1987         (FUNCTION_RVALUE_QUALIFIED): New.
1988         (FUNCTION_OR_METHOD_TYPE_CHECK): New.
1989         (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
1990         (cp_ref_qualifier): New enum.
1991         (cp_declarator): Add ref_qualifier.
1992         * parser.c (cp_parser_ref_qualifier_seq_opt): New.
1993         (cp_parser_direct_declarator): Use it.
1994         (make_call_declarator): Adjust.
1995         (cp_parser_lambda_declarator_opt): Adjust.
1996         * call.c (add_function_candidate): Handle ref-qualifier overload
1997         resolution semantics.
1998         (standard_conversion): Adjust.
1999         * class.c (add_method, same_signature_p): Compare ref-qualifiers.
2000         * decl.c (grokdeclarator): Handle ref-qualifiers.
2001         (grokfndecl): Check for invalid ref-qualifiers.
2002         (static_fn_type, revert_static_member_fn): Adjust.
2003         * decl2.c (build_memfn_type): Handle ref-qualifiers.
2004         (check_classfn): Check them.
2005         (cp_reconstruct_complex_type): Retain them.
2006         * error.c (dump_ref_qualifier): New.
2007         (dump_type_suffix, dump_function_decl): Use it.
2008         (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
2009         * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
2010         (unify): Retain them.
2011         * tree.c (cp_check_qualified_type): New.
2012         (cp_build_qualified_type_real): Keep exception spec and ref-qual.
2013         (build_ref_qualified_type): New.
2014         (strip_typedefs, build_exception_variant): Keep ref-qualifier.
2015         (cp_build_type_attribute_variant): Keep ref-qualifier.
2016         * typeck.c (merge_types): Keep ref-qualifier.
2017         (structural_comptypes): Compare ref-qualifier.
2018         (type_memfn_rqual): New.
2019         (apply_memfn_quals): Take ref-qual argument.
2020         * typeck2.c (build_m_component_ref): Check ref-qualifier.
2022 2013-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
2024         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
2025         (DECL_FUNCTION_TEMPLATE_P): Adjust.
2027         * cxx-pretty-print.c (pp_cxx_nested_name_specifier,
2028         pp_cxx_qualified_id): Use get_containing_scope.
2029         * parser.c (cp_parser_class_head): Likewise.
2030         * pt.c (push_template_decl_real): Likewise.
2032         * decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
2033         * pt.c (unify): Use CP_INTEGRAL_TYPE_P.
2035 2013-03-31  Paolo Carlini  <paolo.carlini@oracle.com>
2037         * decl2.c (collect_candidates_for_java_method_aliases): Use
2038         DECL_CLASS_SCOPE_P.
2039         * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
2040         (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
2041         * decl.c (duplicate_decls): Likewise.
2042         * parser.c (cp_parser_template_declaration_after_export): Likewise,
2043         also DECL_DECLARES_TYPE_P.
2044         * pt.c (instantiate_class_template_1): Likewise.
2045         * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
2046         (lookup_field_r): Likewise.
2047         (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
2048         (lookup_fnfields_slot_nolazy): Likewise.
2049         * semantics.c (finish_member_declaration): Likewise.
2050         * typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
2052 2013-03-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2054         * pt.c (template_parms_to_args): Fix typo in comment.
2056 2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
2058         * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
2060 2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
2062         * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
2063         (build_op_call_1): Likewise.
2064         (build_over_call): Likewise.
2065         (compare_ics): Likewise.
2066         * class.c (build_base_path): Likewise.
2067         (resolve_address_of_overloaded_function): Likewise.
2068         * cp-tree.h: Likewise.
2069         * cvt.c (cp_convert_to_pointer): Likewise.
2070         (convert_to_reference): Likewise.
2071         (ocp_convert): Likewise.
2072         (convert_force): Likewise, tidy.
2073         * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
2074         (pp_cxx_ptr_operator): Likewise.
2075         * decl.c (duplicate_decls): Likewise.
2076         (start_decl): Likewise.
2077         (grok_op_properties): Likewise.
2078         (start_preparsed_function): Likewise.
2079         (store_parm_decls): Likewise.
2080         (finish_function): Likewise.
2081         * decl2.c (delete_sanity): Likewise.
2082         (acceptable_java_type): Likewise.
2083         (grokbitfield): Likewise.
2084         (cp_reconstruct_complex_type): Likewise.
2085         * error.c (dump_type_prefix): Likewise.
2086         (dump_expr): Likewise.
2087         * except.c (push_eh_cleanup): Likewise.
2088         (complete_ptr_ref_or_void_ptr_p): Likewise.
2089         (can_convert_eh): Likewise.
2090         * init.c (build_new_1): Likewise.
2091         (build_delete): Likewise.
2092         (build_vec_delete): Likewise.
2093         * mangle.c (write_type): Likewise.
2094         * parser.c (lookup_literal_operator): Likewise.
2095         * pt.c (convert_nontype_argument_function): Likewise.
2096         (convert_nontype_argument): Likewise.
2097         (tsubst): Likewise.
2098         (unify): Likewise.
2099         (dependent_type_p_r): Likewise.
2100         * rtti.c (build_headof): Likewise.
2101         (build_typeid): Likewise.
2102         (build_dynamic_cast_1): Likewise.
2103         (target_incomplete_p): Likewise.
2104         (typeinfo_in_lib_p): Likewise.
2105         * semantics.c (finish_omp_for): Likewise.
2106         (cxx_eval_call_expression): Likewise.
2107         (maybe_resolve_dummy): Likewise.
2108         * tree.c (build_target_expr): Likewise.
2109         (cp_build_qualified_type_real): Likewise.
2110         * typeck.c (composite_pointer_type_r): Likewise.
2111         (composite_pointer_type): Likewise.
2112         (comp_except_types): Likewise.
2113         (cxx_sizeof_nowarn): Likewise.
2114         (string_conv_p): Likewise.
2115         (cp_build_array_ref): Likewise.
2116         (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
2117         (pointer_diff): Likewise.
2118         (cp_build_addr_expr_1): Likewise.
2119         (cp_build_unary_op): Likewise.
2120         (build_static_cast_1): Likewise.
2121         (cp_build_c_cast): Likewise.
2122         (comp_ptr_ttypes_real): Likewise.
2123         (ptr_reasonably_similar): Likewise.
2124         (comp_ptr_ttypes_const): Likewise.
2125         (casts_away_constness): Likewise.
2126         (check_literal_operator_args): Likewise.
2127         * typeck2.c (build_x_arrow): Likewise.
2128         (add_exception_specifier): Likewise.
2130 2013-03-29  Jason Merrill  <jason@redhat.com>
2132         N3582
2133         * cp-tree.h (AUTO_IS_DECLTYPE): New.
2134         * parser.c (cp_parser_decltype): Handle decltype(auto).
2135         (cp_parser_type_id_1): Allow auto without a late-specified
2136         return in C++1y.
2137         (cp_parser_primary_expression): Use the return value of
2138         finish_parenthesized_expr.
2139         (cp_parser_transaction_expression): Likewise.
2140         * semantics.c (force_paren_expr): New.
2141         (finish_parenthesized_expr): Use it.
2142         * call.c (build_conditional_expr_1): Likewise.
2143         * pt.c (do_auto_deduction): Handle decltype(auto).
2144         (tsubst_copy): Handle PAREN_EXPR.
2145         (tsubst_copy_and_build): Likewise.
2146         * error.c (dump_expr): Handle PAREN_EXPR.
2147         * cxx-pretty-print.c (pp_cxx_expression): Likewise.
2148         * mangle.c (write_expression): Ignore PAREN_EXPR.
2150         * parser.c (cp_parser_decltype_expr): Split out...
2151         (cp_parser_decltype): ...from here.
2153         PR c++/56774
2154         PR c++/35722
2155         * pt.c (unify_pack_expansion): Fix indexing.
2157 2013-03-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2159         * call.c (build_java_interface_fn_ref): Likewise.
2160         (make_temporary_var_for_ref_to_temp): Likewise.
2161         * class.c (check_field_decls): Likewise.
2162         (layout_class_type): Likewise.
2163         (finish_struct_1): Likewise.
2164         (fixed_type_or_null): Likewise.
2165         (get_vtbl_decl_for_binfo): Likewise.
2166         * cp-gimplify.c (omp_var_to_track): Likewise.
2167         (cp_genericize_r): Likewise.
2168         * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
2169         * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
2170         (DECL_DISCRIMINATOR_P): Likewise.
2171         * decl.c (poplevel): Likewise.
2172         (decls_match): Likewise.
2173         (duplicate_decls): Likewise.
2174         (decl_jump_unsafe): Likewise.
2175         (start_decl): Likewise.
2176         (check_for_uninitialized_const_var): Likewise.
2177         (make_rtl_for_nonlocal_decl): Likewise.
2178         (cp_finish_decl): Likewise.
2179         (expand_static_init): Likewise.
2180         (local_variable_p): Likewise.
2181         (maybe_register_incomplete_var): Likewise.
2182         * decl2.c (grokfield): Likewise.
2183         (comdat_linkage): Likewise.
2184         (determine_visibility): Likewise.
2185         (import_export_decl): Likewise.
2186         (prune_vars_needing_no_initialization): Likewise.
2187         (decl_maybe_constant_var_p): Likewise.
2188         * error.c (dump_simple_decl): Likewise.
2189         (dump_template_decl): Likewise.
2190         (cp_printer): Likewise.
2191         * except.c (build_throw): Likewise.
2192         * init.c (build_vtbl_address): Likewise.
2193         (member_init_ok_or_else): Likewise.
2194         (build_aggr_init): Likewise.
2195         (expand_aggr_init_1): Likewise.
2196         (build_offset_ref): Likewise.
2197         (constant_value_1): Likewise.
2198         * mangle.c (write_mangled_name): Likewise.
2199         (write_prefix): Likewise.
2200         * name-lookup.c (supplement_binding_1): Likewise.
2201         (add_decl_to_level): Likewise.
2202         (pushdecl_maybe_friend_1): Likewise.
2203         (check_for_out_of_scope_variable): Likewise.
2204         (validate_nonmember_using_decl): Likewise.
2205         (lookup_name_innermost_nonclass_level_1): Likewise.
2206         (lookup_arg_dependent_1): Likewise.
2207         * parser.c (cp_parser_lambda_introducer): Likewise.
2208         (cp_parser_template_argument): Likewise.
2209         (cp_parser_single_declaration): Likewise.
2210         * pt.c (convert_nontype_argument): Likewise.
2211         (instantiate_class_template_1): Likewise.
2212         (tsubst_decl): Likewise.
2213         (tsubst_expr): Likewise.
2214         (do_decl_instantiation): Likewise.
2215         (do_type_instantiation): Likewise.
2216         (regenerate_decl_from_template): Likewise.
2217         (always_instantiate_p): Likewise.
2218         (instantiate_decl): Likewise.
2219         (type_dependent_expression_p): Likewise.
2220         (build_non_dependent_expr): Likewise.
2221         * repo.c (repo_emit_p): Likewise.
2222         * rtti.c (build_dynamic_cast_1): Likewise.
2223         * search.c (shared_member_p): Likewise.
2224         * semantics.c (outer_var_p): Likewise.
2225         (finish_id_expression): Likewise.
2226         (finish_omp_clauses): Likewise.
2227         (finish_decltype_type): Likewise.
2228         (ensure_literal_type_for_constexpr_object): Likewise.
2229         * tree.c (lvalue_kind): Likewise.
2230         (bot_replace): Likewise.
2231         (cp_tree_equal): Likewise.
2232         (handle_init_priority_attribute): Likewise.
2233         (decl_storage_duration): Likewise.
2234         * typeck.c (cxx_sizeof_expr): Likewise.
2235         (cxx_alignof_expr): Likewise.
2236         (decay_conversion): Likewise.
2237         (build_class_member_access_expr): Likewise.
2238         (cp_build_array_ref): Likewise.
2239         (cxx_mark_addressable): Likewise.
2240         (maybe_warn_about_returning_address_of_local): Likewise.
2241         (check_return_expr): Likewise.
2242         * typeck2.c (cxx_readonly_error): Likewise.
2243         (abstract_virtuals_error_sfinae): Likewise.
2244         (cxx_incomplete_type_diagnostic): Likewise.
2246 2013-03-28  Lawrence Crowl  <crowl@google.com>
2248         * Make-lang.in
2249         (CXX_PARSER_H): Add header dependence.
2250         * cp-tree.h
2251         (extern debug (cp_binding_level &)): New.
2252         (extern debug (cp_binding_level *)): New.
2253         * name-lookup.h
2254         (debug (cp_binding_level &)): New.
2255         (debug (cp_binding_level *)): New.
2256         * parser.c
2257         (debug (cp_parser &)): New.
2258         (debug (cp_parser *)): New.
2259         (debug (cp_token &)): New.
2260         (debug (cp_token *)): New.
2261         (debug (vec<cp_token, va_gc> &)): New.
2262         (debug (vec<cp_token, va_gc> *)): New.
2263         * parser.c: Add header dependence.
2264         (extern debug (cp_parser &)): New.
2265         (extern debug (cp_parser *)): New.
2266         (extern debug (cp_token &)): New.
2267         (extern debug (cp_token *)): New.
2268         (extern debug (vec<cp_token, va_gc> &)): New.
2269         (extern debug (vec<cp_token, va_gc> *)): New.
2271 2013-03-28  Jason Merrill  <jason@redhat.com>
2273         PR c++/17232
2274         PR c++/52748
2275         * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
2276         the type if tf_decltype is set.
2277         * pt.c (fn_type_unification): Add decltype_p parm.
2278         (get_bindings): Adjust.
2279         * cp-tree.h: Adjust.
2280         * class.c (resolve_address_of_overloaded_function): Adjust.
2281         * call.c (add_template_candidate_real, print_z_candidate): Adjust.
2283         PR c++/56679
2284         * parser.c (cp_parser_sizeof_pack): Split out from...
2285         (cp_parser_sizeof_operand): ...here.  Require (id).
2287         PR c++/56701
2288         * semantics.c (finish_this_expr): 'this' is an rvalue.
2289         * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
2291         PR c++/56710
2292         * semantics.c (finish_member_declaration): Don't push closure
2293         members.
2295         * name-lookup.c (pushdecl_maybe_friend_1): Use
2296         nonlambda_method_basetype and current_nonlambda_class_type.
2298         PR c++/56728
2299         * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
2300         conversion from integer to pointer.
2301         (cxx_eval_constant_expression): Likewise.
2302         (cxx_eval_indirect_ref): Use the folded operand if we still think
2303         this might be constant.
2305 2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
2306             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2308         PR c++/56725
2309         * call.c (convert_like_real): Change series of two permerrors
2310         to permerror + inform (and likewise for two errors).
2311         (build_new_method_call_1): Likewise.
2312         * typeck.c (convert_for_initialization): Change additional
2313         warning or error to inform.
2315 2013-03-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2317         * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
2318         (first_aggr_init_expr): Likewise.
2319         (more_aggr_init_expr_args_p): Likewise.
2320         (type_of_this_parm): Likewise.
2321         (class_of_this_parm): Likewise.
2322         * name-lookup.h (get_global_value_if_present): Likewise.
2323         (is_typename_at_global_scope): Likewise.
2325 2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
2327         * call.c (joust): Don't call inform for a permerror returning false.
2328         * parser.c (cp_parser_check_class_key): Likewise.
2329         * pt.c (tsubst_copy_and_build): Likewise.
2331 2013-03-27  Jason Merrill  <jason@redhat.com>
2333         PR c++/56749
2334         * semantics.c (finish_qualified_id_expr): Return early
2335         for enum scope.
2337 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2339         * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
2340         * cvt.c (convert_to_void): Likewise.
2341         * error.c (dump_expr): Likewise.
2342         * mangle.c (write_expression): Likewise.
2343         * parser.c (cp_parser_template_argument): Likewise.
2344         * pt.c (convert_nontype_argument): Likewise.
2345         (tsubst_copy_and_build): Likewise.
2346         * rtti.c (build_typeid): Likewise.
2347         * semantics.c (finish_call_expr): Likewise.
2348         (finish_decltype_type): Likewise.
2349         (build_data_member_initialization): Likewise.
2350         * tree.c (is_dummy_object): Likewise.
2351         * typeck.c (decay_conversion): Likewise.
2352         (build_class_member_access_expr): Likewise.
2353         (cp_build_addr_expr_1): Likewise.
2354         (unary_complex_lvalue): Likewise.
2355         (check_return_expr): Likewise.
2356         * typeck2.c (cxx_readonly_error): Likewise.
2358 2013-03-26  Jason Merrill  <jason@redhat.com>
2360         PR c++/52597
2361         * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn.  Take tree.
2362         * semantics.c (finish_decltype_type): Check it before type_unknown_p.
2363         * cp-tree.h: Adjust prototype.
2365         PR c++/45282
2366         * typeck2.c (build_m_component_ref): Handle prvalue object.
2368 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2370         * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
2371         * decl.c (duplicate_decls): Likewise.
2372         (cp_finish_decl): Likewise.
2373         (check_class_member_definition_namespace): Likewise.
2374         * decl2.c (grokfield): Likewise.
2375         (decl_needed_p): Likewise.
2376         (import_export_decl): Likewise.
2377         (mark_used): Likewise.
2378         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2379         * pt.c (push_access_scope): Likewise.
2380         (instantiate_decl): Likewise.
2381         * ptree.c (cxx_print_decl): Likewise.
2382         * repo.c (repo_emit_p): Likewise.
2383         * semantics.c (note_decl_for_pch): Likewise.
2384         * tree.c (decl_linkage): Likewise.
2386 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
2388         PR c++/55951
2389         * decl.c (check_array_designated_initializer): Handle CONST_DECL
2390         as ce->index.
2392 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
2394         * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
2395         error messages.
2397         * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
2399 2013-03-25  Jason Merrill  <jason@redhat.com>
2401         PR c++/56699
2402         * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
2403         class is derived from the type of the object.
2405         PR c++/52014
2406         * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
2407         unevaluated context.
2409 2013-03-25  Paolo Carlini  <paolo.carlini@oracle.com>
2411         PR c++/56722
2412         * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
2413         DECL_TEMPLATE_INSTANTIATION.
2415 2013-03-22  Jason Merrill  <jason@redhat.com>
2417         PR c++/56684
2418         * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
2419         and CONST_DECL.
2421 2013-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2423         * cp-tree.h (identifier_p): New.
2424         * call.c: Throughout, call identifier_p insstead of direct
2425         comparaison of TREE_CODE against IDENTIFIER_NODE.
2426         * decl.c: Likewisse.
2427         * decl2.c: Likewise.
2428         * init.c: Likewise.
2429         * mangle.c: Likewise.
2430         * name-lookup.c: Likewise.
2431         * parser.c: Likewise.
2432         * pt.c: Likewise.
2433         * search.c: Likewise.
2434         * semantics.c: Likewise.
2435         * tree.c: Likewise.
2436         * typeck.c: Likewise.
2437         * typeck2.c: Likewise.
2439 2013-03-21  Jakub Jelinek  <jakub@redhat.com>
2441         PR middle-end/48087
2442         * pt.c (convert_nontype_argument): Count werrorcount as warnings.
2443         * call.c (build_temp): Likewise.
2444         * method.c (synthesize_method): Likewise.
2445         * typeck.c (convert_for_initialization): Likewise.
2447 2013-03-21  Marc Glisse  <marc.glisse@inria.fr>
2449         * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
2451 2013-03-21  Richard Biener  <rguenther@suse.de>
2453         * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
2454         DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
2456 2013-03-20  Jason Merrill  <jason@redhat.com>
2458         PR c++/56646
2459         * parser.c (cp_parser_late_return_type_opt): Save and restore
2460         current_class_ptr/ref.
2462         PR c++/54532
2463         * expr.c (cplus_expand_constant): Do nothing if the class is
2464         incomplete.
2465         * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
2466         * typeck2.c (store_init_value): Use reduced_constant_expression_p.
2467         * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
2468         (complete_vars): Likewise.
2470         * name-lookup.c (get_anonymous_namespace_name): Never use
2471         get_file_function_name.
2473         * pt.c (retrieve_specialization): Handle null tmpl argument.
2475         PR c++/17232
2476         PR c++/56642
2477         * pt.c (tsubst_decl): Check return value of register_specialization.
2478         * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
2479         change.
2481 2013-03-17  Jason Merrill  <jason@redhat.com>
2483         PR c++/54359
2484         PR c++/56639
2485         * parser.c (cp_parser_direct_declarator): Bail if we see a
2486         qualified-id not at namespace scope.
2488         PR c++/17232
2489         PR c++/56642
2490         * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
2491         change for now.
2493 2013-03-16  Jason Merrill  <jason@redhat.com>
2495         * decl.c (grokdeclarator): Assert that we won't see a pointer to
2496         METHOD_TYPE.
2498         PR c++/54277
2499         * cp-tree.h (WILDCARD_TYPE_P): Split out from...
2500         (MAYBE_CLASS_TYPE_P): ...here.
2501         * semantics.c (lambda_capture_field_type): Only build a
2502         magic decltype for wildcard types.
2503         (lambda_proxy_type): Likewise.
2504         (finish_non_static_data_member): Get the quals from
2505         the object.
2507         PR c++/55931
2508         * parser.c (cp_parser_template_argument): Don't
2509         fold_non_dependent_expr.
2511         * parser.c (cp_parser_lambda_declarator_opt): Use
2512         cp_parser_trailing_type_id.
2514         PR c++/45917
2515         * parser.c (cp_parser_template_id): Don't forget access checks.
2517         PR c++/52374
2518         * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
2520         PR c++/54764
2521         PR c++/55972
2522         * name-lookup.h (tag_scope): Add ts_lambda.
2523         * semantics.c (begin_lambda_type): Use it.
2524         * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
2525         * pt.c (check_default_tmpl_args): Ignore lambdas.
2526         (push_template_decl_real): Handle lambdas.
2527         * tree.c (no_linkage_check): Adjust lambda check.
2529         PR c++/56039
2530         * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
2532         PR c++/54359
2533         * parser.c (cp_parser_direct_declarator): Fix late return
2534         for out-of-class defn of member function.
2536         PR c++/55357
2537         * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
2538         parms to avoid duplicate -Wshadow warnings.
2540         * search.c (lookup_base): Handle NULL_TREE.
2542         PR c++/56481
2543         * semantics.c (potential_constant_expression_1): Use of 'this' in
2544         a non-constexpr function makes the expression not potentially
2545         constant.
2547         N3276
2548         PR c++/52748
2549         * cp-tree.h (tsubst_flags): Add tf_decltype.
2550         * call.c (build_cxx_call): Don't build a temporary if it's set.
2551         (build_over_call): Make sure it's only passed to build_cxx_call.
2552         * parser.c (cp_parser_primary_expression): Add decltype_p parm.
2553         (cp_parser_unary_expression): Likewise.
2554         (cp_parser_cast_expression): Likewise.
2555         (cp_parser_binary_expression): Likewise.
2556         (cp_parser_assignment_expression): Likewise.
2557         (cp_parser_postfix_expression): Likewise.  Pass tf_decltype.
2558         (cp_parser_expression): Add decltype_p.  Force a
2559         temporary for a call on the LHS of a comma.
2560         (cp_parser_decltype): Pass true to decltype_p parms.
2561         * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
2562         (tsubst_copy_and_build): Pass tf_decltype down only for
2563         CALL_EXPR and the RHS of COMPOUND_EXPR.
2564         * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
2566         * cp-tree.h (abstract_class_use): New enum.
2567         * typeck2.c (pending_abstract_type): Add use field.
2568         (abstract_virtuals_error_sfinae): Add overloads taking
2569         abstract_class_use instead of tree.
2570         * typeck.c (build_static_cast_1): Call it.
2571         * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
2572         * pt.c: Adjust calls.
2573         * decl.c (cp_finish_decl): Don't handle functions specially.
2574         (grokdeclarator): Always check return type.
2575         * init.c (build_new_1): Adjust call.
2577         DR 337
2578         PR c++/17232
2579         * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
2580         * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
2582         DR 657
2583         * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
2584         (tsubst_arg_types): Likewise.
2586         DR 1518
2587         PR c++/54835
2588         * call.c (convert_like_real): Check for explicit constructors
2589         even for value-initialization.
2591         PR c++/54946
2592         * pt.c (convert_nontype_argument): Handle invalid pointer.
2594         * parser.c (cp_parser_lambda_expression): Use nreverse.
2596         PR c++/56447
2597         PR c++/55532
2598         * pt.c (instantiate_class_template_1): Instantiate lambda capture
2599         list here.
2600         (tsubst_copy_and_build): Not here.
2602         PR c++/55017
2603         * method.c (walk_field_subobs): Disallow copy of rvalue ref.
2605         PR c++/55240
2606         * parser.c (parsing_nsdmi): New.
2607         * semantics.c (outer_automatic_var_p): Check it.
2608         (finish_id_expression): Likewise.
2609         * cp-tree.h: Declare it.
2611         PR c++/55241
2612         * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
2614         * parser.c (lookup_literal_operator): Correct parm/arg naming
2615         mixup.
2617         PR c++/56238
2618         * pt.c (fold_non_dependent_expr_sfinae): Check
2619         instantiation_dependent_expression_p.
2621         PR c++/56095
2622         * class.c (resolve_address_of_overloaded_function): Accept a
2623         reference to function for target_type.
2624         (instantiate_type): Likewise.
2625         * pt.c (convert_nontype_argument): Pass it to
2626         convert_nontype_argument_function.
2628 2013-03-16  Jakub Jelinek  <jakub@redhat.com>
2630         * tree.c (cp_tree_equal): Fix a pasto.
2632         PR c++/56607
2633         * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
2634         pass op1 through maybe_constant_value first.
2636 2013-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
2638         PR c++/56582
2639         * semantics.c (cxx_eval_array_reference): Check for negative index.
2641 2013-03-14  Jason Merrill  <jason@redhat.com>
2643         PR c++/56614
2644         * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
2646         PR c++/56346
2647         * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
2648         dso_handle parm on targets without __cxa_atexit.
2650 2013-03-11  Jason Merrill  <jason@redhat.com>
2652         PR c++/56567
2653         * typeck.c (check_return_expr): Disallow returning init list here.
2654         * semantics.c (apply_deduced_return_type): Not here.
2656 2013-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
2658         PR c++/51412
2659         * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
2660         * error.c (dump_expr): Likewise.
2662 2013-03-08  Jason Merrill  <jason@redhat.com>
2664         PR c++/51884
2665         * class.c (modify_all_vtables): Mangle the vtable name before
2666         entering dfs_walk.
2668         * semantics.c (lambda_expr_this_capture): In unevaluated context,
2669         just return the nearest 'this'.
2671         PR c++/51494
2672         PR c++/52183
2673         PR c++/56222
2674         * tree.c (maybe_dummy_object): Don't capture 'this'.
2675         * semantics.c (maybe_resolve_dummy): New.
2676         (finish_non_static_data_member): Use it.
2677         (finish_qualified_id_expr): Don't test is_dummy_object.
2678         * cp-tree.h: Declare maybe_resolve_dummy.
2679         * call.c (build_new_method_call_1): Use it.
2681         PR c++/56567
2682         * semantics.c (apply_deduced_return_type): Don't allow returning
2683         std::initializer_list.
2685 2013-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
2687         PR c++/56534
2688         * parser.c (cp_parser_elaborated_type_specifier): Don't call
2689         check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
2690         * decl.c (check_elaborated_type_specifier): Tidy.
2692 2013-03-06  Jakub Jelinek  <jakub@redhat.com>
2694         PR c++/56543
2695         * tree.c (strip_typedefs): Don't copy args if they are NULL.
2697 2013-03-05  Jakub Jelinek  <jakub@redhat.com>
2699         * parser.c (cp_parser_braced_list): For {} initialize
2700         *non_constant_p to false.
2702 2013-03-04  Jason Merrill  <jason@redhat.com>
2704         PR c++/56464
2705         PR c++/54383
2706         * semantics.c (lambda_expr_this_capture): Handle NSDMI
2707         and non-class scopes.
2709 2013-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
2711         * decl.c (grokdeclarator): Remove dead code.
2713 2013-02-28  Jason Merrill  <jason@redhat.com>
2715         PR c++/56481
2716         * semantics.c (potential_constant_expression_1): Use
2717         cxx_eval_outermost_constant_expr rather than maybe_constant_value.
2719         PR c++/56243
2720         * call.c (build_over_call): Avoid virtual lookup in a template.
2722 2013-02-27  Jason Merrill  <jason@redhat.com>
2724         PR c++/56358
2725         PR c++/56323
2726         * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
2727         of the base name for inheriting ctors.
2728         (push_class_level_binding_1): Remove inheriting ctor handling.
2729         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
2730         * class.c (add_implicitly_declared_members): Adjust.
2732 2013-02-26  David Binderman  <dcb314@hotmail.com>
2734         PR c++/55632
2735         * decl.c (grokdeclarator): Tidy publicp assignment.
2737 2013-02-25  Aldy Hernandez  <aldyh@redhat.com>
2739         PR c++/56419
2740         * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
2741         (build_transaction_expr): Same.
2743 2013-02-25  Jason Merrill  <jason@redhat.com>
2745         PR c++/56377
2746         * pt.c (fn_type_unification): Wait to call push_tinst_level until
2747         we know what args we're looking at.
2749         PR c++/56438
2750         * semantics.c (potential_constant_expression_1): In C++98, a cast
2751         to non-integral type can't be a constant expression.
2753 2013-02-24  Jakub Jelinek  <jakub@redhat.com>
2755         PR c++/56403
2756         * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
2757         of CLASS_TYPE_P.
2759 2013-02-22  Jason Merrill  <jason@redhat.com>
2761         PR c++/40405
2762         * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
2763         if we got the wrong number of template parms.
2765         PR c++/56377
2766         * pt.c (fn_type_unification): Use explicit args in template
2767         instantiation context.
2769         PR c++/56359
2770         * call.c (can_convert_arg): Discard access checks.
2772         PR c++/56395
2773         * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
2774         args.
2776 2013-02-20  Paolo Carlini  <paolo.carlini@oracle.com>
2778         PR c++/56373
2779         * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
2780         * cvt.c (ocp_convert): Use the latter.
2781         (cp_convert_to_pointer): Likewise.
2782         * decl.c (check_default_argument): Likewise.
2783         * typeck.c (cp_build_binary_op): Likewise.
2784         * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
2786 2013-02-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
2787             Paolo Carlini  <paolo.carlini@oracle.com>
2789         PR c++/51242
2790         * decl2.c (grokbitfield): Allow scoped enumeration types.
2792 2013-02-15  Jason Merrill  <jason@redhat.com>
2794         PR c++/54276
2795         * semantics.c (finish_id_expression): Also return the identifier
2796         for an outer local static.
2798         PR c++/56343
2799         * class.c (check_bases_and_members): Deduce noexcept after
2800         checking bases.
2802         PR c++/52026
2803         * semantics.c (finish_id_expression): In a template, return
2804         the identifier for a constant variable.
2806 2013-02-14  Jason Merrill  <jason@redhat.com>
2808         PR c++/54922
2809         * semantics.c (build_anon_member_initialization): New.
2810         (build_data_member_initialization): Use it.
2812         PR c++/55003
2813         * decl.c (cp_finish_decl): Force instantiation of an
2814         auto static data member.
2816         PR c++/55220
2817         * pt.c (unify): A pack expansion that is not the last template
2818         argument makes the entire template argument list non-deduced.
2820         PR c++/56323
2821         * name-lookup.c (do_class_using_decl): Handle typedefs with
2822         inheriting constructors.
2823         (push_class_level_binding_1): Allow inheriting from template
2824         template parameter, too.
2825         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
2827         PR c++/55223
2828         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
2829         default argument scope.
2830         * mangle.c (write_name): Likewise.
2832         PR c++/55232
2833         * error.c (find_typenames_r): Don't walk into a pack expansion.
2835 2013-02-13  Jason Merrill  <jason@redhat.com>
2837         PR c++/55670
2838         * parser.c (cp_parser_member_declaration): Check the declarator
2839         form when detecting a function declaration via typedef.
2841         PR c++/55680
2842         * pt.c (maybe_process_partial_specialization): A lambda
2843         isn't what's being specialized.
2845         PR c++/55710
2846         * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
2847         TREE_USED.
2849         PR c++/55879
2850         * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
2852         PR c++/55993
2853         * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
2854         non-zero offsets, too.
2856         PR c++/56155
2857         * decl.c (build_enumerator): Always convert the value to a
2858         fixed underlying type.
2860         PR c++/56135
2861         * pt.c (tsubst_copy_and_build): Don't forget any new
2862         captures that arose from use of dependent names.
2864 2013-02-13  Jakub Jelinek  <jakub@redhat.com>
2866         PR c++/56302
2867         * semantics.c (finish_asm_stmt): If input constraints allow
2868         neither register nor memory, try maybe_constant_value to get
2869         a constant if possible.
2871 2013-02-12  Jason Merrill  <jason@redhat.com>
2873         PR c++/56285
2874         * method.c (add_one_base_init): Handle base constructor
2875         taking rvalue reference parm.
2877         PR c++/56291
2878         * semantics.c (sort_constexpr_mem_initializers): Handle
2879         vptr out of order.
2881 2013-02-09  Jason Merrill  <jason@redhat.com>
2883         PR c++/56268
2884         * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
2885         maybe_instantiate_noexcept.
2887         PR c++/56247
2888         * pt.c (eq_specializations): Set comparing_specializations.
2889         * tree.c (cp_tree_equal): Check it.
2890         * cp-tree.h: Declare it.
2892         * decl.c (decls_match): Check versions later.
2894         PR c++/56238
2895         * pt.c (build_non_dependent_expr): Don't try to fold
2896         instantiation-dependent expressions.
2897         (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
2898         [BIND_EXPR]: Treat as dependent.
2900 2013-02-07  Jakub Jelinek  <jakub@redhat.com>
2902         PR c++/56241
2903         * init.c (build_vec_init): Don't append NULL values into new_vec.
2904         (build_zero_init_1): Don't push anything into v if recursive call
2905         returned NULL_TREE.
2906         (build_value_init_noctor): Don't push anything into v if
2907         build_value_init call returned NULL_TREE.
2909         PR c++/56239
2910         * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
2911         (cp_parser_tokens_start_cast_expression): ... this.  Change parameter
2912         to cp_parser *, call cp_lexer_peek_token first.  For CPP_OPEN_PAREN,
2913         return true only if 2nd token isn't CPP_CLOSE_PAREN.
2914         (cp_parser_cast_expression): Adjust caller.
2916         PR c++/56237
2917         * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
2918         only if DECL_DISCRIMINATOR_SET_P (t) rather than just
2919         DECL_LANG_SPECIFIC (t).
2921 2013-02-07  Jason Merrill  <jason@redhat.com>
2923         PR c++/56235
2924         * method.c (do_build_copy_constructor): Don't bother turning
2925         scalars from lvalues to xvalues.
2926         (do_build_copy_assign): Likewise.
2928 2013-02-06  Jason Merrill  <jason@redhat.com>
2930         * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
2932 2013-02-05  Jason Merrill  <jason@redhat.com>
2934         PR c++/54122
2935         * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
2936         METHOD_TYPE.
2938         PR c++/56177
2939         * decl.c (start_preparsed_function): Update restype if we change
2940         decl1.
2942         PR c++/56208
2943         * pt.c (fn_type_unification): Discard any access checks from
2944         substituting explicit args.
2946 2013-01-31  Jason Merrill  <jason@redhat.com>
2948         PR c++/56162
2949         PR c++/56104
2950         * typeck.c (get_member_function_from_ptrfunc): Fix
2951         ptrmemfunc_vbit_in_delta case.
2953 2013-01-29  Jason Merrill  <jason@redhat.com>
2955         PR libstdc++/54314
2956         * class.c (build_ctor_vtbl_group): Give construction vtables
2957         hidden visibility.
2959 2013-01-25  Jason Merrill  <jason@redhat.com>
2961         PR c++/56095
2962         * pt.c (convert_nontype_argument_function): Handle invalid input.
2963         (convert_nontype_argument): Likewise.
2965         PR c++/56104
2966         * typeck.c (get_member_function_from_ptrfunc): Optimize if the
2967         dynamic type has no virtual functions.
2969 2013-01-22  Paolo Carlini  <paolo.carlini@oracle.com>
2971         PR c++/55944
2972         * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
2973         on TARGET_EXPR nodes.
2975 2013-01-22  Jason Merrill  <jason@redhat.com>
2977         PR c++/56071
2978         * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
2980 2013-01-22  Dodji Seketeli  <dodji@redhat.com>
2982         PR c++/53609
2983         * pt.c (argument_pack_element_is_expansion_p)
2984         (make_argument_pack_select, use_pack_expansion_extra_args_p)
2985         (gen_elem_of_pack_expansion_instantiation): New static functions.
2986         (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
2987         look through the possibly resulting pack expansion as well.
2988         (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
2989         generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
2990         Use gen_elem_of_pack_expansion_instantiation to build the
2991         instantiation piece-wise.  Don't use arg_from_parm_pack_p anymore,
2992         as gen_elem_of_pack_expansion_instantiation and the change in
2993         tsubst above generalize this particular case.
2994         (arg_from_parm_pack_p): Remove this for it's not used by
2995         tsubst_pack_expansion anymore.
2997 2013-01-21  Jason Merrill  <jason@redhat.com>
2999         PR c++/56059
3000         * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
3001         template args count.
3003 2013-01-18  Jason Merrill  <jason@redhat.com>
3005         PR target/54908
3006         * decl2.c (get_local_tls_init_fn): New.
3007         (get_tls_init_fn): Handle flag_extern_tls_init.  Don't bother
3008         with aliases for internal variables.  Don't use weakrefs if
3009         the variable needs destruction.
3010         (generate_tls_wrapper): Mark the wrapper as const if no
3011         initialization is needed.
3012         (handle_tls_init): Don't require aliases.
3014 2013-01-15  Dodji Seketeli  <dodji@redhat.com>
3016         PR c++/55663
3017         * pt.c (coerce_innermost_template_parms): New static function.
3018         (instantiate_alias_template):  Use it here.
3020 2013-01-09  Jason Merrill  <jason@redhat.com>
3022         PR c++/55878
3023         * rtti.c (build_typeid, get_typeid): Add complain parm.
3024         (get_tinfo_decl_dynamic): Likewise.
3025         * cp-tree.h, parser.c, pt.c: Adjust.
3027         PR c++/55893
3028         * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
3029         needs destruction.
3031 2013-01-09  Jakub Jelinek  <jakub@redhat.com>
3033         PR c/48418
3034         * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
3035         call maybe_constant_value for the negative or too big shift
3036         count warnings.
3038 2013-01-09  Paolo Carlini  <paolo.carlini@oracle.com>
3040         PR c++/55801
3041         * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
3042         of the argument is true.
3044 2013-01-08  Joel Brobecker  <brobecker@adacore.com>
3046         * parser.c (cp_parser_initializer_list): Move declaration
3047         of variable non_const to start of lexical block.
3049 2013-01-07  Jason Merrill  <jason@redhat.com>
3051         PR c++/55753
3052         * tree.c (build_aggr_init_expr): Do nothing in a template.
3053         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
3054         a FUNCTION_DECL before tsubsting.
3056 2013-01-04  Dodji Seketeli  <dodji@redhat.com>
3058         PR c++/52343
3059         * pt.c (check_instantiated_arg): Allow type template arguments.
3061 2013-01-04  Jason Merrill  <jason@redhat.com>
3063         PR c++/55877
3064         * decl.c (reset_type_linkage, bt_reset_linkage): New.
3065         (grokdeclarator): Use reset_type_linkage.
3066         * name-lookup.c (binding_table_foreach): Handle null table.
3067         * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
3069 2013-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
3071         PR c++/54526 (again)
3072         * parser.c (cp_parser_template_id): Revert core of previous change
3073         (keep adjusted inform message).
3075 2013-01-03  Jason Merrill  <jason@redhat.com>
3077         PR c++/55419
3078         PR c++/55753
3079         * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
3080         TREE_CONSTANT.
3082         PR c++/55842
3083         * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
3085         PR c++/55856
3086         * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
3088         PR c++/53650
3089         * call.c (type_has_extended_temps): New.
3090         * cp-tree.h: Declare it.
3091         * decl.c (check_initializer): Use build_aggr_init for arrays
3092         if it is false.
3093         * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
3095 2013-01-02  Jason Merrill  <jason@redhat.com>
3097         PR c++/54325
3098         * call.c (build_new_method_call_1): Don't use build_value_init for
3099         user-provided default constructors.
3101         * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
3103         PR c++/55032
3104         PR c++/55245
3105         * tree.c (build_cplus_array_type): Copy layout information
3106         to main variant if necessary.
3108 Copyright (C) 2013 Free Software Foundation, Inc.
3110 Copying and distribution of this file, with or without modification,
3111 are permitted in any medium without royalty provided the copyright
3112 notice and this notice are preserved.