Reverting merge from trunk
[official-gcc.git] / gcc / cp / ChangeLog
blob2729ec31f5d82fd5c62efb11e416aeaffd52b615
1 2013-11-17  Paolo Carlini  <paolo.carlini@oracle.com>
3         PR c++/59123
4         * decl.c (validate_constexpr_redeclaration): Redeclarations of
5         variables can differ in constexpr.
7 2013-11-16  Paolo Carlini  <paolo.carlini@oracle.com>
9         PR c++/29143
10         * semantics.c (finish_call_expr): Ensure that for OVERLOADs too
11         '(&f)(...)' is the same as '(f)(...)', per 13.3.1.1.
13 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
15         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Depend on cp/cp-cilkplus.o.
16         * cp-cilkplus.c: New file.
17         * cp-tree.h (cpp_validate_cilk_plus_loop): Protoize.
18         * parser.c (cp_parser_cilk_simd): New.
19         (cp_debug_parser): Add case for IN_CILK_SIMD_FOR.
20         (cp_parser_jump_statement): Same.
21         (cp_parser_omp_for_cond): Add new argument.
22         Add case for NE_EXPR.
23         (cp_parser_omp_for_loop): Pass new argument to
24         cp_parser_omp_for_cond.
25         Handle CILK_SIMD nodes.
26         Abstract initilization code to..
27         (cp_parser_omp_for_loop_init): ...here.
28         (cp_parser_pragma): Add case for PRAGMA_CILK_SIMD.
29         (cp_parser_cilk_simd_vectorlength): New.
30         (cp_parser_cilk_simd_linear): New.
31         (cp_parser_cilk_simd_clause_name): New.
32         (cp_parser_cilk_simd_all_clauses): New.
33         (cp_parser_cilk_simd): New.
34         * parser.h (IN_CILK_SIMD_FOR): New macro.
35         * pt.c (tsubst_expr): Add case for CILK_SIMD.
36         * typeck2.c (cxx_readonly_error): Pass location argument to
37         readonly_error.
39 2013-11-14  Paolo Carlini  <paolo.carlini@oracle.com>
41         PR c++/57887
42         * parser.c (cp_parser_late_parsing_nsdmi): Call
43         maybe_begin_member_template_processing.
44         * pt.c (maybe_begin_member_template_processing): Handle NSDMIs.
45         (inline_needs_template_parms): Adjust.
47 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
49         * class.c: Include only gimplify.h and gimple.h as needed.
50         * cp-gimplify.c: Likewise.
51         * error.c: Likewise.
52         * init.c: Likewise.
53         * optimize.c: Likewise.
54         * pt.c: Likewise.
55         * semantics.c: Likewise.
56         * tree.c: Likewise.
57         * vtable-class-hierarchy.c: Likewise.
59 2013-11-12  Andrew MacLeod <amacleod@redhat.com>
61         * class.c: Include gimplify.h.
62         * cp-gimplify.c: Likewise.
63         * error.c: Likewise.
64         * init.c: Likewise.
65         * optimize.c: Likewise.
66         * pt.c: Likewise.
67         * semantics.c: Likewise.
68         * tree.c: Likewise.
69         * vtable-class-hierarchy.c: Likewise.
70         * decl2.c: Don't include gimple.h.
71         * except.c: Likewise.
72         * method.c: Include pointer-set.h instead of gimple.h.
74 2013-11-12  Adam Butcher  <adam@jessamine.co.uk>
76         * pt.c (convert_generic_types_to_packs): New function to transform
77         a range of implicitly introduced non-pack template parms to be parameter
78         packs.
79         * cp-tree.h (convert_generic_types_to_packs): Declare.
80         * parser.c (cp_parser_parameter_declaration_list): If a function
81         parameter pack contains generic types, convert them to packs prior to
82         grokdeclarator.
84 2013-11-12  Adam Butcher  <adam@jessamine.co.uk>
86         PR c++/58534
87         PR c++/58536
88         PR c++/58548
89         PR c++/58549
90         PR c++/58637
91         * parser.h (struct cp_parser): New members implicit_template_parms,
92         implicit_template_scope and auto_is_implicit_function_template_parm_p.
93         * parser.c (add_implicit_template_parms): Refactor as ...
94         (synthesize_implicit_template_parm): ... this to append a new template
95         type parm to the current template parameter list (introducing a new list
96         if necessary).  Removed push_deferring_access_checks.
97         (finish_fully_implicit_template): Removed pop_deferring_access_checks.
98         (cp_parser_new): Initialize new cp_parser members.
99         (cp_parser_parameter_declaration_clause): Consider auto as implicit
100         template parm when parsing a parameter declaration (unless parsing an
101         explicit specialization).
102         (cp_parser_parameter_declaration_list): Remove local
103         implicit_template_parms counter and reset cp_parser implicit template
104         state when complete.
105         (cp_parser_lambda_expression): Reset implicit template cp_parser members
106         whilst generating lambda class.
107         (cp_parser_function_definition_after_declarator): Reset implicit
108         template cp_parser members whilst parsing function definition.
109         (make_generic_type_name): Respell '<autoN>' as 'auto:N' which works
110         better with template diagnostics.
111         (cp_parser_simple_type_specifier): Synthesize implicit template parm on
112         parsing 'auto' if auto_is_implicit_function_template_parm_p and provide
113         diagnostics ...
114         * decl.c (grokdeclarator): ... that were previously done here.
116 2013-11-12  Paolo Carlini  <paolo.carlini@oracle.com>
118         PR c++/57734
119         * pt.c (lookup_template_class_1): Handle alias template declarations
120         of enumeration types.
122 2013-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
124         * cvt.c (cp_convert_to_pointer): Call build_ptrmemfunc before
125         maybe_warn_zero_as_null_pointer_constant to avoid duplicate
126         -Wzero-as-null-pointer-constant diagnostics.
128         * typeck.c (build_ptrmemfunc): Use cp_build_c_cast.
130 2013-11-06  Paolo Carlini  <paolo.carlini@oracle.com>
132         PR c++/11006
133         * init.c (build_new_1): Don't call build_java_class_ref on non-class
134         types.
136 2013-11-05  Jason Merrill  <jason@redhat.com>
138         PR c++/58868
139         * decl.c (check_initializer): Don't use build_vec_init for arrays
140         of trivial type.
142 2013-11-05  Paolo Carlini  <paolo.carlini@oracle.com>
144         PR c++/58724
145         * name-lookup.c (handle_namespace_attrs): Use get_attribute_name.
147 2013-11-05  Tobias Burnus  <burnus@net-b.de>
149         * parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
150         cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
151         cp_parser_omp_declare): Handle -fopenmp-simd.
153 2013-11-04  Eric Botcazou  <ebotcazou@adacore.com>
155         * decl2.c (cpp_check): Change type of first parameter and deal with
156         IS_TRIVIAL.
158 2013-11-03  Paolo Carlini  <paolo.carlini@oracle.com>
160         PR c++/38313
161         * parser.c (cp_parser_constructor_declarator_p): Check that the
162         class-name matches current_class_type.
164 2013-11-03  Marek Polacek  <polacek@redhat.com>
166         * decl.c (cp_finish_decl): Move C++1y bounds checking...
167         (compute_array_index_type): ...here.  Add VLA instrumentation.
168         Call stabilize_vla_size.
169         (grokdeclarator): Don't call stabilize_vla_size here.
171 2013-11-02  Paolo Carlini  <paolo.carlini@oracle.com>
173         PR c++/29234
174         PR c++/56037
175         * parser.c (cp_parser_cast_expression): If we aren't looking at
176         a cast-expression don't call cp_parser_type_id.
177         (cp_parser_postfix_expression): Likewise for compound-literal.
178         (cp_parser_tokens_start_cast_expression): Adjust.
180 2013-11-01  Edward Smith-Rowland  <3dw4rd@verizon.net>
182         PR c++/58708
183         * parser.c (make_string_pack): Discover non-const type and size
184         of character and build parm pack with correct type and chars.
186 2013-11-01  Trevor Saunders  <tsaunders@mozilla.com>
188         * semantics.c (build_anon_member_initialization): Convert fields to be
189         a stack_vec.
191 2013-11-01  Marc Glisse  <marc.glisse@inria.fr>
193         PR c++/58834
194         * pt.c (type_dependent_expression_p): Handle null argument.
196 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
198         * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
199         check_dup_generic at the end, unless remove is true.
200         (finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Add break; after
201         remove = true;.
203 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
205         * semantics.c (finish_omp_clauses): Diagnose aligned clause
206         with decl that is not pointer nor array nor reference to those.
208 2013-10-31  Jason Merrill  <jason@redhat.com>
210         * semantics.c (cxx_eval_call_expression): Handle trivial
211         value-initialization.
212         * typeck2.c (store_init_value): Call maybe_constant_init after
213         cxx_constant_value.
215         * decl.c (cxx_maybe_build_cleanup): Always set LOOKUP_NONVIRTUAL.
216         * decl2.c (build_cleanup): Just call cxx_maybe_build_cleanup.
218         PR c++/58162
219         * parser.c (cp_parser_late_parse_one_default_arg): Set
220         TARGET_EXPR_DIRECT_INIT_P.
222         * class.c (type_build_ctor_call): Return early in C++98 mode.
223         (type_build_dtor_call): Likewise.
225 2013-10-31  Paolo Carlini  <paolo.carlini@oracle.com>
227         PR c++/58932
228         Revert:
229         2013-10-18  Paolo Carlini  <paolo.carlini@oracle.com>
231         PR c++/58466
232         * pt.c (most_specialized_class): Bump processing_template_decl for
233         get_class_bindings.
235 2013-10-30  Paolo Carlini  <paolo.carlini@oracle.com>
237         PR c++/58581
238         * call.c (build_over_call): Check return value of mark_used.
240 2013-10-30  Jason Merrill  <jason@redhat.com>
242         * semantics.c (finish_compound_literal): Don't create a static variable
243         inside cp_unevaluated_operand.
245         * init.c (push_base_cleanups): Check ANON_AGGR_TYPE_P.
247 2013-10-30  Tobias Burnus  <burnus@net-b.de>
249         PR other/33426
250         * cp-tree.h (RANGE_FOR_IVDEP): Define.
251         (cp_convert_range_for, finish_while_stmt_cond, finish_do_stmt,
252         finish_for_cond): Take 'bool ivdep' parameter.
253         * cp-array-notation.c (create_an_loop): Update call.
254         * init.c (build_vec_init): Ditto.
255         * pt.c (tsubst_expr): Ditto.
256         * parser.c (cp_parser_iteration_statement, cp_parser_for,
257         cp_parser_range_for, cp_convert_range_for): Update calls.
258         (cp_parser_pragma): Accept GCC ivdep for 'while' and 'do'.
259         * semantics.c (finish_while_stmt_cond, finish_do_stmt,
260         finish_for_cond): Optionally build ivdep annotation.
262 2013-10-30  Jason Merrill  <jason@redhat.com>
264         * decl.c (cp_finish_decl): Never throw for VLA bound == 0.
266 2013-10-29  David Malcolm  <dmalcolm@redhat.com>
268         Patch autogenerated by refactor_symtab.py from
269         https://github.com/davidmalcolm/gcc-refactoring-scripts
270         revision 58bb219cc090b2f4516a9297d868c245495ee622
272         * call.c (mark_versions_used): Update for conversion of symtab types
273         to a true class hierarchy.
274         * decl2.c (cp_write_global_declarations): Likewise.
275         (clear_decl_external): Likewise.
276         (build_java_method_aliases): Likewise.
277         (collect_candidates_for_java_method_aliases): Likewise.
278         (mark_needed): Likewise.
279         (var_finalized_p): Likewise.
280         (maybe_make_one_only): Likewise.
281         (maybe_emit_vtables): Likewise.
282         * lambda.c (maybe_add_lambda_conv_op): Likewise.
283         * method.c (use_thunk): Likewise.
284         * optimize.c (maybe_clone_body): Likewise.
285         * tree.c (cp_fix_function_decl_p): Likewise.
287 2013-10-29  Paolo Carlini  <paolo.carlini@oracle.com>
289         PR c++/58888
290         * decl2.c (grokfield): Handle auto like NSDMI.
292 2013-10-25  Paolo Carlini  <paolo.carlini@oracle.com>
294         PR c++/58878
295         * pt.c (check_template_shadow): Don't skip declarations in inline
296         member templates.
298 2013-10-25  Tobias Burnus  <burnus@net-b.de>
300         PR other/33426
301         * parser.c (cp_parser_iteration_statement,
302         cp_parser_for, cp_parser_c_for, cp_parser_pragma): Handle
303         IVDEP pragma.
305 2013-10-24  Marek Polacek  <polacek@redhat.com>
307         PR c++/58705
308         * typeck2.c (check_narrowing): Don't check narrowing when the scalar
309         initializer is empty.
311 2013-10-23  Jason Merrill  <jason@redhat.com>
313         LWG 2165
314         * method.c (defaulted_late_check): Delete on eh-spec mismatch.
315         (maybe_explain_implicit_delete): Explain it.
317         * error.c (eh_spec_to_string): New.
318         (cp_printer): Use it for %X.
320         In C++11 a trivial [cd]tor might not be callable.
321         * class.c (user_provided_p): A function deleted on its declation
322         in the class is not user-provided.
323         (type_build_ctor_call): Also force a ctor call if we
324         might have a deleted or private trivial ctor.
325         (type_build_dtor_call): New.
326         (deduce_noexcept_on_destructors): Remove obsolete code.
327         * cp-tree.h: Declare type_build_dtor_call.
328         * decl.c (expand_static_init): Make sure trivial dtors are callable.
329         (cxx_maybe_build_cleanup): Likewise.
330         * except.c (build_throw): Likewise.
331         * init.c (build_value_init): Handle trivial but not callable ctors.
332         (perform_target_ctor): Make sure trivial dtor is callable.
333         (perform_member_init): Likewise.
334         (expand_cleanup_for_base): Likewise.
335         (build_vec_delete_1): Likewise.
336         (build_delete): Likewise.
337         (push_base_cleanups): Likewise.
338         (build_new_1): Avoid redundant error.
339         * method.c (synthesized_method_walk): Can't ever exit early in C++11.
340         Always process the subobject destructor.
341         * semantics.c (finish_compound_literal): Make sure trivial dtor is
342         callable.
343         * typeck2.c (split_nonconstant_init): Likewise.
345 2013-10-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
347         Implement C++14 [[deprecated]] modulo [[gnu::deprecated]] bugs.
348         * parser.c (cp_parser_std_attribute): Interpret [[deprecated]]
349         as [[gnu::deprecated]].
351 2013-10-22  Paolo Carlini  <paolo.carlini@oracle.com>
353         PR c++/58816
354         * pt.c (apply_late_template_attributes): Use get_attribute_name,
355         not TREE_PURPOSE.
357 2013-10-18  Paolo Carlini  <paolo.carlini@oracle.com>
359         PR c++/58466
360         * pt.c (most_specialized_class): Bump processing_template_decl for
361         get_class_bindings.
363 2013-10-18  Paolo Carlini  <paolo.carlini@oracle.com>
365         * parser.c (cp_parser_lookup_name): Tidy.
367 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
369         * parser.c: Include omp-low.h.
370         * semantics.c: Likewise.
372 2013-10-17  Paolo Carlini  <paolo.carlini@oracle.com>
374         PR c++/58596
375         * lambda.c (lambda_expr_this_capture): Handle NSDMIs in the
376         cp_unevaluated_operand case.
378 2013-10-16  Jason Merrill  <jason@redhat.com>
380         * pt.c (apply_late_template_attributes): Use
381         attribute_takes_identifier_p.
383         * error.c (dump_exception_spec): Print "noexcept" rather than
384         "noexcept (true)".
386         Core 1591
387         * pt.c (unify_array_domain): Split out from unify.
388         (unify): Use it for list deduction, too.
390         PR c++/57850
391         * decl2.c (dump_tu): Split out from...
392         (cp_write_global_declarations): ...here.  Call it in PCH mode.
394 2013-10-16  Paolo Carlini  <paolo.carlini@oracle.com>
396         * pt.c (tsubst): Fix typo in last commit.
398 2013-10-16  Paulo Matos  <pmatos@broadcom.com>
400         * error.c (code_to_string): Use new wrapper get_tree_code_name.
401         * cxx-pretty-print.c (pp_cxx_assignment_operator): Likewise.
402         * pt.c (tsubst): Likewise.
403         * semantics.c (cxx_eval_constant_expression,
404         potential_constant_expression_1): Likewise.
405         * mangle.c (MANGLE_TRACE_TREE, dump_substitution_candidates,
406         add_substitution, find_substitution): Likewise.
408 2013-10-15  Paolo Carlini  <paolo.carlini@oracle.com>
410         PR c++/58707
411         * parser.c (cp_parser_postfix_open_square_expression): Set
412         parser->greater_than_is_operator_p for the argument.
414 2013-10-11  Paolo Carlini  <paolo.carlini@oracle.com>
416         PR c++/58633
417         * parser.c (cp_parser_commit_to_topmost_tentative_parse): New.
418         (cp_parser_pseudo_destructor_name): Use it.
420 2013-10-11  Paolo Carlini  <paolo.carlini@oracle.com>
422         PR c++/31671
423         * pt.c (convert_nontype_argument): Set expr_type to
424         TREE_TYPE (probe_type).
426 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
428         * decl.c (duplicate_decls): Error out for redeclaration of UDRs.
429         (declare_simd_adjust_this): New function.
430         (grokfndecl): If "omp declare simd" attribute is present,
431         call declare_simd_adjust_this if needed and
432         c_omp_declare_simd_clauses_to_numbers.
433         * cp-array-notation.c (expand_array_notation_exprs): Handle
434         OMP_TASKGROUP.
435         * cp-gimplify.c (cp_gimplify_expr): Handle OMP_SIMD and
436         OMP_DISTRIBUTE.  Handle is_invisiref_parm decls in
437         OMP_CLAUSE_REDUCTION.
438         (cp_genericize_r): Handle OMP_SIMD and OMP_DISTRIBUTE like
439         OMP_FOR.
440         (cxx_omp_privatize_by_reference): Return true for
441         is_invisiref_parm decls.
442         (cxx_omp_finish_clause): Adjust cxx_omp_create_clause_info
443         caller.
444         * pt.c (apply_late_template_attributes): For "omp declare simd"
445         attribute call tsubst_omp_clauses,
446         c_omp_declare_simd_clauses_to_decls, finish_omp_clauses
447         and c_omp_declare_simd_clauses_to_numbers.
448         (instantiate_class_template_1): Call cp_check_omp_declare_reduction
449         for UDRs.
450         (tsubst_decl): Handle UDRs.
451         (tsubst_omp_clauses): Add declare_simd argument, if true don't
452         call finish_omp_clauses.  Handle new OpenMP 4.0 clauses.
453         Handle non-NULL OMP_CLAUSE_REDUCTION_PLACEHOLDER on
454         OMP_CLAUSE_REDUCTION.
455         (tsubst_expr): For UDRs call pushdecl and
456         cp_check_omp_declare_reduction.  Adjust tsubst_omp_clauses
457         callers.  Handle OMP_SIMD, OMP_DISTRIBUTE, OMP_TEAMS,
458         OMP_TARGET_DATA, OMP_TARGET_UPDATE, OMP_TARGET, OMP_TASKGROUP.
459         Adjust finish_omp_atomic caller.
460         (tsubst_omp_udr): New function.
461         (instantiate_decl): For UDRs at block scope, don't call
462         start_preparsed_function/finish_function.  Call tsubst_omp_udr.
463         * semantics.c (cxx_omp_create_clause_info): Add need_dtor argument,
464         use it instead of need_default_ctor || need_copy_ctor.
465         (struct cp_check_omp_declare_reduction_data): New type.
466         (handle_omp_array_sections_1, handle_omp_array_sections,
467         omp_reduction_id, omp_reduction_lookup,
468         cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction_r,
469         cp_check_omp_declare_reduction, clone_omp_udr,
470         find_omp_placeholder_r, finish_omp_reduction_clause): New functions.
471         (finish_omp_clauses): Handle new OpenMP 4.0 clauses and user defined
472         reductions.
473         (finish_omp_for): Add CODE argument, use it instead of hardcoded
474         OMP_FOR.  Adjust c_finish_omp_for caller.
475         (finish_omp_atomic): Add seq_cst argument, adjust
476         c_finish_omp_atomic callers, handle seq_cst and new OpenMP 4.0
477         atomic variants.
478         (finish_omp_cancel, finish_omp_cancellation_point): New functions.
479         * decl2.c (mark_used): Force immediate instantiation of
480         DECL_OMP_DECLARE_REDUCTION_P decls.
481         (is_late_template_attribute): Return true for "omp declare simd"
482         attribute.
483         (cp_omp_mappable_type): New function.
484         (cplus_decl_attributes): Add implicit "omp declare target" attribute
485         if requested.
486         * parser.c (cp_debug_parser): Print
487         parser->colon_doesnt_start_class_def_p.
488         (cp_ensure_no_omp_declare_simd, cp_finalize_omp_declare_simd): New
489         functions.
490         (enum pragma_context): Add pragma_member and pragma_objc_icode.
491         (cp_parser_binary_expression): Handle no_toplevel_fold_p
492         even for binary operations other than comparison.
493         (cp_parser_linkage_specification): Call
494         cp_ensure_no_omp_declare_simd if needed.
495         (cp_parser_namespace_definition): Likewise.
496         (cp_parser_init_declarator): Call cp_finalize_omp_declare_simd.
497         (cp_parser_direct_declarator): Pass declarator to
498         cp_parser_late_return_type_opt.
499         (cp_parser_late_return_type_opt): Add declarator argument,
500         call cp_parser_late_parsing_omp_declare_simd for declare simd.
501         (cp_parser_class_specifier_1): Call cp_ensure_no_omp_declare_simd.
502         Parse UDRs before all other methods.
503         (cp_parser_member_specification_opt): Use pragma_member instead of
504         pragma_external.
505         (cp_parser_member_declaration): Call cp_finalize_omp_declare_simd.
506         (cp_parser_function_definition_from_specifiers_and_declarator,
507         cp_parser_save_member_function_body): Likewise.
508         (cp_parser_late_parsing_for_member): Handle UDRs specially.
509         (cp_parser_next_token_starts_class_definition_p): Don't allow
510         CPP_COLON if colon_doesnt_start_class_def_p flag is true.
511         (cp_parser_objc_interstitial_code): Use pragma_objc_icode
512         instead of pragma_external.
513         (cp_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
514         (cp_parser_omp_var_list_no_open): Parse array sections for
515         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.  Add COLON argument,
516         if non-NULL, allow parsing to end with a colon rather than close
517         paren.
518         (cp_parser_omp_var_list): Adjust cp_parser_omp_var_list_no_open
519         caller.
520         (cp_parser_omp_clause_reduction): Handle user defined reductions.
521         (cp_parser_omp_clause_branch, cp_parser_omp_clause_cancelkind,
522         cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
523         cp_parser_omp_clause_aligned, cp_parser_omp_clause_linear,
524         cp_parser_omp_clause_safelen, cp_parser_omp_clause_simdlen,
525         cp_parser_omp_clause_depend, cp_parser_omp_clause_map,
526         cp_parser_omp_clause_device, cp_parser_omp_clause_dist_schedule,
527         cp_parser_omp_clause_proc_bind, cp_parser_omp_clause_to,
528         cp_parser_omp_clause_from, cp_parser_omp_clause_uniform): New
529         functions.
530         (cp_parser_omp_all_clauses): Add finish_p argument.  Don't call
531         finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
532         (cp_parser_omp_atomic): Parse seq_cst clause, pass
533         true if it is present to finish_omp_atomic.  Handle new OpenMP 4.0
534         atomic forms.
535         (cp_parser_omp_for_loop): Add CODE argument, pass it through
536         to finish_omp_for.  Change last argument to cclauses,
537         and adjust uses to grab parallel clauses from the array of all
538         the split clauses.
539         (cp_omp_split_clauses): New function.
540         (cp_parser_omp_simd): New function.
541         (cp_parser_omp_for): Add p_name, mask and cclauses arguments.
542         Allow the function to be called also when parsing combined constructs,
543         and call c_parser_omp_simd when parsing for simd.
544         (cp_parser_omp_sections_scope): If section-sequence doesn't start with
545         #pragma omp section, require exactly one structured-block instead of
546         sequence of statements.
547         (cp_parser_omp_sections): Add p_name, mask and cclauses arguments.
548         Allow the function to be called also when parsing combined constructs.
549         (cp_parser_omp_parallel): Add p_name, mask and cclauses arguments.
550         Allow the function to be called also when parsing combined
551         constructs.
552         (cp_parser_omp_taskgroup, cp_parser_omp_cancel,
553         cp_parser_omp_cancellation_point, cp_parser_omp_distribute,
554         cp_parser_omp_teams, cp_parser_omp_target_data,
555         cp_parser_omp_target_update, cp_parser_omp_target,
556         cp_parser_omp_declare_simd, cp_parser_late_parsing_omp_declare_simd,
557         cp_parser_omp_declare_target, cp_parser_omp_end_declare_target,
558         cp_parser_omp_declare_reduction_exprs, cp_parser_omp_declare_reduction,
559         cp_parser_omp_declare): New functions.
560         (cp_parser_omp_construct): Add p_name and mask vars.  Handle
561         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
562         PRAGMA_OMP_TEAMS.  Adjust cp_parser_omp_for, cp_parser_omp_parallel
563         and cp_parser_omp_sections callers.
564         (cp_parser_pragma): Handle PRAGMA_OMP_CANCEL,
565         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
566         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
567         PRAGMA_OMP_TEAMS, PRAGMA_OMP_TARGET, PRAGMA_OMP_END_DECLARE_TARGET.
568         Handle pragma_member and pragma_objc_icode like pragma_external.
569         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
570         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
571         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
572         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
573         OMP_CLAUSE_DEPEND.
574         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
575         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
576         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
577         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
578         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
579         * parser.h (struct cp_omp_declare_simd_data): New type.
580         (struct cp_parser): Add colon_doesnt_start_class_def_p and
581         omp_declare_simd fields.
582         * cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
583         * cp-tree.h (struct lang_decl_fn): Add omp_declare_reduction_p
584         bit.
585         (DECL_OMP_DECLARE_REDUCTION_P): Define.
586         (OMP_FOR_GIMPLIFYING_P): Use OMP_LOOP_CHECK macro.
587         (struct saved_scope): Add omp_declare_target_attribute field.
588         (cp_omp_mappable_type, omp_reduction_id,
589         cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction,
590         finish_omp_cancel, finish_omp_cancellation_point): New prototypes.
591         (finish_omp_for): Add CODE argument.
592         (finish_omp_atomic): Add seq_cst argument.
593         (cxx_omp_create_clause_info): Add need_dtor argument.
595 2013-10-09  Marek Polacek  <polacek@redhat.com>
597         PR c++/58635
598         * semantics.c (finish_return_stmt): Return error_mark_node
599         when error_operand_p of the expr is true.
600         (build_transaction_expr): Check for EXPR_P before setting the
601         expr location.
603 2013-10-08  Paolo Carlini  <paolo.carlini@oracle.com>
605         PR c++/58568
606         * lambda.c (begin_lambda_type): Check return value of xref_tag
607         for error_mark_node; tidy.
608         * decl.c (grokdeclarator): Tweak error message.
610 2013-10-08  Paolo Carlini  <paolo.carlini@oracle.com>
612         PR c++/58665
613         Revert:
614         2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>
616         PR c++/58448
617         * pt.c (tsubst): Use error_operand_p on parameter t.
619 2013-10-06  Paolo Carlini  <paolo.carlini@oracle.com>
621         PR c++/58126
622         * class.c (check_bases): Propagate CLASSTYPE_READONLY_FIELDS_NEED_INIT
623         and CLASSTYPE_REF_FIELDS_NEED_INIT from bases to derived.
624         * init.c (diagnose_uninitialized_cst_or_ref_member_1): Extend error
625         messages about uninitialized const and references members to mention
626         the base class.
628 2013-10-06  Paolo Carlini  <paolo.carlini@oracle.com>
630         PR c++/56060
631         * pt.c (type_dependent_expression_p): Handle EXPR_PACK_EXPANSION.
633 2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>
635         PR c++/58560
636         * typeck2.c (build_functional_cast): Use error_operand_p on exp.
638 2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>
640         PR c++/58503
641         * parser.c (cp_parser_perform_range_for_lookup): If eventually
642         either *begin or *end is type-dependent, return NULL_TREE.
643         (do_range_for_auto_deduction): If cp_parser_perform_range_for_lookup
644         returns NULL_TREE, don't actually do_auto_deduction.
646 2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>
648         PR c++/58448
649         * pt.c (tsubst): Use error_operand_p on parameter t.
651 2013-10-04  Marc Glisse  <marc.glisse@inria.fr>
653         PR c++/19476
654         * decl.c (cxx_init_decl_processing): Set operator_new_flag.
656 2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>
658         PR c++/58584
659         * decl2.c (save_template_attributes): Handle error_mark_node as
660         *attr_p argument.
661         (cp_check_const_attributes): Likewise for attributes.
662         * parser.c (cp_parser_std_attribute_spec): When alignas_expr is an
663         error_mark_node call cp_parser_skip_to_end_of_statement.
665 2013-10-03  Easwaran Raman  <eraman@google.com>
667         PR c++/33911
668         * parser.c (cp_parser_init_declarator): Do not drop attributes
669         of template member functions.
671 2013-10-03  Marek Polacek  <polacek@redhat.com>
673         PR c++/58510
674         * init.c (sort_mem_initializers): Splice when giving an error.
676 2013-10-02  Paolo Carlini  <paolo.carlini@oracle.com>
678         PR c++/58535
679         * parser.c (cp_parser_function_specifier_opt): Upon error about
680         virtual templates don't set ds_virtual.
681         (finish_fully_implicit_template): Reject virtual implicit templates.
683 2013-10-02  Paolo Carlini  <paolo.carlini@oracle.com>
685         PR c++/58565
686         * semantics.c (potential_constant_expression_1): Handle LABEL_EXPR.
688 2013-10-01  Paolo Carlini  <paolo.carlini@oracle.com>
690         PR c++/58563
691         * parser.c (cp_parser_lookup_name): Check make_typename_type return
692         value for error_mark_node.
694 2013-09-25  Tom Tromey  <tromey@redhat.com>
696         * Make-lang.in (CXX_TREE_H, CXX_PARSER_H, CXX_PRETTY_PRINT_H):
697         Remove.
699 2013-09-25  Tom Tromey  <tromey@redhat.com>
701         * Make-lang.in (g++spec.o): Remove.
702         (CFLAGS-cp/g++spec.o): New variable.
703         (GXX_OBJS): Reference cp/g++spec.o.
704         (cc1plus-checksum.o, cp/lex.o, cp/cp-array-notation.o)
705         (cp/cp-lang.o, cp/decl.o, cp/decl2.o, cp/cp-objcp-common.o)
706         (cp/typeck2.o, cp/typeck.o, cp/class.o, cp/call.o)
707         (cp/friend.o, cp/init.o, cp/method.o, cp/cvt.o, cp/search.o)
708         (cp/tree.o, cp/ptree.o, cp/rtti.o, cp/except.o, cp/expr.o)
709         (cp/pt.o, cp/error.o, cp/repo.o, cp/semantics.o, cp/dump.o)
710         (cp/optimize.o, cp/mangle.o, cp/parser.o, cp/cp-gimplify.o)
711         (cp/name-lookup.o, cp/cxx-pretty-print.o): Remove.
713 2013-09-25  Tom Tromey  <tromey@redhat.com>
715         * Make-lang.in (g++spec.o): Don't use subshell.
717 2013-09-25  Marek Polacek  <polacek@redhat.com>
719         PR c++/58516
720         * semantics.c (finish_transaction_stmt): Check for EXPR_P before
721         setting the expr location.
723 2013-09-23  Adam Butcher  <adam@jessamine.co.uk>
725         PR c++/58500
726         * type-utils.h (find_type_usage): Only traverse one type level into
727         member function pointers.
729 2013-09-23  Adam Butcher  <adam@jessamine.co.uk>
731         * parser.c (cp_parser_init_declarator): Defer calling
732         finish_fully_implicit_template for forward declarations until after
733         other decl processing is complete.  Cleanup for clarity: Extract 'else'
734         case after 'if' containing unconditional return.
736 2013-09-23  Adam Butcher  <adam@jessamine.co.uk>
738         * parser.c (make_generic_type_name): Spell generic type names '<autoN>'
739         rather than '__GenN'.
741 2013-09-23  Adam Butcher  <adam@jessamine.co.uk>
743         * lambda.c (maybe_add_lambda_conv_op): Don't check for instantiated
744         callop in the case of generic lambdas.
746 2013-09-23  Adam Butcher  <adam@jessamine.co.uk>
748         * parser.c (make_generic_type_name): Use global count rather than
749         parameter and ...
750         (add_implicit_template_parms): ... propagate interface change here.
752 2013-09-20  Paolo Carlini  <paolo.carlini@oracle.com>
754         PR c++/58481
755         * pt.c (tsubst_copy): Use current_nonlambda_class_type to
756         call tsubst_baselink.
758 2013-09-18  Paolo Carlini  <paolo.carlini@oracle.com>
760         PR c++/58457
761         * class.c (instantiate_type): Loosen a bit the gcc_assert.
763 2013-09-18  Marek Polacek  <polacek@redhat.com>
765         PR sanitize/58443
766         * typeck.c (cp_build_binary_op): Properly honor -fsanitize options.
767         Remove unnecessary check.
769 2013-09-18  Marek Polacek  <polacek@redhat.com>
771         PR sanitizer/58411
772         * typeck.c (cp_build_binary_op): Don't sanitize function if it has the
773         no_sanitize_undefined attribute.
775 2013-09-17  Paolo Carlini  <paolo.carlini@oracle.com>
777         PR c++/58435
778         * pt.c (tsubst, [BOUND_TEMPLATE_TEMPLATE_PARM]): Take into account
779         the cp_type_quals (r) too.
781 2013-09-16  Adam Butcher  <adam@jessamine.co.uk>
783         * cp-tree.h (type_uses_auto_or_concept): Declare.
784         (is_auto_or_concept): Declare.
785         * decl.c (grokdeclarator): Allow 'auto' parameters in lambdas with
786         -std=gnu++1y or -std=c++1y or, as a GNU extension, in plain functions.
787         * type-utils.h: New header defining ...
788         (find_type_usage): ... this new function based on pt.c (type_uses_auto)
789         for searching a type tree given a predicate.
790         * pt.c (type_uses_auto): Reimplement via type-utils.h (find_type_usage).
791         (is_auto_or_concept): New function.
792         (type_uses_auto_or_concept): New function.
793         * parser.h (struct cp_parser): Add fully_implicit_function_template_p.
794         * parser.c (cp_parser_new): Initialize
795         fully_implicit_function_template_p.
796         (cp_parser_new): Initialize fully_implicit_function_template_p.
797         (cp_parser_lambda_expression): Copy and restore value of
798         fully_implicit_function_template_p as per other parser fields.
799         (cp_parser_parameter_declaration_list): Count generic
800         parameters and call ...
801         (add_implicit_template_parms): ... this new function to synthesize them
802         with help from type-utils.h (find_type_usage), ...
803         (tree_type_is_auto_or_concept): ... this new static function and ...
804         (make_generic_type_name): ... this new static function.
805         (cp_parser_direct_declarator): Account for implicit template parameters.
806         (cp_parser_lambda_declarator_opt): Finish fully implicit template if
807         necessary by calling ...
808         (finish_fully_implicit_template): ... this new function.
809         (cp_parser_init_declarator): Likewise.
810         (cp_parser_function_definition_after_declarator): Likewise.
811         (cp_parser_member_declaration): Likewise.
812         * Make-lang.in (cp/pt.o): Add dependency on type-utils.h.
813         (cp/parser.o): Likewise.
815 2013-09-16  Adam Butcher  <adam@jessamine.co.uk>
817         * parser.c (cp_parser_lambda_declarator_opt): Accept template parameter
818         list with std=c++1y or std=gnu++1y.
819         (cp_parser_lambda_body): Don't call 'expand_or_defer_fn' for lambda call
820         operator template to avoid adding template result to symbol table.
821         * lambda.c (lambda_function): Return template result if call operator is
822         a template.
823         (maybe_add_lambda_conv_op): Move declarations to point of use.  Refactor
824         operator call building in order to support conversion of a non-capturing
825         lambda template to a function pointer with help from ...
826         (prepare_op_call): ... this new function.
827         * decl2.c (check_member_template): Don't reject lambda call operator
828         template in local [lambda] class.
829         * pt.c (instantiate_class_template_1): Don't instantiate lambda call
830         operator template when instantiating lambda class.
832 2013-09-16  Adam Butcher  <adam@jessamine.co.uk>
834         * pt.c (make_auto_1): Use input_location rather than BUILTINS_LOCATION.
836 2013-09-15  Jason Merrill  <jason@redhat.com>
838         Core DR 904
839         PR c++/41933
840         * parser.c (cp_parser_lambda_introducer): Handle variadic capture.
841         * lambda.c (add_capture): Handle variadic capture.
842         (add_default_capture, lambda_capture_field_type): Likewise.
843         (build_capture_proxy, register_capture_members): Likewise.
844         * pt.c (register_specialization): Allow FIELD_DECL.
845         (retrieve_specialization): Likewise.
846         (find_parameter_packs_r): Handle FIELD_DECL and VAR_DECL.
847         (tsubst_pack_expansion): Handle FIELD_DECL packs.
848         (gen_elem_of_pack_expansion_instantiation): Likewise.
849         (instantiate_class_template_1): Likewise.
850         (tsubst_decl, tsubst_copy): Likewise.
851         (tsubst_expr) [DECL_EXPR]: Handle capture proxy packs.
852         (tsubst_copy_and_build) [VAR_DECL]: Likewise.
853         * semantics.c (finish_non_static_data_member): Don't try to represent
854         the type of a COMPOUND_REF of a FIELD_DECL pack.
856         PR c++/41933
857         * cp-tree.h (DECL_PACK_P): Replace FUNCTION_PARAMETER_PACK_P.
858         * cxx-pretty-print.c (direct_declarator): Adjust.
859         * decl2.c (cp_build_parm_decl): Adjust.
860         * pt.c (function_parameter_pack_p): Adjust.
861         (find_parameter_packs_r, push_template_decl_real): Adjust.
862         (tsubst_pack_expansion, tsubst_decl): Adjust.
863         (regenerate_decl_from_template, instantiate_decl): Adjust.
865         * lambda.c (add_capture): Don't add DECL_LANG_SPECIFIC.
867 2013-09-13  Jason Merrill  <jason@redhat.com>
869         PR c++/58273
870         * pt.c (any_type_dependent_elements_p): Actually check for
871         type-dependence, not value-dependence.
873 2013-09-13  Jacek Caban  <jacek@codeweavers.com>
875         * decl.c: Use new cxx_implicit_extern_c hook
877 2013-09-12  Brooks Moses  <bmoses@google.com>
879         PR driver/42955
880         * Make-lang.in: Do not install driver binaries in $(target)/bin.
882 2013-09-12  Adam Butcher  <adam@jessamine.co.uk>
884         * pt.c (instantiate_decl): Save/restore cp_unevaluated_operand and
885         c_inhibit_evaluation_warnings.  Reset if instantiating within a
886         function-local template.
888 2013-09-12  Paolo Carlini  <paolo.carlini@oracle.com>
890         * semantics.c (finish_pseudo_destructor_expr): Add location_t
891         parameter.
892         * pt.c (unify_arg_conversion): Use EXPR_LOC_OR_HERE.
893         (tsubst_copy_and_build): Adjust finish_pseudo_destructor_expr
894         calls.
895         * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
896         (cp_parser_postfix_expression): Pass the proper location to
897         cp_parser_postfix_dot_deref_expression.
898         * cp-tree.h (finish_pseudo_destructor_expr): Update declaration.
900 2013-09-10  Jan Hubicka  <jh@suse.cz>
901             Paolo Carlini  <paolo.carlini@oracle.com>
903         * error.c (print_instantiation_partial_context_line): If
904         loc == UNKNOWN_LOCATION return immediately.
906 2013-09-09  Jakub Jelinek  <jakub@redhat.com>
908         PR c++/58325
909         * init.c (build_vec_delete): Call mark_rvalue_use on base.
911 2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
913         PR c++/43452
914         * init.c (build_vec_delete_1): When the type is incomplete emit a
915         warning, enabled by default (not an error).
916         (build_delete): Adjust to use OPT_Wdelete_incomplete.
918 2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
920         PR c++/58362
921         * error.c (location_of): Don't handle PARM_DECLs specially.
923 2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
925         * error.c (dump_expr, [PSEUDO_DTOR_EXPR]): Fix.
926         * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
927         Tweak, TREE_OPERAND (t, 1) may be null.
929 2013-09-08  Caroline Tice  <cmtice@google.com>
931         PR c++/58300
932         * vtable-class-hierarchy.c (vtv_generate_init_routine):  In
933         preinit case, move call to assemble_vtv_preinit_initializer to
934         after call to cgraph_process_new_functions.
936 2013-09-08  Tom de Vries  <tom@codesourcery.com>
938         PR c++/58282
939         * except.c (build_must_not_throw_expr): Handle
940         flag_exceptions.
942 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
944         * typeck.c (cp_build_binary_op): Use vector_types_compatible_elements_p.
946 2013-09-04  Paolo Carlini  <paolo.carlini@oracle.com>
948         PR c++/24926
949         * class.c (finish_struct_anon_r): New.
950         (finish_struct_anon): Use it.
952 2013-09-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
954         * cxx-pretty-print.h (cxx_pretty_printer::simple_type_specifier):
955         Declare as overrider.
956         * cxx-pretty-print.c (cxx_pretty_printer::simple_type_specifier):
957         Rename from pp_cxx_simple_type_specifier.
958         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
959         simple_type_specifier.
961 2013-09-03  Paolo Carlini  <paolo.carlini@oracle.com>
963         PR c++/58305
964         * typeck2.c (build_functional_cast): Maybe warn_deprecated_use.
966 2013-09-03  Mike Stump  <mikestump@comcast.net>
968         * Make-lang.in (cp/lambda.o): Add dependencies.
970 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
972         * cxx-pretty-print.h (cxx_pretty_printer::type_id): Declare as
973         overrider.
974         * cxx-pretty-print.c (pp_cxx_storage_class_specifier): Remove.
975         (pp_cxx_userdef_literal): Tidy.
976         (pp_cxx_template_argument_list): Likewise.
977         (pp_cxx_typeid_expression): Likewise.
978         (pp_cxx_offsetof_expression_1): Likewise.
979         (cxx_pretty_printer::postfix_expression): Likewise.
980         (cxx_pretty_printer::unary_expression): Likewise.
981         (cxx_pretty_printer::statement): Likewise.
982         (cxx_pretty_printer::type_id): Rename from pp_cxx_type_id.
983         (c_pretty_printer::cxx_pretty_printer): Do not assign to type_id.
984         * error.c (dump_decl): Tidy.
985         (dump_expr): Likewise.
987 2013-09-02  Paolo Carlini  <paolo.carlini@oracle.com>
989         PR c++/21682, implement DR 565
990         * name-lookup.c (compparms_for_decl_and_using_decl): New.
991         (push_overloaded_decl_1, do_nonmember_using_decl): Use it.
993 2013-08-30  Marek Polacek  <polacek@redhat.com>
995         * typeck.c (cp_build_binary_op): Add division by zero and shift
996         instrumentation.
997         * error.c (dump_expr): Special-case ubsan builtins.
999 2013-08-30  Paolo Carlini  <paolo.carlini@oracle.com>
1001         PR c++/51424
1002         * cp-tree.h (LOOKUP_DELEGATING_CONS): Add.
1003         * init.c (perform_target_ctor): Use it.
1004         * call.c (build_special_member_call): Diagnose self-delegating
1005         constructors.
1007 2013-08-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1009         * cxx-pretty-print.h (cxx_pretty_printer::declaration): Declare as
1010         overrider.
1011         (cxx_pretty_printer::declaration_specifiers): Likewise.
1012         (cxx_pretty_printer::function_specifier): Likewise.
1013         (cxx_pretty_printer::declarator): Likewise.
1014         (cxx_pretty_printer::direct_declarator): Likewise.
1015         (cxx_pretty_printer::abstract_declarator): Likewise.
1016         (cxx_pretty_printer::direct_abstract_declarator): Likewise.
1017         (pp_cxx_declaration): Remove.
1018         * cxx-pretty-print.c (cxx_pretty_printer::function_specifier):
1019         Rename from pp_cxx_function_specifier.  Adjust.
1020         (cxx_pretty_printer::declaration_specifiers): Rename from
1021         pp_cxx_decl_specifier_seq.  Adjust.
1022         (cxx_pretty_printer::direct_declarator): Rename from
1023         pp_cxx_direct_declarator.  Adjust.
1024         (cxx_pretty_printer::declarator): Rename from pp_cxx_declarator.
1025         Adjust.
1026         (cxx_pretty_printer::abstract_declarator): Rename from
1027         pp_cxx_abstract_declarator.  Adjust.
1028         (cxx_pretty_printer::direct_abstract_declarator): Rename from
1029         pp_cxx_direct_abstract_declarator.  Adjust.
1030         (cxx_pretty_printer::declaration): Rename from
1031         pp_cxx_declaration.  Adjust.
1032         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1033         declaration, declaration_specifiers, function_specifier,
1034         declarator, direct_declarator, abstract_declarator,
1035         direct_abstract_declarator.
1036         * error.c (dump_decl): Adjust.
1038 2013-08-29  Jan Hubicka  <jh@suse.cz>
1040         Correct previous patch to not mark terminate as LEAF.
1041         * class.c (build_vtbl_initializer): Drop LEAF
1042         * decl.c (cxx_init_decl_processing): Likewise.
1043         (push_throw_library_fn): Likewise.
1044         * except.c (init_exception_processing): Likewise.
1045         (do_begin_catch): Likewise.
1046         (do_end_catch): Likewise.
1047         (do_allocate_exception): Likewise.
1049 2013-08-29  Jan Hubicka  <jh@suse.cz>
1051         * class.c (build_vtbl_initializer): Make __cxa_deleted_virtual
1052         ECF_NORETURN | ECF_LEAF
1053         * cp-tree.h (build_library_fn_ptr, build_cp_library_fn_ptr,
1054         push_library_fn, push_void_library_fn): Update prototype.
1055         * decl.c (build_library_fn_1): Remove.
1056         (push_cp_library_fn, build_cp_library_fn): Update to take ECF flags.
1057         (cxx_init_decl_processing): Update; global_delete_fndecl is ECF_NOTROW;
1058         __cxa_pure_virtual is ECF_NORETURN | ECF_NORETURN | ECF_LEAF.
1059         (build_library_fn_1): Add ecf_flags argument; rename to ...
1060         (build_library_fn): ... this one.
1061         (build_cp_library_fn): Take ecf_flags; do not copy NOTHROW flag.
1062         (build_library_fn_ptr): Take ecf_flags.
1063         (build_cp_library_fn_ptr): Likewise.
1064         (push_library_fn): Likewise.
1065         (push_cp_library_fn): Likewise.
1066         (push_void_library_fn): Likewise.
1067         (push_throw_library_fn): All throws are ECF_NORETURN.
1068         (__cxa_atexit, __cxa_thread_atexit): Add ECF_LEAF | ECF_NOTHROW attributes.
1069         (expand_static_init): __cxa_guard_acquire, __cxa_guard_release,
1070         __cxa_guard_abort are ECF_NOTHROW | ECF_LEAF.
1071         * except.c (init_exception_processing): terminate is
1072         ECF_NOTHROW | ECF_NORETURN | ECF_LEAF.
1073         (declare_nothrow_library_fn): Add ecf_flags parameter.
1074         (__cxa_get_exception_ptr): Is ECF_NOTHROW | ECF_PURE | ECF_LEAF |
1075         ECF_TM_PURE.
1076         (do_begin_catch): cxa_begin_catch and _ITM_cxa_begin_catch
1077         are ECF_NOTHROW | ECF_LEAF.
1078         (do_end_catch): __cxa_end_catch and _ITM_cxa_end_catch is
1079         ECF_LEAF.
1080         (do_allocate_exception): _cxa_allocate_exception
1081         and _ITM_cxa_allocate_exception are ECF_NOTHROW | ECF_MALLOC
1082         | ECF_LEAF
1083         (do_free_exception): __cxa_free_exception is
1084         ECF_NOTHROW | ECF_LEAF.
1085         * rtti.c (build_dynamic_cast_1): __dynamic_cast
1086         is ECF_LEAF | ECF_PURE | ECF_NOTHROW.
1088 2013-08-29  Adam Butcher  <adam@jessamine.co.uk>
1090         * error.c (dump_lambda_function): New function, dependent on ...
1091         (dump_substitution): ... this new function, factored out of ...
1092         (subst_to_string): ... here and ...
1093         (dump_function_decl): ... here.  Updated to early-out with call to
1094         dump_lambda_function after determining template bindings.
1096 2013-08-28  Paolo Carlini  <paolo.carlini@oracle.com>
1098         PR c++/58255
1099         * init.c (build_aggr_init): When init == void_type_node do not
1100         set LOOKUP_ONLYCONVERTING.
1102 2013-08-27  Caroline Tice  <cmtice@google.com>
1104         * vtable-class-hierarchy.c: Remove unnecessary include statements.
1105         (MAX_SET_SIZE): Remove unnecessary constant.
1106         (register_construction_vtables):  Make vtable_ptr_array parameter
1107         into a vector; remove num_args parameter. Change array accesses to
1108         vector accesses.
1109         (register_other_binfo_vtables): Ditto.
1110         (insert_call_to_register_set): Ditto.
1111         (insert_call_to_register_pair): Ditto.
1112         (output_set_info):  Ditto.  Also change warning calls to warning_at
1113         calls, and fix format of warning messages.
1114         (register_all_pairs): Change vtbl_ptr_array from an array into a
1115         vector.  Remove num_vtable_args (replace with calls to vector length).
1116         Change array stores & accesses to vector functions. Change calls to
1117         register_construction_vtables, register_other_binfo_vtables,
1118         insert_call_to_register_set, insert_call_to_register_pair and
1119         output_set_info to match their new signatures.  Change warning to
1120         warning_at and fix the format of the warning message.
1122 2013-08-27  Jakub Jelinek  <jakub@redhat.com>
1123             Aldy Hernandez  <aldyh@redhat.com>
1125         * cp-tree.h (CP_OMP_CLAUSE_INFO): Adjust range for new clauses.
1127 2013-08-27  Paolo Carlini  <paolo.carlini@oracle.com>
1129         * decl.c (grokfndecl): Remove old bison hack.
1131 2013-08-26  Jan Hubicka  <jh@suse.cz>
1133         * cp-tree.h (DECL_CONSTRUCTOR_P, DECL_DESTRUCTOR_P): Use
1134         middle-end flag.
1136 2013-08-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1138         * cxx-pretty-print.h (cxx_pretty_printer::unary_expression):
1139         Declare as overrider.
1140         (cxx_pretty_printer::multiplicative_expression): Likewise.
1141         (cxx_pretty_printer::conditional_expression): Likewise.
1142         (cxx_pretty_printer::assignment_expression): Likewise.
1143         (cxx_pretty_printer::expression): Likewise.
1144         * cxx-pretty-print.c (cxx_pretty_printer::unary_expression):
1145         Rename from pp_cxx_unary_expression.  Adjust.
1146         (cxx_pretty_printer::multiplicative_expression): Rename from
1147         pp_cxx_multiplicative_expression.  Adjust.
1148         (cxx_pretty_printer::conditional_expression): Rename from
1149         pp_cxx_conditional_expression.  Adjust.
1150         (cxx_pretty_printer::assignment_expression): Rename from
1151         pp_cxx_assignment_expression.  Adjust.
1152         (cxx_pretty_printer::expression): Rename from pp_cxx_expression.
1153         Adjust.
1154         (cxx_pretty_printer::cxx_pretty_printer): Dot not assign to
1155         unary_expression, multiplicative_expression,
1156         conditional_expression, assignment_expression, expression.
1158 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1160         * cxx-pretty-print.h (cxx_pretty_printer::postfix_expression):
1161         Declare as overrider.
1162         * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
1163         Rename from pp_cxx_postfix_expression.  Adjust.
1164         (pp_cxx_expression): Use pp_postfix_expression.
1165         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1166         postfix_expression.
1168 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1170         * cxx-pretty-print.h (cxx_pretty_printer::primary_expression): Now
1171         an overrider of c_pretty_printer::primary_expression.
1172         * cxx-pretty-print.c (cxx_pretty_printer::primary_expression):
1173         Rename from pp_cxx_primary_expression.  Adjust.
1174         (pp_cxx_postfix_expression): Use pp_primary_expression.
1175         (pp_cxx_ctor_initializer): Likewise.
1176         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1177         primary_expression.
1179 2013-08-23  Jan Hubicka  <jh@suse.cz>
1181         * cp-tree.h (struct lang_type_class): Free is_final bit.
1182         (CLASSTYPE_FINAL): Define using TYPE_FINAL_P.
1183         (DECL_FINAL_P): Remove.
1184         * pt.c (instantiate_class_template_1): Guard that CLASSTYPE_FINAL
1185         is called on CLASS_TYPE_P.
1187 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1189         * cxx-pretty-print.c (M_): Remove.
1190         (pp_cxx_unqualified_id): Use translate_string instead of M_.
1191         (pp_cxx_canonical_template_parameter): Likewise.
1193 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1195         * cxx-pretty-print.h (cxx_pretty_printer::id_expression): Declare.
1196         * cxx-pretty-print.c (cxx_pretty_printer::id_expression): Rename
1197         from pp_cxx_id_expression.  Adjust.
1198         (pp_cxx_userdef_literal): Use pp_id_expression.
1199         (pp_cxx_primary_expression): Likewise.
1200         (pp_cxx_direct_declarator): Likewise.
1201         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
1202         id_expression.
1204 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1206         * cxx-pretty-print.h (cxx_pretty_printer::constant): Now a member
1207         function, overriding c_pretty_printer::constant.
1208         * cxx-pretty-print.c (cxx_pretty_printer::constant): Rename from
1209         pp_cxx_constant.  Adjust.
1210         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to constant.
1212 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutiobs.net>
1214         * cp-objcp-common.c (cxx_initialize_diagnostics): Call a
1215         destructor for the early printer.
1216         * error.c (type_to_string): Use pp_buffer.
1218 2013-08-22  Paolo Carlini  <paolo.carlini@oracle.com>
1220         PR c++/56380
1221         * class.c (check_field_decls): Check for const mutable and const
1222         reference data members.
1224 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1226         * error.c (init_error): Remove calls to pp_construct and
1227         pp_cxx_pretty_printer_init.  Initialize cxx_pp with placement-new.
1228         * cxx-pretty-print.h (cxx_pretty_printer::cxx_pretty_printer): Declare.
1229         (cxx_pretty_printer_init): Remove.
1230         * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer):
1231         Rename from cxx_pretty_printer_init.  Adjust.
1232         * cp-objcp-common.c (cxx_initialize_diagnostics): Simplify
1233         initialization of C++ diagnostics pretty printer.
1235 2013-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
1237         * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
1238         * cp-tree.h (REFERENCE_REF_P): Likewise.
1239         * semantics.c (finish_offsetof): Likewise.
1241 2013-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
1243         PR c++/56130
1244         * semantics.c (finish_id_expression): Handle deprecated references.
1246 2013-08-20  Jason Merrill  <jason@redhat.com>
1248         PR c++/58119
1249         * cvt.c (build_expr_type_conversion): Don't complain about a
1250         template that can't match the desired type category.
1252 2013-08-20  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1254         * error.c (pp_ggc_formatted_text): New.
1255         (type_as_string): Use it in lieu of pp_formatted_text.
1256         (type_as_string_translate): Likewise.
1257         (expr_as_string): Likewise.
1258         (decl_as_string): Likewise.
1259         (decl_as_string_translate): Likewise.
1260         (lang_decl_name): Likewise.
1261         (decl_to_string): Likewise.
1262         (expr_to_string): Likewise.
1263         (fndecl_to_string): Likewise.
1264         (parm_to_string): Likewise.
1265         (type_to_string): Likewise.
1266         (args_to_string): Likewise.
1267         (subst_to_string): Likewise.
1269 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1271         PR c/57490
1272         * cp-array-notation.c (cp_expand_cond_array_notations): Added a
1273         check for truth values.
1274         (expand_array_notation_exprs): Added truth values case.  Removed an
1275         unwanted else.  Added for-loop to walk through subtrees in default
1276         case.
1277         * call.c (build_cxx_call): Inherited the type of the array notation for
1278         certain built-in array notation functions.
1280 2013-08-19  Paolo Carlini  <paolo.carlini@oracle.com>
1282         * parser.c (cp_parser_lambda_introducer, cp_parser_decltype_expr):
1283         Use cp_parser_lookup_name_simple.
1285 2013-08-19  Paolo Carlini  <paolo.carlini@oracle.com>
1287         * name-lookup.h (pop_bindings_and_leave_scope): Declare.
1288         * name-lookup.c (pop_bindings_and_leave_scope): Define.
1289         * parser.c (cp_parser_lambda_declarator_opt,
1290         cp_parser_direct_declarator, cp_parser_cache_defarg): Use it.
1292 2013-08-17  Jason Merrill  <jason@redhat.com>
1294         PR c++/58083
1295         * name-lookup.c (push_class_level_binding_1): It's OK to push a
1296         lambda type after the enclosing type is complete.
1298 2013-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1300         * error.c (dump_scope): Add a cxx_pretty_printer parameter.
1301         Adjust callers.
1302         (dump_template_argument): Likewise.
1303         (dump_template_argument_list): Likewise.
1304         (dump_template_parameter): Likewise.
1305         (dump_template_bindings): Likewise.
1306         (dump_alias_template_specialization): Likewise.
1307         (dump_type): Likewise.
1308         (dump_typename): Likewise.
1309         (dump_aggr_type): Likewise.
1310         (dump_type_prefix): Likewise.
1311         (dump_type_suffix): Likewise.
1312         (dump_global_iord): Likewise.
1313         (dump_simple_decl): Likewise.
1314         (dump_decl): Likewise.
1315         (dump_template_decl): Likewise.
1316         (dump_function_decl): Likewise.
1317         (dump_parameters): Likewise.
1318         (dump_ref_qualifier): Likewise.
1319         (dump_exception_spec): Likewise.
1320         (dump_function_name): Likewise.
1321         (dump_template_parms): Likewise.
1322         (dump_call_expr_args): Likewise.
1323         (dump_aggr_init_expr_args): Likewise.
1324         (dump_expr_list): Likewise.
1325         (dump_expr_init_vec): Likewise.
1326         (dump_expr): Likewise.
1327         (dump_binary_op): Likewise.
1328         (dump_unary_op): Likewise.
1330 2013-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
1332         PR c++/51912
1333         * cp-tree.h (LOOKUP_NO_NON_INTEGRAL): Add.
1334         * decl.c (case_conversion): Use it.
1335         * call.c (standard_conversion): Likewise.
1336         (implicit_conversion): Adjust.
1338 2013-08-13  Adam Butcher  <adam@jessamine.co.uk>
1340         * pt.c: Grammar fix in comments ("it's" to "its").
1342 2013-08-12  Paolo Carlini  <paolo.carlini@oracle.com>
1344         * decl.c (warn_extern_redeclared_static, duplicate_decls,
1345         check_elaborated_type_specifier): Use error + inform.
1346         * friend.c (make_friend_class): Likewise.
1347         * semantics.c (finish_id_expression): Likewise.
1349 2013-08-09  Paolo Carlini  <paolo.carlini@oracle.com>
1351         Revert:
1352         2013-08-07  Paolo Carlini  <paolo.carlini@oracle.com>
1354         PR c++/46206
1355         * name-lookup.c (lookup_name_real_1): Handle iter->type before
1356         iter->value.
1358 2013-08-07  Paolo Carlini  <paolo.carlini@oracle.com>
1360         PR c++/46206
1361         * name-lookup.c (lookup_name_real_1): Handle iter->type before
1362         iter->value.
1364 2013-08-06  Caroline Tice  <cmtice@google.com>
1366         * Make-lang.in (*CXX_AND_OBJCXX_OBJS):  Add vtable-class-hierarchy.o to
1367         list.
1368         (vtable-class-hierarchy.o): Add build rule.
1369         * cp-tree.h (vtv_start_verification_constructor_init_function): New
1370         extern function decl.
1371         (vtv_finish_verification_constructor_init_function): New extern
1372         function decl.
1373         (build_vtbl_address): New extern function decl.
1374         (get_mangled_vtable_map_var_name): New extern function decl.
1375         (vtv_compute_class_hierarchy_transitive_closure): New extern function
1376         decl.
1377         (vtv_generate_init_routine): New extern function decl.
1378         (vtv_save_class_info): New extern function decl.
1379         (vtv_recover_class_info): New extern function decl.
1380         (vtv_build_vtable_verify_fndecl): New extern function decl.
1381         * class.c (finish_struct_1): Add call to vtv_save_class_info if
1382         flag_vtable_verify is true.
1383         * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list.
1384         * vtable-class-hierarchy.c: New file.
1385         * mangle.c (get_mangled_vtable_map_var_name):  New function.
1386         * decl2.c (start_objects): Update function comment.
1387         (cp_write_global_declarations):  Call vtv_recover_class_info,
1388         vtv_compute_class_hierarchy_transitive_closure and
1389         vtv_build_vtable_verify_fndecl, before calling
1390         finalize_compilation_unit, and call vtv_generate_init_rount after, IFF
1391         flag_vtable_verify is true.
1392         (vtv_start_verification_constructor_init_function): New function.
1393         (vtv_finish_verification_constructor_init_function): New function.
1394         * init.c (build_vtbl_address): Remove static qualifier from function.
1396 2013-08-06  Jason Merrill  <jason@redhat.com>
1398         PR c++/57825
1399         * tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.
1401 2013-08-05  Paolo Carlini  <paolo.carlini@oracle.com>
1403         PR c++/58080
1404         * typeck.c (cp_pointer_int_sum): Add tsubst_flags_t parameter.
1405         (cp_build_binary_op): Adjust.
1407 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1409         * cxx-pretty-print.h (pp_c_base): Remove.
1410         (cxx_pretty_printer): Derive from c_pretty_printer.
1411         Adjust macros using pp_c_base.
1412         * cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base.
1413         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise.
1414         (pp_cxx_colon_colon): Likewise.
1415         (pp_cxx_separate_with): Likewise.
1416         (pp_cxx_storage_class_specifier): Do not call pp_c_base.
1417         (pp_cxx_expression_list): Likewise.
1418         (pp_cxx_space_for_pointer_operator): Likewise.
1419         (pp_cxx_init_declarator): Likewise.
1420         (pp_cxx_call_argument_list): Likewise.
1421         (pp_cxx_constant): Likewise.
1422         (pp_cxx_postfix_expression): Likewise.
1423         (pp_cxx_new_expression): Likewise.
1424         (pp_cxx_unary_expression): Likewise.
1425         (pp_cxx_cast_expression): Likewise.
1426         (pp_cxx_conditional_expression): Likewise.
1427         (pp_cxx_assignment_expression): Likewise.
1428         (pp_cxx_expression): Likewise.
1429         (pp_cxx_function_specifier): Likewise.
1430         (pp_cxx_decl_specifier_seq): Likewise.
1431         (pp_cxx_simple_type_specifier): Likewise.
1432         (pp_cxx_type_specifier_seq): Likewise.
1433         (pp_cxx_ptr_operator): Likewise.
1434         (pp_cxx_parameter_declaration_clause): Likewise.
1435         (pp_cxx_direct_declarator): Likewise.
1436         (pp_cxx_direct_abstract_declarator): Likewise.
1437         (pp_cxx_type_id): Likewise.
1438         (pp_cxx_statement): Likewise.
1439         (pp_cxx_pretty_printer_init): Tidy.
1440         * error.c (init_error): Do not use pp_base.
1441         (dump_aggr_type): Likewise.
1442         (dump_type_prefix): Likewise.
1443         (dump_type_suffix): Likewise.
1444         (dump_global_iord): Likewise.
1445         (dump_decl): Likewise.
1446         (dump_function_decl): Likewise.
1447         (dump_ref_qualifier): Likewise.
1448         (reinit_cxx_pp): Likewise.
1449         (decl_as_dwarf_string): Likewise.
1450         (lang_decl_dwarf_name): Likewise.
1451         (type_to_string): Likewise.
1452         (cv_to_string): Likewise.
1453         (cxx_print_error_function): Likewise.
1454         (cp_diagnostic_starter): Likewise.
1455         (cp_diagnostic_finalizer): Likewise.
1456         (cp_print_error_function): Likewise.
1457         (print_instantiation_context): Likewise.
1458         (cp_printer): Likewise.
1460 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1462         * error.c (dump_type_prefix): Use specialized pretty printer
1463         functions instead of pp_string or operators and punctuators.
1464         (dump_decl): Likewise.
1465         (dump_expr): Likewise.
1467 2013-08-03  Jason Merrill  <jason@redhat.com>
1469         DR 1286
1470         * pt.c (get_underlying_template): New.
1471         (convert_template_argument, lookup_template_class_1): Use it.
1473         DR 1430
1474         PR c++/51239
1475         * pt.c (pack_expansion_args_count): Rename from
1476         any_pack_expanson_args_p.
1477         (coerce_template_parms): Reject pack expansion to
1478         non-pack template parameter of alias template.
1480 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1482         * error.c (dump_aggr_type): Use specialized pretty printer
1483         functions instead of pp_character.
1484         (dump_type_prefix): Likewise.
1485         (dump_simple_decl): Likewise.
1486         (type_to_string): Likewise.
1488 2013-08-02  Paolo Carlini  <paolo.carlini@oracle.com>
1490         * cp-tree.h (finish_stmt): Do not declare.
1491         * decl.c (finish_stmt): Do not define.
1492         * parser.c (cp_parser_expression_statement,
1493         cp_parser_declaration_statement,
1494         cp_parser_transaction_cancel): Don't call finish_stmt.
1495         * semantics.c (finish_expr_stmt, finish_if_stmt,
1496         finish_while_stmt, finish_do_stmt, finish_return_stmt,
1497         finish_for_stmt, finish_switch_stmt, finish_compound_stmt,
1498         finish_transaction_stmt): Likewise.
1500 2013-08-01  Fabien Chêne  <fabien@gcc.gnu.org>
1502         PR c++/54537
1503         * cp-tree.h: Check OVL_USED with OVERLOAD_CHECK.
1504         * name-lookup.c (do_nonmember_using_decl): Make sure we have an
1505         OVERLOAD before calling OVL_USED. Call diagnose_name_conflict
1506         instead of issuing an error without mentioning the conflicting
1507         declaration.
1509 2013-07-31  Paolo Carlini  <paolo.carlini@oracle.com>
1511         * parser.c (cp_parser_sizeof_pack): Check cp_parser_identifier
1512         return value for error_mark_node.
1514 2013-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
1516         PR c++/57673
1517         * parser.c (cp_parser_cache_defarg): In an NSDMI don't stop when
1518         token->type == CPP_ELLIPSIS.
1520 2013-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
1522         PR c++/57947
1523         * call.c (is_std_init_list): Return false if cxx_dialect == cxx98.
1525 2013-07-29  Jason Merrill  <jason@redhat.com>
1527         PR c++/57901
1528         * semantics.c (build_data_member_initialization, constexpr_fn_retval):
1529         Use break_out_target_exprs instead of unshare_expr.
1531 2013-07-29  Paolo Carlini  <paolo.carlini@oracle.com>
1533         PR c++/57948
1534         * call.c (initialize_reference): Don't crash when reference_binding
1535         returns a conv with conv->kind == ck_ambig.
1537 2013-07-29  Jason Merrill  <jason@redhat.com>
1539         * mangle.c (write_name): Check for null context.
1540         (write_unscoped_name): Allow PARM_DECL context.
1542 2013-07-25  Paolo Carlini  <paolo.carlini@oracle.com>
1544         PR c++/57981
1545         * decl.c (check_default_argument): Take a tsubst_flags_t parameter.
1546         (grokparms): Adjust.
1547         * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
1548         * pt.c (tsubst_default_argument, tsubst_default_arguments): Take
1549         a tsubst_flags_t parameter.
1550         (tsubst_decl): Adjust.
1551         * call.c (convert_default_arg): Likewise.
1552         * cp-tree.h (check_default_argument, tsubst_default_argument):
1553         Update declarations.
1555 2013-07-25  Paolo Carlini  <paolo.carlini@oracle.com>
1557         PR c++/57880
1558         * parser.c (cp_parser_operator, case CPP_WSTRING, CPP_STRING16,
1559         CPP_STRING32, CPP_UTF8STRING, CPP_WSTRING_USERDEF,
1560         CPP_STRING16_USERDEF, CPP_STRING32_USERDEF, CPP_UTF8STRING_USERDEF):
1561         Fix string_len management, tidy.
1563 2013-07-24  Paolo Carlini  <paolo.carlini@oracle.com>
1565         PR c++/57942
1566         * typeck.c (ptr_reasonably_similar): Use COMPARE_STRICT if either
1567         target type is incomplete; return a bool, not an int.
1568         * cp-tree.h (ptr_reasonably_similar): Adjust declaration.
1570 2013-07-22  Paolo Carlini  <paolo.carlini@oracle.com>
1572         * cp-tree.h (DERIVED_FROM_P): Pass tf_none to lookup_base, not
1573         tf_warning_or_error.
1575 2013-07-21   Ondřej Bílka  <neleai@seznam.cz>
1577         * class.c: Fix typos.
1578         * cp-array-notation.c: Likewise.
1579         * cp-objcp-common.c: Likewise.
1580         * decl.c: Likewise.
1581         * init.c: Likewise.
1582         * mangle.c: Likewise.
1583         * parser.c: Likewise.
1584         * pt.c: Likewise.
1585         * semantics.c: Likewise.
1587 2013-07-14  Adam Butcher  <adam@jessamine.co.uk>
1589         * semantics.c (build_lambda_expr),
1590         (build_lambda_object), (begin_lambda_type), (lambda_return_type),
1591         (lambda_function), (lambda_capture_field_type), (is_capture_proxy),
1592         (is_normal_capture_proxy), (insert_capture_proxy),
1593         (insert_pending_capture_proxies), (lambda_proxy_type),
1594         (build_capture_proxy), (vla_capture_type),
1595         (register_capture_members), (add_default_capture),
1596         (lambda_expr_this_capture), (maybe_resolve_dummy),
1597         (nonlambda_method_basetype), (maybe_add_lambda_conv_op) and
1598         (is_lambda_ignored_entity): Moved definitions into ...
1599         * lambda.c: ... this new file.
1601 2013-07-14  Marc Glisse  <marc.glisse@inria.fr>
1603         * call.c (build_conditional_expr_1): Handle the case with 1 vector
1604         and 2 scalars. Call save_expr before building a vector.
1605         * typeck.c (cp_build_binary_op): Check complain before complaining.
1607 2013-07-13  Lubos Lunak  <l.lunak@suse.cz>
1609         PR c++/55203
1610         * init.c (build_aggr_init): Check for warn_unused attribute.
1611         * decl.c (poplevel): Likewise.
1613 2013-07-13  Jason Merrill  <jason@redhat.com>
1615         PR c++/57402
1616         * init.c (build_vec_init): Use {} for arrays of class type.
1617         (build_vec_delete): Don't take the address of the array.
1619         PR c++/57793
1620         * class.c (layout_class_type): Check for too-large class.
1622         * call.c (can_convert): Allow user-defined conversions.
1623         (can_convert_standard): New.
1624         * cp-tree.h: Declare it.
1625         * cvt.c (convert_to_reference): Use it.
1626         * pt.c (convert_nontype_argument): Likewise.
1627         * search.c (check_final_overrider): Likewise.
1628         Don't worry about user-defined conversions.
1630 2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
1632         PR c++/57869
1633         * typeck.c (build_reinterpret_cast_1): With -Wconditionally-supported
1634         warn about casting between pointer-to-function and pointer-to-object.
1636 2013-07-09  Jason Merrill  <jason@redhat.com>
1638         PR c++/57402
1639         * init.c (build_vec_init): Don't take shortcuts when initializing
1640         a VLA.
1642         PR c++/57471
1643         * parser.c (cp_parser_sizeof_pack): Clear parser scopes.
1645         PR c++/57658
1646         * semantics.c (finish_id_expression): Return the id for an
1647         unevaluated outer variable.
1649         PR c++/57526
1650         * semantics.c (lambda_capture_field_type): Build a DECLTYPE_TYPE
1651         if the variable type uses 'auto'.
1653         PR c++/57437
1654         * typeck.c (check_return_expr): Lambda proxies aren't eligible
1655         for nrv or return by move.
1657         PR c++/57532
1658         * parser.c (cp_parser_ref_qualifier_opt): Don't tentatively parse
1659         a ref-qualifier in C++98 mode.
1661         PR c++/57545
1662         * pt.c (convert_nontype_argument) [INTEGER_CST]: Force the
1663         argument to have the exact type of the parameter.
1665         PR c++/57551
1666         * semantics.c (cxx_eval_indirect_ref): Don't try to look through
1667         a POINTER_PLUS_EXPR for type punning diagnostic.
1669         PR c++/57831
1670         * pt.c (tsubst_copy): Handle USING_DECL.
1672 2013-07-09  Marc Glisse  <marc.glisse@inria.fr>
1674         PR c++/53094
1675         * semantics.c (cxx_eval_bit_field_ref): Handle VECTOR_CST.
1677 2013-07-09  Marc Glisse  <marc.glisse@inria.fr>
1679         PR c++/53000
1680         * call.c (build_conditional_expr_1): Preserve xvalues.
1682 2013-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
1684         PR c++/51786
1685         * parser.c (cp_parser_simple_declaration): Before calling shadow_tag
1686         also check declares_class_or_enum.
1688 2013-07-08  Jason Merrill  <jason@redhat.com>
1690         PR c++/57550
1691         * pt.c (fn_type_unification): Only defer during substitution.
1692         (type_unification_real): Defer during defarg substitution,
1693         add checks parm to pass back deferred checks.
1694         (unify, do_auto_deduction): Adjust.
1695         * semantics.c (reopen_deferring_access_checks): New.
1696         * cp-tree.h: Declare it.
1698 2013-07-06  Paolo Carlini  <paolo.carlini@oracle.com>
1700         PR c++/28262
1701         * parser.c (cp_parser_init_declarator): If we are parsing a typedef
1702         set parser->default_arg_ok_p to false before cp_parser_declarator.
1704 2013-07-05  Paolo Carlini  <paolo.carlini@oracle.com>
1706         PR c++/14263
1707         * class.c (build_base_path): Improve diagnostic.
1709 2013-07-04  Paolo Carlini  <paolo.carlini@oracle.com>
1711         PR c++/38634
1712         * decl.c (start_preparsed_function): Return a bool, false if
1713         push_template_decl fails.
1714         (start_function): Adjust.
1715         * cp-tree.h: Update.
1717 2013-07-03  Jakub Jelinek  <jakub@redhat.com>
1719         PR c++/57771
1720         * parser.c (cp_parser_postfix_expression) <case RID_STATCAST>
1721         Temporarily set parser->greater_than_is_operator_p for
1722         cp_parser_expression and restore from saved value afterwards.
1724 2013-06-28  Ed Smith-Rowland  <3dw4rd@verizon.net>
1726         * cp-tree.h (UDLIT_OP_ANSI_PREFIX): Remove space.
1727         * parser.c (cp_parser_operator()): Parse user-defined string
1728         literal as literal operator.
1730 2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>
1732         PR c++/57645
1733         * class.c (deduce_noexcept_on_destructors): Save, set, and restore
1734         TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
1735         destructors.
1737 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1739         * parser.c (cp_parser_array_notation): Removed rejection array notation
1740         of type function pointers. Added handling of array expressions when
1741         Cilk Plus is enabled.  Took out type-checking.
1742         (cp_parser_postfix_open_square_expression): Moved normal array expr.
1743         parsing into cp_parser_array_notation when cilkplus is enabled.
1744         (cp_parser_compound_statement): Removed expansion of array notations.
1745         (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
1746         (cp_parser_function_definition_after_declarator): Likewise.
1747         (cp_parser_selection_statement): Removed error reporting.
1748         (cp_parser_iteration_statement): Likewise.
1749         (cp_parser_direct_declarator): Removed error checking/reporting if
1750         array notations are used in the declarator.
1751         * pt.c (instantiate_decl): Likewise.
1752         (type_unification_real): Removed a check for ARRAY_NOTATION_REF.
1753         (cxx_eval_constant_expression): Removed ARRAY_NOTATION_REF case.
1754         (potential_constant_expression_1): Returned false for
1755         ARRAY_NOTATION_REF case.
1756         * cp-gimplify.c (cp_genericize): Added expansion of array notation
1757         expressions here.
1758         * cp-array-notation.c (make_triplet_val_inv): Removed loc and cry 
1759         parameters.  Replaced build_decls with get_temp_regvar with type as
1760         ptrdiff.
1761         (create_array_refs): Made the type-casting to ptrdiff_type.
1762         (replace_invariant_var): Added a check for void return type before 
1763         creating new var.  Replaced build_decl and build_min_nt_loc with
1764         get_temp_regvar.
1765         (expand_an_in_modify_expr): Ditto.  Replaced body of redundant else 
1766         with gcc_unreachable.  Removed few unwanted checks.  Made induction 
1767         variable type as ptrdiff_type.  Removed loc and complain arguments 
1768         passed into make_triplet_val_inv.  Replaced all modify expression's 
1769         code from NOP EXPR to INIT EXPR.  Replaced all forceful appending 
1770         into stmt. list with the non-forceful one.  Replaced some integer 
1771         conversion and equality-checking to using tree_int_cst_equal.
1772         (expand_sec_reduce_builtin): All changes mentioned in above function
1773         expand_an_in_modify_expr.  Made the new variable type of
1774         SEC_REDUCE_ANY/ALL_{NON}ZERO intrinsic functions as bool.
1775         (expand_array_notation_exprs): Removed SWITCH_EXPR case.  Moved all
1776         the error reporting from parser to this function.  Removed unwanted
1777         statements and checks from SWITCH_STMT, WHILE_STMT, and DO_STMT cases.
1778         (cilkplus_an_triplet_types_ok_p): Removed rejection of array notation
1779         in function pointers.
1780         (cp_expand_cond_array_notations): Added a new if statements to check
1781         if condition has a zero rank.  If so, then just return.
1782         (expand_return_expr): Added a check for return expressions with a rank.
1783         Replaced get_tmp_regvar with a create_temporary_var.
1784         (build_array_notation_ref): Simplified and removed unwanted if-stmts.
1785         Moved common code outside if-statements.  Moved type-checking from
1786         parser to here.
1787         * semantics.c (finish_return_stmt): Removed a check for return exprs.
1788         with a rank.
1789         * call.c (convert_like_real): Removed a check for array notation
1790         expression in a function.
1791         (build_over_call): Likewise.
1792         (magic_varargs_p): Added a check for builtin array notation function.
1793         Made this function non-static and removed its prototype.
1794         * cp-tree.h (magic_varargs_p): New prototype.
1795         * typeck.c (cp_build_function_call_vec): Removed automatic setting of
1796         nargs to the param->length when builtin reduction function is used.
1797         (convert_arguments): Replaced check for a constant_p function with
1798         margic_varargs_p function call.
1799         (cp_build_binary_op): Removed calling of the function
1800         find_correct_array_notation_type.
1801         (cp_build_addr_expr_1): Removed an unwanted if-statement.
1802         (convert_for_assignment): Removed automatic return of rhs when array
1803         notation builtin function is used.
1805 2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>
1807         PR c++/57682
1808         * parser.c (cp_parser_save_member_function_body): Handle correctly
1809         curly braces in function-try-block mem-initializers.
1811 2013-06-27  Marc Glisse  <marc.glisse@inria.fr>
1813         PR c++/57509
1814         * typeck.c (cp_build_vec_perm_expr): New function.
1815         * cp-tree.h: Declare it.
1816         * parser.c (cp_parser_postfix_expression): Call it.
1817         * pt.c (tsubst_copy): Handle VEC_PERM_EXPR.
1818         (tsubst_copy_and_build): Likewise.
1820 2013-06-27  Marc Glisse  <marc.glisse@inria.fr>
1822         PR c++/57172
1823         * pt.c (more_specialized_fn): If both arguments are references,
1824         give priority to an lvalue.
1826 2013-06-26  Jason Merrill  <jason@redhat.com>
1828         * typeck2.c (store_init_value): Diagnose a non-constant
1829         initializer for in-class static.
1831         PR c++/57408
1832         * semantics.c (add_capture): Set type to error_mark_node after
1833         error.
1835 2013-06-25  Ed Smith-Rowland  <3dw4rd@verizon.net>
1837         PR c++/57640
1838         * parser.c (cp_parser_unqualified_id): Add declarator_p to checks
1839         to trigger warning, (cp_literal_operator_id): Remove bogus TODO comment.
1841 2013-06-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1843         * call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x.
1844         * class.c (add_implicitly_declared_members): Likewise.
1845         (check_field_decl): Likewise.
1846         (finalize_literal_type_property): Likewise.
1847         (check_bases_and_members): Likewise.
1848         * decl.c (poplevel): Likewise.
1849         (case_conversion): Likewise.
1850         (check_initializer): Likewise.
1851         (grokfndecl): Likewise.
1852         (check_static_variable_definition): Likewise.
1853         (compute_array_index_type): Likewise.
1854         (grokdeclarator): Likewise.
1855         (build_enumerator): Likewise.
1856         * friend.c (make_friend_class): Likewise.
1857         * lex.c (init_reswords): Likewise.
1858         * method.c (synthesized_method_walk): Likewise.
1859         (implicitly_declare_fn): Likewise.
1860         * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
1861         (cp_parser_constant_expression): Likewise.
1862         (cp_parser_for_init_statement): Likewise.
1863         (cp_parser_block_declaration): Likewise.
1864         (cp_parser_type_name): Likewise.
1865         (cp_parser_enum_specifier): Likewise.
1866         (cp_parser_enumerator_list): Likewise.
1867         (cp_parser_member_declaration): Likewise.
1868         (cp_nth_tokens_can_be_std_attribute_p): Likewise.
1869         (cp_parser_template_declaration_after_export): Likewise.
1870         * pt.c (convert_nontype_argument_function): Likewise.
1871         (convert_nontype_argument): Likewise.
1872         (convert_template_argument): Likewise.
1873         (tsubst_copy_and_build): Likewise.
1874         (build_non_dependent_expr): Likewise.
1875         * semantics.c (non_const_var_error): Likewise.
1876         (potential_constant_expression_1): Likewise.
1877         * tree.c (lvalue_kind): Likewise.
1878         (build_vec_init_expr): Likewise.
1879         (cast_valid_in_integral_constant_expression_p): Likewise.
1880         * typeck.c (build_x_conditional_expr): Likewise.
1881         * typeck2.c (check_narrowing): Likewise.
1883 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1885         * cp-array-notation.c (cp_length_mismatch_in_expr_p): Remove.
1886         (expand_an_in_modify_expr): Changed a function call from the above
1887         removed function to length_mismatch_in_expr_p.
1889 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1891         * call.c (convert_like_real): Added a check if array notation is present
1892         in expression.  If so, then no conversion of arguments is necessary.
1893         (build_over_call): Likewise.
1894         * typeck.c (cp_build_function_call_vec): Likewise.
1895         (convert_for_assignment): Likewise.
1896         (cp_build_array_ref): Reject array notations with a rank greater than 1
1897         as an array's index.
1898         (cp_build_binary_op): If array notations are preent in op, then call
1899         find_correct_array_notation_type.
1900         (cp_build_addr_expr_1): Handle ARRAY_NOTATION_REF similar to ARRAY_REF.
1901         * cp-array-notation.c: New file.
1902         * cp-objcp-common.c (cp_common_init_ts): Marked ARRAY_NOTATION_REF tree
1903         as typed.
1904         * cp-tree.h (fix_array_notation_exprs): New prototype.
1905         * semantics.c (finish_return_stmt): Reject array notations as
1906         return value.
1907         (cxx_eval_constant_expression): Added ARRAY_NOTATION_REF case.
1908         (potential_constant_expression_1): Likewise.
1909         * tree.c (lvalue_kind): Likewise.
1910         * error.c (dump_decl): Likewise.
1911         (dump_expr): Likewise.
1912         * pt.c (ARRAY_NOTATION_REF): Likewise.
1913         (type_unification_real): Do not unify any arguments if array notations
1914         are found in arg.
1915         (instantiate_decl): Added a check for array notaitons inside the
1916         function body.  If so, then expand them.
1917         * parser.c (cp_parser_array_notation): New function.
1918         (cp_parser_postfix_open_square_expression): Added a check for colons
1919         inside square braces.  If found, then handle the array access as an
1920         array notation access.  Also, disable auto-correction from a single
1921         colon to scope when Cilk Plus is enabled.
1922         (cp_parser_compound_statement): Added a check for array notations
1923         inside the statement.  If found, then expand them.
1924         (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
1925         (cp_parser_function_definition_after_declarator): Likewise.
1926         (cp_parser_selection_statement): Searched for array notations inside
1927         condition.  If so, then emit an error.
1928         (cp_parser_iteration_statement): Likewise.
1929         (cp_parser_direct_declarator): Reject array notations inside a
1930         variable or array declaration.
1931         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Added cp/cp-array-notation.o.
1933 2013-06-20  Jason Merrill  <jason@redhat.com>
1935         PR c++/55149
1936         * decl.c (compute_array_index_type): Don't reject VLAs in SFINAE
1937         context if we're in C++14 mode.
1938         * tree.c (array_of_runtime_bound_p): Return true for a dependent
1939         bound that is not potentually constant.
1940         * cp-tree.h (DECL_VLA_CAPTURE_P, REFERENCE_VLA_OK): New.
1941         * pt.c (tsubst) [REFERENCE_TYPE]: Check REFERENCE_VLA_OK.
1942         * semantics.c (build_lambda_object): Don't rvalue a VLA capture.
1943         (build_capture_proxy): Set REFERENCE_VLA_OK.
1944         (vla_capture_type): Make it a proper C++ class.
1945         (add_capture): Set DECL_VLA_CAPTURE_P.  Don't pre-digest the
1946         initializer.
1948         * decl.c (compute_array_index_type): Use size_one_node.
1950         * pt.c (process_partial_specialization): Build a TEMPLATE_DECL for
1951         a partial specialization.
1952         (tsubst_decl): Don't clobber CLASSTYPE_TI_TEMPLATE of a partial
1953         specialization.
1954         (most_specialized_class): Adjust.
1956         * cp-tree.h (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT)
1957         (DECL_TEMPLATE_INSTANTIATIONS, DECL_TEMPLATE_SPECIALIZATIONS): Use
1958         TEMPLATE_DECL_CHECK.
1960 2013-06-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1962         PR c++/57638
1963         * pt.c (unify, [TEMPLATE_PARM_INDEX]): Pass to unify_type_mismatch
1964         TREE_TYPE (arg), not arg itself.
1966 2013-06-18  Paolo Carlini  <paolo.carlini@oracle.com>
1968         PR c++/53211
1969         * pt.c (type_dependent_expression_p): Handle an array of unknown
1970         bound depending on a variadic parameter.
1971         * parser.c (cp_parser_range_for): Revert PR56794 changes.
1973 2013-06-17  Richard Biener  <rguenther@suse.de>
1975         * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h.
1977 2013-06-17  Paolo Carlini  <paolo.carlini@oracle.com>
1979         PR c++/16128
1980         * parser.c (cp_parser_expression_statement): Check whether
1981         cp_parser_expression returns error_mark_node.
1983 2013-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
1985         PR c++/51413
1986         * semantics.c (finish_offsetof): Handle INDIRECT_REF as expr.
1988 2013-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
1990         PR c++/57599
1991         * rtti.c (build_dynamic_cast_1): In case of cast to an unambiguous
1992         accessible base simply forward to build_static_cast.
1994 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
1996         PR c++/38958
1997         * decl.c (poplevel): For the benefit of -Wunused-variable see
1998         through references.
2000 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
2002         * parser.c (cp_parser_nested_name_specifier_opt): Fix typo in comment.
2004 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
2006         PR c++/42021
2007         * parser.c (cp_parser_nested_name_specifier_opt): Avoid emitting
2008         again diagnostic already emitted by cp_parser_lookup_name.
2010 2013-06-11  Jan Hubicka  <jh@suse.cz>
2012         PR c++/57551
2013         * cp/pt.c (mark_decl_instantiated): Do not export explicit
2014         instantiations of anonymous namespace templates.
2016 2013-06-10  Jason Merrill  <jason@redhat.com>
2018         * name-lookup.c (add_decl_to_level): Add decls in an anonymous
2019         namespace to static_decls.
2021 2013-06-07  Sriraman Tallam  <tmsriram@google.com>
2023         PR c++/57548
2024         * call.c (build_over_call):  Check if current_function_decl is
2025         NULL.
2027 2013-06-07  Paolo Carlini  <paolo.carlini@oracle.com>
2029         PR c++/53658
2030         * pt.c (lookup_template_class_1): Consistently use TYPE_MAIN_DECL,
2031         not TYPE_STUB_DECL, to access the _DECL for a _TYPE.
2033 2013-06-06  Jason Merrill  <jason@redhat.com>
2035         PR c++/55520
2036         * semantics.c (add_capture): Diagnose capture of variable-size
2037         type that is not a C++1y array of runtime bound.
2039         * decl.c (grokdeclarator): Keep a decl with error type.
2040         (grokfield, grokbitfield): Likewise.
2041         * pt.c (instantiate_class_template_1): Likewise.
2042         (tsubst_decl): Drop redundant error.
2043         * class.c (walk_subobject_offsets): Handle erroneous fields.
2044         * typeck2.c (process_init_constructor_record): Likewise.
2046 2013-06-05  Paolo Carlini  <paolo.carlini@oracle.com>
2048         PR c++/51908
2049         * parser.c (cp_parser_postfix_expression [RID_*CAST]): Set
2050         parser->in_type_id_in_expr_p before calling cp_parser_type_id.
2052 2013-06-03  Jan Hubicka  <jh@suse.cz>
2054         * decl2.c (maybe_make_one_only): Use forced_by_abi instead of
2055         mark_decl_referenced.
2056         (mark_needed): Likewise.
2058 2013-06-03  Jason Merrill  <jason@redhat.com>
2060         * class.c (mark_type_abi_tags): New.
2061         (check_abi_tags): Use it.
2063 2013-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
2065         PR c++/57419
2066         * decl2.c (mark_used): Add overload taking a tsubst_flags_t too.
2067         * semantics.c (finish_qualified_id_expr): Use it.
2068         * cp-tree.h: Update.
2070 2013-06-01  Jan Hubicka  <jh@suse.cz>
2072         * decl2.c (cp_write_global_declarations): Replace same_body_alias
2073         by symbol.cpp_implicit_alias.
2075 2013-05-30  Jason Merrill  <jason@redhat.com>
2077         PR c++/57404
2078         * cp-lang.c (cp_classify_record): Handle structs without
2079         TYPE_LANG_SPECIFIC.
2081         PR c++/52377
2082         * class.c (common_enclosing_class): New.
2083         * cp-tree.h: Declare it.
2084         * init.c (sort_mem_initializers): Don't splice out a union member
2085         with an NSDMI.
2087 2013-05-29  Jan Hubicka  <jh@suse.cz>
2089         * tree.c (cp_fix_function_decl_p): Update for new symtab flags.
2090         * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise.
2092 2013-05-25  Paolo Carlini  <paolo.carlini@oracle.com>
2094         PR c++/25666
2095         * decl2.c (check_classfn): Check for destructors declared as member
2096         templates.
2098 2013-05-24  Jason Merrill  <jason@redhat.com>
2100         PR c++/56971
2101         * pt.c (any_template_arguments_need_structural_equality_p): A
2102         TEMPLATE_TEMPLATE_PARM can require structural type comparison.
2104 2013-05-24  Paolo Carlini  <paolo.carlini@oracle.com>
2106         PR c++/19618
2107         * class.c (check_bitfield_decl): Warn for bool and enum bitfields
2108         with width exceeding the type.
2110 2013-05-24  Jason Merrill  <jason@redhat.com>
2112         PR c++/57391
2113         * semantics.c (cxx_eval_constant_expression): Handle FMA_EXPR.
2114         (cxx_eval_trinary_expression): Rename from cxx_eval_vec_perm_expr.
2116 2013-05-23  Jason Merrill  <jason@redhat.com>
2118         PR c++/57388
2119         * tree.c (build_ref_qualified_type): Clear
2120         FUNCTION_RVALUE_QUALIFIED for lvalue ref-qualifier.
2122 2013-05-22  Jason Merrill  <jason@redhat.com>
2124         PR c++/56930
2125         * call.c (convert_like_real): Use cp_convert_and_check.
2126         * cvt.c (cp_convert_and_check): Use maybe_constant_value.
2127         * semantics.c (cxx_eval_constant_expression): Handle LTGT_EXPR.
2128         (potential_constant_expression_1): Handle OMP_ATOMIC*.
2130         PR c++/56915
2131         * semantics.c (maybe_add_lambda_conv_op): Give up if the call op
2132         isn't defined.
2134 2013-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
2136         PR c++/57352
2137         * parser.c (cp_parser_conversion_type_id): Set up
2138         parser->type_definition_forbidden_message before calling
2139         cp_parser_type_specifier_seq.
2141 2013-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
2143         PR c++/57211
2144         * method.c (defaultable_fn_check): Avoid do_warn_unused_parameter
2145         warnings about defaulted functions.
2147 2013-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
2149         * call.c (build_conditional_expr_1): Add location_t parameter.
2150         (build_conditional_expr): Likewise.
2151         * typeck.c (rationalize_conditional_expr, cp_build_array_ref,
2152         get_member_function_from_ptrfunc, build_x_conditional_expr,
2153         cp_build_modify_expr): Update.
2154         * init.c (build_new_1): Likewise.
2155         * cp-tree.h: Update declaration.
2157 2013-05-20  Jason Merrill  <jason@redhat.com>
2159         PR c++/57016
2160         * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Only check type2
2161         if there is one.
2163         PR c++/57102
2164         * decl.c (fndecl_declared_return_type): Also look in
2165         DECL_SAVED_FUNCTION_DATA.
2167 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
2169         PR c++/12288
2170         * parser.c (cp_parser_parameter_declaration): Check return value
2171         of cp_parser_parse_and_diagnose_invalid_type_name.
2173 2013-05-20  Jason Merrill  <jason@redhat.com>
2175         PR c++/57319
2176         * class.c (vbase_has_user_provided_move_assign): New.
2177         * method.c (synthesized_method_walk): Check it.
2178         * cp-tree.h: Declare it.
2180         PR c++/57325
2181         * tree.c (build_cplus_array_type): Copy layout info if element
2182         type is complete.
2184 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
2186         PR c++/23608
2187         * call.c (build_new_op_1): Propagate loc to cp_build_binary_op.
2189 2013-05-20  Jason Merrill  <jason@redhat.com>
2191         PR c++/57317
2192         * decl2.c (determine_visibility): Use PRIMARY_TEMPLATE_P to decide
2193         whether a template has its own args.
2195 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
2197         PR c++/57327
2198         * pt.c (unify_no_common_base): Swap arg and parm arguments to inform.
2200 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
2202         PR c++/10207
2203         * parser.c (cp_parser_postfix_expression): Use cp_parser_braced_list
2204         instead of cp_parser_initializer_list for compound-literals.
2206 2013-05-20  Marc Glisse  <marc.glisse@inria.fr>
2208         PR c++/57175
2209         * typeck.c (check_return_expr): Reverse the alignment comparison.
2211 2013-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
2213         PR c++/18126
2214         * parser.c (cp_parser_sizeof_operand): As a GNU Extension, parse
2215         correctly sizeof compound-literal; update comments.
2217 2013-05-16  Marc Glisse  <marc.glisse@inria.fr>
2219         * call.c (build_conditional_expr_1): Use cp_build_binary_op
2220         instead of directly calling fold_build2.
2222 2013-05-16  Jason Merrill  <jason@redhat.com>
2224         * Make-lang.in (cc1plus$(exeext)): Use link mutex.
2226         PR c++/57279
2227         * decl.c (grokdeclarator): Allow member function qualifiers in
2228         TYPENAME context in C++11 mode.
2230 2013-05-16  Dodji Seketeli  <dodji@redhat.com>
2232         PR c++/56782 - Regression with empty pack expansions
2233         * pt.c (use_pack_expansion_extra_args_p): When at least a
2234         parameter pack has an empty argument pack, and another parameter
2235         pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
2236         mechanism.
2238 2013-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
2240         * name-lookup.c (pushdecl_maybe_friend_1): Replace pairs of
2241         warning_at and permerror with warning_at/inform and permerror/
2242         inform, respectively.
2244 2013-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
2246         PR c++/31952
2247         * name-lookup.c (pushdecl_maybe_friend_1): Diagnose illegal
2248         redeclarations.
2250 2013-05-14  Jason Merrill  <jason@redhat.com>
2252         PR c++/57243
2253         * parser.c (cp_parser_range_for): Call complete_type.
2255         PR c++/57041
2256         * pt.c (tsubst_copy_and_build): Don't recur into a designator.
2258 2013-05-14  Paolo Carlini  <paolo.carlini@oracle.com>
2260         PR c++/53903
2261         * method.c (defaulted_late_check): Check for compatible exception
2262         specification out of class explicitly defaulted functions too.
2264 2013-05-14  Jason Merrill  <jason@redhat.com>
2266         PR c++/56998
2267         * semantics.c (potential_constant_expression_1): Make sure the
2268         called function is potentially constant.
2269         * call.c (null_ptr_cst_p): Revert earlier change.
2271 2013-05-13  Jason Merrill  <jason@redhat.com>
2273         PR c++/56998
2274         * call.c (null_ptr_cst_p): An expression with side-effects can't
2275         be a C++03 null pointer constant.
2277         PR c++/57041
2278         * decl.c (reshape_init_class): Handle error_mark_node.
2280         PR c++/57254
2281         * typeck.c (merge_types): Propagate ref-qualifier
2282         in METHOD_TYPE case.
2284         PR c++/57253
2285         * decl.c (grokdeclarator): Apply ref-qualifier
2286         in the TYPENAME case.
2288         PR c++/57252
2289         * decl.c (decls_match): Compare ref-qualifiers.
2291 2013-05-10  Jason Merrill  <jason@redhat.com>
2293         PR c++/57196
2294         * pt.c (convert_template_argument): Use dependent_template_arg_p,
2295         not uses_template_parms.
2297         PR c++/57047
2298         * semantics.c (cxx_fold_indirect_ref): Fix thinko.
2300         PR c++/55149
2301         * semantics.c (add_capture): Error rather than abort on copy
2302         capture of VLA.
2303         * typeck.c (maybe_warn_about_returning_address_of_local): Don't
2304         warn about capture proxy.
2306 2013-05-09  Jason Merrill  <jason@redhat.com>
2308         * decl.c (cp_finish_decl): Only check VLA bound in C++1y mode.
2310         PR c++/57222
2311         * pt.c (lookup_template_class_1): Handle getting a template
2312         template parameter as D1.
2314         N3639 C++1y VLA diagnostics
2315         * decl.c (grokdeclarator): Complain about reference, pointer, or
2316         typedef to VLA.
2317         (create_array_type_for_decl): Complain about array of VLA.
2318         * pt.c (tsubst): Likewise.
2319         * rtti.c (get_tinfo_decl): Talk about "array of runtime bound".
2320         * semantics.c (finish_decltype_type): Complain about decltype of VLA.
2321         * typeck.c (cp_build_addr_expr_1): Complain about VLA.
2322         (cxx_sizeof_or_alignof_type): Likewise.
2324         N3639 C++1y VLA support
2325         * decl.c (compute_array_index_type): Allow VLAs in C++1y mode.
2326         (check_array_initializer): Allow VLA init.
2327         (reshape_init_array_1): Adjust.
2328         (cp_finish_decl): Check for invalid VLA length.
2329         * typeck2.c (process_init_constructor_array): Adjust.
2330         (store_init_value): Use build_vec_init for VLAs.
2331         * semantics.c (add_capture): Capture VLA as ptr+len.
2332         (vla_capture_type): New.
2333         (build_capture_proxy): Rebuild the VLA.
2334         * typeck.c (build_simple_component_ref): Split out from...
2335         (build_ptrmemfunc_access_expr): ...here.
2336         * tree.c (array_of_runtime_bound_p): New.
2337         * init.c (throw_bad_array_length): New.
2338         (build_vec_init): Use it.
2339         * parser.c (cp_convert_range_for): When iterating over a VLA,
2340         use it directly rather than bind a reference.
2341         * cp-tree.h: Declare new functions.
2343 2013-05-08  Jason Merrill  <jason@redhat.com>
2345         * except.c (is_admissible_throw_operand_or_catch_parameter): Check
2346         variably_modified_type_p.
2347         (expand_start_catch_block): Mark the typeinfo used here.
2348         * semantics.c (finish_handler_parms): Not here.
2350         * error.c (dump_type_suffix): Try harder on VLA length.
2352         Core 624/N2932
2353         * init.c (throw_bad_array_new_length): New.
2354         (build_new_1): Use it.  Don't warn about braced-init-list.
2355         (build_vec_init): Use it.
2356         * call.c (build_operator_new_call): Use it.
2358         PR c++/57068
2359         * decl.c (grokdeclarator): Warn about ref-qualifiers here.
2360         * parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
2361         * error.c (maybe_warn_cpp0x): s/0x/11/.
2363 2013-05-08  Paolo Carlini  <paolo.carlini@oracle.com>
2365         PR c++/51226
2366         * parser.c (cp_parser_enum_specifier): Handle nested_name_specifier
2367         == error_mark_node.
2369 2013-05-06  Marc Glisse  <marc.glisse@inria.fr>
2371         * typeck.c (cp_build_binary_op): Call save_expr before
2372         build_vector_from_val.
2374 2013-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
2376         PR c++/57183
2377         * decl.c (cp_finish_decl): After do_auto_deduction copy the
2378         qualifers with cp_apply_type_quals_to_decl.
2380 2013-05-05  Paolo Carlini  <paolo.carlini@oracle.com>
2382         * pt.c (convert_nontype_argument): Add missing whitespace in
2383         error message.
2385 2013-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
2387         PR c++/53745
2388         * decl.c (build_enumerator): Improve error message.
2390 2013-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
2392         PR c++/14283
2393         * parser.c (cp_parser_diagnose_invalid_type_name): Improve error
2394         messages for template types and fix column numbers.
2396 2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
2398         PR c++/57132
2399         * pt.c (tsubst_copy_and_build, MODOP_EXPR): Increase / decrease
2400         c_inhibit_evaluation_warnings around build_x_modify_expr call.
2402 2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
2404         PR c++/57092
2405         * semantics.c (finish_decltype_type): Handle instantiated template
2406         non-type arguments.
2408 2013-04-28  Paolo Carlini  <paolo.carlini@oracle.com>
2410         PR c++/56450
2411         * semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
2413 2013-04-26  Jakub Jelinek  <jakub@redhat.com>
2415         * error.c (cp_print_error_function): Adjust file_name_as_prefix
2416         caller.
2418 2013-04-25  Jason Merrill  <jason@redhat.com>
2420         PR c++/56859
2421         * typeck.c (cxx_alignas_expr): Handle value-dependence properly.
2423         PR c++/50261
2424         * init.c (perform_member_init): Call reshape_init.
2426 2013-04-24  Jason Merrill  <jason@redhat.com>
2428         PR c++/53721
2429         * parser.c (cp_parser_postfix_dot_deref_expression): Fix thinko.
2431 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
2433         * typeck.c (cxx_sizeof_or_alignof_type): Change -Wpointer-arith
2434         pedwarn to simply use OPT_Wpointer_arith.
2435         (cp_build_unary_op): Likewise.
2437 2013-04-24  Jason Merrill  <jason@redhat.com>
2439         N3648: init-captures are named.
2440         * semantics.c (add_capture): Don't prepend "__" to init-captures.
2441         (build_capture_proxy): Adjust.
2442         * error.c (dump_simple_decl): Check DECL_NORMAL_CAPTURE_P.
2444         N3648: Allow braced and parenthesized initializers.
2445         * parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer.
2446         * pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE.
2447         * semantics.c (lambda_capture_field_type): Use do_auto_deduction.
2448         (add_capture): Collapse a parenthesized initializer into a single
2449         expression.
2450         * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New.
2452 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
2454         PR c++/56970
2455         * init.c (build_offset_ref): Add tsubst_flags_t parameter.
2456         * semantics.c (finish_qualified_id_expr): Likewise.
2457         (finish_id_expression): Update.
2458         * typeck.c (cp_build_addr_expr_1): Likewise.
2459         * pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
2460         * cp-tree.h: Update declarations.
2462 2013-04-22  Jason Merrill  <jason@redhat.com>
2464         Core 1586
2465         * parser.c (cp_parser_unqualified_id): Handle ~auto.
2466         (cp_parser_pseudo_destructor_name): Likewise.
2467         (cp_parser_postfix_dot_deref_expression): Adjust.
2468         (cp_lexer_nth_token_is_keyword): New.
2469         * semantics.c (finish_pseudo_destructor_expr): Handle ~auto.
2470         * typeck.c (lookup_destructor): Handle ~auto.
2472         * pt.c (fn_type_unification): Push tinst level around
2473         type_unification_real if we aren't explaining.
2474         * cp-tree.h (TFF_NO_TEMPLATE_BINDINGS): New.
2475         * error.c (dump_function_decl): Respect it.
2476         (subst_to_string): Pass it.
2478         PR c++/48665
2479         * rtti.c (get_typeid): Diagnose qualified function type.
2480         * pt.c (tsubst) [POINTER_TYPE]: Likewise.
2482         * error.c (dump_aggr_type): Fix lambda detection.
2483         (dump_simple_decl): Pretty-print capture field.
2485         N3323
2486         * cvt.c (build_expr_type_conversion): Two conversions that return
2487         the same type aren't necessarily ambiguous.
2489         N3648
2490         * parser.c (cp_parser_lambda_introducer): Make lambda capture init
2491         pedwarn unconditional except in C++1y mode.
2493         * semantics.c (potential_constant_expression_1): Don't crash on
2494         'this' in NSDMI.
2496         Core 1612
2497         * semantics.c (finish_id_expression): Reject capture of anonymous
2498         union member.
2500         Core 1609
2501         * decl2.c (check_default_args): Check for pack expansion.
2503         * mangle.c (write_type): Mangle decltype(auto).
2505 2013-04-19  Jason Merrill  <jason@redhat.com>
2507         N3638 changes to return type deduction
2508         * decl.c (undeduced_auto_decl): New.
2509         (require_deduced_type): New.
2510         (fndecl_declared_return_type): New.
2511         (decls_match): Use it.
2512         (duplicate_decls): Don't check for auto return.
2513         (grokdeclarator): Reject virtual auto.
2514         * class.c (resolve_address_of_overloaded_function): Handle
2515         auto function templates.
2516         * decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type.
2517         * cp-tree.h: Declare new fns.
2518         * error.c (dump_function_decl): Use fndecl_declared_return_type.
2519         * search.c (check_final_overrider): Likewise.
2520         * pt.c (make_decltype_auto): New.
2521         (do_auto_deduction): Require plain decltype(auto).
2522         (is_auto): Adjust.
2524         DR 941
2525         * decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
2526         template specializations.
2528 2013-04-16  Ed Smith-Rowland  <3dw4rd@verizon.net>
2530         Implement n3599 - Literal operator templates for strings.
2531         * parser.c (make_string_pack (tree value)): New function.
2532         (cp_parser_userdef_string_literal (cp_token *)): Use it
2533         to construct calls to character string literal operator templates.
2534         (cp_parser_template_declaration_after_export): Check for new string
2535         literal operator template parameter form.
2537 2013-04-15  Jason Merrill  <jason@redhat.com>
2539         * pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build.
2541         PR c++/52748
2542         * pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
2543         rather than a destructor name, it isn't an unqualified-name.
2544         (tsubst_copy_and_build): Pass down decltype_flag to operator
2545         handling code, too.
2547         PR c++/56388
2548         * semantics.c (insert_capture_proxy): Just use index 1 in the
2549         stmt_list_stack.
2551 2013-04-12  Jakub Jelinek  <jakub@redhat.com>
2553         * error.c (cp_print_error_function,
2554         print_instantiation_partial_context_line,
2555         maybe_print_constexpr_context): Colorize locus strings.
2557 2013-04-11  Jason Merrill  <jason@redhat.com>
2559         PR c++/52748
2560         * parser.c (complain_flags): New.
2561         (cp_parser_postfix_expression): Use it.
2562         (cp_parser_unary_expression): Likewise.
2563         (cp_parser_binary_expression): Likewise.
2564         (cp_parser_assignment_expression): Likewise.
2565         (cp_parser_expression): Likewise.
2566         (cp_parser_postfix_open_square_expression): Take decltype_p.
2567         (cp_parser_builtin_offsetof): Adjust.
2568         (cp_convert_range_for): Pass complain to finish_unary_op_expr.
2569         * decl2.c (grok_array_decl): Add decltype_p parm.
2570         * cp-tree.h: Adjust prototype.
2571         * semantics.c (finish_unary_op_expr): Add complain parm.
2573 2013-04-11  Jakub Jelinek  <jakub@redhat.com>
2575         PR c++/56895
2576         * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
2577         calling maybe_constant_value for C++98.
2579 2013-04-11  Jason Merrill  <jason@redhat.com>
2581         PR c++/56901
2582         * semantics.c (lambda_capture_field_type, lambda_proxy_type):
2583         Strip references before checking WILDCARD_TYPE_P.
2585 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
2587         * call.c (build_conditional_expr_1, build_over_call): Protect
2588         error calls with complain & tf_error.
2589         * typeck.c (finish_class_member_access_expr, cp_build_binary_op,
2590         build_x_unary_op, cp_build_unary_op, cp_build_compound_expr,
2591         build_ptrmemfunc): Likewise.
2592         (lookup_destructor): Take tsubst_flags_t parameter, adjust.
2594         * cvt.c (warn_ref_binding): Rename to diagnose_ref_binding.
2595         (convert_to_reference): Adjust.
2597 2013-04-11  Jason Merrill  <jason@redhat.com>
2599         * pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for
2600         local variables, look them up instead.
2601         (tsubst_decl) [VAR_DECL]: Remove handling for anonymous union
2602         proxies and substitution in unevaluated context.
2603         (tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY
2604         before the iterators.
2606         PR c++/23055
2607         * pt.c (uses_deducible_template_parms): New.
2608         (deducible_array_bound, deducible_expression): New.
2609         (deducible_template_args): New.
2610         (unify_one_argument): Call uses_deducible_template_parms.
2612 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
2614         PR c++/56913
2615         * typeck2.c (build_m_component_ref): Protect error calls with
2616         (complain & tf_error).
2618 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
2620         PR c++/54216
2621         * parser.c (cp_parser_enum_specifier): Check for empty
2622         anonymous enums and anonymous scoped enums.
2624 2013-04-10  Jakub Jelinek  <jakub@redhat.com>
2626         PR c++/56895
2627         * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
2628         first before calling maybe_constant_value for warn_for_div_by_zero
2629         or invalid shift count warning purposes.
2631 2013-04-09  Jason Merrill  <jason@redhat.com>
2633         PR c++/25466
2634         * rtti.c (build_typeid): Check the address of the argument
2635         rather than looking for an INDIRECT_REF.
2637 2013-04-04  Jason Merrill  <jason@redhat.com>
2639         PR c++/56838
2640         PR c++/17232
2641         * typeck2.c (abstract_virtuals_error_sfinae): Disable
2642         complete_type again.
2644 2013-04-08  Paolo Carlini  <paolo.carlini@oracle.com>
2646         PR c++/56871
2647         * decl.c (validate_constexpr_redeclaration): Allow an explicit
2648         specialization to be different wrt the constexpr specifier.
2650 2013-04-06  Jason Merrill  <jason@redhat.com>
2652         * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
2653         noreturn attribute.
2655 2013-04-05  Ed Smith-Rowland  <3dw4rd@verizon.net>
2657         * parser.c (cp_parser_ref_qualifier_seq_opt): Move to
2658         cp_parser_ref_qualifier_opt.  Error if more than one ref-qual found.
2660 2013-04-03  Jason Merrill  <jason@redhat.com>
2662         * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
2663         (TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
2664         (FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.
2666         * mangle.c (write_type): When writing a function type with
2667         function-cv-quals, don't add the unqualified type as a
2668         substitution candidate.
2670 2013-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
2672         PR c++/56815
2673         * typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
2674         pedwarn.
2676 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
2678         PR debug/56819
2679         * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
2680         from args to new_args.
2681         (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
2682         r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
2684 2013-04-02  Jason Merrill  <jason@redhat.com>
2686         PR c++/56821
2687         * mangle.c (write_function_type): Mangle ref-qualifier.
2688         (write_nested_name): Likewise.
2689         (canonicalize_for_substitution): Preserve ref-qualifier.
2690         (write_type): Likewise.
2692         PR c++/34949
2693         * decl.c (begin_destructor_body): Clobber the object in a cleanup.
2695 2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>
2697         * friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
2698         * pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
2699         (for_each_template_parm_r): Use TYPE_TI_ARGS.
2701 2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>
2703         * cp-tree.h (TAGGED_TYPE_P): Remove.
2704         (IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
2705         (TYPE_ANONYMOUS_P): Adjust.
2706         * call.c (build_new_op_1): Likewise.
2707         * class.c (find_abi_tags_r): Likewise.
2708         * decl.c (warn_misplaced_attr_for_class_type, start_decl,
2709         type_is_deprecated): Likewise.
2710         * decl2.c (grokfield, min_vis_r): Likewise.
2711         * pt.c (get_template_info): Likewise.
2712         * tree.c (handle_abi_tag_attribute): Likewise.
2714 2013-04-01  Jason Merrill  <jason@redhat.com>
2716         * semantics.c (maybe_constant_value): Check
2717         instantiation_dependent_expression_p.
2718         * pt.c (build_non_dependent_expr): Don't check it here.
2720         PR c++/56772
2721         * init.c (build_new): Don't try to process an array initializer
2722         at template definition time.
2724         PR c++/56793
2725         * typeck.c (finish_class_member_access_expr): Handle enum scope.
2727         PR c++/56794
2728         * parser.c (cp_parser_range_for): Don't try to do auto deduction
2729         in a template if the type of the range is incomplete.
2731         * call.c (add_function_candidate): Take the address of 'this' here.
2732         (build_over_call): And here.
2733         (build_new_method_call_1, build_op_call_1): Not here.
2734         (build_user_type_conversion_1): Or here.
2735         (add_candidates): Adjust.
2737         * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
2738         * class.c (same_signature_p): Use type_memfn_quals.
2739         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
2740         FUNCTION_OR_METHOD_TYPE_CHECK.
2741         * error.c (dump_type_suffix): Add padding before cv-qualifiers.
2742         * pt.c (unify): Use static_fn_type.
2744 2013-04-01  Bronek Kozicki <b.kozicki@gmail.com>
2745             Jason Merrill  <jason@redhat.com>
2747         Implement N2439 (ref-qualifiers for 'this')
2748         * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
2749         (FUNCTION_RVALUE_QUALIFIED): New.
2750         (FUNCTION_OR_METHOD_TYPE_CHECK): New.
2751         (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
2752         (cp_ref_qualifier): New enum.
2753         (cp_declarator): Add ref_qualifier.
2754         * parser.c (cp_parser_ref_qualifier_seq_opt): New.
2755         (cp_parser_direct_declarator): Use it.
2756         (make_call_declarator): Adjust.
2757         (cp_parser_lambda_declarator_opt): Adjust.
2758         * call.c (add_function_candidate): Handle ref-qualifier overload
2759         resolution semantics.
2760         (standard_conversion): Adjust.
2761         * class.c (add_method, same_signature_p): Compare ref-qualifiers.
2762         * decl.c (grokdeclarator): Handle ref-qualifiers.
2763         (grokfndecl): Check for invalid ref-qualifiers.
2764         (static_fn_type, revert_static_member_fn): Adjust.
2765         * decl2.c (build_memfn_type): Handle ref-qualifiers.
2766         (check_classfn): Check them.
2767         (cp_reconstruct_complex_type): Retain them.
2768         * error.c (dump_ref_qualifier): New.
2769         (dump_type_suffix, dump_function_decl): Use it.
2770         (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
2771         * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
2772         (unify): Retain them.
2773         * tree.c (cp_check_qualified_type): New.
2774         (cp_build_qualified_type_real): Keep exception spec and ref-qual.
2775         (build_ref_qualified_type): New.
2776         (strip_typedefs, build_exception_variant): Keep ref-qualifier.
2777         (cp_build_type_attribute_variant): Keep ref-qualifier.
2778         * typeck.c (merge_types): Keep ref-qualifier.
2779         (structural_comptypes): Compare ref-qualifier.
2780         (type_memfn_rqual): New.
2781         (apply_memfn_quals): Take ref-qual argument.
2782         * typeck2.c (build_m_component_ref): Check ref-qualifier.
2784 2013-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
2786         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
2787         (DECL_FUNCTION_TEMPLATE_P): Adjust.
2789         * cxx-pretty-print.c (pp_cxx_nested_name_specifier,
2790         pp_cxx_qualified_id): Use get_containing_scope.
2791         * parser.c (cp_parser_class_head): Likewise.
2792         * pt.c (push_template_decl_real): Likewise.
2794         * decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
2795         * pt.c (unify): Use CP_INTEGRAL_TYPE_P.
2797 2013-03-31  Paolo Carlini  <paolo.carlini@oracle.com>
2799         * decl2.c (collect_candidates_for_java_method_aliases): Use
2800         DECL_CLASS_SCOPE_P.
2801         * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
2802         (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
2803         * decl.c (duplicate_decls): Likewise.
2804         * parser.c (cp_parser_template_declaration_after_export): Likewise,
2805         also DECL_DECLARES_TYPE_P.
2806         * pt.c (instantiate_class_template_1): Likewise.
2807         * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
2808         (lookup_field_r): Likewise.
2809         (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
2810         (lookup_fnfields_slot_nolazy): Likewise.
2811         * semantics.c (finish_member_declaration): Likewise.
2812         * typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
2814 2013-03-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2816         * pt.c (template_parms_to_args): Fix typo in comment.
2818 2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
2820         * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
2822 2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
2824         * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
2825         (build_op_call_1): Likewise.
2826         (build_over_call): Likewise.
2827         (compare_ics): Likewise.
2828         * class.c (build_base_path): Likewise.
2829         (resolve_address_of_overloaded_function): Likewise.
2830         * cp-tree.h: Likewise.
2831         * cvt.c (cp_convert_to_pointer): Likewise.
2832         (convert_to_reference): Likewise.
2833         (ocp_convert): Likewise.
2834         (convert_force): Likewise, tidy.
2835         * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
2836         (pp_cxx_ptr_operator): Likewise.
2837         * decl.c (duplicate_decls): Likewise.
2838         (start_decl): Likewise.
2839         (grok_op_properties): Likewise.
2840         (start_preparsed_function): Likewise.
2841         (store_parm_decls): Likewise.
2842         (finish_function): Likewise.
2843         * decl2.c (delete_sanity): Likewise.
2844         (acceptable_java_type): Likewise.
2845         (grokbitfield): Likewise.
2846         (cp_reconstruct_complex_type): Likewise.
2847         * error.c (dump_type_prefix): Likewise.
2848         (dump_expr): Likewise.
2849         * except.c (push_eh_cleanup): Likewise.
2850         (complete_ptr_ref_or_void_ptr_p): Likewise.
2851         (can_convert_eh): Likewise.
2852         * init.c (build_new_1): Likewise.
2853         (build_delete): Likewise.
2854         (build_vec_delete): Likewise.
2855         * mangle.c (write_type): Likewise.
2856         * parser.c (lookup_literal_operator): Likewise.
2857         * pt.c (convert_nontype_argument_function): Likewise.
2858         (convert_nontype_argument): Likewise.
2859         (tsubst): Likewise.
2860         (unify): Likewise.
2861         (dependent_type_p_r): Likewise.
2862         * rtti.c (build_headof): Likewise.
2863         (build_typeid): Likewise.
2864         (build_dynamic_cast_1): Likewise.
2865         (target_incomplete_p): Likewise.
2866         (typeinfo_in_lib_p): Likewise.
2867         * semantics.c (finish_omp_for): Likewise.
2868         (cxx_eval_call_expression): Likewise.
2869         (maybe_resolve_dummy): Likewise.
2870         * tree.c (build_target_expr): Likewise.
2871         (cp_build_qualified_type_real): Likewise.
2872         * typeck.c (composite_pointer_type_r): Likewise.
2873         (composite_pointer_type): Likewise.
2874         (comp_except_types): Likewise.
2875         (cxx_sizeof_nowarn): Likewise.
2876         (string_conv_p): Likewise.
2877         (cp_build_array_ref): Likewise.
2878         (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
2879         (pointer_diff): Likewise.
2880         (cp_build_addr_expr_1): Likewise.
2881         (cp_build_unary_op): Likewise.
2882         (build_static_cast_1): Likewise.
2883         (cp_build_c_cast): Likewise.
2884         (comp_ptr_ttypes_real): Likewise.
2885         (ptr_reasonably_similar): Likewise.
2886         (comp_ptr_ttypes_const): Likewise.
2887         (casts_away_constness): Likewise.
2888         (check_literal_operator_args): Likewise.
2889         * typeck2.c (build_x_arrow): Likewise.
2890         (add_exception_specifier): Likewise.
2892 2013-03-29  Jason Merrill  <jason@redhat.com>
2894         N3582
2895         * cp-tree.h (AUTO_IS_DECLTYPE): New.
2896         * parser.c (cp_parser_decltype): Handle decltype(auto).
2897         (cp_parser_type_id_1): Allow auto without a late-specified
2898         return in C++1y.
2899         (cp_parser_primary_expression): Use the return value of
2900         finish_parenthesized_expr.
2901         (cp_parser_transaction_expression): Likewise.
2902         * semantics.c (force_paren_expr): New.
2903         (finish_parenthesized_expr): Use it.
2904         * call.c (build_conditional_expr_1): Likewise.
2905         * pt.c (do_auto_deduction): Handle decltype(auto).
2906         (tsubst_copy): Handle PAREN_EXPR.
2907         (tsubst_copy_and_build): Likewise.
2908         * error.c (dump_expr): Handle PAREN_EXPR.
2909         * cxx-pretty-print.c (pp_cxx_expression): Likewise.
2910         * mangle.c (write_expression): Ignore PAREN_EXPR.
2912         * parser.c (cp_parser_decltype_expr): Split out...
2913         (cp_parser_decltype): ...from here.
2915         PR c++/56774
2916         PR c++/35722
2917         * pt.c (unify_pack_expansion): Fix indexing.
2919 2013-03-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2921         * call.c (build_java_interface_fn_ref): Likewise.
2922         (make_temporary_var_for_ref_to_temp): Likewise.
2923         * class.c (check_field_decls): Likewise.
2924         (layout_class_type): Likewise.
2925         (finish_struct_1): Likewise.
2926         (fixed_type_or_null): Likewise.
2927         (get_vtbl_decl_for_binfo): Likewise.
2928         * cp-gimplify.c (omp_var_to_track): Likewise.
2929         (cp_genericize_r): Likewise.
2930         * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
2931         * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
2932         (DECL_DISCRIMINATOR_P): Likewise.
2933         * decl.c (poplevel): Likewise.
2934         (decls_match): Likewise.
2935         (duplicate_decls): Likewise.
2936         (decl_jump_unsafe): Likewise.
2937         (start_decl): Likewise.
2938         (check_for_uninitialized_const_var): Likewise.
2939         (make_rtl_for_nonlocal_decl): Likewise.
2940         (cp_finish_decl): Likewise.
2941         (expand_static_init): Likewise.
2942         (local_variable_p): Likewise.
2943         (maybe_register_incomplete_var): Likewise.
2944         * decl2.c (grokfield): Likewise.
2945         (comdat_linkage): Likewise.
2946         (determine_visibility): Likewise.
2947         (import_export_decl): Likewise.
2948         (prune_vars_needing_no_initialization): Likewise.
2949         (decl_maybe_constant_var_p): Likewise.
2950         * error.c (dump_simple_decl): Likewise.
2951         (dump_template_decl): Likewise.
2952         (cp_printer): Likewise.
2953         * except.c (build_throw): Likewise.
2954         * init.c (build_vtbl_address): Likewise.
2955         (member_init_ok_or_else): Likewise.
2956         (build_aggr_init): Likewise.
2957         (expand_aggr_init_1): Likewise.
2958         (build_offset_ref): Likewise.
2959         (constant_value_1): Likewise.
2960         * mangle.c (write_mangled_name): Likewise.
2961         (write_prefix): Likewise.
2962         * name-lookup.c (supplement_binding_1): Likewise.
2963         (add_decl_to_level): Likewise.
2964         (pushdecl_maybe_friend_1): Likewise.
2965         (check_for_out_of_scope_variable): Likewise.
2966         (validate_nonmember_using_decl): Likewise.
2967         (lookup_name_innermost_nonclass_level_1): Likewise.
2968         (lookup_arg_dependent_1): Likewise.
2969         * parser.c (cp_parser_lambda_introducer): Likewise.
2970         (cp_parser_template_argument): Likewise.
2971         (cp_parser_single_declaration): Likewise.
2972         * pt.c (convert_nontype_argument): Likewise.
2973         (instantiate_class_template_1): Likewise.
2974         (tsubst_decl): Likewise.
2975         (tsubst_expr): Likewise.
2976         (do_decl_instantiation): Likewise.
2977         (do_type_instantiation): Likewise.
2978         (regenerate_decl_from_template): Likewise.
2979         (always_instantiate_p): Likewise.
2980         (instantiate_decl): Likewise.
2981         (type_dependent_expression_p): Likewise.
2982         (build_non_dependent_expr): Likewise.
2983         * repo.c (repo_emit_p): Likewise.
2984         * rtti.c (build_dynamic_cast_1): Likewise.
2985         * search.c (shared_member_p): Likewise.
2986         * semantics.c (outer_var_p): Likewise.
2987         (finish_id_expression): Likewise.
2988         (finish_omp_clauses): Likewise.
2989         (finish_decltype_type): Likewise.
2990         (ensure_literal_type_for_constexpr_object): Likewise.
2991         * tree.c (lvalue_kind): Likewise.
2992         (bot_replace): Likewise.
2993         (cp_tree_equal): Likewise.
2994         (handle_init_priority_attribute): Likewise.
2995         (decl_storage_duration): Likewise.
2996         * typeck.c (cxx_sizeof_expr): Likewise.
2997         (cxx_alignof_expr): Likewise.
2998         (decay_conversion): Likewise.
2999         (build_class_member_access_expr): Likewise.
3000         (cp_build_array_ref): Likewise.
3001         (cxx_mark_addressable): Likewise.
3002         (maybe_warn_about_returning_address_of_local): Likewise.
3003         (check_return_expr): Likewise.
3004         * typeck2.c (cxx_readonly_error): Likewise.
3005         (abstract_virtuals_error_sfinae): Likewise.
3006         (cxx_incomplete_type_diagnostic): Likewise.
3008 2013-03-28  Lawrence Crowl  <crowl@google.com>
3010         * Make-lang.in
3011         (CXX_PARSER_H): Add header dependence.
3012         * cp-tree.h
3013         (extern debug (cp_binding_level &)): New.
3014         (extern debug (cp_binding_level *)): New.
3015         * name-lookup.h
3016         (debug (cp_binding_level &)): New.
3017         (debug (cp_binding_level *)): New.
3018         * parser.c
3019         (debug (cp_parser &)): New.
3020         (debug (cp_parser *)): New.
3021         (debug (cp_token &)): New.
3022         (debug (cp_token *)): New.
3023         (debug (vec<cp_token, va_gc> &)): New.
3024         (debug (vec<cp_token, va_gc> *)): New.
3025         * parser.c: Add header dependence.
3026         (extern debug (cp_parser &)): New.
3027         (extern debug (cp_parser *)): New.
3028         (extern debug (cp_token &)): New.
3029         (extern debug (cp_token *)): New.
3030         (extern debug (vec<cp_token, va_gc> &)): New.
3031         (extern debug (vec<cp_token, va_gc> *)): New.
3033 2013-03-28  Jason Merrill  <jason@redhat.com>
3035         PR c++/17232
3036         PR c++/52748
3037         * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
3038         the type if tf_decltype is set.
3039         * pt.c (fn_type_unification): Add decltype_p parm.
3040         (get_bindings): Adjust.
3041         * cp-tree.h: Adjust.
3042         * class.c (resolve_address_of_overloaded_function): Adjust.
3043         * call.c (add_template_candidate_real, print_z_candidate): Adjust.
3045         PR c++/56679
3046         * parser.c (cp_parser_sizeof_pack): Split out from...
3047         (cp_parser_sizeof_operand): ...here.  Require (id).
3049         PR c++/56701
3050         * semantics.c (finish_this_expr): 'this' is an rvalue.
3051         * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
3053         PR c++/56710
3054         * semantics.c (finish_member_declaration): Don't push closure
3055         members.
3057         * name-lookup.c (pushdecl_maybe_friend_1): Use
3058         nonlambda_method_basetype and current_nonlambda_class_type.
3060         PR c++/56728
3061         * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
3062         conversion from integer to pointer.
3063         (cxx_eval_constant_expression): Likewise.
3064         (cxx_eval_indirect_ref): Use the folded operand if we still think
3065         this might be constant.
3067 2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
3068             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3070         PR c++/56725
3071         * call.c (convert_like_real): Change series of two permerrors
3072         to permerror + inform (and likewise for two errors).
3073         (build_new_method_call_1): Likewise.
3074         * typeck.c (convert_for_initialization): Change additional
3075         warning or error to inform.
3077 2013-03-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3079         * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
3080         (first_aggr_init_expr): Likewise.
3081         (more_aggr_init_expr_args_p): Likewise.
3082         (type_of_this_parm): Likewise.
3083         (class_of_this_parm): Likewise.
3084         * name-lookup.h (get_global_value_if_present): Likewise.
3085         (is_typename_at_global_scope): Likewise.
3087 2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
3089         * call.c (joust): Don't call inform for a permerror returning false.
3090         * parser.c (cp_parser_check_class_key): Likewise.
3091         * pt.c (tsubst_copy_and_build): Likewise.
3093 2013-03-27  Jason Merrill  <jason@redhat.com>
3095         PR c++/56749
3096         * semantics.c (finish_qualified_id_expr): Return early
3097         for enum scope.
3099 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3101         * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
3102         * cvt.c (convert_to_void): Likewise.
3103         * error.c (dump_expr): Likewise.
3104         * mangle.c (write_expression): Likewise.
3105         * parser.c (cp_parser_template_argument): Likewise.
3106         * pt.c (convert_nontype_argument): Likewise.
3107         (tsubst_copy_and_build): Likewise.
3108         * rtti.c (build_typeid): Likewise.
3109         * semantics.c (finish_call_expr): Likewise.
3110         (finish_decltype_type): Likewise.
3111         (build_data_member_initialization): Likewise.
3112         * tree.c (is_dummy_object): Likewise.
3113         * typeck.c (decay_conversion): Likewise.
3114         (build_class_member_access_expr): Likewise.
3115         (cp_build_addr_expr_1): Likewise.
3116         (unary_complex_lvalue): Likewise.
3117         (check_return_expr): Likewise.
3118         * typeck2.c (cxx_readonly_error): Likewise.
3120 2013-03-26  Jason Merrill  <jason@redhat.com>
3122         PR c++/52597
3123         * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn.  Take tree.
3124         * semantics.c (finish_decltype_type): Check it before type_unknown_p.
3125         * cp-tree.h: Adjust prototype.
3127         PR c++/45282
3128         * typeck2.c (build_m_component_ref): Handle prvalue object.
3130 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3132         * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
3133         * decl.c (duplicate_decls): Likewise.
3134         (cp_finish_decl): Likewise.
3135         (check_class_member_definition_namespace): Likewise.
3136         * decl2.c (grokfield): Likewise.
3137         (decl_needed_p): Likewise.
3138         (import_export_decl): Likewise.
3139         (mark_used): Likewise.
3140         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
3141         * pt.c (push_access_scope): Likewise.
3142         (instantiate_decl): Likewise.
3143         * ptree.c (cxx_print_decl): Likewise.
3144         * repo.c (repo_emit_p): Likewise.
3145         * semantics.c (note_decl_for_pch): Likewise.
3146         * tree.c (decl_linkage): Likewise.
3148 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
3150         PR c++/55951
3151         * decl.c (check_array_designated_initializer): Handle CONST_DECL
3152         as ce->index.
3154 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
3156         * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
3157         error messages.
3159         * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
3161 2013-03-25  Jason Merrill  <jason@redhat.com>
3163         PR c++/56699
3164         * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
3165         class is derived from the type of the object.
3167         PR c++/52014
3168         * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
3169         unevaluated context.
3171 2013-03-25  Paolo Carlini  <paolo.carlini@oracle.com>
3173         PR c++/56722
3174         * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
3175         DECL_TEMPLATE_INSTANTIATION.
3177 2013-03-22  Jason Merrill  <jason@redhat.com>
3179         PR c++/56684
3180         * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
3181         and CONST_DECL.
3183 2013-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3185         * cp-tree.h (identifier_p): New.
3186         * call.c: Throughout, call identifier_p insstead of direct
3187         comparaison of TREE_CODE against IDENTIFIER_NODE.
3188         * decl.c: Likewisse.
3189         * decl2.c: Likewise.
3190         * init.c: Likewise.
3191         * mangle.c: Likewise.
3192         * name-lookup.c: Likewise.
3193         * parser.c: Likewise.
3194         * pt.c: Likewise.
3195         * search.c: Likewise.
3196         * semantics.c: Likewise.
3197         * tree.c: Likewise.
3198         * typeck.c: Likewise.
3199         * typeck2.c: Likewise.
3201 2013-03-21  Jakub Jelinek  <jakub@redhat.com>
3203         PR middle-end/48087
3204         * pt.c (convert_nontype_argument): Count werrorcount as warnings.
3205         * call.c (build_temp): Likewise.
3206         * method.c (synthesize_method): Likewise.
3207         * typeck.c (convert_for_initialization): Likewise.
3209 2013-03-21  Marc Glisse  <marc.glisse@inria.fr>
3211         * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
3213 2013-03-21  Richard Biener  <rguenther@suse.de>
3215         * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
3216         DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
3218 2013-03-20  Jason Merrill  <jason@redhat.com>
3220         PR c++/56646
3221         * parser.c (cp_parser_late_return_type_opt): Save and restore
3222         current_class_ptr/ref.
3224         PR c++/54532
3225         * expr.c (cplus_expand_constant): Do nothing if the class is
3226         incomplete.
3227         * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
3228         * typeck2.c (store_init_value): Use reduced_constant_expression_p.
3229         * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
3230         (complete_vars): Likewise.
3232         * name-lookup.c (get_anonymous_namespace_name): Never use
3233         get_file_function_name.
3235         * pt.c (retrieve_specialization): Handle null tmpl argument.
3237         PR c++/17232
3238         PR c++/56642
3239         * pt.c (tsubst_decl): Check return value of register_specialization.
3240         * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
3241         change.
3243 2013-03-17  Jason Merrill  <jason@redhat.com>
3245         PR c++/54359
3246         PR c++/56639
3247         * parser.c (cp_parser_direct_declarator): Bail if we see a
3248         qualified-id not at namespace scope.
3250         PR c++/17232
3251         PR c++/56642
3252         * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
3253         change for now.
3255 2013-03-16  Jason Merrill  <jason@redhat.com>
3257         * decl.c (grokdeclarator): Assert that we won't see a pointer to
3258         METHOD_TYPE.
3260         PR c++/54277
3261         * cp-tree.h (WILDCARD_TYPE_P): Split out from...
3262         (MAYBE_CLASS_TYPE_P): ...here.
3263         * semantics.c (lambda_capture_field_type): Only build a
3264         magic decltype for wildcard types.
3265         (lambda_proxy_type): Likewise.
3266         (finish_non_static_data_member): Get the quals from
3267         the object.
3269         PR c++/55931
3270         * parser.c (cp_parser_template_argument): Don't
3271         fold_non_dependent_expr.
3273         * parser.c (cp_parser_lambda_declarator_opt): Use
3274         cp_parser_trailing_type_id.
3276         PR c++/45917
3277         * parser.c (cp_parser_template_id): Don't forget access checks.
3279         PR c++/52374
3280         * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
3282         PR c++/54764
3283         PR c++/55972
3284         * name-lookup.h (tag_scope): Add ts_lambda.
3285         * semantics.c (begin_lambda_type): Use it.
3286         * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
3287         * pt.c (check_default_tmpl_args): Ignore lambdas.
3288         (push_template_decl_real): Handle lambdas.
3289         * tree.c (no_linkage_check): Adjust lambda check.
3291         PR c++/56039
3292         * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
3294         PR c++/54359
3295         * parser.c (cp_parser_direct_declarator): Fix late return
3296         for out-of-class defn of member function.
3298         PR c++/55357
3299         * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
3300         parms to avoid duplicate -Wshadow warnings.
3302         * search.c (lookup_base): Handle NULL_TREE.
3304         PR c++/56481
3305         * semantics.c (potential_constant_expression_1): Use of 'this' in
3306         a non-constexpr function makes the expression not potentially
3307         constant.
3309         N3276
3310         PR c++/52748
3311         * cp-tree.h (tsubst_flags): Add tf_decltype.
3312         * call.c (build_cxx_call): Don't build a temporary if it's set.
3313         (build_over_call): Make sure it's only passed to build_cxx_call.
3314         * parser.c (cp_parser_primary_expression): Add decltype_p parm.
3315         (cp_parser_unary_expression): Likewise.
3316         (cp_parser_cast_expression): Likewise.
3317         (cp_parser_binary_expression): Likewise.
3318         (cp_parser_assignment_expression): Likewise.
3319         (cp_parser_postfix_expression): Likewise.  Pass tf_decltype.
3320         (cp_parser_expression): Add decltype_p.  Force a
3321         temporary for a call on the LHS of a comma.
3322         (cp_parser_decltype): Pass true to decltype_p parms.
3323         * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
3324         (tsubst_copy_and_build): Pass tf_decltype down only for
3325         CALL_EXPR and the RHS of COMPOUND_EXPR.
3326         * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
3328         * cp-tree.h (abstract_class_use): New enum.
3329         * typeck2.c (pending_abstract_type): Add use field.
3330         (abstract_virtuals_error_sfinae): Add overloads taking
3331         abstract_class_use instead of tree.
3332         * typeck.c (build_static_cast_1): Call it.
3333         * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
3334         * pt.c: Adjust calls.
3335         * decl.c (cp_finish_decl): Don't handle functions specially.
3336         (grokdeclarator): Always check return type.
3337         * init.c (build_new_1): Adjust call.
3339         DR 337
3340         PR c++/17232
3341         * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
3342         * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
3344         DR 657
3345         * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
3346         (tsubst_arg_types): Likewise.
3348         DR 1518
3349         PR c++/54835
3350         * call.c (convert_like_real): Check for explicit constructors
3351         even for value-initialization.
3353         PR c++/54946
3354         * pt.c (convert_nontype_argument): Handle invalid pointer.
3356         * parser.c (cp_parser_lambda_expression): Use nreverse.
3358         PR c++/56447
3359         PR c++/55532
3360         * pt.c (instantiate_class_template_1): Instantiate lambda capture
3361         list here.
3362         (tsubst_copy_and_build): Not here.
3364         PR c++/55017
3365         * method.c (walk_field_subobs): Disallow copy of rvalue ref.
3367         PR c++/55240
3368         * parser.c (parsing_nsdmi): New.
3369         * semantics.c (outer_automatic_var_p): Check it.
3370         (finish_id_expression): Likewise.
3371         * cp-tree.h: Declare it.
3373         PR c++/55241
3374         * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
3376         * parser.c (lookup_literal_operator): Correct parm/arg naming
3377         mixup.
3379         PR c++/56238
3380         * pt.c (fold_non_dependent_expr_sfinae): Check
3381         instantiation_dependent_expression_p.
3383         PR c++/56095
3384         * class.c (resolve_address_of_overloaded_function): Accept a
3385         reference to function for target_type.
3386         (instantiate_type): Likewise.
3387         * pt.c (convert_nontype_argument): Pass it to
3388         convert_nontype_argument_function.
3390 2013-03-16  Jakub Jelinek  <jakub@redhat.com>
3392         * tree.c (cp_tree_equal): Fix a pasto.
3394         PR c++/56607
3395         * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
3396         pass op1 through maybe_constant_value first.
3398 2013-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
3400         PR c++/56582
3401         * semantics.c (cxx_eval_array_reference): Check for negative index.
3403 2013-03-14  Jason Merrill  <jason@redhat.com>
3405         PR c++/56614
3406         * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
3408         PR c++/56346
3409         * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
3410         dso_handle parm on targets without __cxa_atexit.
3412 2013-03-11  Jason Merrill  <jason@redhat.com>
3414         PR c++/56567
3415         * typeck.c (check_return_expr): Disallow returning init list here.
3416         * semantics.c (apply_deduced_return_type): Not here.
3418 2013-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
3420         PR c++/51412
3421         * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
3422         * error.c (dump_expr): Likewise.
3424 2013-03-08  Jason Merrill  <jason@redhat.com>
3426         PR c++/51884
3427         * class.c (modify_all_vtables): Mangle the vtable name before
3428         entering dfs_walk.
3430         * semantics.c (lambda_expr_this_capture): In unevaluated context,
3431         just return the nearest 'this'.
3433         PR c++/51494
3434         PR c++/52183
3435         PR c++/56222
3436         * tree.c (maybe_dummy_object): Don't capture 'this'.
3437         * semantics.c (maybe_resolve_dummy): New.
3438         (finish_non_static_data_member): Use it.
3439         (finish_qualified_id_expr): Don't test is_dummy_object.
3440         * cp-tree.h: Declare maybe_resolve_dummy.
3441         * call.c (build_new_method_call_1): Use it.
3443         PR c++/56567
3444         * semantics.c (apply_deduced_return_type): Don't allow returning
3445         std::initializer_list.
3447 2013-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
3449         PR c++/56534
3450         * parser.c (cp_parser_elaborated_type_specifier): Don't call
3451         check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
3452         * decl.c (check_elaborated_type_specifier): Tidy.
3454 2013-03-06  Jakub Jelinek  <jakub@redhat.com>
3456         PR c++/56543
3457         * tree.c (strip_typedefs): Don't copy args if they are NULL.
3459 2013-03-05  Jakub Jelinek  <jakub@redhat.com>
3461         * parser.c (cp_parser_braced_list): For {} initialize
3462         *non_constant_p to false.
3464 2013-03-04  Jason Merrill  <jason@redhat.com>
3466         PR c++/56464
3467         PR c++/54383
3468         * semantics.c (lambda_expr_this_capture): Handle NSDMI
3469         and non-class scopes.
3471 2013-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
3473         * decl.c (grokdeclarator): Remove dead code.
3475 2013-02-28  Jason Merrill  <jason@redhat.com>
3477         PR c++/56481
3478         * semantics.c (potential_constant_expression_1): Use
3479         cxx_eval_outermost_constant_expr rather than maybe_constant_value.
3481         PR c++/56243
3482         * call.c (build_over_call): Avoid virtual lookup in a template.
3484 2013-02-27  Jason Merrill  <jason@redhat.com>
3486         PR c++/56358
3487         PR c++/56323
3488         * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
3489         of the base name for inheriting ctors.
3490         (push_class_level_binding_1): Remove inheriting ctor handling.
3491         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
3492         * class.c (add_implicitly_declared_members): Adjust.
3494 2013-02-26  David Binderman  <dcb314@hotmail.com>
3496         PR c++/55632
3497         * decl.c (grokdeclarator): Tidy publicp assignment.
3499 2013-02-25  Aldy Hernandez  <aldyh@redhat.com>
3501         PR c++/56419
3502         * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
3503         (build_transaction_expr): Same.
3505 2013-02-25  Jason Merrill  <jason@redhat.com>
3507         PR c++/56377
3508         * pt.c (fn_type_unification): Wait to call push_tinst_level until
3509         we know what args we're looking at.
3511         PR c++/56438
3512         * semantics.c (potential_constant_expression_1): In C++98, a cast
3513         to non-integral type can't be a constant expression.
3515 2013-02-24  Jakub Jelinek  <jakub@redhat.com>
3517         PR c++/56403
3518         * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
3519         of CLASS_TYPE_P.
3521 2013-02-22  Jason Merrill  <jason@redhat.com>
3523         PR c++/40405
3524         * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
3525         if we got the wrong number of template parms.
3527         PR c++/56377
3528         * pt.c (fn_type_unification): Use explicit args in template
3529         instantiation context.
3531         PR c++/56359
3532         * call.c (can_convert_arg): Discard access checks.
3534         PR c++/56395
3535         * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
3536         args.
3538 2013-02-20  Paolo Carlini  <paolo.carlini@oracle.com>
3540         PR c++/56373
3541         * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
3542         * cvt.c (ocp_convert): Use the latter.
3543         (cp_convert_to_pointer): Likewise.
3544         * decl.c (check_default_argument): Likewise.
3545         * typeck.c (cp_build_binary_op): Likewise.
3546         * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
3548 2013-02-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
3549             Paolo Carlini  <paolo.carlini@oracle.com>
3551         PR c++/51242
3552         * decl2.c (grokbitfield): Allow scoped enumeration types.
3554 2013-02-15  Jason Merrill  <jason@redhat.com>
3556         PR c++/54276
3557         * semantics.c (finish_id_expression): Also return the identifier
3558         for an outer local static.
3560         PR c++/56343
3561         * class.c (check_bases_and_members): Deduce noexcept after
3562         checking bases.
3564         PR c++/52026
3565         * semantics.c (finish_id_expression): In a template, return
3566         the identifier for a constant variable.
3568 2013-02-14  Jason Merrill  <jason@redhat.com>
3570         PR c++/54922
3571         * semantics.c (build_anon_member_initialization): New.
3572         (build_data_member_initialization): Use it.
3574         PR c++/55003
3575         * decl.c (cp_finish_decl): Force instantiation of an
3576         auto static data member.
3578         PR c++/55220
3579         * pt.c (unify): A pack expansion that is not the last template
3580         argument makes the entire template argument list non-deduced.
3582         PR c++/56323
3583         * name-lookup.c (do_class_using_decl): Handle typedefs with
3584         inheriting constructors.
3585         (push_class_level_binding_1): Allow inheriting from template
3586         template parameter, too.
3587         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
3589         PR c++/55223
3590         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
3591         default argument scope.
3592         * mangle.c (write_name): Likewise.
3594         PR c++/55232
3595         * error.c (find_typenames_r): Don't walk into a pack expansion.
3597 2013-02-13  Jason Merrill  <jason@redhat.com>
3599         PR c++/55670
3600         * parser.c (cp_parser_member_declaration): Check the declarator
3601         form when detecting a function declaration via typedef.
3603         PR c++/55680
3604         * pt.c (maybe_process_partial_specialization): A lambda
3605         isn't what's being specialized.
3607         PR c++/55710
3608         * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
3609         TREE_USED.
3611         PR c++/55879
3612         * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
3614         PR c++/55993
3615         * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
3616         non-zero offsets, too.
3618         PR c++/56155
3619         * decl.c (build_enumerator): Always convert the value to a
3620         fixed underlying type.
3622         PR c++/56135
3623         * pt.c (tsubst_copy_and_build): Don't forget any new
3624         captures that arose from use of dependent names.
3626 2013-02-13  Jakub Jelinek  <jakub@redhat.com>
3628         PR c++/56302
3629         * semantics.c (finish_asm_stmt): If input constraints allow
3630         neither register nor memory, try maybe_constant_value to get
3631         a constant if possible.
3633 2013-02-12  Jason Merrill  <jason@redhat.com>
3635         PR c++/56285
3636         * method.c (add_one_base_init): Handle base constructor
3637         taking rvalue reference parm.
3639         PR c++/56291
3640         * semantics.c (sort_constexpr_mem_initializers): Handle
3641         vptr out of order.
3643 2013-02-09  Jason Merrill  <jason@redhat.com>
3645         PR c++/56268
3646         * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
3647         maybe_instantiate_noexcept.
3649         PR c++/56247
3650         * pt.c (eq_specializations): Set comparing_specializations.
3651         * tree.c (cp_tree_equal): Check it.
3652         * cp-tree.h: Declare it.
3654         * decl.c (decls_match): Check versions later.
3656         PR c++/56238
3657         * pt.c (build_non_dependent_expr): Don't try to fold
3658         instantiation-dependent expressions.
3659         (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
3660         [BIND_EXPR]: Treat as dependent.
3662 2013-02-07  Jakub Jelinek  <jakub@redhat.com>
3664         PR c++/56241
3665         * init.c (build_vec_init): Don't append NULL values into new_vec.
3666         (build_zero_init_1): Don't push anything into v if recursive call
3667         returned NULL_TREE.
3668         (build_value_init_noctor): Don't push anything into v if
3669         build_value_init call returned NULL_TREE.
3671         PR c++/56239
3672         * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
3673         (cp_parser_tokens_start_cast_expression): ... this.  Change parameter
3674         to cp_parser *, call cp_lexer_peek_token first.  For CPP_OPEN_PAREN,
3675         return true only if 2nd token isn't CPP_CLOSE_PAREN.
3676         (cp_parser_cast_expression): Adjust caller.
3678         PR c++/56237
3679         * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
3680         only if DECL_DISCRIMINATOR_SET_P (t) rather than just
3681         DECL_LANG_SPECIFIC (t).
3683 2013-02-07  Jason Merrill  <jason@redhat.com>
3685         PR c++/56235
3686         * method.c (do_build_copy_constructor): Don't bother turning
3687         scalars from lvalues to xvalues.
3688         (do_build_copy_assign): Likewise.
3690 2013-02-06  Jason Merrill  <jason@redhat.com>
3692         * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
3694 2013-02-05  Jason Merrill  <jason@redhat.com>
3696         PR c++/54122
3697         * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
3698         METHOD_TYPE.
3700         PR c++/56177
3701         * decl.c (start_preparsed_function): Update restype if we change
3702         decl1.
3704         PR c++/56208
3705         * pt.c (fn_type_unification): Discard any access checks from
3706         substituting explicit args.
3708 2013-01-31  Jason Merrill  <jason@redhat.com>
3710         PR c++/56162
3711         PR c++/56104
3712         * typeck.c (get_member_function_from_ptrfunc): Fix
3713         ptrmemfunc_vbit_in_delta case.
3715 2013-01-29  Jason Merrill  <jason@redhat.com>
3717         PR libstdc++/54314
3718         * class.c (build_ctor_vtbl_group): Give construction vtables
3719         hidden visibility.
3721 2013-01-25  Jason Merrill  <jason@redhat.com>
3723         PR c++/56095
3724         * pt.c (convert_nontype_argument_function): Handle invalid input.
3725         (convert_nontype_argument): Likewise.
3727         PR c++/56104
3728         * typeck.c (get_member_function_from_ptrfunc): Optimize if the
3729         dynamic type has no virtual functions.
3731 2013-01-22  Paolo Carlini  <paolo.carlini@oracle.com>
3733         PR c++/55944
3734         * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
3735         on TARGET_EXPR nodes.
3737 2013-01-22  Jason Merrill  <jason@redhat.com>
3739         PR c++/56071
3740         * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
3742 2013-01-22  Dodji Seketeli  <dodji@redhat.com>
3744         PR c++/53609
3745         * pt.c (argument_pack_element_is_expansion_p)
3746         (make_argument_pack_select, use_pack_expansion_extra_args_p)
3747         (gen_elem_of_pack_expansion_instantiation): New static functions.
3748         (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
3749         look through the possibly resulting pack expansion as well.
3750         (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
3751         generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
3752         Use gen_elem_of_pack_expansion_instantiation to build the
3753         instantiation piece-wise.  Don't use arg_from_parm_pack_p anymore,
3754         as gen_elem_of_pack_expansion_instantiation and the change in
3755         tsubst above generalize this particular case.
3756         (arg_from_parm_pack_p): Remove this for it's not used by
3757         tsubst_pack_expansion anymore.
3759 2013-01-21  Jason Merrill  <jason@redhat.com>
3761         PR c++/56059
3762         * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
3763         template args count.
3765 2013-01-18  Jason Merrill  <jason@redhat.com>
3767         PR target/54908
3768         * decl2.c (get_local_tls_init_fn): New.
3769         (get_tls_init_fn): Handle flag_extern_tls_init.  Don't bother
3770         with aliases for internal variables.  Don't use weakrefs if
3771         the variable needs destruction.
3772         (generate_tls_wrapper): Mark the wrapper as const if no
3773         initialization is needed.
3774         (handle_tls_init): Don't require aliases.
3776 2013-01-15  Dodji Seketeli  <dodji@redhat.com>
3778         PR c++/55663
3779         * pt.c (coerce_innermost_template_parms): New static function.
3780         (instantiate_alias_template):  Use it here.
3782 2013-01-09  Jason Merrill  <jason@redhat.com>
3784         PR c++/55878
3785         * rtti.c (build_typeid, get_typeid): Add complain parm.
3786         (get_tinfo_decl_dynamic): Likewise.
3787         * cp-tree.h, parser.c, pt.c: Adjust.
3789         PR c++/55893
3790         * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
3791         needs destruction.
3793 2013-01-09  Jakub Jelinek  <jakub@redhat.com>
3795         PR c/48418
3796         * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
3797         call maybe_constant_value for the negative or too big shift
3798         count warnings.
3800 2013-01-09  Paolo Carlini  <paolo.carlini@oracle.com>
3802         PR c++/55801
3803         * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
3804         of the argument is true.
3806 2013-01-08  Joel Brobecker  <brobecker@adacore.com>
3808         * parser.c (cp_parser_initializer_list): Move declaration
3809         of variable non_const to start of lexical block.
3811 2013-01-07  Jason Merrill  <jason@redhat.com>
3813         PR c++/55753
3814         * tree.c (build_aggr_init_expr): Do nothing in a template.
3815         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
3816         a FUNCTION_DECL before tsubsting.
3818 2013-01-04  Dodji Seketeli  <dodji@redhat.com>
3820         PR c++/52343
3821         * pt.c (check_instantiated_arg): Allow type template arguments.
3823 2013-01-04  Jason Merrill  <jason@redhat.com>
3825         PR c++/55877
3826         * decl.c (reset_type_linkage, bt_reset_linkage): New.
3827         (grokdeclarator): Use reset_type_linkage.
3828         * name-lookup.c (binding_table_foreach): Handle null table.
3829         * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
3831 2013-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
3833         PR c++/54526 (again)
3834         * parser.c (cp_parser_template_id): Revert core of previous change
3835         (keep adjusted inform message).
3837 2013-01-03  Jason Merrill  <jason@redhat.com>
3839         PR c++/55419
3840         PR c++/55753
3841         * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
3842         TREE_CONSTANT.
3844         PR c++/55842
3845         * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
3847         PR c++/55856
3848         * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
3850         PR c++/53650
3851         * call.c (type_has_extended_temps): New.
3852         * cp-tree.h: Declare it.
3853         * decl.c (check_initializer): Use build_aggr_init for arrays
3854         if it is false.
3855         * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
3857 2013-01-02  Jason Merrill  <jason@redhat.com>
3859         PR c++/54325
3860         * call.c (build_new_method_call_1): Don't use build_value_init for
3861         user-provided default constructors.
3863         * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
3865         PR c++/55032
3866         PR c++/55245
3867         * tree.c (build_cplus_array_type): Copy layout information
3868         to main variant if necessary.
3870 Copyright (C) 2013 Free Software Foundation, Inc.
3872 Copying and distribution of this file, with or without modification,
3873 are permitted in any medium without royalty provided the copyright
3874 notice and this notice are preserved.