re PR c++/58705 ([c++11] ICE with invalid initializer for _Complex variable)
[official-gcc.git] / gcc / cp / ChangeLog
blob5fa01fe1a96a504cd0f23820951569f269b1f610
1 2013-10-24  Marek Polacek  <polacek@redhat.com>
3         PR c++/58705
4         * typeck2.c (check_narrowing): Don't check narrowing when the scalar
5         initializer is empty.
7 2013-10-23  Jason Merrill  <jason@redhat.com>
9         LWG 2165
10         * method.c (defaulted_late_check): Delete on eh-spec mismatch.
11         (maybe_explain_implicit_delete): Explain it.
13         * error.c (eh_spec_to_string): New.
14         (cp_printer): Use it for %X.
16         In C++11 a trivial [cd]tor might not be callable.
17         * class.c (user_provided_p): A function deleted on its declation
18         in the class is not user-provided.
19         (type_build_ctor_call): Also force a ctor call if we
20         might have a deleted or private trivial ctor.
21         (type_build_dtor_call): New.
22         (deduce_noexcept_on_destructors): Remove obsolete code.
23         * cp-tree.h: Declare type_build_dtor_call.
24         * decl.c (expand_static_init): Make sure trivial dtors are callable.
25         (cxx_maybe_build_cleanup): Likewise.
26         * except.c (build_throw): Likewise.
27         * init.c (build_value_init): Handle trivial but not callable ctors.
28         (perform_target_ctor): Make sure trivial dtor is callable.
29         (perform_member_init): Likewise.
30         (expand_cleanup_for_base): Likewise.
31         (build_vec_delete_1): Likewise.
32         (build_delete): Likewise.
33         (push_base_cleanups): Likewise.
34         (build_new_1): Avoid redundant error.
35         * method.c (synthesized_method_walk): Can't ever exit early in C++11.
36         Always process the subobject destructor.
37         * semantics.c (finish_compound_literal): Make sure trivial dtor is
38         callable.
39         * typeck2.c (split_nonconstant_init): Likewise.
41 2013-10-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
43         Implement C++14 [[deprecated]] modulo [[gnu::deprecated]] bugs.
44         * parser.c (cp_parser_std_attribute): Interpret [[deprecated]]
45         as [[gnu::deprecated]].
47 2013-10-22  Paolo Carlini  <paolo.carlini@oracle.com>
49         PR c++/58816
50         * pt.c (apply_late_template_attributes): Use get_attribute_name,
51         not TREE_PURPOSE.
53 2013-10-18  Paolo Carlini  <paolo.carlini@oracle.com>
55         PR c++/58466
56         * pt.c (most_specialized_class): Bump processing_template_decl for
57         get_class_bindings.
59 2013-10-18  Paolo Carlini  <paolo.carlini@oracle.com>
61         * parser.c (cp_parser_lookup_name): Tidy.
63 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
65         * parser.c: Include omp-low.h.
66         * semantics.c: Likewise.
68 2013-10-17  Paolo Carlini  <paolo.carlini@oracle.com>
70         PR c++/58596
71         * lambda.c (lambda_expr_this_capture): Handle NSDMIs in the
72         cp_unevaluated_operand case.
74 2013-10-16  Jason Merrill  <jason@redhat.com>
76         * pt.c (apply_late_template_attributes): Use
77         attribute_takes_identifier_p.
79         * error.c (dump_exception_spec): Print "noexcept" rather than
80         "noexcept (true)".
82         Core 1591
83         * pt.c (unify_array_domain): Split out from unify.
84         (unify): Use it for list deduction, too.
86         PR c++/57850
87         * decl2.c (dump_tu): Split out from...
88         (cp_write_global_declarations): ...here.  Call it in PCH mode.
90 2013-10-16  Paolo Carlini  <paolo.carlini@oracle.com>
92         * pt.c (tsubst): Fix typo in last commit.
94 2013-10-16  Paulo Matos  <pmatos@broadcom.com>
96         * error.c (code_to_string): Use new wrapper get_tree_code_name.
97         * cxx-pretty-print.c (pp_cxx_assignment_operator): Likewise.
98         * pt.c (tsubst): Likewise.
99         * semantics.c (cxx_eval_constant_expression,
100         potential_constant_expression_1): Likewise.
101         * mangle.c (MANGLE_TRACE_TREE, dump_substitution_candidates,
102         add_substitution, find_substitution): Likewise.
104 2013-10-15  Paolo Carlini  <paolo.carlini@oracle.com>
106         PR c++/58707
107         * parser.c (cp_parser_postfix_open_square_expression): Set
108         parser->greater_than_is_operator_p for the argument.
110 2013-10-11  Paolo Carlini  <paolo.carlini@oracle.com>
112         PR c++/58633
113         * parser.c (cp_parser_commit_to_topmost_tentative_parse): New.
114         (cp_parser_pseudo_destructor_name): Use it.
116 2013-10-11  Paolo Carlini  <paolo.carlini@oracle.com>
118         PR c++/31671
119         * pt.c (convert_nontype_argument): Set expr_type to
120         TREE_TYPE (probe_type).
122 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
124         * decl.c (duplicate_decls): Error out for redeclaration of UDRs.
125         (declare_simd_adjust_this): New function.
126         (grokfndecl): If "omp declare simd" attribute is present,
127         call declare_simd_adjust_this if needed and
128         c_omp_declare_simd_clauses_to_numbers.
129         * cp-array-notation.c (expand_array_notation_exprs): Handle
130         OMP_TASKGROUP.
131         * cp-gimplify.c (cp_gimplify_expr): Handle OMP_SIMD and
132         OMP_DISTRIBUTE.  Handle is_invisiref_parm decls in
133         OMP_CLAUSE_REDUCTION.
134         (cp_genericize_r): Handle OMP_SIMD and OMP_DISTRIBUTE like
135         OMP_FOR.
136         (cxx_omp_privatize_by_reference): Return true for
137         is_invisiref_parm decls.
138         (cxx_omp_finish_clause): Adjust cxx_omp_create_clause_info
139         caller.
140         * pt.c (apply_late_template_attributes): For "omp declare simd"
141         attribute call tsubst_omp_clauses,
142         c_omp_declare_simd_clauses_to_decls, finish_omp_clauses
143         and c_omp_declare_simd_clauses_to_numbers.
144         (instantiate_class_template_1): Call cp_check_omp_declare_reduction
145         for UDRs.
146         (tsubst_decl): Handle UDRs.
147         (tsubst_omp_clauses): Add declare_simd argument, if true don't
148         call finish_omp_clauses.  Handle new OpenMP 4.0 clauses.
149         Handle non-NULL OMP_CLAUSE_REDUCTION_PLACEHOLDER on
150         OMP_CLAUSE_REDUCTION.
151         (tsubst_expr): For UDRs call pushdecl and
152         cp_check_omp_declare_reduction.  Adjust tsubst_omp_clauses
153         callers.  Handle OMP_SIMD, OMP_DISTRIBUTE, OMP_TEAMS,
154         OMP_TARGET_DATA, OMP_TARGET_UPDATE, OMP_TARGET, OMP_TASKGROUP.
155         Adjust finish_omp_atomic caller.
156         (tsubst_omp_udr): New function.
157         (instantiate_decl): For UDRs at block scope, don't call
158         start_preparsed_function/finish_function.  Call tsubst_omp_udr.
159         * semantics.c (cxx_omp_create_clause_info): Add need_dtor argument,
160         use it instead of need_default_ctor || need_copy_ctor.
161         (struct cp_check_omp_declare_reduction_data): New type.
162         (handle_omp_array_sections_1, handle_omp_array_sections,
163         omp_reduction_id, omp_reduction_lookup,
164         cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction_r,
165         cp_check_omp_declare_reduction, clone_omp_udr,
166         find_omp_placeholder_r, finish_omp_reduction_clause): New functions.
167         (finish_omp_clauses): Handle new OpenMP 4.0 clauses and user defined
168         reductions.
169         (finish_omp_for): Add CODE argument, use it instead of hardcoded
170         OMP_FOR.  Adjust c_finish_omp_for caller.
171         (finish_omp_atomic): Add seq_cst argument, adjust
172         c_finish_omp_atomic callers, handle seq_cst and new OpenMP 4.0
173         atomic variants.
174         (finish_omp_cancel, finish_omp_cancellation_point): New functions.
175         * decl2.c (mark_used): Force immediate instantiation of
176         DECL_OMP_DECLARE_REDUCTION_P decls.
177         (is_late_template_attribute): Return true for "omp declare simd"
178         attribute.
179         (cp_omp_mappable_type): New function.
180         (cplus_decl_attributes): Add implicit "omp declare target" attribute
181         if requested.
182         * parser.c (cp_debug_parser): Print
183         parser->colon_doesnt_start_class_def_p.
184         (cp_ensure_no_omp_declare_simd, cp_finalize_omp_declare_simd): New
185         functions.
186         (enum pragma_context): Add pragma_member and pragma_objc_icode.
187         (cp_parser_binary_expression): Handle no_toplevel_fold_p
188         even for binary operations other than comparison.
189         (cp_parser_linkage_specification): Call
190         cp_ensure_no_omp_declare_simd if needed.
191         (cp_parser_namespace_definition): Likewise.
192         (cp_parser_init_declarator): Call cp_finalize_omp_declare_simd.
193         (cp_parser_direct_declarator): Pass declarator to
194         cp_parser_late_return_type_opt.
195         (cp_parser_late_return_type_opt): Add declarator argument,
196         call cp_parser_late_parsing_omp_declare_simd for declare simd.
197         (cp_parser_class_specifier_1): Call cp_ensure_no_omp_declare_simd.
198         Parse UDRs before all other methods.
199         (cp_parser_member_specification_opt): Use pragma_member instead of
200         pragma_external.
201         (cp_parser_member_declaration): Call cp_finalize_omp_declare_simd.
202         (cp_parser_function_definition_from_specifiers_and_declarator,
203         cp_parser_save_member_function_body): Likewise.
204         (cp_parser_late_parsing_for_member): Handle UDRs specially.
205         (cp_parser_next_token_starts_class_definition_p): Don't allow
206         CPP_COLON if colon_doesnt_start_class_def_p flag is true.
207         (cp_parser_objc_interstitial_code): Use pragma_objc_icode
208         instead of pragma_external.
209         (cp_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
210         (cp_parser_omp_var_list_no_open): Parse array sections for
211         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.  Add COLON argument,
212         if non-NULL, allow parsing to end with a colon rather than close
213         paren.
214         (cp_parser_omp_var_list): Adjust cp_parser_omp_var_list_no_open
215         caller.
216         (cp_parser_omp_clause_reduction): Handle user defined reductions.
217         (cp_parser_omp_clause_branch, cp_parser_omp_clause_cancelkind,
218         cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
219         cp_parser_omp_clause_aligned, cp_parser_omp_clause_linear,
220         cp_parser_omp_clause_safelen, cp_parser_omp_clause_simdlen,
221         cp_parser_omp_clause_depend, cp_parser_omp_clause_map,
222         cp_parser_omp_clause_device, cp_parser_omp_clause_dist_schedule,
223         cp_parser_omp_clause_proc_bind, cp_parser_omp_clause_to,
224         cp_parser_omp_clause_from, cp_parser_omp_clause_uniform): New
225         functions.
226         (cp_parser_omp_all_clauses): Add finish_p argument.  Don't call
227         finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
228         (cp_parser_omp_atomic): Parse seq_cst clause, pass
229         true if it is present to finish_omp_atomic.  Handle new OpenMP 4.0
230         atomic forms.
231         (cp_parser_omp_for_loop): Add CODE argument, pass it through
232         to finish_omp_for.  Change last argument to cclauses,
233         and adjust uses to grab parallel clauses from the array of all
234         the split clauses.
235         (cp_omp_split_clauses): New function.
236         (cp_parser_omp_simd): New function.
237         (cp_parser_omp_for): Add p_name, mask and cclauses arguments.
238         Allow the function to be called also when parsing combined constructs,
239         and call c_parser_omp_simd when parsing for simd.
240         (cp_parser_omp_sections_scope): If section-sequence doesn't start with
241         #pragma omp section, require exactly one structured-block instead of
242         sequence of statements.
243         (cp_parser_omp_sections): Add p_name, mask and cclauses arguments.
244         Allow the function to be called also when parsing combined constructs.
245         (cp_parser_omp_parallel): Add p_name, mask and cclauses arguments.
246         Allow the function to be called also when parsing combined
247         constructs.
248         (cp_parser_omp_taskgroup, cp_parser_omp_cancel,
249         cp_parser_omp_cancellation_point, cp_parser_omp_distribute,
250         cp_parser_omp_teams, cp_parser_omp_target_data,
251         cp_parser_omp_target_update, cp_parser_omp_target,
252         cp_parser_omp_declare_simd, cp_parser_late_parsing_omp_declare_simd,
253         cp_parser_omp_declare_target, cp_parser_omp_end_declare_target,
254         cp_parser_omp_declare_reduction_exprs, cp_parser_omp_declare_reduction,
255         cp_parser_omp_declare): New functions.
256         (cp_parser_omp_construct): Add p_name and mask vars.  Handle
257         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
258         PRAGMA_OMP_TEAMS.  Adjust cp_parser_omp_for, cp_parser_omp_parallel
259         and cp_parser_omp_sections callers.
260         (cp_parser_pragma): Handle PRAGMA_OMP_CANCEL,
261         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
262         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
263         PRAGMA_OMP_TEAMS, PRAGMA_OMP_TARGET, PRAGMA_OMP_END_DECLARE_TARGET.
264         Handle pragma_member and pragma_objc_icode like pragma_external.
265         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
266         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
267         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
268         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
269         OMP_CLAUSE_DEPEND.
270         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
271         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
272         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
273         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
274         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
275         * parser.h (struct cp_omp_declare_simd_data): New type.
276         (struct cp_parser): Add colon_doesnt_start_class_def_p and
277         omp_declare_simd fields.
278         * cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
279         * cp-tree.h (struct lang_decl_fn): Add omp_declare_reduction_p
280         bit.
281         (DECL_OMP_DECLARE_REDUCTION_P): Define.
282         (OMP_FOR_GIMPLIFYING_P): Use OMP_LOOP_CHECK macro.
283         (struct saved_scope): Add omp_declare_target_attribute field.
284         (cp_omp_mappable_type, omp_reduction_id,
285         cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction,
286         finish_omp_cancel, finish_omp_cancellation_point): New prototypes.
287         (finish_omp_for): Add CODE argument.
288         (finish_omp_atomic): Add seq_cst argument.
289         (cxx_omp_create_clause_info): Add need_dtor argument.
291 2013-10-09  Marek Polacek  <polacek@redhat.com>
293         PR c++/58635
294         * semantics.c (finish_return_stmt): Return error_mark_node
295         when error_operand_p of the expr is true.
296         (build_transaction_expr): Check for EXPR_P before setting the
297         expr location.
299 2013-10-08  Paolo Carlini  <paolo.carlini@oracle.com>
301         PR c++/58568
302         * lambda.c (begin_lambda_type): Check return value of xref_tag
303         for error_mark_node; tidy.
304         * decl.c (grokdeclarator): Tweak error message.
306 2013-10-08  Paolo Carlini  <paolo.carlini@oracle.com>
308         PR c++/58665
309         Revert:
310         2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>
312         PR c++/58448
313         * pt.c (tsubst): Use error_operand_p on parameter t.
315 2013-10-06  Paolo Carlini  <paolo.carlini@oracle.com>
317         PR c++/58126
318         * class.c (check_bases): Propagate CLASSTYPE_READONLY_FIELDS_NEED_INIT
319         and CLASSTYPE_REF_FIELDS_NEED_INIT from bases to derived.
320         * init.c (diagnose_uninitialized_cst_or_ref_member_1): Extend error
321         messages about uninitialized const and references members to mention
322         the base class.
324 2013-10-06  Paolo Carlini  <paolo.carlini@oracle.com>
326         PR c++/56060
327         * pt.c (type_dependent_expression_p): Handle EXPR_PACK_EXPANSION.
329 2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>
331         PR c++/58560
332         * typeck2.c (build_functional_cast): Use error_operand_p on exp.
334 2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>
336         PR c++/58503
337         * parser.c (cp_parser_perform_range_for_lookup): If eventually
338         either *begin or *end is type-dependent, return NULL_TREE.
339         (do_range_for_auto_deduction): If cp_parser_perform_range_for_lookup
340         returns NULL_TREE, don't actually do_auto_deduction.
342 2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>
344         PR c++/58448
345         * pt.c (tsubst): Use error_operand_p on parameter t.
347 2013-10-04  Marc Glisse  <marc.glisse@inria.fr>
349         PR c++/19476
350         * decl.c (cxx_init_decl_processing): Set operator_new_flag.
352 2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>
354         PR c++/58584
355         * decl2.c (save_template_attributes): Handle error_mark_node as
356         *attr_p argument.
357         (cp_check_const_attributes): Likewise for attributes.
358         * parser.c (cp_parser_std_attribute_spec): When alignas_expr is an
359         error_mark_node call cp_parser_skip_to_end_of_statement.
361 2013-10-03  Easwaran Raman  <eraman@google.com>
363         PR c++/33911
364         * parser.c (cp_parser_init_declarator): Do not drop attributes
365         of template member functions.
367 2013-10-03  Marek Polacek  <polacek@redhat.com>
369         PR c++/58510
370         * init.c (sort_mem_initializers): Splice when giving an error.
372 2013-10-02  Paolo Carlini  <paolo.carlini@oracle.com>
374         PR c++/58535
375         * parser.c (cp_parser_function_specifier_opt): Upon error about
376         virtual templates don't set ds_virtual.
377         (finish_fully_implicit_template): Reject virtual implicit templates.
379 2013-10-02  Paolo Carlini  <paolo.carlini@oracle.com>
381         PR c++/58565
382         * semantics.c (potential_constant_expression_1): Handle LABEL_EXPR.
384 2013-10-01  Paolo Carlini  <paolo.carlini@oracle.com>
386         PR c++/58563
387         * parser.c (cp_parser_lookup_name): Check make_typename_type return
388         value for error_mark_node.
390 2013-09-25  Tom Tromey  <tromey@redhat.com>
392         * Make-lang.in (CXX_TREE_H, CXX_PARSER_H, CXX_PRETTY_PRINT_H):
393         Remove.
395 2013-09-25  Tom Tromey  <tromey@redhat.com>
397         * Make-lang.in (g++spec.o): Remove.
398         (CFLAGS-cp/g++spec.o): New variable.
399         (GXX_OBJS): Reference cp/g++spec.o.
400         (cc1plus-checksum.o, cp/lex.o, cp/cp-array-notation.o)
401         (cp/cp-lang.o, cp/decl.o, cp/decl2.o, cp/cp-objcp-common.o)
402         (cp/typeck2.o, cp/typeck.o, cp/class.o, cp/call.o)
403         (cp/friend.o, cp/init.o, cp/method.o, cp/cvt.o, cp/search.o)
404         (cp/tree.o, cp/ptree.o, cp/rtti.o, cp/except.o, cp/expr.o)
405         (cp/pt.o, cp/error.o, cp/repo.o, cp/semantics.o, cp/dump.o)
406         (cp/optimize.o, cp/mangle.o, cp/parser.o, cp/cp-gimplify.o)
407         (cp/name-lookup.o, cp/cxx-pretty-print.o): Remove.
409 2013-09-25  Tom Tromey  <tromey@redhat.com>
411         * Make-lang.in (g++spec.o): Don't use subshell.
413 2013-09-25  Marek Polacek  <polacek@redhat.com>
415         PR c++/58516
416         * semantics.c (finish_transaction_stmt): Check for EXPR_P before
417         setting the expr location.
419 2013-09-23  Adam Butcher  <adam@jessamine.co.uk>
421         PR c++/58500
422         * type-utils.h (find_type_usage): Only traverse one type level into
423         member function pointers.
425 2013-09-23  Adam Butcher  <adam@jessamine.co.uk>
427         * parser.c (cp_parser_init_declarator): Defer calling
428         finish_fully_implicit_template for forward declarations until after
429         other decl processing is complete.  Cleanup for clarity: Extract 'else'
430         case after 'if' containing unconditional return.
432 2013-09-23  Adam Butcher  <adam@jessamine.co.uk>
434         * parser.c (make_generic_type_name): Spell generic type names '<autoN>'
435         rather than '__GenN'.
437 2013-09-23  Adam Butcher  <adam@jessamine.co.uk>
439         * lambda.c (maybe_add_lambda_conv_op): Don't check for instantiated
440         callop in the case of generic lambdas.
442 2013-09-23  Adam Butcher  <adam@jessamine.co.uk>
444         * parser.c (make_generic_type_name): Use global count rather than
445         parameter and ...
446         (add_implicit_template_parms): ... propagate interface change here.
448 2013-09-20  Paolo Carlini  <paolo.carlini@oracle.com>
450         PR c++/58481
451         * pt.c (tsubst_copy): Use current_nonlambda_class_type to
452         call tsubst_baselink.
454 2013-09-18  Paolo Carlini  <paolo.carlini@oracle.com>
456         PR c++/58457
457         * class.c (instantiate_type): Loosen a bit the gcc_assert.
459 2013-09-18  Marek Polacek  <polacek@redhat.com>
461         PR sanitize/58443
462         * typeck.c (cp_build_binary_op): Properly honor -fsanitize options.
463         Remove unnecessary check.
465 2013-09-18  Marek Polacek  <polacek@redhat.com>
467         PR sanitizer/58411
468         * typeck.c (cp_build_binary_op): Don't sanitize function if it has the
469         no_sanitize_undefined attribute.
471 2013-09-17  Paolo Carlini  <paolo.carlini@oracle.com>
473         PR c++/58435
474         * pt.c (tsubst, [BOUND_TEMPLATE_TEMPLATE_PARM]): Take into account
475         the cp_type_quals (r) too.
477 2013-09-16  Adam Butcher  <adam@jessamine.co.uk>
479         * cp-tree.h (type_uses_auto_or_concept): Declare.
480         (is_auto_or_concept): Declare.
481         * decl.c (grokdeclarator): Allow 'auto' parameters in lambdas with
482         -std=gnu++1y or -std=c++1y or, as a GNU extension, in plain functions.
483         * type-utils.h: New header defining ...
484         (find_type_usage): ... this new function based on pt.c (type_uses_auto)
485         for searching a type tree given a predicate.
486         * pt.c (type_uses_auto): Reimplement via type-utils.h (find_type_usage).
487         (is_auto_or_concept): New function.
488         (type_uses_auto_or_concept): New function.
489         * parser.h (struct cp_parser): Add fully_implicit_function_template_p.
490         * parser.c (cp_parser_new): Initialize
491         fully_implicit_function_template_p.
492         (cp_parser_new): Initialize fully_implicit_function_template_p.
493         (cp_parser_lambda_expression): Copy and restore value of
494         fully_implicit_function_template_p as per other parser fields.
495         (cp_parser_parameter_declaration_list): Count generic
496         parameters and call ...
497         (add_implicit_template_parms): ... this new function to synthesize them
498         with help from type-utils.h (find_type_usage), ...
499         (tree_type_is_auto_or_concept): ... this new static function and ...
500         (make_generic_type_name): ... this new static function.
501         (cp_parser_direct_declarator): Account for implicit template parameters.
502         (cp_parser_lambda_declarator_opt): Finish fully implicit template if
503         necessary by calling ...
504         (finish_fully_implicit_template): ... this new function.
505         (cp_parser_init_declarator): Likewise.
506         (cp_parser_function_definition_after_declarator): Likewise.
507         (cp_parser_member_declaration): Likewise.
508         * Make-lang.in (cp/pt.o): Add dependency on type-utils.h.
509         (cp/parser.o): Likewise.
511 2013-09-16  Adam Butcher  <adam@jessamine.co.uk>
513         * parser.c (cp_parser_lambda_declarator_opt): Accept template parameter
514         list with std=c++1y or std=gnu++1y.
515         (cp_parser_lambda_body): Don't call 'expand_or_defer_fn' for lambda call
516         operator template to avoid adding template result to symbol table.
517         * lambda.c (lambda_function): Return template result if call operator is
518         a template.
519         (maybe_add_lambda_conv_op): Move declarations to point of use.  Refactor
520         operator call building in order to support conversion of a non-capturing
521         lambda template to a function pointer with help from ...
522         (prepare_op_call): ... this new function.
523         * decl2.c (check_member_template): Don't reject lambda call operator
524         template in local [lambda] class.
525         * pt.c (instantiate_class_template_1): Don't instantiate lambda call
526         operator template when instantiating lambda class.
528 2013-09-16  Adam Butcher  <adam@jessamine.co.uk>
530         * pt.c (make_auto_1): Use input_location rather than BUILTINS_LOCATION.
532 2013-09-15  Jason Merrill  <jason@redhat.com>
534         Core DR 904
535         PR c++/41933
536         * parser.c (cp_parser_lambda_introducer): Handle variadic capture.
537         * lambda.c (add_capture): Handle variadic capture.
538         (add_default_capture, lambda_capture_field_type): Likewise.
539         (build_capture_proxy, register_capture_members): Likewise.
540         * pt.c (register_specialization): Allow FIELD_DECL.
541         (retrieve_specialization): Likewise.
542         (find_parameter_packs_r): Handle FIELD_DECL and VAR_DECL.
543         (tsubst_pack_expansion): Handle FIELD_DECL packs.
544         (gen_elem_of_pack_expansion_instantiation): Likewise.
545         (instantiate_class_template_1): Likewise.
546         (tsubst_decl, tsubst_copy): Likewise.
547         (tsubst_expr) [DECL_EXPR]: Handle capture proxy packs.
548         (tsubst_copy_and_build) [VAR_DECL]: Likewise.
549         * semantics.c (finish_non_static_data_member): Don't try to represent
550         the type of a COMPOUND_REF of a FIELD_DECL pack.
552         PR c++/41933
553         * cp-tree.h (DECL_PACK_P): Replace FUNCTION_PARAMETER_PACK_P.
554         * cxx-pretty-print.c (direct_declarator): Adjust.
555         * decl2.c (cp_build_parm_decl): Adjust.
556         * pt.c (function_parameter_pack_p): Adjust.
557         (find_parameter_packs_r, push_template_decl_real): Adjust.
558         (tsubst_pack_expansion, tsubst_decl): Adjust.
559         (regenerate_decl_from_template, instantiate_decl): Adjust.
561         * lambda.c (add_capture): Don't add DECL_LANG_SPECIFIC.
563 2013-09-13  Jason Merrill  <jason@redhat.com>
565         PR c++/58273
566         * pt.c (any_type_dependent_elements_p): Actually check for
567         type-dependence, not value-dependence.
569 2013-09-13  Jacek Caban  <jacek@codeweavers.com>
571         * decl.c: Use new cxx_implicit_extern_c hook
573 2013-09-12  Brooks Moses  <bmoses@google.com>
575         PR driver/42955
576         * Make-lang.in: Do not install driver binaries in $(target)/bin.
578 2013-09-12  Adam Butcher  <adam@jessamine.co.uk>
580         * pt.c (instantiate_decl): Save/restore cp_unevaluated_operand and
581         c_inhibit_evaluation_warnings.  Reset if instantiating within a
582         function-local template.
584 2013-09-12  Paolo Carlini  <paolo.carlini@oracle.com>
586         * semantics.c (finish_pseudo_destructor_expr): Add location_t
587         parameter.
588         * pt.c (unify_arg_conversion): Use EXPR_LOC_OR_HERE.
589         (tsubst_copy_and_build): Adjust finish_pseudo_destructor_expr
590         calls.
591         * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
592         (cp_parser_postfix_expression): Pass the proper location to
593         cp_parser_postfix_dot_deref_expression.
594         * cp-tree.h (finish_pseudo_destructor_expr): Update declaration.
596 2013-09-10  Jan Hubicka  <jh@suse.cz>
597             Paolo Carlini  <paolo.carlini@oracle.com>
599         * error.c (print_instantiation_partial_context_line): If
600         loc == UNKNOWN_LOCATION return immediately.
602 2013-09-09  Jakub Jelinek  <jakub@redhat.com>
604         PR c++/58325
605         * init.c (build_vec_delete): Call mark_rvalue_use on base.
607 2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
609         PR c++/43452
610         * init.c (build_vec_delete_1): When the type is incomplete emit a
611         warning, enabled by default (not an error).
612         (build_delete): Adjust to use OPT_Wdelete_incomplete.
614 2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
616         PR c++/58362
617         * error.c (location_of): Don't handle PARM_DECLs specially.
619 2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
621         * error.c (dump_expr, [PSEUDO_DTOR_EXPR]): Fix.
622         * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
623         Tweak, TREE_OPERAND (t, 1) may be null.
625 2013-09-08  Caroline Tice  <cmtice@google.com>
627         PR c++/58300
628         * vtable-class-hierarchy.c (vtv_generate_init_routine):  In
629         preinit case, move call to assemble_vtv_preinit_initializer to
630         after call to cgraph_process_new_functions.
632 2013-09-08  Tom de Vries  <tom@codesourcery.com>
634         PR c++/58282
635         * except.c (build_must_not_throw_expr): Handle
636         flag_exceptions.
638 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
640         * typeck.c (cp_build_binary_op): Use vector_types_compatible_elements_p.
642 2013-09-04  Paolo Carlini  <paolo.carlini@oracle.com>
644         PR c++/24926
645         * class.c (finish_struct_anon_r): New.
646         (finish_struct_anon): Use it.
648 2013-09-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
650         * cxx-pretty-print.h (cxx_pretty_printer::simple_type_specifier):
651         Declare as overrider.
652         * cxx-pretty-print.c (cxx_pretty_printer::simple_type_specifier):
653         Rename from pp_cxx_simple_type_specifier.
654         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
655         simple_type_specifier.
657 2013-09-03  Paolo Carlini  <paolo.carlini@oracle.com>
659         PR c++/58305
660         * typeck2.c (build_functional_cast): Maybe warn_deprecated_use.
662 2013-09-03  Mike Stump  <mikestump@comcast.net>
664         * Make-lang.in (cp/lambda.o): Add dependencies.
666 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
668         * cxx-pretty-print.h (cxx_pretty_printer::type_id): Declare as
669         overrider.
670         * cxx-pretty-print.c (pp_cxx_storage_class_specifier): Remove.
671         (pp_cxx_userdef_literal): Tidy.
672         (pp_cxx_template_argument_list): Likewise.
673         (pp_cxx_typeid_expression): Likewise.
674         (pp_cxx_offsetof_expression_1): Likewise.
675         (cxx_pretty_printer::postfix_expression): Likewise.
676         (cxx_pretty_printer::unary_expression): Likewise.
677         (cxx_pretty_printer::statement): Likewise.
678         (cxx_pretty_printer::type_id): Rename from pp_cxx_type_id.
679         (c_pretty_printer::cxx_pretty_printer): Do not assign to type_id.
680         * error.c (dump_decl): Tidy.
681         (dump_expr): Likewise.
683 2013-09-02  Paolo Carlini  <paolo.carlini@oracle.com>
685         PR c++/21682, implement DR 565
686         * name-lookup.c (compparms_for_decl_and_using_decl): New.
687         (push_overloaded_decl_1, do_nonmember_using_decl): Use it.
689 2013-08-30  Marek Polacek  <polacek@redhat.com>
691         * typeck.c (cp_build_binary_op): Add division by zero and shift
692         instrumentation.
693         * error.c (dump_expr): Special-case ubsan builtins.
695 2013-08-30  Paolo Carlini  <paolo.carlini@oracle.com>
697         PR c++/51424
698         * cp-tree.h (LOOKUP_DELEGATING_CONS): Add.
699         * init.c (perform_target_ctor): Use it.
700         * call.c (build_special_member_call): Diagnose self-delegating
701         constructors.
703 2013-08-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
705         * cxx-pretty-print.h (cxx_pretty_printer::declaration): Declare as
706         overrider.
707         (cxx_pretty_printer::declaration_specifiers): Likewise.
708         (cxx_pretty_printer::function_specifier): Likewise.
709         (cxx_pretty_printer::declarator): Likewise.
710         (cxx_pretty_printer::direct_declarator): Likewise.
711         (cxx_pretty_printer::abstract_declarator): Likewise.
712         (cxx_pretty_printer::direct_abstract_declarator): Likewise.
713         (pp_cxx_declaration): Remove.
714         * cxx-pretty-print.c (cxx_pretty_printer::function_specifier):
715         Rename from pp_cxx_function_specifier.  Adjust.
716         (cxx_pretty_printer::declaration_specifiers): Rename from
717         pp_cxx_decl_specifier_seq.  Adjust.
718         (cxx_pretty_printer::direct_declarator): Rename from
719         pp_cxx_direct_declarator.  Adjust.
720         (cxx_pretty_printer::declarator): Rename from pp_cxx_declarator.
721         Adjust.
722         (cxx_pretty_printer::abstract_declarator): Rename from
723         pp_cxx_abstract_declarator.  Adjust.
724         (cxx_pretty_printer::direct_abstract_declarator): Rename from
725         pp_cxx_direct_abstract_declarator.  Adjust.
726         (cxx_pretty_printer::declaration): Rename from
727         pp_cxx_declaration.  Adjust.
728         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
729         declaration, declaration_specifiers, function_specifier,
730         declarator, direct_declarator, abstract_declarator,
731         direct_abstract_declarator.
732         * error.c (dump_decl): Adjust.
734 2013-08-29  Jan Hubicka  <jh@suse.cz>
736         Correct previous patch to not mark terminate as LEAF.
737         * class.c (build_vtbl_initializer): Drop LEAF
738         * decl.c (cxx_init_decl_processing): Likewise.
739         (push_throw_library_fn): Likewise.
740         * except.c (init_exception_processing): Likewise.
741         (do_begin_catch): Likewise.
742         (do_end_catch): Likewise.
743         (do_allocate_exception): Likewise.
745 2013-08-29  Jan Hubicka  <jh@suse.cz>
747         * class.c (build_vtbl_initializer): Make __cxa_deleted_virtual
748         ECF_NORETURN | ECF_LEAF
749         * cp-tree.h (build_library_fn_ptr, build_cp_library_fn_ptr,
750         push_library_fn, push_void_library_fn): Update prototype.
751         * decl.c (build_library_fn_1): Remove.
752         (push_cp_library_fn, build_cp_library_fn): Update to take ECF flags.
753         (cxx_init_decl_processing): Update; global_delete_fndecl is ECF_NOTROW;
754         __cxa_pure_virtual is ECF_NORETURN | ECF_NORETURN | ECF_LEAF.
755         (build_library_fn_1): Add ecf_flags argument; rename to ...
756         (build_library_fn): ... this one.
757         (build_cp_library_fn): Take ecf_flags; do not copy NOTHROW flag.
758         (build_library_fn_ptr): Take ecf_flags.
759         (build_cp_library_fn_ptr): Likewise.
760         (push_library_fn): Likewise.
761         (push_cp_library_fn): Likewise.
762         (push_void_library_fn): Likewise.
763         (push_throw_library_fn): All throws are ECF_NORETURN.
764         (__cxa_atexit, __cxa_thread_atexit): Add ECF_LEAF | ECF_NOTHROW attributes.
765         (expand_static_init): __cxa_guard_acquire, __cxa_guard_release,
766         __cxa_guard_abort are ECF_NOTHROW | ECF_LEAF.
767         * except.c (init_exception_processing): terminate is
768         ECF_NOTHROW | ECF_NORETURN | ECF_LEAF.
769         (declare_nothrow_library_fn): Add ecf_flags parameter.
770         (__cxa_get_exception_ptr): Is ECF_NOTHROW | ECF_PURE | ECF_LEAF |
771         ECF_TM_PURE.
772         (do_begin_catch): cxa_begin_catch and _ITM_cxa_begin_catch
773         are ECF_NOTHROW | ECF_LEAF.
774         (do_end_catch): __cxa_end_catch and _ITM_cxa_end_catch is
775         ECF_LEAF.
776         (do_allocate_exception): _cxa_allocate_exception
777         and _ITM_cxa_allocate_exception are ECF_NOTHROW | ECF_MALLOC
778         | ECF_LEAF
779         (do_free_exception): __cxa_free_exception is
780         ECF_NOTHROW | ECF_LEAF.
781         * rtti.c (build_dynamic_cast_1): __dynamic_cast
782         is ECF_LEAF | ECF_PURE | ECF_NOTHROW.
784 2013-08-29  Adam Butcher  <adam@jessamine.co.uk>
786         * error.c (dump_lambda_function): New function, dependent on ...
787         (dump_substitution): ... this new function, factored out of ...
788         (subst_to_string): ... here and ...
789         (dump_function_decl): ... here.  Updated to early-out with call to
790         dump_lambda_function after determining template bindings.
792 2013-08-28  Paolo Carlini  <paolo.carlini@oracle.com>
794         PR c++/58255
795         * init.c (build_aggr_init): When init == void_type_node do not
796         set LOOKUP_ONLYCONVERTING.
798 2013-08-27  Caroline Tice  <cmtice@google.com>
800         * vtable-class-hierarchy.c: Remove unnecessary include statements.
801         (MAX_SET_SIZE): Remove unnecessary constant.
802         (register_construction_vtables):  Make vtable_ptr_array parameter
803         into a vector; remove num_args parameter. Change array accesses to
804         vector accesses.
805         (register_other_binfo_vtables): Ditto.
806         (insert_call_to_register_set): Ditto.
807         (insert_call_to_register_pair): Ditto.
808         (output_set_info):  Ditto.  Also change warning calls to warning_at
809         calls, and fix format of warning messages.
810         (register_all_pairs): Change vtbl_ptr_array from an array into a
811         vector.  Remove num_vtable_args (replace with calls to vector length).
812         Change array stores & accesses to vector functions. Change calls to
813         register_construction_vtables, register_other_binfo_vtables,
814         insert_call_to_register_set, insert_call_to_register_pair and
815         output_set_info to match their new signatures.  Change warning to
816         warning_at and fix the format of the warning message.
818 2013-08-27  Jakub Jelinek  <jakub@redhat.com>
819             Aldy Hernandez  <aldyh@redhat.com>
821         * cp-tree.h (CP_OMP_CLAUSE_INFO): Adjust range for new clauses.
823 2013-08-27  Paolo Carlini  <paolo.carlini@oracle.com>
825         * decl.c (grokfndecl): Remove old bison hack.
827 2013-08-26  Jan Hubicka  <jh@suse.cz>
829         * cp-tree.h (DECL_CONSTRUCTOR_P, DECL_DESTRUCTOR_P): Use
830         middle-end flag.
832 2013-08-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
834         * cxx-pretty-print.h (cxx_pretty_printer::unary_expression):
835         Declare as overrider.
836         (cxx_pretty_printer::multiplicative_expression): Likewise.
837         (cxx_pretty_printer::conditional_expression): Likewise.
838         (cxx_pretty_printer::assignment_expression): Likewise.
839         (cxx_pretty_printer::expression): Likewise.
840         * cxx-pretty-print.c (cxx_pretty_printer::unary_expression):
841         Rename from pp_cxx_unary_expression.  Adjust.
842         (cxx_pretty_printer::multiplicative_expression): Rename from
843         pp_cxx_multiplicative_expression.  Adjust.
844         (cxx_pretty_printer::conditional_expression): Rename from
845         pp_cxx_conditional_expression.  Adjust.
846         (cxx_pretty_printer::assignment_expression): Rename from
847         pp_cxx_assignment_expression.  Adjust.
848         (cxx_pretty_printer::expression): Rename from pp_cxx_expression.
849         Adjust.
850         (cxx_pretty_printer::cxx_pretty_printer): Dot not assign to
851         unary_expression, multiplicative_expression,
852         conditional_expression, assignment_expression, expression.
854 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
856         * cxx-pretty-print.h (cxx_pretty_printer::postfix_expression):
857         Declare as overrider.
858         * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
859         Rename from pp_cxx_postfix_expression.  Adjust.
860         (pp_cxx_expression): Use pp_postfix_expression.
861         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
862         postfix_expression.
864 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
866         * cxx-pretty-print.h (cxx_pretty_printer::primary_expression): Now
867         an overrider of c_pretty_printer::primary_expression.
868         * cxx-pretty-print.c (cxx_pretty_printer::primary_expression):
869         Rename from pp_cxx_primary_expression.  Adjust.
870         (pp_cxx_postfix_expression): Use pp_primary_expression.
871         (pp_cxx_ctor_initializer): Likewise.
872         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
873         primary_expression.
875 2013-08-23  Jan Hubicka  <jh@suse.cz>
877         * cp-tree.h (struct lang_type_class): Free is_final bit.
878         (CLASSTYPE_FINAL): Define using TYPE_FINAL_P.
879         (DECL_FINAL_P): Remove.
880         * pt.c (instantiate_class_template_1): Guard that CLASSTYPE_FINAL
881         is called on CLASS_TYPE_P.
883 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
885         * cxx-pretty-print.c (M_): Remove.
886         (pp_cxx_unqualified_id): Use translate_string instead of M_.
887         (pp_cxx_canonical_template_parameter): Likewise.
889 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
891         * cxx-pretty-print.h (cxx_pretty_printer::id_expression): Declare.
892         * cxx-pretty-print.c (cxx_pretty_printer::id_expression): Rename
893         from pp_cxx_id_expression.  Adjust.
894         (pp_cxx_userdef_literal): Use pp_id_expression.
895         (pp_cxx_primary_expression): Likewise.
896         (pp_cxx_direct_declarator): Likewise.
897         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
898         id_expression.
900 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
902         * cxx-pretty-print.h (cxx_pretty_printer::constant): Now a member
903         function, overriding c_pretty_printer::constant.
904         * cxx-pretty-print.c (cxx_pretty_printer::constant): Rename from
905         pp_cxx_constant.  Adjust.
906         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to constant.
908 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutiobs.net>
910         * cp-objcp-common.c (cxx_initialize_diagnostics): Call a
911         destructor for the early printer.
912         * error.c (type_to_string): Use pp_buffer.
914 2013-08-22  Paolo Carlini  <paolo.carlini@oracle.com>
916         PR c++/56380
917         * class.c (check_field_decls): Check for const mutable and const
918         reference data members.
920 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
922         * error.c (init_error): Remove calls to pp_construct and
923         pp_cxx_pretty_printer_init.  Initialize cxx_pp with placement-new.
924         * cxx-pretty-print.h (cxx_pretty_printer::cxx_pretty_printer): Declare.
925         (cxx_pretty_printer_init): Remove.
926         * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer):
927         Rename from cxx_pretty_printer_init.  Adjust.
928         * cp-objcp-common.c (cxx_initialize_diagnostics): Simplify
929         initialization of C++ diagnostics pretty printer.
931 2013-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
933         * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
934         * cp-tree.h (REFERENCE_REF_P): Likewise.
935         * semantics.c (finish_offsetof): Likewise.
937 2013-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
939         PR c++/56130
940         * semantics.c (finish_id_expression): Handle deprecated references.
942 2013-08-20  Jason Merrill  <jason@redhat.com>
944         PR c++/58119
945         * cvt.c (build_expr_type_conversion): Don't complain about a
946         template that can't match the desired type category.
948 2013-08-20  Gabriel Dos Reis  <gdr@integrable-solutions.net>
950         * error.c (pp_ggc_formatted_text): New.
951         (type_as_string): Use it in lieu of pp_formatted_text.
952         (type_as_string_translate): Likewise.
953         (expr_as_string): Likewise.
954         (decl_as_string): Likewise.
955         (decl_as_string_translate): Likewise.
956         (lang_decl_name): Likewise.
957         (decl_to_string): Likewise.
958         (expr_to_string): Likewise.
959         (fndecl_to_string): Likewise.
960         (parm_to_string): Likewise.
961         (type_to_string): Likewise.
962         (args_to_string): Likewise.
963         (subst_to_string): Likewise.
965 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
967         PR c/57490
968         * cp-array-notation.c (cp_expand_cond_array_notations): Added a
969         check for truth values.
970         (expand_array_notation_exprs): Added truth values case.  Removed an
971         unwanted else.  Added for-loop to walk through subtrees in default
972         case.
973         * call.c (build_cxx_call): Inherited the type of the array notation for
974         certain built-in array notation functions.
976 2013-08-19  Paolo Carlini  <paolo.carlini@oracle.com>
978         * parser.c (cp_parser_lambda_introducer, cp_parser_decltype_expr):
979         Use cp_parser_lookup_name_simple.
981 2013-08-19  Paolo Carlini  <paolo.carlini@oracle.com>
983         * name-lookup.h (pop_bindings_and_leave_scope): Declare.
984         * name-lookup.c (pop_bindings_and_leave_scope): Define.
985         * parser.c (cp_parser_lambda_declarator_opt,
986         cp_parser_direct_declarator, cp_parser_cache_defarg): Use it.
988 2013-08-17  Jason Merrill  <jason@redhat.com>
990         PR c++/58083
991         * name-lookup.c (push_class_level_binding_1): It's OK to push a
992         lambda type after the enclosing type is complete.
994 2013-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
996         * error.c (dump_scope): Add a cxx_pretty_printer parameter.
997         Adjust callers.
998         (dump_template_argument): Likewise.
999         (dump_template_argument_list): Likewise.
1000         (dump_template_parameter): Likewise.
1001         (dump_template_bindings): Likewise.
1002         (dump_alias_template_specialization): Likewise.
1003         (dump_type): Likewise.
1004         (dump_typename): Likewise.
1005         (dump_aggr_type): Likewise.
1006         (dump_type_prefix): Likewise.
1007         (dump_type_suffix): Likewise.
1008         (dump_global_iord): Likewise.
1009         (dump_simple_decl): Likewise.
1010         (dump_decl): Likewise.
1011         (dump_template_decl): Likewise.
1012         (dump_function_decl): Likewise.
1013         (dump_parameters): Likewise.
1014         (dump_ref_qualifier): Likewise.
1015         (dump_exception_spec): Likewise.
1016         (dump_function_name): Likewise.
1017         (dump_template_parms): Likewise.
1018         (dump_call_expr_args): Likewise.
1019         (dump_aggr_init_expr_args): Likewise.
1020         (dump_expr_list): Likewise.
1021         (dump_expr_init_vec): Likewise.
1022         (dump_expr): Likewise.
1023         (dump_binary_op): Likewise.
1024         (dump_unary_op): Likewise.
1026 2013-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
1028         PR c++/51912
1029         * cp-tree.h (LOOKUP_NO_NON_INTEGRAL): Add.
1030         * decl.c (case_conversion): Use it.
1031         * call.c (standard_conversion): Likewise.
1032         (implicit_conversion): Adjust.
1034 2013-08-13  Adam Butcher  <adam@jessamine.co.uk>
1036         * pt.c: Grammar fix in comments ("it's" to "its").
1038 2013-08-12  Paolo Carlini  <paolo.carlini@oracle.com>
1040         * decl.c (warn_extern_redeclared_static, duplicate_decls,
1041         check_elaborated_type_specifier): Use error + inform.
1042         * friend.c (make_friend_class): Likewise.
1043         * semantics.c (finish_id_expression): Likewise.
1045 2013-08-09  Paolo Carlini  <paolo.carlini@oracle.com>
1047         Revert:
1048         2013-08-07  Paolo Carlini  <paolo.carlini@oracle.com>
1050         PR c++/46206
1051         * name-lookup.c (lookup_name_real_1): Handle iter->type before
1052         iter->value.
1054 2013-08-07  Paolo Carlini  <paolo.carlini@oracle.com>
1056         PR c++/46206
1057         * name-lookup.c (lookup_name_real_1): Handle iter->type before
1058         iter->value.
1060 2013-08-06  Caroline Tice  <cmtice@google.com>
1062         * Make-lang.in (*CXX_AND_OBJCXX_OBJS):  Add vtable-class-hierarchy.o to
1063         list.
1064         (vtable-class-hierarchy.o): Add build rule.
1065         * cp-tree.h (vtv_start_verification_constructor_init_function): New
1066         extern function decl.
1067         (vtv_finish_verification_constructor_init_function): New extern
1068         function decl.
1069         (build_vtbl_address): New extern function decl.
1070         (get_mangled_vtable_map_var_name): New extern function decl.
1071         (vtv_compute_class_hierarchy_transitive_closure): New extern function
1072         decl.
1073         (vtv_generate_init_routine): New extern function decl.
1074         (vtv_save_class_info): New extern function decl.
1075         (vtv_recover_class_info): New extern function decl.
1076         (vtv_build_vtable_verify_fndecl): New extern function decl.
1077         * class.c (finish_struct_1): Add call to vtv_save_class_info if
1078         flag_vtable_verify is true.
1079         * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list.
1080         * vtable-class-hierarchy.c: New file.
1081         * mangle.c (get_mangled_vtable_map_var_name):  New function.
1082         * decl2.c (start_objects): Update function comment.
1083         (cp_write_global_declarations):  Call vtv_recover_class_info,
1084         vtv_compute_class_hierarchy_transitive_closure and
1085         vtv_build_vtable_verify_fndecl, before calling
1086         finalize_compilation_unit, and call vtv_generate_init_rount after, IFF
1087         flag_vtable_verify is true.
1088         (vtv_start_verification_constructor_init_function): New function.
1089         (vtv_finish_verification_constructor_init_function): New function.
1090         * init.c (build_vtbl_address): Remove static qualifier from function.
1092 2013-08-06  Jason Merrill  <jason@redhat.com>
1094         PR c++/57825
1095         * tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.
1097 2013-08-05  Paolo Carlini  <paolo.carlini@oracle.com>
1099         PR c++/58080
1100         * typeck.c (cp_pointer_int_sum): Add tsubst_flags_t parameter.
1101         (cp_build_binary_op): Adjust.
1103 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1105         * cxx-pretty-print.h (pp_c_base): Remove.
1106         (cxx_pretty_printer): Derive from c_pretty_printer.
1107         Adjust macros using pp_c_base.
1108         * cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base.
1109         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise.
1110         (pp_cxx_colon_colon): Likewise.
1111         (pp_cxx_separate_with): Likewise.
1112         (pp_cxx_storage_class_specifier): Do not call pp_c_base.
1113         (pp_cxx_expression_list): Likewise.
1114         (pp_cxx_space_for_pointer_operator): Likewise.
1115         (pp_cxx_init_declarator): Likewise.
1116         (pp_cxx_call_argument_list): Likewise.
1117         (pp_cxx_constant): Likewise.
1118         (pp_cxx_postfix_expression): Likewise.
1119         (pp_cxx_new_expression): Likewise.
1120         (pp_cxx_unary_expression): Likewise.
1121         (pp_cxx_cast_expression): Likewise.
1122         (pp_cxx_conditional_expression): Likewise.
1123         (pp_cxx_assignment_expression): Likewise.
1124         (pp_cxx_expression): Likewise.
1125         (pp_cxx_function_specifier): Likewise.
1126         (pp_cxx_decl_specifier_seq): Likewise.
1127         (pp_cxx_simple_type_specifier): Likewise.
1128         (pp_cxx_type_specifier_seq): Likewise.
1129         (pp_cxx_ptr_operator): Likewise.
1130         (pp_cxx_parameter_declaration_clause): Likewise.
1131         (pp_cxx_direct_declarator): Likewise.
1132         (pp_cxx_direct_abstract_declarator): Likewise.
1133         (pp_cxx_type_id): Likewise.
1134         (pp_cxx_statement): Likewise.
1135         (pp_cxx_pretty_printer_init): Tidy.
1136         * error.c (init_error): Do not use pp_base.
1137         (dump_aggr_type): Likewise.
1138         (dump_type_prefix): Likewise.
1139         (dump_type_suffix): Likewise.
1140         (dump_global_iord): Likewise.
1141         (dump_decl): Likewise.
1142         (dump_function_decl): Likewise.
1143         (dump_ref_qualifier): Likewise.
1144         (reinit_cxx_pp): Likewise.
1145         (decl_as_dwarf_string): Likewise.
1146         (lang_decl_dwarf_name): Likewise.
1147         (type_to_string): Likewise.
1148         (cv_to_string): Likewise.
1149         (cxx_print_error_function): Likewise.
1150         (cp_diagnostic_starter): Likewise.
1151         (cp_diagnostic_finalizer): Likewise.
1152         (cp_print_error_function): Likewise.
1153         (print_instantiation_context): Likewise.
1154         (cp_printer): Likewise.
1156 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1158         * error.c (dump_type_prefix): Use specialized pretty printer
1159         functions instead of pp_string or operators and punctuators.
1160         (dump_decl): Likewise.
1161         (dump_expr): Likewise.
1163 2013-08-03  Jason Merrill  <jason@redhat.com>
1165         DR 1286
1166         * pt.c (get_underlying_template): New.
1167         (convert_template_argument, lookup_template_class_1): Use it.
1169         DR 1430
1170         PR c++/51239
1171         * pt.c (pack_expansion_args_count): Rename from
1172         any_pack_expanson_args_p.
1173         (coerce_template_parms): Reject pack expansion to
1174         non-pack template parameter of alias template.
1176 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1178         * error.c (dump_aggr_type): Use specialized pretty printer
1179         functions instead of pp_character.
1180         (dump_type_prefix): Likewise.
1181         (dump_simple_decl): Likewise.
1182         (type_to_string): Likewise.
1184 2013-08-02  Paolo Carlini  <paolo.carlini@oracle.com>
1186         * cp-tree.h (finish_stmt): Do not declare.
1187         * decl.c (finish_stmt): Do not define.
1188         * parser.c (cp_parser_expression_statement,
1189         cp_parser_declaration_statement,
1190         cp_parser_transaction_cancel): Don't call finish_stmt.
1191         * semantics.c (finish_expr_stmt, finish_if_stmt,
1192         finish_while_stmt, finish_do_stmt, finish_return_stmt,
1193         finish_for_stmt, finish_switch_stmt, finish_compound_stmt,
1194         finish_transaction_stmt): Likewise.
1196 2013-08-01  Fabien Chêne  <fabien@gcc.gnu.org>
1198         PR c++/54537
1199         * cp-tree.h: Check OVL_USED with OVERLOAD_CHECK.
1200         * name-lookup.c (do_nonmember_using_decl): Make sure we have an
1201         OVERLOAD before calling OVL_USED. Call diagnose_name_conflict
1202         instead of issuing an error without mentioning the conflicting
1203         declaration.
1205 2013-07-31  Paolo Carlini  <paolo.carlini@oracle.com>
1207         * parser.c (cp_parser_sizeof_pack): Check cp_parser_identifier
1208         return value for error_mark_node.
1210 2013-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
1212         PR c++/57673
1213         * parser.c (cp_parser_cache_defarg): In an NSDMI don't stop when
1214         token->type == CPP_ELLIPSIS.
1216 2013-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
1218         PR c++/57947
1219         * call.c (is_std_init_list): Return false if cxx_dialect == cxx98.
1221 2013-07-29  Jason Merrill  <jason@redhat.com>
1223         PR c++/57901
1224         * semantics.c (build_data_member_initialization, constexpr_fn_retval):
1225         Use break_out_target_exprs instead of unshare_expr.
1227 2013-07-29  Paolo Carlini  <paolo.carlini@oracle.com>
1229         PR c++/57948
1230         * call.c (initialize_reference): Don't crash when reference_binding
1231         returns a conv with conv->kind == ck_ambig.
1233 2013-07-29  Jason Merrill  <jason@redhat.com>
1235         * mangle.c (write_name): Check for null context.
1236         (write_unscoped_name): Allow PARM_DECL context.
1238 2013-07-25  Paolo Carlini  <paolo.carlini@oracle.com>
1240         PR c++/57981
1241         * decl.c (check_default_argument): Take a tsubst_flags_t parameter.
1242         (grokparms): Adjust.
1243         * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
1244         * pt.c (tsubst_default_argument, tsubst_default_arguments): Take
1245         a tsubst_flags_t parameter.
1246         (tsubst_decl): Adjust.
1247         * call.c (convert_default_arg): Likewise.
1248         * cp-tree.h (check_default_argument, tsubst_default_argument):
1249         Update declarations.
1251 2013-07-25  Paolo Carlini  <paolo.carlini@oracle.com>
1253         PR c++/57880
1254         * parser.c (cp_parser_operator, case CPP_WSTRING, CPP_STRING16,
1255         CPP_STRING32, CPP_UTF8STRING, CPP_WSTRING_USERDEF,
1256         CPP_STRING16_USERDEF, CPP_STRING32_USERDEF, CPP_UTF8STRING_USERDEF):
1257         Fix string_len management, tidy.
1259 2013-07-24  Paolo Carlini  <paolo.carlini@oracle.com>
1261         PR c++/57942
1262         * typeck.c (ptr_reasonably_similar): Use COMPARE_STRICT if either
1263         target type is incomplete; return a bool, not an int.
1264         * cp-tree.h (ptr_reasonably_similar): Adjust declaration.
1266 2013-07-22  Paolo Carlini  <paolo.carlini@oracle.com>
1268         * cp-tree.h (DERIVED_FROM_P): Pass tf_none to lookup_base, not
1269         tf_warning_or_error.
1271 2013-07-21   Ondřej Bílka  <neleai@seznam.cz>
1273         * class.c: Fix typos.
1274         * cp-array-notation.c: Likewise.
1275         * cp-objcp-common.c: Likewise.
1276         * decl.c: Likewise.
1277         * init.c: Likewise.
1278         * mangle.c: Likewise.
1279         * parser.c: Likewise.
1280         * pt.c: Likewise.
1281         * semantics.c: Likewise.
1283 2013-07-14  Adam Butcher  <adam@jessamine.co.uk>
1285         * semantics.c (build_lambda_expr),
1286         (build_lambda_object), (begin_lambda_type), (lambda_return_type),
1287         (lambda_function), (lambda_capture_field_type), (is_capture_proxy),
1288         (is_normal_capture_proxy), (insert_capture_proxy),
1289         (insert_pending_capture_proxies), (lambda_proxy_type),
1290         (build_capture_proxy), (vla_capture_type),
1291         (register_capture_members), (add_default_capture),
1292         (lambda_expr_this_capture), (maybe_resolve_dummy),
1293         (nonlambda_method_basetype), (maybe_add_lambda_conv_op) and
1294         (is_lambda_ignored_entity): Moved definitions into ...
1295         * lambda.c: ... this new file.
1297 2013-07-14  Marc Glisse  <marc.glisse@inria.fr>
1299         * call.c (build_conditional_expr_1): Handle the case with 1 vector
1300         and 2 scalars. Call save_expr before building a vector.
1301         * typeck.c (cp_build_binary_op): Check complain before complaining.
1303 2013-07-13  Lubos Lunak  <l.lunak@suse.cz>
1305         PR c++/55203
1306         * init.c (build_aggr_init): Check for warn_unused attribute.
1307         * decl.c (poplevel): Likewise.
1309 2013-07-13  Jason Merrill  <jason@redhat.com>
1311         PR c++/57402
1312         * init.c (build_vec_init): Use {} for arrays of class type.
1313         (build_vec_delete): Don't take the address of the array.
1315         PR c++/57793
1316         * class.c (layout_class_type): Check for too-large class.
1318         * call.c (can_convert): Allow user-defined conversions.
1319         (can_convert_standard): New.
1320         * cp-tree.h: Declare it.
1321         * cvt.c (convert_to_reference): Use it.
1322         * pt.c (convert_nontype_argument): Likewise.
1323         * search.c (check_final_overrider): Likewise.
1324         Don't worry about user-defined conversions.
1326 2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
1328         PR c++/57869
1329         * typeck.c (build_reinterpret_cast_1): With -Wconditionally-supported
1330         warn about casting between pointer-to-function and pointer-to-object.
1332 2013-07-09  Jason Merrill  <jason@redhat.com>
1334         PR c++/57402
1335         * init.c (build_vec_init): Don't take shortcuts when initializing
1336         a VLA.
1338         PR c++/57471
1339         * parser.c (cp_parser_sizeof_pack): Clear parser scopes.
1341         PR c++/57658
1342         * semantics.c (finish_id_expression): Return the id for an
1343         unevaluated outer variable.
1345         PR c++/57526
1346         * semantics.c (lambda_capture_field_type): Build a DECLTYPE_TYPE
1347         if the variable type uses 'auto'.
1349         PR c++/57437
1350         * typeck.c (check_return_expr): Lambda proxies aren't eligible
1351         for nrv or return by move.
1353         PR c++/57532
1354         * parser.c (cp_parser_ref_qualifier_opt): Don't tentatively parse
1355         a ref-qualifier in C++98 mode.
1357         PR c++/57545
1358         * pt.c (convert_nontype_argument) [INTEGER_CST]: Force the
1359         argument to have the exact type of the parameter.
1361         PR c++/57551
1362         * semantics.c (cxx_eval_indirect_ref): Don't try to look through
1363         a POINTER_PLUS_EXPR for type punning diagnostic.
1365         PR c++/57831
1366         * pt.c (tsubst_copy): Handle USING_DECL.
1368 2013-07-09  Marc Glisse  <marc.glisse@inria.fr>
1370         PR c++/53094
1371         * semantics.c (cxx_eval_bit_field_ref): Handle VECTOR_CST.
1373 2013-07-09  Marc Glisse  <marc.glisse@inria.fr>
1375         PR c++/53000
1376         * call.c (build_conditional_expr_1): Preserve xvalues.
1378 2013-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
1380         PR c++/51786
1381         * parser.c (cp_parser_simple_declaration): Before calling shadow_tag
1382         also check declares_class_or_enum.
1384 2013-07-08  Jason Merrill  <jason@redhat.com>
1386         PR c++/57550
1387         * pt.c (fn_type_unification): Only defer during substitution.
1388         (type_unification_real): Defer during defarg substitution,
1389         add checks parm to pass back deferred checks.
1390         (unify, do_auto_deduction): Adjust.
1391         * semantics.c (reopen_deferring_access_checks): New.
1392         * cp-tree.h: Declare it.
1394 2013-07-06  Paolo Carlini  <paolo.carlini@oracle.com>
1396         PR c++/28262
1397         * parser.c (cp_parser_init_declarator): If we are parsing a typedef
1398         set parser->default_arg_ok_p to false before cp_parser_declarator.
1400 2013-07-05  Paolo Carlini  <paolo.carlini@oracle.com>
1402         PR c++/14263
1403         * class.c (build_base_path): Improve diagnostic.
1405 2013-07-04  Paolo Carlini  <paolo.carlini@oracle.com>
1407         PR c++/38634
1408         * decl.c (start_preparsed_function): Return a bool, false if
1409         push_template_decl fails.
1410         (start_function): Adjust.
1411         * cp-tree.h: Update.
1413 2013-07-03  Jakub Jelinek  <jakub@redhat.com>
1415         PR c++/57771
1416         * parser.c (cp_parser_postfix_expression) <case RID_STATCAST>
1417         Temporarily set parser->greater_than_is_operator_p for
1418         cp_parser_expression and restore from saved value afterwards.
1420 2013-06-28  Ed Smith-Rowland  <3dw4rd@verizon.net>
1422         * cp-tree.h (UDLIT_OP_ANSI_PREFIX): Remove space.
1423         * parser.c (cp_parser_operator()): Parse user-defined string
1424         literal as literal operator.
1426 2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>
1428         PR c++/57645
1429         * class.c (deduce_noexcept_on_destructors): Save, set, and restore
1430         TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
1431         destructors.
1433 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1435         * parser.c (cp_parser_array_notation): Removed rejection array notation
1436         of type function pointers. Added handling of array expressions when
1437         Cilk Plus is enabled.  Took out type-checking.
1438         (cp_parser_postfix_open_square_expression): Moved normal array expr.
1439         parsing into cp_parser_array_notation when cilkplus is enabled.
1440         (cp_parser_compound_statement): Removed expansion of array notations.
1441         (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
1442         (cp_parser_function_definition_after_declarator): Likewise.
1443         (cp_parser_selection_statement): Removed error reporting.
1444         (cp_parser_iteration_statement): Likewise.
1445         (cp_parser_direct_declarator): Removed error checking/reporting if
1446         array notations are used in the declarator.
1447         * pt.c (instantiate_decl): Likewise.
1448         (type_unification_real): Removed a check for ARRAY_NOTATION_REF.
1449         (cxx_eval_constant_expression): Removed ARRAY_NOTATION_REF case.
1450         (potential_constant_expression_1): Returned false for
1451         ARRAY_NOTATION_REF case.
1452         * cp-gimplify.c (cp_genericize): Added expansion of array notation
1453         expressions here.
1454         * cp-array-notation.c (make_triplet_val_inv): Removed loc and cry 
1455         parameters.  Replaced build_decls with get_temp_regvar with type as
1456         ptrdiff.
1457         (create_array_refs): Made the type-casting to ptrdiff_type.
1458         (replace_invariant_var): Added a check for void return type before 
1459         creating new var.  Replaced build_decl and build_min_nt_loc with
1460         get_temp_regvar.
1461         (expand_an_in_modify_expr): Ditto.  Replaced body of redundant else 
1462         with gcc_unreachable.  Removed few unwanted checks.  Made induction 
1463         variable type as ptrdiff_type.  Removed loc and complain arguments 
1464         passed into make_triplet_val_inv.  Replaced all modify expression's 
1465         code from NOP EXPR to INIT EXPR.  Replaced all forceful appending 
1466         into stmt. list with the non-forceful one.  Replaced some integer 
1467         conversion and equality-checking to using tree_int_cst_equal.
1468         (expand_sec_reduce_builtin): All changes mentioned in above function
1469         expand_an_in_modify_expr.  Made the new variable type of
1470         SEC_REDUCE_ANY/ALL_{NON}ZERO intrinsic functions as bool.
1471         (expand_array_notation_exprs): Removed SWITCH_EXPR case.  Moved all
1472         the error reporting from parser to this function.  Removed unwanted
1473         statements and checks from SWITCH_STMT, WHILE_STMT, and DO_STMT cases.
1474         (cilkplus_an_triplet_types_ok_p): Removed rejection of array notation
1475         in function pointers.
1476         (cp_expand_cond_array_notations): Added a new if statements to check
1477         if condition has a zero rank.  If so, then just return.
1478         (expand_return_expr): Added a check for return expressions with a rank.
1479         Replaced get_tmp_regvar with a create_temporary_var.
1480         (build_array_notation_ref): Simplified and removed unwanted if-stmts.
1481         Moved common code outside if-statements.  Moved type-checking from
1482         parser to here.
1483         * semantics.c (finish_return_stmt): Removed a check for return exprs.
1484         with a rank.
1485         * call.c (convert_like_real): Removed a check for array notation
1486         expression in a function.
1487         (build_over_call): Likewise.
1488         (magic_varargs_p): Added a check for builtin array notation function.
1489         Made this function non-static and removed its prototype.
1490         * cp-tree.h (magic_varargs_p): New prototype.
1491         * typeck.c (cp_build_function_call_vec): Removed automatic setting of
1492         nargs to the param->length when builtin reduction function is used.
1493         (convert_arguments): Replaced check for a constant_p function with
1494         margic_varargs_p function call.
1495         (cp_build_binary_op): Removed calling of the function
1496         find_correct_array_notation_type.
1497         (cp_build_addr_expr_1): Removed an unwanted if-statement.
1498         (convert_for_assignment): Removed automatic return of rhs when array
1499         notation builtin function is used.
1501 2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>
1503         PR c++/57682
1504         * parser.c (cp_parser_save_member_function_body): Handle correctly
1505         curly braces in function-try-block mem-initializers.
1507 2013-06-27  Marc Glisse  <marc.glisse@inria.fr>
1509         PR c++/57509
1510         * typeck.c (cp_build_vec_perm_expr): New function.
1511         * cp-tree.h: Declare it.
1512         * parser.c (cp_parser_postfix_expression): Call it.
1513         * pt.c (tsubst_copy): Handle VEC_PERM_EXPR.
1514         (tsubst_copy_and_build): Likewise.
1516 2013-06-27  Marc Glisse  <marc.glisse@inria.fr>
1518         PR c++/57172
1519         * pt.c (more_specialized_fn): If both arguments are references,
1520         give priority to an lvalue.
1522 2013-06-26  Jason Merrill  <jason@redhat.com>
1524         * typeck2.c (store_init_value): Diagnose a non-constant
1525         initializer for in-class static.
1527         PR c++/57408
1528         * semantics.c (add_capture): Set type to error_mark_node after
1529         error.
1531 2013-06-25  Ed Smith-Rowland  <3dw4rd@verizon.net>
1533         PR c++/57640
1534         * parser.c (cp_parser_unqualified_id): Add declarator_p to checks
1535         to trigger warning, (cp_literal_operator_id): Remove bogus TODO comment.
1537 2013-06-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1539         * call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x.
1540         * class.c (add_implicitly_declared_members): Likewise.
1541         (check_field_decl): Likewise.
1542         (finalize_literal_type_property): Likewise.
1543         (check_bases_and_members): Likewise.
1544         * decl.c (poplevel): Likewise.
1545         (case_conversion): Likewise.
1546         (check_initializer): Likewise.
1547         (grokfndecl): Likewise.
1548         (check_static_variable_definition): Likewise.
1549         (compute_array_index_type): Likewise.
1550         (grokdeclarator): Likewise.
1551         (build_enumerator): Likewise.
1552         * friend.c (make_friend_class): Likewise.
1553         * lex.c (init_reswords): Likewise.
1554         * method.c (synthesized_method_walk): Likewise.
1555         (implicitly_declare_fn): Likewise.
1556         * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
1557         (cp_parser_constant_expression): Likewise.
1558         (cp_parser_for_init_statement): Likewise.
1559         (cp_parser_block_declaration): Likewise.
1560         (cp_parser_type_name): Likewise.
1561         (cp_parser_enum_specifier): Likewise.
1562         (cp_parser_enumerator_list): Likewise.
1563         (cp_parser_member_declaration): Likewise.
1564         (cp_nth_tokens_can_be_std_attribute_p): Likewise.
1565         (cp_parser_template_declaration_after_export): Likewise.
1566         * pt.c (convert_nontype_argument_function): Likewise.
1567         (convert_nontype_argument): Likewise.
1568         (convert_template_argument): Likewise.
1569         (tsubst_copy_and_build): Likewise.
1570         (build_non_dependent_expr): Likewise.
1571         * semantics.c (non_const_var_error): Likewise.
1572         (potential_constant_expression_1): Likewise.
1573         * tree.c (lvalue_kind): Likewise.
1574         (build_vec_init_expr): Likewise.
1575         (cast_valid_in_integral_constant_expression_p): Likewise.
1576         * typeck.c (build_x_conditional_expr): Likewise.
1577         * typeck2.c (check_narrowing): Likewise.
1579 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1581         * cp-array-notation.c (cp_length_mismatch_in_expr_p): Remove.
1582         (expand_an_in_modify_expr): Changed a function call from the above
1583         removed function to length_mismatch_in_expr_p.
1585 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1587         * call.c (convert_like_real): Added a check if array notation is present
1588         in expression.  If so, then no conversion of arguments is necessary.
1589         (build_over_call): Likewise.
1590         * typeck.c (cp_build_function_call_vec): Likewise.
1591         (convert_for_assignment): Likewise.
1592         (cp_build_array_ref): Reject array notations with a rank greater than 1
1593         as an array's index.
1594         (cp_build_binary_op): If array notations are preent in op, then call
1595         find_correct_array_notation_type.
1596         (cp_build_addr_expr_1): Handle ARRAY_NOTATION_REF similar to ARRAY_REF.
1597         * cp-array-notation.c: New file.
1598         * cp-objcp-common.c (cp_common_init_ts): Marked ARRAY_NOTATION_REF tree
1599         as typed.
1600         * cp-tree.h (fix_array_notation_exprs): New prototype.
1601         * semantics.c (finish_return_stmt): Reject array notations as
1602         return value.
1603         (cxx_eval_constant_expression): Added ARRAY_NOTATION_REF case.
1604         (potential_constant_expression_1): Likewise.
1605         * tree.c (lvalue_kind): Likewise.
1606         * error.c (dump_decl): Likewise.
1607         (dump_expr): Likewise.
1608         * pt.c (ARRAY_NOTATION_REF): Likewise.
1609         (type_unification_real): Do not unify any arguments if array notations
1610         are found in arg.
1611         (instantiate_decl): Added a check for array notaitons inside the
1612         function body.  If so, then expand them.
1613         * parser.c (cp_parser_array_notation): New function.
1614         (cp_parser_postfix_open_square_expression): Added a check for colons
1615         inside square braces.  If found, then handle the array access as an
1616         array notation access.  Also, disable auto-correction from a single
1617         colon to scope when Cilk Plus is enabled.
1618         (cp_parser_compound_statement): Added a check for array notations
1619         inside the statement.  If found, then expand them.
1620         (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
1621         (cp_parser_function_definition_after_declarator): Likewise.
1622         (cp_parser_selection_statement): Searched for array notations inside
1623         condition.  If so, then emit an error.
1624         (cp_parser_iteration_statement): Likewise.
1625         (cp_parser_direct_declarator): Reject array notations inside a
1626         variable or array declaration.
1627         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Added cp/cp-array-notation.o.
1629 2013-06-20  Jason Merrill  <jason@redhat.com>
1631         PR c++/55149
1632         * decl.c (compute_array_index_type): Don't reject VLAs in SFINAE
1633         context if we're in C++14 mode.
1634         * tree.c (array_of_runtime_bound_p): Return true for a dependent
1635         bound that is not potentually constant.
1636         * cp-tree.h (DECL_VLA_CAPTURE_P, REFERENCE_VLA_OK): New.
1637         * pt.c (tsubst) [REFERENCE_TYPE]: Check REFERENCE_VLA_OK.
1638         * semantics.c (build_lambda_object): Don't rvalue a VLA capture.
1639         (build_capture_proxy): Set REFERENCE_VLA_OK.
1640         (vla_capture_type): Make it a proper C++ class.
1641         (add_capture): Set DECL_VLA_CAPTURE_P.  Don't pre-digest the
1642         initializer.
1644         * decl.c (compute_array_index_type): Use size_one_node.
1646         * pt.c (process_partial_specialization): Build a TEMPLATE_DECL for
1647         a partial specialization.
1648         (tsubst_decl): Don't clobber CLASSTYPE_TI_TEMPLATE of a partial
1649         specialization.
1650         (most_specialized_class): Adjust.
1652         * cp-tree.h (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT)
1653         (DECL_TEMPLATE_INSTANTIATIONS, DECL_TEMPLATE_SPECIALIZATIONS): Use
1654         TEMPLATE_DECL_CHECK.
1656 2013-06-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1658         PR c++/57638
1659         * pt.c (unify, [TEMPLATE_PARM_INDEX]): Pass to unify_type_mismatch
1660         TREE_TYPE (arg), not arg itself.
1662 2013-06-18  Paolo Carlini  <paolo.carlini@oracle.com>
1664         PR c++/53211
1665         * pt.c (type_dependent_expression_p): Handle an array of unknown
1666         bound depending on a variadic parameter.
1667         * parser.c (cp_parser_range_for): Revert PR56794 changes.
1669 2013-06-17  Richard Biener  <rguenther@suse.de>
1671         * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h.
1673 2013-06-17  Paolo Carlini  <paolo.carlini@oracle.com>
1675         PR c++/16128
1676         * parser.c (cp_parser_expression_statement): Check whether
1677         cp_parser_expression returns error_mark_node.
1679 2013-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
1681         PR c++/51413
1682         * semantics.c (finish_offsetof): Handle INDIRECT_REF as expr.
1684 2013-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
1686         PR c++/57599
1687         * rtti.c (build_dynamic_cast_1): In case of cast to an unambiguous
1688         accessible base simply forward to build_static_cast.
1690 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
1692         PR c++/38958
1693         * decl.c (poplevel): For the benefit of -Wunused-variable see
1694         through references.
1696 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
1698         * parser.c (cp_parser_nested_name_specifier_opt): Fix typo in comment.
1700 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
1702         PR c++/42021
1703         * parser.c (cp_parser_nested_name_specifier_opt): Avoid emitting
1704         again diagnostic already emitted by cp_parser_lookup_name.
1706 2013-06-11  Jan Hubicka  <jh@suse.cz>
1708         PR c++/57551
1709         * cp/pt.c (mark_decl_instantiated): Do not export explicit
1710         instantiations of anonymous namespace templates.
1712 2013-06-10  Jason Merrill  <jason@redhat.com>
1714         * name-lookup.c (add_decl_to_level): Add decls in an anonymous
1715         namespace to static_decls.
1717 2013-06-07  Sriraman Tallam  <tmsriram@google.com>
1719         PR c++/57548
1720         * call.c (build_over_call):  Check if current_function_decl is
1721         NULL.
1723 2013-06-07  Paolo Carlini  <paolo.carlini@oracle.com>
1725         PR c++/53658
1726         * pt.c (lookup_template_class_1): Consistently use TYPE_MAIN_DECL,
1727         not TYPE_STUB_DECL, to access the _DECL for a _TYPE.
1729 2013-06-06  Jason Merrill  <jason@redhat.com>
1731         PR c++/55520
1732         * semantics.c (add_capture): Diagnose capture of variable-size
1733         type that is not a C++1y array of runtime bound.
1735         * decl.c (grokdeclarator): Keep a decl with error type.
1736         (grokfield, grokbitfield): Likewise.
1737         * pt.c (instantiate_class_template_1): Likewise.
1738         (tsubst_decl): Drop redundant error.
1739         * class.c (walk_subobject_offsets): Handle erroneous fields.
1740         * typeck2.c (process_init_constructor_record): Likewise.
1742 2013-06-05  Paolo Carlini  <paolo.carlini@oracle.com>
1744         PR c++/51908
1745         * parser.c (cp_parser_postfix_expression [RID_*CAST]): Set
1746         parser->in_type_id_in_expr_p before calling cp_parser_type_id.
1748 2013-06-03  Jan Hubicka  <jh@suse.cz>
1750         * decl2.c (maybe_make_one_only): Use forced_by_abi instead of
1751         mark_decl_referenced.
1752         (mark_needed): Likewise.
1754 2013-06-03  Jason Merrill  <jason@redhat.com>
1756         * class.c (mark_type_abi_tags): New.
1757         (check_abi_tags): Use it.
1759 2013-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
1761         PR c++/57419
1762         * decl2.c (mark_used): Add overload taking a tsubst_flags_t too.
1763         * semantics.c (finish_qualified_id_expr): Use it.
1764         * cp-tree.h: Update.
1766 2013-06-01  Jan Hubicka  <jh@suse.cz>
1768         * decl2.c (cp_write_global_declarations): Replace same_body_alias
1769         by symbol.cpp_implicit_alias.
1771 2013-05-30  Jason Merrill  <jason@redhat.com>
1773         PR c++/57404
1774         * cp-lang.c (cp_classify_record): Handle structs without
1775         TYPE_LANG_SPECIFIC.
1777         PR c++/52377
1778         * class.c (common_enclosing_class): New.
1779         * cp-tree.h: Declare it.
1780         * init.c (sort_mem_initializers): Don't splice out a union member
1781         with an NSDMI.
1783 2013-05-29  Jan Hubicka  <jh@suse.cz>
1785         * tree.c (cp_fix_function_decl_p): Update for new symtab flags.
1786         * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise.
1788 2013-05-25  Paolo Carlini  <paolo.carlini@oracle.com>
1790         PR c++/25666
1791         * decl2.c (check_classfn): Check for destructors declared as member
1792         templates.
1794 2013-05-24  Jason Merrill  <jason@redhat.com>
1796         PR c++/56971
1797         * pt.c (any_template_arguments_need_structural_equality_p): A
1798         TEMPLATE_TEMPLATE_PARM can require structural type comparison.
1800 2013-05-24  Paolo Carlini  <paolo.carlini@oracle.com>
1802         PR c++/19618
1803         * class.c (check_bitfield_decl): Warn for bool and enum bitfields
1804         with width exceeding the type.
1806 2013-05-24  Jason Merrill  <jason@redhat.com>
1808         PR c++/57391
1809         * semantics.c (cxx_eval_constant_expression): Handle FMA_EXPR.
1810         (cxx_eval_trinary_expression): Rename from cxx_eval_vec_perm_expr.
1812 2013-05-23  Jason Merrill  <jason@redhat.com>
1814         PR c++/57388
1815         * tree.c (build_ref_qualified_type): Clear
1816         FUNCTION_RVALUE_QUALIFIED for lvalue ref-qualifier.
1818 2013-05-22  Jason Merrill  <jason@redhat.com>
1820         PR c++/56930
1821         * call.c (convert_like_real): Use cp_convert_and_check.
1822         * cvt.c (cp_convert_and_check): Use maybe_constant_value.
1823         * semantics.c (cxx_eval_constant_expression): Handle LTGT_EXPR.
1824         (potential_constant_expression_1): Handle OMP_ATOMIC*.
1826         PR c++/56915
1827         * semantics.c (maybe_add_lambda_conv_op): Give up if the call op
1828         isn't defined.
1830 2013-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
1832         PR c++/57352
1833         * parser.c (cp_parser_conversion_type_id): Set up
1834         parser->type_definition_forbidden_message before calling
1835         cp_parser_type_specifier_seq.
1837 2013-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
1839         PR c++/57211
1840         * method.c (defaultable_fn_check): Avoid do_warn_unused_parameter
1841         warnings about defaulted functions.
1843 2013-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
1845         * call.c (build_conditional_expr_1): Add location_t parameter.
1846         (build_conditional_expr): Likewise.
1847         * typeck.c (rationalize_conditional_expr, cp_build_array_ref,
1848         get_member_function_from_ptrfunc, build_x_conditional_expr,
1849         cp_build_modify_expr): Update.
1850         * init.c (build_new_1): Likewise.
1851         * cp-tree.h: Update declaration.
1853 2013-05-20  Jason Merrill  <jason@redhat.com>
1855         PR c++/57016
1856         * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Only check type2
1857         if there is one.
1859         PR c++/57102
1860         * decl.c (fndecl_declared_return_type): Also look in
1861         DECL_SAVED_FUNCTION_DATA.
1863 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1865         PR c++/12288
1866         * parser.c (cp_parser_parameter_declaration): Check return value
1867         of cp_parser_parse_and_diagnose_invalid_type_name.
1869 2013-05-20  Jason Merrill  <jason@redhat.com>
1871         PR c++/57319
1872         * class.c (vbase_has_user_provided_move_assign): New.
1873         * method.c (synthesized_method_walk): Check it.
1874         * cp-tree.h: Declare it.
1876         PR c++/57325
1877         * tree.c (build_cplus_array_type): Copy layout info if element
1878         type is complete.
1880 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1882         PR c++/23608
1883         * call.c (build_new_op_1): Propagate loc to cp_build_binary_op.
1885 2013-05-20  Jason Merrill  <jason@redhat.com>
1887         PR c++/57317
1888         * decl2.c (determine_visibility): Use PRIMARY_TEMPLATE_P to decide
1889         whether a template has its own args.
1891 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1893         PR c++/57327
1894         * pt.c (unify_no_common_base): Swap arg and parm arguments to inform.
1896 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1898         PR c++/10207
1899         * parser.c (cp_parser_postfix_expression): Use cp_parser_braced_list
1900         instead of cp_parser_initializer_list for compound-literals.
1902 2013-05-20  Marc Glisse  <marc.glisse@inria.fr>
1904         PR c++/57175
1905         * typeck.c (check_return_expr): Reverse the alignment comparison.
1907 2013-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
1909         PR c++/18126
1910         * parser.c (cp_parser_sizeof_operand): As a GNU Extension, parse
1911         correctly sizeof compound-literal; update comments.
1913 2013-05-16  Marc Glisse  <marc.glisse@inria.fr>
1915         * call.c (build_conditional_expr_1): Use cp_build_binary_op
1916         instead of directly calling fold_build2.
1918 2013-05-16  Jason Merrill  <jason@redhat.com>
1920         * Make-lang.in (cc1plus$(exeext)): Use link mutex.
1922         PR c++/57279
1923         * decl.c (grokdeclarator): Allow member function qualifiers in
1924         TYPENAME context in C++11 mode.
1926 2013-05-16  Dodji Seketeli  <dodji@redhat.com>
1928         PR c++/56782 - Regression with empty pack expansions
1929         * pt.c (use_pack_expansion_extra_args_p): When at least a
1930         parameter pack has an empty argument pack, and another parameter
1931         pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
1932         mechanism.
1934 2013-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
1936         * name-lookup.c (pushdecl_maybe_friend_1): Replace pairs of
1937         warning_at and permerror with warning_at/inform and permerror/
1938         inform, respectively.
1940 2013-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
1942         PR c++/31952
1943         * name-lookup.c (pushdecl_maybe_friend_1): Diagnose illegal
1944         redeclarations.
1946 2013-05-14  Jason Merrill  <jason@redhat.com>
1948         PR c++/57243
1949         * parser.c (cp_parser_range_for): Call complete_type.
1951         PR c++/57041
1952         * pt.c (tsubst_copy_and_build): Don't recur into a designator.
1954 2013-05-14  Paolo Carlini  <paolo.carlini@oracle.com>
1956         PR c++/53903
1957         * method.c (defaulted_late_check): Check for compatible exception
1958         specification out of class explicitly defaulted functions too.
1960 2013-05-14  Jason Merrill  <jason@redhat.com>
1962         PR c++/56998
1963         * semantics.c (potential_constant_expression_1): Make sure the
1964         called function is potentially constant.
1965         * call.c (null_ptr_cst_p): Revert earlier change.
1967 2013-05-13  Jason Merrill  <jason@redhat.com>
1969         PR c++/56998
1970         * call.c (null_ptr_cst_p): An expression with side-effects can't
1971         be a C++03 null pointer constant.
1973         PR c++/57041
1974         * decl.c (reshape_init_class): Handle error_mark_node.
1976         PR c++/57254
1977         * typeck.c (merge_types): Propagate ref-qualifier
1978         in METHOD_TYPE case.
1980         PR c++/57253
1981         * decl.c (grokdeclarator): Apply ref-qualifier
1982         in the TYPENAME case.
1984         PR c++/57252
1985         * decl.c (decls_match): Compare ref-qualifiers.
1987 2013-05-10  Jason Merrill  <jason@redhat.com>
1989         PR c++/57196
1990         * pt.c (convert_template_argument): Use dependent_template_arg_p,
1991         not uses_template_parms.
1993         PR c++/57047
1994         * semantics.c (cxx_fold_indirect_ref): Fix thinko.
1996         PR c++/55149
1997         * semantics.c (add_capture): Error rather than abort on copy
1998         capture of VLA.
1999         * typeck.c (maybe_warn_about_returning_address_of_local): Don't
2000         warn about capture proxy.
2002 2013-05-09  Jason Merrill  <jason@redhat.com>
2004         * decl.c (cp_finish_decl): Only check VLA bound in C++1y mode.
2006         PR c++/57222
2007         * pt.c (lookup_template_class_1): Handle getting a template
2008         template parameter as D1.
2010         N3639 C++1y VLA diagnostics
2011         * decl.c (grokdeclarator): Complain about reference, pointer, or
2012         typedef to VLA.
2013         (create_array_type_for_decl): Complain about array of VLA.
2014         * pt.c (tsubst): Likewise.
2015         * rtti.c (get_tinfo_decl): Talk about "array of runtime bound".
2016         * semantics.c (finish_decltype_type): Complain about decltype of VLA.
2017         * typeck.c (cp_build_addr_expr_1): Complain about VLA.
2018         (cxx_sizeof_or_alignof_type): Likewise.
2020         N3639 C++1y VLA support
2021         * decl.c (compute_array_index_type): Allow VLAs in C++1y mode.
2022         (check_array_initializer): Allow VLA init.
2023         (reshape_init_array_1): Adjust.
2024         (cp_finish_decl): Check for invalid VLA length.
2025         * typeck2.c (process_init_constructor_array): Adjust.
2026         (store_init_value): Use build_vec_init for VLAs.
2027         * semantics.c (add_capture): Capture VLA as ptr+len.
2028         (vla_capture_type): New.
2029         (build_capture_proxy): Rebuild the VLA.
2030         * typeck.c (build_simple_component_ref): Split out from...
2031         (build_ptrmemfunc_access_expr): ...here.
2032         * tree.c (array_of_runtime_bound_p): New.
2033         * init.c (throw_bad_array_length): New.
2034         (build_vec_init): Use it.
2035         * parser.c (cp_convert_range_for): When iterating over a VLA,
2036         use it directly rather than bind a reference.
2037         * cp-tree.h: Declare new functions.
2039 2013-05-08  Jason Merrill  <jason@redhat.com>
2041         * except.c (is_admissible_throw_operand_or_catch_parameter): Check
2042         variably_modified_type_p.
2043         (expand_start_catch_block): Mark the typeinfo used here.
2044         * semantics.c (finish_handler_parms): Not here.
2046         * error.c (dump_type_suffix): Try harder on VLA length.
2048         Core 624/N2932
2049         * init.c (throw_bad_array_new_length): New.
2050         (build_new_1): Use it.  Don't warn about braced-init-list.
2051         (build_vec_init): Use it.
2052         * call.c (build_operator_new_call): Use it.
2054         PR c++/57068
2055         * decl.c (grokdeclarator): Warn about ref-qualifiers here.
2056         * parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
2057         * error.c (maybe_warn_cpp0x): s/0x/11/.
2059 2013-05-08  Paolo Carlini  <paolo.carlini@oracle.com>
2061         PR c++/51226
2062         * parser.c (cp_parser_enum_specifier): Handle nested_name_specifier
2063         == error_mark_node.
2065 2013-05-06  Marc Glisse  <marc.glisse@inria.fr>
2067         * typeck.c (cp_build_binary_op): Call save_expr before
2068         build_vector_from_val.
2070 2013-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
2072         PR c++/57183
2073         * decl.c (cp_finish_decl): After do_auto_deduction copy the
2074         qualifers with cp_apply_type_quals_to_decl.
2076 2013-05-05  Paolo Carlini  <paolo.carlini@oracle.com>
2078         * pt.c (convert_nontype_argument): Add missing whitespace in
2079         error message.
2081 2013-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
2083         PR c++/53745
2084         * decl.c (build_enumerator): Improve error message.
2086 2013-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
2088         PR c++/14283
2089         * parser.c (cp_parser_diagnose_invalid_type_name): Improve error
2090         messages for template types and fix column numbers.
2092 2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
2094         PR c++/57132
2095         * pt.c (tsubst_copy_and_build, MODOP_EXPR): Increase / decrease
2096         c_inhibit_evaluation_warnings around build_x_modify_expr call.
2098 2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
2100         PR c++/57092
2101         * semantics.c (finish_decltype_type): Handle instantiated template
2102         non-type arguments.
2104 2013-04-28  Paolo Carlini  <paolo.carlini@oracle.com>
2106         PR c++/56450
2107         * semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
2109 2013-04-26  Jakub Jelinek  <jakub@redhat.com>
2111         * error.c (cp_print_error_function): Adjust file_name_as_prefix
2112         caller.
2114 2013-04-25  Jason Merrill  <jason@redhat.com>
2116         PR c++/56859
2117         * typeck.c (cxx_alignas_expr): Handle value-dependence properly.
2119         PR c++/50261
2120         * init.c (perform_member_init): Call reshape_init.
2122 2013-04-24  Jason Merrill  <jason@redhat.com>
2124         PR c++/53721
2125         * parser.c (cp_parser_postfix_dot_deref_expression): Fix thinko.
2127 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
2129         * typeck.c (cxx_sizeof_or_alignof_type): Change -Wpointer-arith
2130         pedwarn to simply use OPT_Wpointer_arith.
2131         (cp_build_unary_op): Likewise.
2133 2013-04-24  Jason Merrill  <jason@redhat.com>
2135         N3648: init-captures are named.
2136         * semantics.c (add_capture): Don't prepend "__" to init-captures.
2137         (build_capture_proxy): Adjust.
2138         * error.c (dump_simple_decl): Check DECL_NORMAL_CAPTURE_P.
2140         N3648: Allow braced and parenthesized initializers.
2141         * parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer.
2142         * pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE.
2143         * semantics.c (lambda_capture_field_type): Use do_auto_deduction.
2144         (add_capture): Collapse a parenthesized initializer into a single
2145         expression.
2146         * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New.
2148 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
2150         PR c++/56970
2151         * init.c (build_offset_ref): Add tsubst_flags_t parameter.
2152         * semantics.c (finish_qualified_id_expr): Likewise.
2153         (finish_id_expression): Update.
2154         * typeck.c (cp_build_addr_expr_1): Likewise.
2155         * pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
2156         * cp-tree.h: Update declarations.
2158 2013-04-22  Jason Merrill  <jason@redhat.com>
2160         Core 1586
2161         * parser.c (cp_parser_unqualified_id): Handle ~auto.
2162         (cp_parser_pseudo_destructor_name): Likewise.
2163         (cp_parser_postfix_dot_deref_expression): Adjust.
2164         (cp_lexer_nth_token_is_keyword): New.
2165         * semantics.c (finish_pseudo_destructor_expr): Handle ~auto.
2166         * typeck.c (lookup_destructor): Handle ~auto.
2168         * pt.c (fn_type_unification): Push tinst level around
2169         type_unification_real if we aren't explaining.
2170         * cp-tree.h (TFF_NO_TEMPLATE_BINDINGS): New.
2171         * error.c (dump_function_decl): Respect it.
2172         (subst_to_string): Pass it.
2174         PR c++/48665
2175         * rtti.c (get_typeid): Diagnose qualified function type.
2176         * pt.c (tsubst) [POINTER_TYPE]: Likewise.
2178         * error.c (dump_aggr_type): Fix lambda detection.
2179         (dump_simple_decl): Pretty-print capture field.
2181         N3323
2182         * cvt.c (build_expr_type_conversion): Two conversions that return
2183         the same type aren't necessarily ambiguous.
2185         N3648
2186         * parser.c (cp_parser_lambda_introducer): Make lambda capture init
2187         pedwarn unconditional except in C++1y mode.
2189         * semantics.c (potential_constant_expression_1): Don't crash on
2190         'this' in NSDMI.
2192         Core 1612
2193         * semantics.c (finish_id_expression): Reject capture of anonymous
2194         union member.
2196         Core 1609
2197         * decl2.c (check_default_args): Check for pack expansion.
2199         * mangle.c (write_type): Mangle decltype(auto).
2201 2013-04-19  Jason Merrill  <jason@redhat.com>
2203         N3638 changes to return type deduction
2204         * decl.c (undeduced_auto_decl): New.
2205         (require_deduced_type): New.
2206         (fndecl_declared_return_type): New.
2207         (decls_match): Use it.
2208         (duplicate_decls): Don't check for auto return.
2209         (grokdeclarator): Reject virtual auto.
2210         * class.c (resolve_address_of_overloaded_function): Handle
2211         auto function templates.
2212         * decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type.
2213         * cp-tree.h: Declare new fns.
2214         * error.c (dump_function_decl): Use fndecl_declared_return_type.
2215         * search.c (check_final_overrider): Likewise.
2216         * pt.c (make_decltype_auto): New.
2217         (do_auto_deduction): Require plain decltype(auto).
2218         (is_auto): Adjust.
2220         DR 941
2221         * decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
2222         template specializations.
2224 2013-04-16  Ed Smith-Rowland  <3dw4rd@verizon.net>
2226         Implement n3599 - Literal operator templates for strings.
2227         * parser.c (make_string_pack (tree value)): New function.
2228         (cp_parser_userdef_string_literal (cp_token *)): Use it
2229         to construct calls to character string literal operator templates.
2230         (cp_parser_template_declaration_after_export): Check for new string
2231         literal operator template parameter form.
2233 2013-04-15  Jason Merrill  <jason@redhat.com>
2235         * pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build.
2237         PR c++/52748
2238         * pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
2239         rather than a destructor name, it isn't an unqualified-name.
2240         (tsubst_copy_and_build): Pass down decltype_flag to operator
2241         handling code, too.
2243         PR c++/56388
2244         * semantics.c (insert_capture_proxy): Just use index 1 in the
2245         stmt_list_stack.
2247 2013-04-12  Jakub Jelinek  <jakub@redhat.com>
2249         * error.c (cp_print_error_function,
2250         print_instantiation_partial_context_line,
2251         maybe_print_constexpr_context): Colorize locus strings.
2253 2013-04-11  Jason Merrill  <jason@redhat.com>
2255         PR c++/52748
2256         * parser.c (complain_flags): New.
2257         (cp_parser_postfix_expression): Use it.
2258         (cp_parser_unary_expression): Likewise.
2259         (cp_parser_binary_expression): Likewise.
2260         (cp_parser_assignment_expression): Likewise.
2261         (cp_parser_expression): Likewise.
2262         (cp_parser_postfix_open_square_expression): Take decltype_p.
2263         (cp_parser_builtin_offsetof): Adjust.
2264         (cp_convert_range_for): Pass complain to finish_unary_op_expr.
2265         * decl2.c (grok_array_decl): Add decltype_p parm.
2266         * cp-tree.h: Adjust prototype.
2267         * semantics.c (finish_unary_op_expr): Add complain parm.
2269 2013-04-11  Jakub Jelinek  <jakub@redhat.com>
2271         PR c++/56895
2272         * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
2273         calling maybe_constant_value for C++98.
2275 2013-04-11  Jason Merrill  <jason@redhat.com>
2277         PR c++/56901
2278         * semantics.c (lambda_capture_field_type, lambda_proxy_type):
2279         Strip references before checking WILDCARD_TYPE_P.
2281 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
2283         * call.c (build_conditional_expr_1, build_over_call): Protect
2284         error calls with complain & tf_error.
2285         * typeck.c (finish_class_member_access_expr, cp_build_binary_op,
2286         build_x_unary_op, cp_build_unary_op, cp_build_compound_expr,
2287         build_ptrmemfunc): Likewise.
2288         (lookup_destructor): Take tsubst_flags_t parameter, adjust.
2290         * cvt.c (warn_ref_binding): Rename to diagnose_ref_binding.
2291         (convert_to_reference): Adjust.
2293 2013-04-11  Jason Merrill  <jason@redhat.com>
2295         * pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for
2296         local variables, look them up instead.
2297         (tsubst_decl) [VAR_DECL]: Remove handling for anonymous union
2298         proxies and substitution in unevaluated context.
2299         (tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY
2300         before the iterators.
2302         PR c++/23055
2303         * pt.c (uses_deducible_template_parms): New.
2304         (deducible_array_bound, deducible_expression): New.
2305         (deducible_template_args): New.
2306         (unify_one_argument): Call uses_deducible_template_parms.
2308 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
2310         PR c++/56913
2311         * typeck2.c (build_m_component_ref): Protect error calls with
2312         (complain & tf_error).
2314 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
2316         PR c++/54216
2317         * parser.c (cp_parser_enum_specifier): Check for empty
2318         anonymous enums and anonymous scoped enums.
2320 2013-04-10  Jakub Jelinek  <jakub@redhat.com>
2322         PR c++/56895
2323         * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
2324         first before calling maybe_constant_value for warn_for_div_by_zero
2325         or invalid shift count warning purposes.
2327 2013-04-09  Jason Merrill  <jason@redhat.com>
2329         PR c++/25466
2330         * rtti.c (build_typeid): Check the address of the argument
2331         rather than looking for an INDIRECT_REF.
2333 2013-04-04  Jason Merrill  <jason@redhat.com>
2335         PR c++/56838
2336         PR c++/17232
2337         * typeck2.c (abstract_virtuals_error_sfinae): Disable
2338         complete_type again.
2340 2013-04-08  Paolo Carlini  <paolo.carlini@oracle.com>
2342         PR c++/56871
2343         * decl.c (validate_constexpr_redeclaration): Allow an explicit
2344         specialization to be different wrt the constexpr specifier.
2346 2013-04-06  Jason Merrill  <jason@redhat.com>
2348         * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
2349         noreturn attribute.
2351 2013-04-05  Ed Smith-Rowland  <3dw4rd@verizon.net>
2353         * parser.c (cp_parser_ref_qualifier_seq_opt): Move to
2354         cp_parser_ref_qualifier_opt.  Error if more than one ref-qual found.
2356 2013-04-03  Jason Merrill  <jason@redhat.com>
2358         * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
2359         (TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
2360         (FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.
2362         * mangle.c (write_type): When writing a function type with
2363         function-cv-quals, don't add the unqualified type as a
2364         substitution candidate.
2366 2013-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
2368         PR c++/56815
2369         * typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
2370         pedwarn.
2372 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
2374         PR debug/56819
2375         * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
2376         from args to new_args.
2377         (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
2378         r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
2380 2013-04-02  Jason Merrill  <jason@redhat.com>
2382         PR c++/56821
2383         * mangle.c (write_function_type): Mangle ref-qualifier.
2384         (write_nested_name): Likewise.
2385         (canonicalize_for_substitution): Preserve ref-qualifier.
2386         (write_type): Likewise.
2388         PR c++/34949
2389         * decl.c (begin_destructor_body): Clobber the object in a cleanup.
2391 2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>
2393         * friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
2394         * pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
2395         (for_each_template_parm_r): Use TYPE_TI_ARGS.
2397 2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>
2399         * cp-tree.h (TAGGED_TYPE_P): Remove.
2400         (IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
2401         (TYPE_ANONYMOUS_P): Adjust.
2402         * call.c (build_new_op_1): Likewise.
2403         * class.c (find_abi_tags_r): Likewise.
2404         * decl.c (warn_misplaced_attr_for_class_type, start_decl,
2405         type_is_deprecated): Likewise.
2406         * decl2.c (grokfield, min_vis_r): Likewise.
2407         * pt.c (get_template_info): Likewise.
2408         * tree.c (handle_abi_tag_attribute): Likewise.
2410 2013-04-01  Jason Merrill  <jason@redhat.com>
2412         * semantics.c (maybe_constant_value): Check
2413         instantiation_dependent_expression_p.
2414         * pt.c (build_non_dependent_expr): Don't check it here.
2416         PR c++/56772
2417         * init.c (build_new): Don't try to process an array initializer
2418         at template definition time.
2420         PR c++/56793
2421         * typeck.c (finish_class_member_access_expr): Handle enum scope.
2423         PR c++/56794
2424         * parser.c (cp_parser_range_for): Don't try to do auto deduction
2425         in a template if the type of the range is incomplete.
2427         * call.c (add_function_candidate): Take the address of 'this' here.
2428         (build_over_call): And here.
2429         (build_new_method_call_1, build_op_call_1): Not here.
2430         (build_user_type_conversion_1): Or here.
2431         (add_candidates): Adjust.
2433         * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
2434         * class.c (same_signature_p): Use type_memfn_quals.
2435         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
2436         FUNCTION_OR_METHOD_TYPE_CHECK.
2437         * error.c (dump_type_suffix): Add padding before cv-qualifiers.
2438         * pt.c (unify): Use static_fn_type.
2440 2013-04-01  Bronek Kozicki <b.kozicki@gmail.com>
2441             Jason Merrill  <jason@redhat.com>
2443         Implement N2439 (ref-qualifiers for 'this')
2444         * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
2445         (FUNCTION_RVALUE_QUALIFIED): New.
2446         (FUNCTION_OR_METHOD_TYPE_CHECK): New.
2447         (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
2448         (cp_ref_qualifier): New enum.
2449         (cp_declarator): Add ref_qualifier.
2450         * parser.c (cp_parser_ref_qualifier_seq_opt): New.
2451         (cp_parser_direct_declarator): Use it.
2452         (make_call_declarator): Adjust.
2453         (cp_parser_lambda_declarator_opt): Adjust.
2454         * call.c (add_function_candidate): Handle ref-qualifier overload
2455         resolution semantics.
2456         (standard_conversion): Adjust.
2457         * class.c (add_method, same_signature_p): Compare ref-qualifiers.
2458         * decl.c (grokdeclarator): Handle ref-qualifiers.
2459         (grokfndecl): Check for invalid ref-qualifiers.
2460         (static_fn_type, revert_static_member_fn): Adjust.
2461         * decl2.c (build_memfn_type): Handle ref-qualifiers.
2462         (check_classfn): Check them.
2463         (cp_reconstruct_complex_type): Retain them.
2464         * error.c (dump_ref_qualifier): New.
2465         (dump_type_suffix, dump_function_decl): Use it.
2466         (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
2467         * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
2468         (unify): Retain them.
2469         * tree.c (cp_check_qualified_type): New.
2470         (cp_build_qualified_type_real): Keep exception spec and ref-qual.
2471         (build_ref_qualified_type): New.
2472         (strip_typedefs, build_exception_variant): Keep ref-qualifier.
2473         (cp_build_type_attribute_variant): Keep ref-qualifier.
2474         * typeck.c (merge_types): Keep ref-qualifier.
2475         (structural_comptypes): Compare ref-qualifier.
2476         (type_memfn_rqual): New.
2477         (apply_memfn_quals): Take ref-qual argument.
2478         * typeck2.c (build_m_component_ref): Check ref-qualifier.
2480 2013-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
2482         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
2483         (DECL_FUNCTION_TEMPLATE_P): Adjust.
2485         * cxx-pretty-print.c (pp_cxx_nested_name_specifier,
2486         pp_cxx_qualified_id): Use get_containing_scope.
2487         * parser.c (cp_parser_class_head): Likewise.
2488         * pt.c (push_template_decl_real): Likewise.
2490         * decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
2491         * pt.c (unify): Use CP_INTEGRAL_TYPE_P.
2493 2013-03-31  Paolo Carlini  <paolo.carlini@oracle.com>
2495         * decl2.c (collect_candidates_for_java_method_aliases): Use
2496         DECL_CLASS_SCOPE_P.
2497         * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
2498         (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
2499         * decl.c (duplicate_decls): Likewise.
2500         * parser.c (cp_parser_template_declaration_after_export): Likewise,
2501         also DECL_DECLARES_TYPE_P.
2502         * pt.c (instantiate_class_template_1): Likewise.
2503         * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
2504         (lookup_field_r): Likewise.
2505         (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
2506         (lookup_fnfields_slot_nolazy): Likewise.
2507         * semantics.c (finish_member_declaration): Likewise.
2508         * typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
2510 2013-03-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2512         * pt.c (template_parms_to_args): Fix typo in comment.
2514 2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
2516         * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
2518 2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
2520         * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
2521         (build_op_call_1): Likewise.
2522         (build_over_call): Likewise.
2523         (compare_ics): Likewise.
2524         * class.c (build_base_path): Likewise.
2525         (resolve_address_of_overloaded_function): Likewise.
2526         * cp-tree.h: Likewise.
2527         * cvt.c (cp_convert_to_pointer): Likewise.
2528         (convert_to_reference): Likewise.
2529         (ocp_convert): Likewise.
2530         (convert_force): Likewise, tidy.
2531         * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
2532         (pp_cxx_ptr_operator): Likewise.
2533         * decl.c (duplicate_decls): Likewise.
2534         (start_decl): Likewise.
2535         (grok_op_properties): Likewise.
2536         (start_preparsed_function): Likewise.
2537         (store_parm_decls): Likewise.
2538         (finish_function): Likewise.
2539         * decl2.c (delete_sanity): Likewise.
2540         (acceptable_java_type): Likewise.
2541         (grokbitfield): Likewise.
2542         (cp_reconstruct_complex_type): Likewise.
2543         * error.c (dump_type_prefix): Likewise.
2544         (dump_expr): Likewise.
2545         * except.c (push_eh_cleanup): Likewise.
2546         (complete_ptr_ref_or_void_ptr_p): Likewise.
2547         (can_convert_eh): Likewise.
2548         * init.c (build_new_1): Likewise.
2549         (build_delete): Likewise.
2550         (build_vec_delete): Likewise.
2551         * mangle.c (write_type): Likewise.
2552         * parser.c (lookup_literal_operator): Likewise.
2553         * pt.c (convert_nontype_argument_function): Likewise.
2554         (convert_nontype_argument): Likewise.
2555         (tsubst): Likewise.
2556         (unify): Likewise.
2557         (dependent_type_p_r): Likewise.
2558         * rtti.c (build_headof): Likewise.
2559         (build_typeid): Likewise.
2560         (build_dynamic_cast_1): Likewise.
2561         (target_incomplete_p): Likewise.
2562         (typeinfo_in_lib_p): Likewise.
2563         * semantics.c (finish_omp_for): Likewise.
2564         (cxx_eval_call_expression): Likewise.
2565         (maybe_resolve_dummy): Likewise.
2566         * tree.c (build_target_expr): Likewise.
2567         (cp_build_qualified_type_real): Likewise.
2568         * typeck.c (composite_pointer_type_r): Likewise.
2569         (composite_pointer_type): Likewise.
2570         (comp_except_types): Likewise.
2571         (cxx_sizeof_nowarn): Likewise.
2572         (string_conv_p): Likewise.
2573         (cp_build_array_ref): Likewise.
2574         (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
2575         (pointer_diff): Likewise.
2576         (cp_build_addr_expr_1): Likewise.
2577         (cp_build_unary_op): Likewise.
2578         (build_static_cast_1): Likewise.
2579         (cp_build_c_cast): Likewise.
2580         (comp_ptr_ttypes_real): Likewise.
2581         (ptr_reasonably_similar): Likewise.
2582         (comp_ptr_ttypes_const): Likewise.
2583         (casts_away_constness): Likewise.
2584         (check_literal_operator_args): Likewise.
2585         * typeck2.c (build_x_arrow): Likewise.
2586         (add_exception_specifier): Likewise.
2588 2013-03-29  Jason Merrill  <jason@redhat.com>
2590         N3582
2591         * cp-tree.h (AUTO_IS_DECLTYPE): New.
2592         * parser.c (cp_parser_decltype): Handle decltype(auto).
2593         (cp_parser_type_id_1): Allow auto without a late-specified
2594         return in C++1y.
2595         (cp_parser_primary_expression): Use the return value of
2596         finish_parenthesized_expr.
2597         (cp_parser_transaction_expression): Likewise.
2598         * semantics.c (force_paren_expr): New.
2599         (finish_parenthesized_expr): Use it.
2600         * call.c (build_conditional_expr_1): Likewise.
2601         * pt.c (do_auto_deduction): Handle decltype(auto).
2602         (tsubst_copy): Handle PAREN_EXPR.
2603         (tsubst_copy_and_build): Likewise.
2604         * error.c (dump_expr): Handle PAREN_EXPR.
2605         * cxx-pretty-print.c (pp_cxx_expression): Likewise.
2606         * mangle.c (write_expression): Ignore PAREN_EXPR.
2608         * parser.c (cp_parser_decltype_expr): Split out...
2609         (cp_parser_decltype): ...from here.
2611         PR c++/56774
2612         PR c++/35722
2613         * pt.c (unify_pack_expansion): Fix indexing.
2615 2013-03-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2617         * call.c (build_java_interface_fn_ref): Likewise.
2618         (make_temporary_var_for_ref_to_temp): Likewise.
2619         * class.c (check_field_decls): Likewise.
2620         (layout_class_type): Likewise.
2621         (finish_struct_1): Likewise.
2622         (fixed_type_or_null): Likewise.
2623         (get_vtbl_decl_for_binfo): Likewise.
2624         * cp-gimplify.c (omp_var_to_track): Likewise.
2625         (cp_genericize_r): Likewise.
2626         * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
2627         * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
2628         (DECL_DISCRIMINATOR_P): Likewise.
2629         * decl.c (poplevel): Likewise.
2630         (decls_match): Likewise.
2631         (duplicate_decls): Likewise.
2632         (decl_jump_unsafe): Likewise.
2633         (start_decl): Likewise.
2634         (check_for_uninitialized_const_var): Likewise.
2635         (make_rtl_for_nonlocal_decl): Likewise.
2636         (cp_finish_decl): Likewise.
2637         (expand_static_init): Likewise.
2638         (local_variable_p): Likewise.
2639         (maybe_register_incomplete_var): Likewise.
2640         * decl2.c (grokfield): Likewise.
2641         (comdat_linkage): Likewise.
2642         (determine_visibility): Likewise.
2643         (import_export_decl): Likewise.
2644         (prune_vars_needing_no_initialization): Likewise.
2645         (decl_maybe_constant_var_p): Likewise.
2646         * error.c (dump_simple_decl): Likewise.
2647         (dump_template_decl): Likewise.
2648         (cp_printer): Likewise.
2649         * except.c (build_throw): Likewise.
2650         * init.c (build_vtbl_address): Likewise.
2651         (member_init_ok_or_else): Likewise.
2652         (build_aggr_init): Likewise.
2653         (expand_aggr_init_1): Likewise.
2654         (build_offset_ref): Likewise.
2655         (constant_value_1): Likewise.
2656         * mangle.c (write_mangled_name): Likewise.
2657         (write_prefix): Likewise.
2658         * name-lookup.c (supplement_binding_1): Likewise.
2659         (add_decl_to_level): Likewise.
2660         (pushdecl_maybe_friend_1): Likewise.
2661         (check_for_out_of_scope_variable): Likewise.
2662         (validate_nonmember_using_decl): Likewise.
2663         (lookup_name_innermost_nonclass_level_1): Likewise.
2664         (lookup_arg_dependent_1): Likewise.
2665         * parser.c (cp_parser_lambda_introducer): Likewise.
2666         (cp_parser_template_argument): Likewise.
2667         (cp_parser_single_declaration): Likewise.
2668         * pt.c (convert_nontype_argument): Likewise.
2669         (instantiate_class_template_1): Likewise.
2670         (tsubst_decl): Likewise.
2671         (tsubst_expr): Likewise.
2672         (do_decl_instantiation): Likewise.
2673         (do_type_instantiation): Likewise.
2674         (regenerate_decl_from_template): Likewise.
2675         (always_instantiate_p): Likewise.
2676         (instantiate_decl): Likewise.
2677         (type_dependent_expression_p): Likewise.
2678         (build_non_dependent_expr): Likewise.
2679         * repo.c (repo_emit_p): Likewise.
2680         * rtti.c (build_dynamic_cast_1): Likewise.
2681         * search.c (shared_member_p): Likewise.
2682         * semantics.c (outer_var_p): Likewise.
2683         (finish_id_expression): Likewise.
2684         (finish_omp_clauses): Likewise.
2685         (finish_decltype_type): Likewise.
2686         (ensure_literal_type_for_constexpr_object): Likewise.
2687         * tree.c (lvalue_kind): Likewise.
2688         (bot_replace): Likewise.
2689         (cp_tree_equal): Likewise.
2690         (handle_init_priority_attribute): Likewise.
2691         (decl_storage_duration): Likewise.
2692         * typeck.c (cxx_sizeof_expr): Likewise.
2693         (cxx_alignof_expr): Likewise.
2694         (decay_conversion): Likewise.
2695         (build_class_member_access_expr): Likewise.
2696         (cp_build_array_ref): Likewise.
2697         (cxx_mark_addressable): Likewise.
2698         (maybe_warn_about_returning_address_of_local): Likewise.
2699         (check_return_expr): Likewise.
2700         * typeck2.c (cxx_readonly_error): Likewise.
2701         (abstract_virtuals_error_sfinae): Likewise.
2702         (cxx_incomplete_type_diagnostic): Likewise.
2704 2013-03-28  Lawrence Crowl  <crowl@google.com>
2706         * Make-lang.in
2707         (CXX_PARSER_H): Add header dependence.
2708         * cp-tree.h
2709         (extern debug (cp_binding_level &)): New.
2710         (extern debug (cp_binding_level *)): New.
2711         * name-lookup.h
2712         (debug (cp_binding_level &)): New.
2713         (debug (cp_binding_level *)): New.
2714         * parser.c
2715         (debug (cp_parser &)): New.
2716         (debug (cp_parser *)): New.
2717         (debug (cp_token &)): New.
2718         (debug (cp_token *)): New.
2719         (debug (vec<cp_token, va_gc> &)): New.
2720         (debug (vec<cp_token, va_gc> *)): New.
2721         * parser.c: Add header dependence.
2722         (extern debug (cp_parser &)): New.
2723         (extern debug (cp_parser *)): New.
2724         (extern debug (cp_token &)): New.
2725         (extern debug (cp_token *)): New.
2726         (extern debug (vec<cp_token, va_gc> &)): New.
2727         (extern debug (vec<cp_token, va_gc> *)): New.
2729 2013-03-28  Jason Merrill  <jason@redhat.com>
2731         PR c++/17232
2732         PR c++/52748
2733         * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
2734         the type if tf_decltype is set.
2735         * pt.c (fn_type_unification): Add decltype_p parm.
2736         (get_bindings): Adjust.
2737         * cp-tree.h: Adjust.
2738         * class.c (resolve_address_of_overloaded_function): Adjust.
2739         * call.c (add_template_candidate_real, print_z_candidate): Adjust.
2741         PR c++/56679
2742         * parser.c (cp_parser_sizeof_pack): Split out from...
2743         (cp_parser_sizeof_operand): ...here.  Require (id).
2745         PR c++/56701
2746         * semantics.c (finish_this_expr): 'this' is an rvalue.
2747         * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
2749         PR c++/56710
2750         * semantics.c (finish_member_declaration): Don't push closure
2751         members.
2753         * name-lookup.c (pushdecl_maybe_friend_1): Use
2754         nonlambda_method_basetype and current_nonlambda_class_type.
2756         PR c++/56728
2757         * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
2758         conversion from integer to pointer.
2759         (cxx_eval_constant_expression): Likewise.
2760         (cxx_eval_indirect_ref): Use the folded operand if we still think
2761         this might be constant.
2763 2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
2764             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2766         PR c++/56725
2767         * call.c (convert_like_real): Change series of two permerrors
2768         to permerror + inform (and likewise for two errors).
2769         (build_new_method_call_1): Likewise.
2770         * typeck.c (convert_for_initialization): Change additional
2771         warning or error to inform.
2773 2013-03-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2775         * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
2776         (first_aggr_init_expr): Likewise.
2777         (more_aggr_init_expr_args_p): Likewise.
2778         (type_of_this_parm): Likewise.
2779         (class_of_this_parm): Likewise.
2780         * name-lookup.h (get_global_value_if_present): Likewise.
2781         (is_typename_at_global_scope): Likewise.
2783 2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
2785         * call.c (joust): Don't call inform for a permerror returning false.
2786         * parser.c (cp_parser_check_class_key): Likewise.
2787         * pt.c (tsubst_copy_and_build): Likewise.
2789 2013-03-27  Jason Merrill  <jason@redhat.com>
2791         PR c++/56749
2792         * semantics.c (finish_qualified_id_expr): Return early
2793         for enum scope.
2795 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2797         * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
2798         * cvt.c (convert_to_void): Likewise.
2799         * error.c (dump_expr): Likewise.
2800         * mangle.c (write_expression): Likewise.
2801         * parser.c (cp_parser_template_argument): Likewise.
2802         * pt.c (convert_nontype_argument): Likewise.
2803         (tsubst_copy_and_build): Likewise.
2804         * rtti.c (build_typeid): Likewise.
2805         * semantics.c (finish_call_expr): Likewise.
2806         (finish_decltype_type): Likewise.
2807         (build_data_member_initialization): Likewise.
2808         * tree.c (is_dummy_object): Likewise.
2809         * typeck.c (decay_conversion): Likewise.
2810         (build_class_member_access_expr): Likewise.
2811         (cp_build_addr_expr_1): Likewise.
2812         (unary_complex_lvalue): Likewise.
2813         (check_return_expr): Likewise.
2814         * typeck2.c (cxx_readonly_error): Likewise.
2816 2013-03-26  Jason Merrill  <jason@redhat.com>
2818         PR c++/52597
2819         * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn.  Take tree.
2820         * semantics.c (finish_decltype_type): Check it before type_unknown_p.
2821         * cp-tree.h: Adjust prototype.
2823         PR c++/45282
2824         * typeck2.c (build_m_component_ref): Handle prvalue object.
2826 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2828         * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
2829         * decl.c (duplicate_decls): Likewise.
2830         (cp_finish_decl): Likewise.
2831         (check_class_member_definition_namespace): Likewise.
2832         * decl2.c (grokfield): Likewise.
2833         (decl_needed_p): Likewise.
2834         (import_export_decl): Likewise.
2835         (mark_used): Likewise.
2836         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2837         * pt.c (push_access_scope): Likewise.
2838         (instantiate_decl): Likewise.
2839         * ptree.c (cxx_print_decl): Likewise.
2840         * repo.c (repo_emit_p): Likewise.
2841         * semantics.c (note_decl_for_pch): Likewise.
2842         * tree.c (decl_linkage): Likewise.
2844 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
2846         PR c++/55951
2847         * decl.c (check_array_designated_initializer): Handle CONST_DECL
2848         as ce->index.
2850 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
2852         * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
2853         error messages.
2855         * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
2857 2013-03-25  Jason Merrill  <jason@redhat.com>
2859         PR c++/56699
2860         * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
2861         class is derived from the type of the object.
2863         PR c++/52014
2864         * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
2865         unevaluated context.
2867 2013-03-25  Paolo Carlini  <paolo.carlini@oracle.com>
2869         PR c++/56722
2870         * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
2871         DECL_TEMPLATE_INSTANTIATION.
2873 2013-03-22  Jason Merrill  <jason@redhat.com>
2875         PR c++/56684
2876         * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
2877         and CONST_DECL.
2879 2013-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2881         * cp-tree.h (identifier_p): New.
2882         * call.c: Throughout, call identifier_p insstead of direct
2883         comparaison of TREE_CODE against IDENTIFIER_NODE.
2884         * decl.c: Likewisse.
2885         * decl2.c: Likewise.
2886         * init.c: Likewise.
2887         * mangle.c: Likewise.
2888         * name-lookup.c: Likewise.
2889         * parser.c: Likewise.
2890         * pt.c: Likewise.
2891         * search.c: Likewise.
2892         * semantics.c: Likewise.
2893         * tree.c: Likewise.
2894         * typeck.c: Likewise.
2895         * typeck2.c: Likewise.
2897 2013-03-21  Jakub Jelinek  <jakub@redhat.com>
2899         PR middle-end/48087
2900         * pt.c (convert_nontype_argument): Count werrorcount as warnings.
2901         * call.c (build_temp): Likewise.
2902         * method.c (synthesize_method): Likewise.
2903         * typeck.c (convert_for_initialization): Likewise.
2905 2013-03-21  Marc Glisse  <marc.glisse@inria.fr>
2907         * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
2909 2013-03-21  Richard Biener  <rguenther@suse.de>
2911         * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
2912         DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
2914 2013-03-20  Jason Merrill  <jason@redhat.com>
2916         PR c++/56646
2917         * parser.c (cp_parser_late_return_type_opt): Save and restore
2918         current_class_ptr/ref.
2920         PR c++/54532
2921         * expr.c (cplus_expand_constant): Do nothing if the class is
2922         incomplete.
2923         * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
2924         * typeck2.c (store_init_value): Use reduced_constant_expression_p.
2925         * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
2926         (complete_vars): Likewise.
2928         * name-lookup.c (get_anonymous_namespace_name): Never use
2929         get_file_function_name.
2931         * pt.c (retrieve_specialization): Handle null tmpl argument.
2933         PR c++/17232
2934         PR c++/56642
2935         * pt.c (tsubst_decl): Check return value of register_specialization.
2936         * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
2937         change.
2939 2013-03-17  Jason Merrill  <jason@redhat.com>
2941         PR c++/54359
2942         PR c++/56639
2943         * parser.c (cp_parser_direct_declarator): Bail if we see a
2944         qualified-id not at namespace scope.
2946         PR c++/17232
2947         PR c++/56642
2948         * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
2949         change for now.
2951 2013-03-16  Jason Merrill  <jason@redhat.com>
2953         * decl.c (grokdeclarator): Assert that we won't see a pointer to
2954         METHOD_TYPE.
2956         PR c++/54277
2957         * cp-tree.h (WILDCARD_TYPE_P): Split out from...
2958         (MAYBE_CLASS_TYPE_P): ...here.
2959         * semantics.c (lambda_capture_field_type): Only build a
2960         magic decltype for wildcard types.
2961         (lambda_proxy_type): Likewise.
2962         (finish_non_static_data_member): Get the quals from
2963         the object.
2965         PR c++/55931
2966         * parser.c (cp_parser_template_argument): Don't
2967         fold_non_dependent_expr.
2969         * parser.c (cp_parser_lambda_declarator_opt): Use
2970         cp_parser_trailing_type_id.
2972         PR c++/45917
2973         * parser.c (cp_parser_template_id): Don't forget access checks.
2975         PR c++/52374
2976         * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
2978         PR c++/54764
2979         PR c++/55972
2980         * name-lookup.h (tag_scope): Add ts_lambda.
2981         * semantics.c (begin_lambda_type): Use it.
2982         * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
2983         * pt.c (check_default_tmpl_args): Ignore lambdas.
2984         (push_template_decl_real): Handle lambdas.
2985         * tree.c (no_linkage_check): Adjust lambda check.
2987         PR c++/56039
2988         * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
2990         PR c++/54359
2991         * parser.c (cp_parser_direct_declarator): Fix late return
2992         for out-of-class defn of member function.
2994         PR c++/55357
2995         * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
2996         parms to avoid duplicate -Wshadow warnings.
2998         * search.c (lookup_base): Handle NULL_TREE.
3000         PR c++/56481
3001         * semantics.c (potential_constant_expression_1): Use of 'this' in
3002         a non-constexpr function makes the expression not potentially
3003         constant.
3005         N3276
3006         PR c++/52748
3007         * cp-tree.h (tsubst_flags): Add tf_decltype.
3008         * call.c (build_cxx_call): Don't build a temporary if it's set.
3009         (build_over_call): Make sure it's only passed to build_cxx_call.
3010         * parser.c (cp_parser_primary_expression): Add decltype_p parm.
3011         (cp_parser_unary_expression): Likewise.
3012         (cp_parser_cast_expression): Likewise.
3013         (cp_parser_binary_expression): Likewise.
3014         (cp_parser_assignment_expression): Likewise.
3015         (cp_parser_postfix_expression): Likewise.  Pass tf_decltype.
3016         (cp_parser_expression): Add decltype_p.  Force a
3017         temporary for a call on the LHS of a comma.
3018         (cp_parser_decltype): Pass true to decltype_p parms.
3019         * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
3020         (tsubst_copy_and_build): Pass tf_decltype down only for
3021         CALL_EXPR and the RHS of COMPOUND_EXPR.
3022         * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
3024         * cp-tree.h (abstract_class_use): New enum.
3025         * typeck2.c (pending_abstract_type): Add use field.
3026         (abstract_virtuals_error_sfinae): Add overloads taking
3027         abstract_class_use instead of tree.
3028         * typeck.c (build_static_cast_1): Call it.
3029         * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
3030         * pt.c: Adjust calls.
3031         * decl.c (cp_finish_decl): Don't handle functions specially.
3032         (grokdeclarator): Always check return type.
3033         * init.c (build_new_1): Adjust call.
3035         DR 337
3036         PR c++/17232
3037         * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
3038         * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
3040         DR 657
3041         * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
3042         (tsubst_arg_types): Likewise.
3044         DR 1518
3045         PR c++/54835
3046         * call.c (convert_like_real): Check for explicit constructors
3047         even for value-initialization.
3049         PR c++/54946
3050         * pt.c (convert_nontype_argument): Handle invalid pointer.
3052         * parser.c (cp_parser_lambda_expression): Use nreverse.
3054         PR c++/56447
3055         PR c++/55532
3056         * pt.c (instantiate_class_template_1): Instantiate lambda capture
3057         list here.
3058         (tsubst_copy_and_build): Not here.
3060         PR c++/55017
3061         * method.c (walk_field_subobs): Disallow copy of rvalue ref.
3063         PR c++/55240
3064         * parser.c (parsing_nsdmi): New.
3065         * semantics.c (outer_automatic_var_p): Check it.
3066         (finish_id_expression): Likewise.
3067         * cp-tree.h: Declare it.
3069         PR c++/55241
3070         * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
3072         * parser.c (lookup_literal_operator): Correct parm/arg naming
3073         mixup.
3075         PR c++/56238
3076         * pt.c (fold_non_dependent_expr_sfinae): Check
3077         instantiation_dependent_expression_p.
3079         PR c++/56095
3080         * class.c (resolve_address_of_overloaded_function): Accept a
3081         reference to function for target_type.
3082         (instantiate_type): Likewise.
3083         * pt.c (convert_nontype_argument): Pass it to
3084         convert_nontype_argument_function.
3086 2013-03-16  Jakub Jelinek  <jakub@redhat.com>
3088         * tree.c (cp_tree_equal): Fix a pasto.
3090         PR c++/56607
3091         * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
3092         pass op1 through maybe_constant_value first.
3094 2013-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
3096         PR c++/56582
3097         * semantics.c (cxx_eval_array_reference): Check for negative index.
3099 2013-03-14  Jason Merrill  <jason@redhat.com>
3101         PR c++/56614
3102         * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
3104         PR c++/56346
3105         * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
3106         dso_handle parm on targets without __cxa_atexit.
3108 2013-03-11  Jason Merrill  <jason@redhat.com>
3110         PR c++/56567
3111         * typeck.c (check_return_expr): Disallow returning init list here.
3112         * semantics.c (apply_deduced_return_type): Not here.
3114 2013-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
3116         PR c++/51412
3117         * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
3118         * error.c (dump_expr): Likewise.
3120 2013-03-08  Jason Merrill  <jason@redhat.com>
3122         PR c++/51884
3123         * class.c (modify_all_vtables): Mangle the vtable name before
3124         entering dfs_walk.
3126         * semantics.c (lambda_expr_this_capture): In unevaluated context,
3127         just return the nearest 'this'.
3129         PR c++/51494
3130         PR c++/52183
3131         PR c++/56222
3132         * tree.c (maybe_dummy_object): Don't capture 'this'.
3133         * semantics.c (maybe_resolve_dummy): New.
3134         (finish_non_static_data_member): Use it.
3135         (finish_qualified_id_expr): Don't test is_dummy_object.
3136         * cp-tree.h: Declare maybe_resolve_dummy.
3137         * call.c (build_new_method_call_1): Use it.
3139         PR c++/56567
3140         * semantics.c (apply_deduced_return_type): Don't allow returning
3141         std::initializer_list.
3143 2013-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
3145         PR c++/56534
3146         * parser.c (cp_parser_elaborated_type_specifier): Don't call
3147         check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
3148         * decl.c (check_elaborated_type_specifier): Tidy.
3150 2013-03-06  Jakub Jelinek  <jakub@redhat.com>
3152         PR c++/56543
3153         * tree.c (strip_typedefs): Don't copy args if they are NULL.
3155 2013-03-05  Jakub Jelinek  <jakub@redhat.com>
3157         * parser.c (cp_parser_braced_list): For {} initialize
3158         *non_constant_p to false.
3160 2013-03-04  Jason Merrill  <jason@redhat.com>
3162         PR c++/56464
3163         PR c++/54383
3164         * semantics.c (lambda_expr_this_capture): Handle NSDMI
3165         and non-class scopes.
3167 2013-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
3169         * decl.c (grokdeclarator): Remove dead code.
3171 2013-02-28  Jason Merrill  <jason@redhat.com>
3173         PR c++/56481
3174         * semantics.c (potential_constant_expression_1): Use
3175         cxx_eval_outermost_constant_expr rather than maybe_constant_value.
3177         PR c++/56243
3178         * call.c (build_over_call): Avoid virtual lookup in a template.
3180 2013-02-27  Jason Merrill  <jason@redhat.com>
3182         PR c++/56358
3183         PR c++/56323
3184         * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
3185         of the base name for inheriting ctors.
3186         (push_class_level_binding_1): Remove inheriting ctor handling.
3187         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
3188         * class.c (add_implicitly_declared_members): Adjust.
3190 2013-02-26  David Binderman  <dcb314@hotmail.com>
3192         PR c++/55632
3193         * decl.c (grokdeclarator): Tidy publicp assignment.
3195 2013-02-25  Aldy Hernandez  <aldyh@redhat.com>
3197         PR c++/56419
3198         * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
3199         (build_transaction_expr): Same.
3201 2013-02-25  Jason Merrill  <jason@redhat.com>
3203         PR c++/56377
3204         * pt.c (fn_type_unification): Wait to call push_tinst_level until
3205         we know what args we're looking at.
3207         PR c++/56438
3208         * semantics.c (potential_constant_expression_1): In C++98, a cast
3209         to non-integral type can't be a constant expression.
3211 2013-02-24  Jakub Jelinek  <jakub@redhat.com>
3213         PR c++/56403
3214         * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
3215         of CLASS_TYPE_P.
3217 2013-02-22  Jason Merrill  <jason@redhat.com>
3219         PR c++/40405
3220         * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
3221         if we got the wrong number of template parms.
3223         PR c++/56377
3224         * pt.c (fn_type_unification): Use explicit args in template
3225         instantiation context.
3227         PR c++/56359
3228         * call.c (can_convert_arg): Discard access checks.
3230         PR c++/56395
3231         * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
3232         args.
3234 2013-02-20  Paolo Carlini  <paolo.carlini@oracle.com>
3236         PR c++/56373
3237         * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
3238         * cvt.c (ocp_convert): Use the latter.
3239         (cp_convert_to_pointer): Likewise.
3240         * decl.c (check_default_argument): Likewise.
3241         * typeck.c (cp_build_binary_op): Likewise.
3242         * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
3244 2013-02-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
3245             Paolo Carlini  <paolo.carlini@oracle.com>
3247         PR c++/51242
3248         * decl2.c (grokbitfield): Allow scoped enumeration types.
3250 2013-02-15  Jason Merrill  <jason@redhat.com>
3252         PR c++/54276
3253         * semantics.c (finish_id_expression): Also return the identifier
3254         for an outer local static.
3256         PR c++/56343
3257         * class.c (check_bases_and_members): Deduce noexcept after
3258         checking bases.
3260         PR c++/52026
3261         * semantics.c (finish_id_expression): In a template, return
3262         the identifier for a constant variable.
3264 2013-02-14  Jason Merrill  <jason@redhat.com>
3266         PR c++/54922
3267         * semantics.c (build_anon_member_initialization): New.
3268         (build_data_member_initialization): Use it.
3270         PR c++/55003
3271         * decl.c (cp_finish_decl): Force instantiation of an
3272         auto static data member.
3274         PR c++/55220
3275         * pt.c (unify): A pack expansion that is not the last template
3276         argument makes the entire template argument list non-deduced.
3278         PR c++/56323
3279         * name-lookup.c (do_class_using_decl): Handle typedefs with
3280         inheriting constructors.
3281         (push_class_level_binding_1): Allow inheriting from template
3282         template parameter, too.
3283         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
3285         PR c++/55223
3286         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
3287         default argument scope.
3288         * mangle.c (write_name): Likewise.
3290         PR c++/55232
3291         * error.c (find_typenames_r): Don't walk into a pack expansion.
3293 2013-02-13  Jason Merrill  <jason@redhat.com>
3295         PR c++/55670
3296         * parser.c (cp_parser_member_declaration): Check the declarator
3297         form when detecting a function declaration via typedef.
3299         PR c++/55680
3300         * pt.c (maybe_process_partial_specialization): A lambda
3301         isn't what's being specialized.
3303         PR c++/55710
3304         * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
3305         TREE_USED.
3307         PR c++/55879
3308         * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
3310         PR c++/55993
3311         * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
3312         non-zero offsets, too.
3314         PR c++/56155
3315         * decl.c (build_enumerator): Always convert the value to a
3316         fixed underlying type.
3318         PR c++/56135
3319         * pt.c (tsubst_copy_and_build): Don't forget any new
3320         captures that arose from use of dependent names.
3322 2013-02-13  Jakub Jelinek  <jakub@redhat.com>
3324         PR c++/56302
3325         * semantics.c (finish_asm_stmt): If input constraints allow
3326         neither register nor memory, try maybe_constant_value to get
3327         a constant if possible.
3329 2013-02-12  Jason Merrill  <jason@redhat.com>
3331         PR c++/56285
3332         * method.c (add_one_base_init): Handle base constructor
3333         taking rvalue reference parm.
3335         PR c++/56291
3336         * semantics.c (sort_constexpr_mem_initializers): Handle
3337         vptr out of order.
3339 2013-02-09  Jason Merrill  <jason@redhat.com>
3341         PR c++/56268
3342         * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
3343         maybe_instantiate_noexcept.
3345         PR c++/56247
3346         * pt.c (eq_specializations): Set comparing_specializations.
3347         * tree.c (cp_tree_equal): Check it.
3348         * cp-tree.h: Declare it.
3350         * decl.c (decls_match): Check versions later.
3352         PR c++/56238
3353         * pt.c (build_non_dependent_expr): Don't try to fold
3354         instantiation-dependent expressions.
3355         (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
3356         [BIND_EXPR]: Treat as dependent.
3358 2013-02-07  Jakub Jelinek  <jakub@redhat.com>
3360         PR c++/56241
3361         * init.c (build_vec_init): Don't append NULL values into new_vec.
3362         (build_zero_init_1): Don't push anything into v if recursive call
3363         returned NULL_TREE.
3364         (build_value_init_noctor): Don't push anything into v if
3365         build_value_init call returned NULL_TREE.
3367         PR c++/56239
3368         * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
3369         (cp_parser_tokens_start_cast_expression): ... this.  Change parameter
3370         to cp_parser *, call cp_lexer_peek_token first.  For CPP_OPEN_PAREN,
3371         return true only if 2nd token isn't CPP_CLOSE_PAREN.
3372         (cp_parser_cast_expression): Adjust caller.
3374         PR c++/56237
3375         * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
3376         only if DECL_DISCRIMINATOR_SET_P (t) rather than just
3377         DECL_LANG_SPECIFIC (t).
3379 2013-02-07  Jason Merrill  <jason@redhat.com>
3381         PR c++/56235
3382         * method.c (do_build_copy_constructor): Don't bother turning
3383         scalars from lvalues to xvalues.
3384         (do_build_copy_assign): Likewise.
3386 2013-02-06  Jason Merrill  <jason@redhat.com>
3388         * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
3390 2013-02-05  Jason Merrill  <jason@redhat.com>
3392         PR c++/54122
3393         * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
3394         METHOD_TYPE.
3396         PR c++/56177
3397         * decl.c (start_preparsed_function): Update restype if we change
3398         decl1.
3400         PR c++/56208
3401         * pt.c (fn_type_unification): Discard any access checks from
3402         substituting explicit args.
3404 2013-01-31  Jason Merrill  <jason@redhat.com>
3406         PR c++/56162
3407         PR c++/56104
3408         * typeck.c (get_member_function_from_ptrfunc): Fix
3409         ptrmemfunc_vbit_in_delta case.
3411 2013-01-29  Jason Merrill  <jason@redhat.com>
3413         PR libstdc++/54314
3414         * class.c (build_ctor_vtbl_group): Give construction vtables
3415         hidden visibility.
3417 2013-01-25  Jason Merrill  <jason@redhat.com>
3419         PR c++/56095
3420         * pt.c (convert_nontype_argument_function): Handle invalid input.
3421         (convert_nontype_argument): Likewise.
3423         PR c++/56104
3424         * typeck.c (get_member_function_from_ptrfunc): Optimize if the
3425         dynamic type has no virtual functions.
3427 2013-01-22  Paolo Carlini  <paolo.carlini@oracle.com>
3429         PR c++/55944
3430         * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
3431         on TARGET_EXPR nodes.
3433 2013-01-22  Jason Merrill  <jason@redhat.com>
3435         PR c++/56071
3436         * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
3438 2013-01-22  Dodji Seketeli  <dodji@redhat.com>
3440         PR c++/53609
3441         * pt.c (argument_pack_element_is_expansion_p)
3442         (make_argument_pack_select, use_pack_expansion_extra_args_p)
3443         (gen_elem_of_pack_expansion_instantiation): New static functions.
3444         (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
3445         look through the possibly resulting pack expansion as well.
3446         (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
3447         generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
3448         Use gen_elem_of_pack_expansion_instantiation to build the
3449         instantiation piece-wise.  Don't use arg_from_parm_pack_p anymore,
3450         as gen_elem_of_pack_expansion_instantiation and the change in
3451         tsubst above generalize this particular case.
3452         (arg_from_parm_pack_p): Remove this for it's not used by
3453         tsubst_pack_expansion anymore.
3455 2013-01-21  Jason Merrill  <jason@redhat.com>
3457         PR c++/56059
3458         * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
3459         template args count.
3461 2013-01-18  Jason Merrill  <jason@redhat.com>
3463         PR target/54908
3464         * decl2.c (get_local_tls_init_fn): New.
3465         (get_tls_init_fn): Handle flag_extern_tls_init.  Don't bother
3466         with aliases for internal variables.  Don't use weakrefs if
3467         the variable needs destruction.
3468         (generate_tls_wrapper): Mark the wrapper as const if no
3469         initialization is needed.
3470         (handle_tls_init): Don't require aliases.
3472 2013-01-15  Dodji Seketeli  <dodji@redhat.com>
3474         PR c++/55663
3475         * pt.c (coerce_innermost_template_parms): New static function.
3476         (instantiate_alias_template):  Use it here.
3478 2013-01-09  Jason Merrill  <jason@redhat.com>
3480         PR c++/55878
3481         * rtti.c (build_typeid, get_typeid): Add complain parm.
3482         (get_tinfo_decl_dynamic): Likewise.
3483         * cp-tree.h, parser.c, pt.c: Adjust.
3485         PR c++/55893
3486         * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
3487         needs destruction.
3489 2013-01-09  Jakub Jelinek  <jakub@redhat.com>
3491         PR c/48418
3492         * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
3493         call maybe_constant_value for the negative or too big shift
3494         count warnings.
3496 2013-01-09  Paolo Carlini  <paolo.carlini@oracle.com>
3498         PR c++/55801
3499         * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
3500         of the argument is true.
3502 2013-01-08  Joel Brobecker  <brobecker@adacore.com>
3504         * parser.c (cp_parser_initializer_list): Move declaration
3505         of variable non_const to start of lexical block.
3507 2013-01-07  Jason Merrill  <jason@redhat.com>
3509         PR c++/55753
3510         * tree.c (build_aggr_init_expr): Do nothing in a template.
3511         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
3512         a FUNCTION_DECL before tsubsting.
3514 2013-01-04  Dodji Seketeli  <dodji@redhat.com>
3516         PR c++/52343
3517         * pt.c (check_instantiated_arg): Allow type template arguments.
3519 2013-01-04  Jason Merrill  <jason@redhat.com>
3521         PR c++/55877
3522         * decl.c (reset_type_linkage, bt_reset_linkage): New.
3523         (grokdeclarator): Use reset_type_linkage.
3524         * name-lookup.c (binding_table_foreach): Handle null table.
3525         * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
3527 2013-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
3529         PR c++/54526 (again)
3530         * parser.c (cp_parser_template_id): Revert core of previous change
3531         (keep adjusted inform message).
3533 2013-01-03  Jason Merrill  <jason@redhat.com>
3535         PR c++/55419
3536         PR c++/55753
3537         * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
3538         TREE_CONSTANT.
3540         PR c++/55842
3541         * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
3543         PR c++/55856
3544         * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
3546         PR c++/53650
3547         * call.c (type_has_extended_temps): New.
3548         * cp-tree.h: Declare it.
3549         * decl.c (check_initializer): Use build_aggr_init for arrays
3550         if it is false.
3551         * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
3553 2013-01-02  Jason Merrill  <jason@redhat.com>
3555         PR c++/54325
3556         * call.c (build_new_method_call_1): Don't use build_value_init for
3557         user-provided default constructors.
3559         * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
3561         PR c++/55032
3562         PR c++/55245
3563         * tree.c (build_cplus_array_type): Copy layout information
3564         to main variant if necessary.
3566 Copyright (C) 2013 Free Software Foundation, Inc.
3568 Copying and distribution of this file, with or without modification,
3569 are permitted in any medium without royalty provided the copyright
3570 notice and this notice are preserved.