/cp
[official-gcc.git] / gcc / cp / ChangeLog
blobd1af38217bc3471a67f68e31db782f6b7faf9b40
1 2013-10-11  Paolo Carlini  <paolo.carlini@oracle.com>
3         PR c++/58633
4         * parser.c (cp_parser_commit_to_topmost_tentative_parse): New.
5         (cp_parser_pseudo_destructor_name): Use it.
7 2013-10-11  Paolo Carlini  <paolo.carlini@oracle.com>
9         PR c++/31671
10         * pt.c (convert_nontype_argument): Set expr_type to
11         TREE_TYPE (probe_type).
13 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
15         * decl.c (duplicate_decls): Error out for redeclaration of UDRs.
16         (declare_simd_adjust_this): New function.
17         (grokfndecl): If "omp declare simd" attribute is present,
18         call declare_simd_adjust_this if needed and
19         c_omp_declare_simd_clauses_to_numbers.
20         * cp-array-notation.c (expand_array_notation_exprs): Handle
21         OMP_TASKGROUP.
22         * cp-gimplify.c (cp_gimplify_expr): Handle OMP_SIMD and
23         OMP_DISTRIBUTE.  Handle is_invisiref_parm decls in
24         OMP_CLAUSE_REDUCTION.
25         (cp_genericize_r): Handle OMP_SIMD and OMP_DISTRIBUTE like
26         OMP_FOR.
27         (cxx_omp_privatize_by_reference): Return true for
28         is_invisiref_parm decls.
29         (cxx_omp_finish_clause): Adjust cxx_omp_create_clause_info
30         caller.
31         * pt.c (apply_late_template_attributes): For "omp declare simd"
32         attribute call tsubst_omp_clauses,
33         c_omp_declare_simd_clauses_to_decls, finish_omp_clauses
34         and c_omp_declare_simd_clauses_to_numbers.
35         (instantiate_class_template_1): Call cp_check_omp_declare_reduction
36         for UDRs.
37         (tsubst_decl): Handle UDRs.
38         (tsubst_omp_clauses): Add declare_simd argument, if true don't
39         call finish_omp_clauses.  Handle new OpenMP 4.0 clauses.
40         Handle non-NULL OMP_CLAUSE_REDUCTION_PLACEHOLDER on
41         OMP_CLAUSE_REDUCTION.
42         (tsubst_expr): For UDRs call pushdecl and
43         cp_check_omp_declare_reduction.  Adjust tsubst_omp_clauses
44         callers.  Handle OMP_SIMD, OMP_DISTRIBUTE, OMP_TEAMS,
45         OMP_TARGET_DATA, OMP_TARGET_UPDATE, OMP_TARGET, OMP_TASKGROUP.
46         Adjust finish_omp_atomic caller.
47         (tsubst_omp_udr): New function.
48         (instantiate_decl): For UDRs at block scope, don't call
49         start_preparsed_function/finish_function.  Call tsubst_omp_udr.
50         * semantics.c (cxx_omp_create_clause_info): Add need_dtor argument,
51         use it instead of need_default_ctor || need_copy_ctor.
52         (struct cp_check_omp_declare_reduction_data): New type.
53         (handle_omp_array_sections_1, handle_omp_array_sections,
54         omp_reduction_id, omp_reduction_lookup,
55         cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction_r,
56         cp_check_omp_declare_reduction, clone_omp_udr,
57         find_omp_placeholder_r, finish_omp_reduction_clause): New functions.
58         (finish_omp_clauses): Handle new OpenMP 4.0 clauses and user defined
59         reductions.
60         (finish_omp_for): Add CODE argument, use it instead of hardcoded
61         OMP_FOR.  Adjust c_finish_omp_for caller.
62         (finish_omp_atomic): Add seq_cst argument, adjust
63         c_finish_omp_atomic callers, handle seq_cst and new OpenMP 4.0
64         atomic variants.
65         (finish_omp_cancel, finish_omp_cancellation_point): New functions.
66         * decl2.c (mark_used): Force immediate instantiation of
67         DECL_OMP_DECLARE_REDUCTION_P decls.
68         (is_late_template_attribute): Return true for "omp declare simd"
69         attribute.
70         (cp_omp_mappable_type): New function.
71         (cplus_decl_attributes): Add implicit "omp declare target" attribute
72         if requested.
73         * parser.c (cp_debug_parser): Print
74         parser->colon_doesnt_start_class_def_p.
75         (cp_ensure_no_omp_declare_simd, cp_finalize_omp_declare_simd): New
76         functions.
77         (enum pragma_context): Add pragma_member and pragma_objc_icode.
78         (cp_parser_binary_expression): Handle no_toplevel_fold_p
79         even for binary operations other than comparison.
80         (cp_parser_linkage_specification): Call
81         cp_ensure_no_omp_declare_simd if needed.
82         (cp_parser_namespace_definition): Likewise.
83         (cp_parser_init_declarator): Call cp_finalize_omp_declare_simd.
84         (cp_parser_direct_declarator): Pass declarator to
85         cp_parser_late_return_type_opt.
86         (cp_parser_late_return_type_opt): Add declarator argument,
87         call cp_parser_late_parsing_omp_declare_simd for declare simd.
88         (cp_parser_class_specifier_1): Call cp_ensure_no_omp_declare_simd.
89         Parse UDRs before all other methods.
90         (cp_parser_member_specification_opt): Use pragma_member instead of
91         pragma_external.
92         (cp_parser_member_declaration): Call cp_finalize_omp_declare_simd.
93         (cp_parser_function_definition_from_specifiers_and_declarator,
94         cp_parser_save_member_function_body): Likewise.
95         (cp_parser_late_parsing_for_member): Handle UDRs specially.
96         (cp_parser_next_token_starts_class_definition_p): Don't allow
97         CPP_COLON if colon_doesnt_start_class_def_p flag is true.
98         (cp_parser_objc_interstitial_code): Use pragma_objc_icode
99         instead of pragma_external.
100         (cp_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
101         (cp_parser_omp_var_list_no_open): Parse array sections for
102         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.  Add COLON argument,
103         if non-NULL, allow parsing to end with a colon rather than close
104         paren.
105         (cp_parser_omp_var_list): Adjust cp_parser_omp_var_list_no_open
106         caller.
107         (cp_parser_omp_clause_reduction): Handle user defined reductions.
108         (cp_parser_omp_clause_branch, cp_parser_omp_clause_cancelkind,
109         cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
110         cp_parser_omp_clause_aligned, cp_parser_omp_clause_linear,
111         cp_parser_omp_clause_safelen, cp_parser_omp_clause_simdlen,
112         cp_parser_omp_clause_depend, cp_parser_omp_clause_map,
113         cp_parser_omp_clause_device, cp_parser_omp_clause_dist_schedule,
114         cp_parser_omp_clause_proc_bind, cp_parser_omp_clause_to,
115         cp_parser_omp_clause_from, cp_parser_omp_clause_uniform): New
116         functions.
117         (cp_parser_omp_all_clauses): Add finish_p argument.  Don't call
118         finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
119         (cp_parser_omp_atomic): Parse seq_cst clause, pass
120         true if it is present to finish_omp_atomic.  Handle new OpenMP 4.0
121         atomic forms.
122         (cp_parser_omp_for_loop): Add CODE argument, pass it through
123         to finish_omp_for.  Change last argument to cclauses,
124         and adjust uses to grab parallel clauses from the array of all
125         the split clauses.
126         (cp_omp_split_clauses): New function.
127         (cp_parser_omp_simd): New function.
128         (cp_parser_omp_for): Add p_name, mask and cclauses arguments.
129         Allow the function to be called also when parsing combined constructs,
130         and call c_parser_omp_simd when parsing for simd.
131         (cp_parser_omp_sections_scope): If section-sequence doesn't start with
132         #pragma omp section, require exactly one structured-block instead of
133         sequence of statements.
134         (cp_parser_omp_sections): Add p_name, mask and cclauses arguments.
135         Allow the function to be called also when parsing combined constructs.
136         (cp_parser_omp_parallel): Add p_name, mask and cclauses arguments.
137         Allow the function to be called also when parsing combined
138         constructs.
139         (cp_parser_omp_taskgroup, cp_parser_omp_cancel,
140         cp_parser_omp_cancellation_point, cp_parser_omp_distribute,
141         cp_parser_omp_teams, cp_parser_omp_target_data,
142         cp_parser_omp_target_update, cp_parser_omp_target,
143         cp_parser_omp_declare_simd, cp_parser_late_parsing_omp_declare_simd,
144         cp_parser_omp_declare_target, cp_parser_omp_end_declare_target,
145         cp_parser_omp_declare_reduction_exprs, cp_parser_omp_declare_reduction,
146         cp_parser_omp_declare): New functions.
147         (cp_parser_omp_construct): Add p_name and mask vars.  Handle
148         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
149         PRAGMA_OMP_TEAMS.  Adjust cp_parser_omp_for, cp_parser_omp_parallel
150         and cp_parser_omp_sections callers.
151         (cp_parser_pragma): Handle PRAGMA_OMP_CANCEL,
152         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
153         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
154         PRAGMA_OMP_TEAMS, PRAGMA_OMP_TARGET, PRAGMA_OMP_END_DECLARE_TARGET.
155         Handle pragma_member and pragma_objc_icode like pragma_external.
156         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
157         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
158         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
159         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
160         OMP_CLAUSE_DEPEND.
161         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
162         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
163         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
164         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
165         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
166         * parser.h (struct cp_omp_declare_simd_data): New type.
167         (struct cp_parser): Add colon_doesnt_start_class_def_p and
168         omp_declare_simd fields.
169         * cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
170         * cp-tree.h (struct lang_decl_fn): Add omp_declare_reduction_p
171         bit.
172         (DECL_OMP_DECLARE_REDUCTION_P): Define.
173         (OMP_FOR_GIMPLIFYING_P): Use OMP_LOOP_CHECK macro.
174         (struct saved_scope): Add omp_declare_target_attribute field.
175         (cp_omp_mappable_type, omp_reduction_id,
176         cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction,
177         finish_omp_cancel, finish_omp_cancellation_point): New prototypes.
178         (finish_omp_for): Add CODE argument.
179         (finish_omp_atomic): Add seq_cst argument.
180         (cxx_omp_create_clause_info): Add need_dtor argument.
182 2013-10-09  Marek Polacek  <polacek@redhat.com>
184         PR c++/58635
185         * semantics.c (finish_return_stmt): Return error_mark_node
186         when error_operand_p of the expr is true.
187         (build_transaction_expr): Check for EXPR_P before setting the
188         expr location.
190 2013-10-08  Paolo Carlini  <paolo.carlini@oracle.com>
192         PR c++/58568
193         * lambda.c (begin_lambda_type): Check return value of xref_tag
194         for error_mark_node; tidy.
195         * decl.c (grokdeclarator): Tweak error message.
197 2013-10-08  Paolo Carlini  <paolo.carlini@oracle.com>
199         PR c++/58665
200         Revert:
201         2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>
203         PR c++/58448
204         * pt.c (tsubst): Use error_operand_p on parameter t.
206 2013-10-06  Paolo Carlini  <paolo.carlini@oracle.com>
208         PR c++/58126
209         * class.c (check_bases): Propagate CLASSTYPE_READONLY_FIELDS_NEED_INIT
210         and CLASSTYPE_REF_FIELDS_NEED_INIT from bases to derived.
211         * init.c (diagnose_uninitialized_cst_or_ref_member_1): Extend error
212         messages about uninitialized const and references members to mention
213         the base class.
215 2013-10-06  Paolo Carlini  <paolo.carlini@oracle.com>
217         PR c++/56060
218         * pt.c (type_dependent_expression_p): Handle EXPR_PACK_EXPANSION.
220 2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>
222         PR c++/58560
223         * typeck2.c (build_functional_cast): Use error_operand_p on exp.
225 2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>
227         PR c++/58503
228         * parser.c (cp_parser_perform_range_for_lookup): If eventually
229         either *begin or *end is type-dependent, return NULL_TREE.
230         (do_range_for_auto_deduction): If cp_parser_perform_range_for_lookup
231         returns NULL_TREE, don't actually do_auto_deduction.
233 2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>
235         PR c++/58448
236         * pt.c (tsubst): Use error_operand_p on parameter t.
238 2013-10-04  Marc Glisse  <marc.glisse@inria.fr>
240         PR c++/19476
241         * decl.c (cxx_init_decl_processing): Set operator_new_flag.
243 2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>
245         PR c++/58584
246         * decl2.c (save_template_attributes): Handle error_mark_node as
247         *attr_p argument.
248         (cp_check_const_attributes): Likewise for attributes.
249         * parser.c (cp_parser_std_attribute_spec): When alignas_expr is an
250         error_mark_node call cp_parser_skip_to_end_of_statement.
252 2013-10-03  Easwaran Raman  <eraman@google.com>
254         PR c++/33911
255         * parser.c (cp_parser_init_declarator): Do not drop attributes
256         of template member functions.
258 2013-10-03  Marek Polacek  <polacek@redhat.com>
260         PR c++/58510
261         * init.c (sort_mem_initializers): Splice when giving an error.
263 2013-10-02  Paolo Carlini  <paolo.carlini@oracle.com>
265         PR c++/58535
266         * parser.c (cp_parser_function_specifier_opt): Upon error about
267         virtual templates don't set ds_virtual.
268         (finish_fully_implicit_template): Reject virtual implicit templates.
270 2013-10-02  Paolo Carlini  <paolo.carlini@oracle.com>
272         PR c++/58565
273         * semantics.c (potential_constant_expression_1): Handle LABEL_EXPR.
275 2013-10-01  Paolo Carlini  <paolo.carlini@oracle.com>
277         PR c++/58563
278         * parser.c (cp_parser_lookup_name): Check make_typename_type return
279         value for error_mark_node.
281 2013-09-25  Tom Tromey  <tromey@redhat.com>
283         * Make-lang.in (CXX_TREE_H, CXX_PARSER_H, CXX_PRETTY_PRINT_H):
284         Remove.
286 2013-09-25  Tom Tromey  <tromey@redhat.com>
288         * Make-lang.in (g++spec.o): Remove.
289         (CFLAGS-cp/g++spec.o): New variable.
290         (GXX_OBJS): Reference cp/g++spec.o.
291         (cc1plus-checksum.o, cp/lex.o, cp/cp-array-notation.o)
292         (cp/cp-lang.o, cp/decl.o, cp/decl2.o, cp/cp-objcp-common.o)
293         (cp/typeck2.o, cp/typeck.o, cp/class.o, cp/call.o)
294         (cp/friend.o, cp/init.o, cp/method.o, cp/cvt.o, cp/search.o)
295         (cp/tree.o, cp/ptree.o, cp/rtti.o, cp/except.o, cp/expr.o)
296         (cp/pt.o, cp/error.o, cp/repo.o, cp/semantics.o, cp/dump.o)
297         (cp/optimize.o, cp/mangle.o, cp/parser.o, cp/cp-gimplify.o)
298         (cp/name-lookup.o, cp/cxx-pretty-print.o): Remove.
300 2013-09-25  Tom Tromey  <tromey@redhat.com>
302         * Make-lang.in (g++spec.o): Don't use subshell.
304 2013-09-25  Marek Polacek  <polacek@redhat.com>
306         PR c++/58516
307         * semantics.c (finish_transaction_stmt): Check for EXPR_P before
308         setting the expr location.
310 2013-09-23  Adam Butcher  <adam@jessamine.co.uk>
312         PR c++/58500
313         * type-utils.h (find_type_usage): Only traverse one type level into
314         member function pointers.
316 2013-09-23  Adam Butcher  <adam@jessamine.co.uk>
318         * parser.c (cp_parser_init_declarator): Defer calling
319         finish_fully_implicit_template for forward declarations until after
320         other decl processing is complete.  Cleanup for clarity: Extract 'else'
321         case after 'if' containing unconditional return.
323 2013-09-23  Adam Butcher  <adam@jessamine.co.uk>
325         * parser.c (make_generic_type_name): Spell generic type names '<autoN>'
326         rather than '__GenN'.
328 2013-09-23  Adam Butcher  <adam@jessamine.co.uk>
330         * lambda.c (maybe_add_lambda_conv_op): Don't check for instantiated
331         callop in the case of generic lambdas.
333 2013-09-23  Adam Butcher  <adam@jessamine.co.uk>
335         * parser.c (make_generic_type_name): Use global count rather than
336         parameter and ...
337         (add_implicit_template_parms): ... propagate interface change here.
339 2013-09-20  Paolo Carlini  <paolo.carlini@oracle.com>
341         PR c++/58481
342         * pt.c (tsubst_copy): Use current_nonlambda_class_type to
343         call tsubst_baselink.
345 2013-09-18  Paolo Carlini  <paolo.carlini@oracle.com>
347         PR c++/58457
348         * class.c (instantiate_type): Loosen a bit the gcc_assert.
350 2013-09-18  Marek Polacek  <polacek@redhat.com>
352         PR sanitize/58443
353         * typeck.c (cp_build_binary_op): Properly honor -fsanitize options.
354         Remove unnecessary check.
356 2013-09-18  Marek Polacek  <polacek@redhat.com>
358         PR sanitizer/58411
359         * typeck.c (cp_build_binary_op): Don't sanitize function if it has the
360         no_sanitize_undefined attribute.
362 2013-09-17  Paolo Carlini  <paolo.carlini@oracle.com>
364         PR c++/58435
365         * pt.c (tsubst, [BOUND_TEMPLATE_TEMPLATE_PARM]): Take into account
366         the cp_type_quals (r) too.
368 2013-09-16  Adam Butcher  <adam@jessamine.co.uk>
370         * cp-tree.h (type_uses_auto_or_concept): Declare.
371         (is_auto_or_concept): Declare.
372         * decl.c (grokdeclarator): Allow 'auto' parameters in lambdas with
373         -std=gnu++1y or -std=c++1y or, as a GNU extension, in plain functions.
374         * type-utils.h: New header defining ...
375         (find_type_usage): ... this new function based on pt.c (type_uses_auto)
376         for searching a type tree given a predicate.
377         * pt.c (type_uses_auto): Reimplement via type-utils.h (find_type_usage).
378         (is_auto_or_concept): New function.
379         (type_uses_auto_or_concept): New function.
380         * parser.h (struct cp_parser): Add fully_implicit_function_template_p.
381         * parser.c (cp_parser_new): Initialize
382         fully_implicit_function_template_p.
383         (cp_parser_new): Initialize fully_implicit_function_template_p.
384         (cp_parser_lambda_expression): Copy and restore value of
385         fully_implicit_function_template_p as per other parser fields.
386         (cp_parser_parameter_declaration_list): Count generic
387         parameters and call ...
388         (add_implicit_template_parms): ... this new function to synthesize them
389         with help from type-utils.h (find_type_usage), ...
390         (tree_type_is_auto_or_concept): ... this new static function and ...
391         (make_generic_type_name): ... this new static function.
392         (cp_parser_direct_declarator): Account for implicit template parameters.
393         (cp_parser_lambda_declarator_opt): Finish fully implicit template if
394         necessary by calling ...
395         (finish_fully_implicit_template): ... this new function.
396         (cp_parser_init_declarator): Likewise.
397         (cp_parser_function_definition_after_declarator): Likewise.
398         (cp_parser_member_declaration): Likewise.
399         * Make-lang.in (cp/pt.o): Add dependency on type-utils.h.
400         (cp/parser.o): Likewise.
402 2013-09-16  Adam Butcher  <adam@jessamine.co.uk>
404         * parser.c (cp_parser_lambda_declarator_opt): Accept template parameter
405         list with std=c++1y or std=gnu++1y.
406         (cp_parser_lambda_body): Don't call 'expand_or_defer_fn' for lambda call
407         operator template to avoid adding template result to symbol table.
408         * lambda.c (lambda_function): Return template result if call operator is
409         a template.
410         (maybe_add_lambda_conv_op): Move declarations to point of use.  Refactor
411         operator call building in order to support conversion of a non-capturing
412         lambda template to a function pointer with help from ...
413         (prepare_op_call): ... this new function.
414         * decl2.c (check_member_template): Don't reject lambda call operator
415         template in local [lambda] class.
416         * pt.c (instantiate_class_template_1): Don't instantiate lambda call
417         operator template when instantiating lambda class.
419 2013-09-16  Adam Butcher  <adam@jessamine.co.uk>
421         * pt.c (make_auto_1): Use input_location rather than BUILTINS_LOCATION.
423 2013-09-15  Jason Merrill  <jason@redhat.com>
425         Core DR 904
426         PR c++/41933
427         * parser.c (cp_parser_lambda_introducer): Handle variadic capture.
428         * lambda.c (add_capture): Handle variadic capture.
429         (add_default_capture, lambda_capture_field_type): Likewise.
430         (build_capture_proxy, register_capture_members): Likewise.
431         * pt.c (register_specialization): Allow FIELD_DECL.
432         (retrieve_specialization): Likewise.
433         (find_parameter_packs_r): Handle FIELD_DECL and VAR_DECL.
434         (tsubst_pack_expansion): Handle FIELD_DECL packs.
435         (gen_elem_of_pack_expansion_instantiation): Likewise.
436         (instantiate_class_template_1): Likewise.
437         (tsubst_decl, tsubst_copy): Likewise.
438         (tsubst_expr) [DECL_EXPR]: Handle capture proxy packs.
439         (tsubst_copy_and_build) [VAR_DECL]: Likewise.
440         * semantics.c (finish_non_static_data_member): Don't try to represent
441         the type of a COMPOUND_REF of a FIELD_DECL pack.
443         PR c++/41933
444         * cp-tree.h (DECL_PACK_P): Replace FUNCTION_PARAMETER_PACK_P.
445         * cxx-pretty-print.c (direct_declarator): Adjust.
446         * decl2.c (cp_build_parm_decl): Adjust.
447         * pt.c (function_parameter_pack_p): Adjust.
448         (find_parameter_packs_r, push_template_decl_real): Adjust.
449         (tsubst_pack_expansion, tsubst_decl): Adjust.
450         (regenerate_decl_from_template, instantiate_decl): Adjust.
452         * lambda.c (add_capture): Don't add DECL_LANG_SPECIFIC.
454 2013-09-13  Jason Merrill  <jason@redhat.com>
456         PR c++/58273
457         * pt.c (any_type_dependent_elements_p): Actually check for
458         type-dependence, not value-dependence.
460 2013-09-13  Jacek Caban  <jacek@codeweavers.com>
462         * decl.c: Use new cxx_implicit_extern_c hook
464 2013-09-12  Brooks Moses  <bmoses@google.com>
466         PR driver/42955
467         * Make-lang.in: Do not install driver binaries in $(target)/bin.
469 2013-09-12  Adam Butcher  <adam@jessamine.co.uk>
471         * pt.c (instantiate_decl): Save/restore cp_unevaluated_operand and
472         c_inhibit_evaluation_warnings.  Reset if instantiating within a
473         function-local template.
475 2013-09-12  Paolo Carlini  <paolo.carlini@oracle.com>
477         * semantics.c (finish_pseudo_destructor_expr): Add location_t
478         parameter.
479         * pt.c (unify_arg_conversion): Use EXPR_LOC_OR_HERE.
480         (tsubst_copy_and_build): Adjust finish_pseudo_destructor_expr
481         calls.
482         * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
483         (cp_parser_postfix_expression): Pass the proper location to
484         cp_parser_postfix_dot_deref_expression.
485         * cp-tree.h (finish_pseudo_destructor_expr): Update declaration.
487 2013-09-10  Jan Hubicka  <jh@suse.cz>
488             Paolo Carlini  <paolo.carlini@oracle.com>
490         * error.c (print_instantiation_partial_context_line): If
491         loc == UNKNOWN_LOCATION return immediately.
493 2013-09-09  Jakub Jelinek  <jakub@redhat.com>
495         PR c++/58325
496         * init.c (build_vec_delete): Call mark_rvalue_use on base.
498 2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
500         PR c++/43452
501         * init.c (build_vec_delete_1): When the type is incomplete emit a
502         warning, enabled by default (not an error).
503         (build_delete): Adjust to use OPT_Wdelete_incomplete.
505 2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
507         PR c++/58362
508         * error.c (location_of): Don't handle PARM_DECLs specially.
510 2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
512         * error.c (dump_expr, [PSEUDO_DTOR_EXPR]): Fix.
513         * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
514         Tweak, TREE_OPERAND (t, 1) may be null.
516 2013-09-08  Caroline Tice  <cmtice@google.com>
518         PR c++/58300
519         * vtable-class-hierarchy.c (vtv_generate_init_routine):  In
520         preinit case, move call to assemble_vtv_preinit_initializer to
521         after call to cgraph_process_new_functions.
523 2013-09-08  Tom de Vries  <tom@codesourcery.com>
525         PR c++/58282
526         * except.c (build_must_not_throw_expr): Handle
527         flag_exceptions.
529 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
531         * typeck.c (cp_build_binary_op): Use vector_types_compatible_elements_p.
533 2013-09-04  Paolo Carlini  <paolo.carlini@oracle.com>
535         PR c++/24926
536         * class.c (finish_struct_anon_r): New.
537         (finish_struct_anon): Use it.
539 2013-09-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
541         * cxx-pretty-print.h (cxx_pretty_printer::simple_type_specifier):
542         Declare as overrider.
543         * cxx-pretty-print.c (cxx_pretty_printer::simple_type_specifier):
544         Rename from pp_cxx_simple_type_specifier.
545         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
546         simple_type_specifier.
548 2013-09-03  Paolo Carlini  <paolo.carlini@oracle.com>
550         PR c++/58305
551         * typeck2.c (build_functional_cast): Maybe warn_deprecated_use.
553 2013-09-03  Mike Stump  <mikestump@comcast.net>
555         * Make-lang.in (cp/lambda.o): Add dependencies.
557 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
559         * cxx-pretty-print.h (cxx_pretty_printer::type_id): Declare as
560         overrider.
561         * cxx-pretty-print.c (pp_cxx_storage_class_specifier): Remove.
562         (pp_cxx_userdef_literal): Tidy.
563         (pp_cxx_template_argument_list): Likewise.
564         (pp_cxx_typeid_expression): Likewise.
565         (pp_cxx_offsetof_expression_1): Likewise.
566         (cxx_pretty_printer::postfix_expression): Likewise.
567         (cxx_pretty_printer::unary_expression): Likewise.
568         (cxx_pretty_printer::statement): Likewise.
569         (cxx_pretty_printer::type_id): Rename from pp_cxx_type_id.
570         (c_pretty_printer::cxx_pretty_printer): Do not assign to type_id.
571         * error.c (dump_decl): Tidy.
572         (dump_expr): Likewise.
574 2013-09-02  Paolo Carlini  <paolo.carlini@oracle.com>
576         PR c++/21682, implement DR 565
577         * name-lookup.c (compparms_for_decl_and_using_decl): New.
578         (push_overloaded_decl_1, do_nonmember_using_decl): Use it.
580 2013-08-30  Marek Polacek  <polacek@redhat.com>
582         * typeck.c (cp_build_binary_op): Add division by zero and shift
583         instrumentation.
584         * error.c (dump_expr): Special-case ubsan builtins.
586 2013-08-30  Paolo Carlini  <paolo.carlini@oracle.com>
588         PR c++/51424
589         * cp-tree.h (LOOKUP_DELEGATING_CONS): Add.
590         * init.c (perform_target_ctor): Use it.
591         * call.c (build_special_member_call): Diagnose self-delegating
592         constructors.
594 2013-08-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
596         * cxx-pretty-print.h (cxx_pretty_printer::declaration): Declare as
597         overrider.
598         (cxx_pretty_printer::declaration_specifiers): Likewise.
599         (cxx_pretty_printer::function_specifier): Likewise.
600         (cxx_pretty_printer::declarator): Likewise.
601         (cxx_pretty_printer::direct_declarator): Likewise.
602         (cxx_pretty_printer::abstract_declarator): Likewise.
603         (cxx_pretty_printer::direct_abstract_declarator): Likewise.
604         (pp_cxx_declaration): Remove.
605         * cxx-pretty-print.c (cxx_pretty_printer::function_specifier):
606         Rename from pp_cxx_function_specifier.  Adjust.
607         (cxx_pretty_printer::declaration_specifiers): Rename from
608         pp_cxx_decl_specifier_seq.  Adjust.
609         (cxx_pretty_printer::direct_declarator): Rename from
610         pp_cxx_direct_declarator.  Adjust.
611         (cxx_pretty_printer::declarator): Rename from pp_cxx_declarator.
612         Adjust.
613         (cxx_pretty_printer::abstract_declarator): Rename from
614         pp_cxx_abstract_declarator.  Adjust.
615         (cxx_pretty_printer::direct_abstract_declarator): Rename from
616         pp_cxx_direct_abstract_declarator.  Adjust.
617         (cxx_pretty_printer::declaration): Rename from
618         pp_cxx_declaration.  Adjust.
619         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
620         declaration, declaration_specifiers, function_specifier,
621         declarator, direct_declarator, abstract_declarator,
622         direct_abstract_declarator.
623         * error.c (dump_decl): Adjust.
625 2013-08-29  Jan Hubicka  <jh@suse.cz>
627         Correct previous patch to not mark terminate as LEAF.
628         * class.c (build_vtbl_initializer): Drop LEAF
629         * decl.c (cxx_init_decl_processing): Likewise.
630         (push_throw_library_fn): Likewise.
631         * except.c (init_exception_processing): Likewise.
632         (do_begin_catch): Likewise.
633         (do_end_catch): Likewise.
634         (do_allocate_exception): Likewise.
636 2013-08-29  Jan Hubicka  <jh@suse.cz>
638         * class.c (build_vtbl_initializer): Make __cxa_deleted_virtual
639         ECF_NORETURN | ECF_LEAF
640         * cp-tree.h (build_library_fn_ptr, build_cp_library_fn_ptr,
641         push_library_fn, push_void_library_fn): Update prototype.
642         * decl.c (build_library_fn_1): Remove.
643         (push_cp_library_fn, build_cp_library_fn): Update to take ECF flags.
644         (cxx_init_decl_processing): Update; global_delete_fndecl is ECF_NOTROW;
645         __cxa_pure_virtual is ECF_NORETURN | ECF_NORETURN | ECF_LEAF.
646         (build_library_fn_1): Add ecf_flags argument; rename to ...
647         (build_library_fn): ... this one.
648         (build_cp_library_fn): Take ecf_flags; do not copy NOTHROW flag.
649         (build_library_fn_ptr): Take ecf_flags.
650         (build_cp_library_fn_ptr): Likewise.
651         (push_library_fn): Likewise.
652         (push_cp_library_fn): Likewise.
653         (push_void_library_fn): Likewise.
654         (push_throw_library_fn): All throws are ECF_NORETURN.
655         (__cxa_atexit, __cxa_thread_atexit): Add ECF_LEAF | ECF_NOTHROW attributes.
656         (expand_static_init): __cxa_guard_acquire, __cxa_guard_release,
657         __cxa_guard_abort are ECF_NOTHROW | ECF_LEAF.
658         * except.c (init_exception_processing): terminate is
659         ECF_NOTHROW | ECF_NORETURN | ECF_LEAF.
660         (declare_nothrow_library_fn): Add ecf_flags parameter.
661         (__cxa_get_exception_ptr): Is ECF_NOTHROW | ECF_PURE | ECF_LEAF |
662         ECF_TM_PURE.
663         (do_begin_catch): cxa_begin_catch and _ITM_cxa_begin_catch
664         are ECF_NOTHROW | ECF_LEAF.
665         (do_end_catch): __cxa_end_catch and _ITM_cxa_end_catch is
666         ECF_LEAF.
667         (do_allocate_exception): _cxa_allocate_exception
668         and _ITM_cxa_allocate_exception are ECF_NOTHROW | ECF_MALLOC
669         | ECF_LEAF
670         (do_free_exception): __cxa_free_exception is
671         ECF_NOTHROW | ECF_LEAF.
672         * rtti.c (build_dynamic_cast_1): __dynamic_cast
673         is ECF_LEAF | ECF_PURE | ECF_NOTHROW.
675 2013-08-29  Adam Butcher  <adam@jessamine.co.uk>
677         * error.c (dump_lambda_function): New function, dependent on ...
678         (dump_substitution): ... this new function, factored out of ...
679         (subst_to_string): ... here and ...
680         (dump_function_decl): ... here.  Updated to early-out with call to
681         dump_lambda_function after determining template bindings.
683 2013-08-28  Paolo Carlini  <paolo.carlini@oracle.com>
685         PR c++/58255
686         * init.c (build_aggr_init): When init == void_type_node do not
687         set LOOKUP_ONLYCONVERTING.
689 2013-08-27  Caroline Tice  <cmtice@google.com>
691         * vtable-class-hierarchy.c: Remove unnecessary include statements.
692         (MAX_SET_SIZE): Remove unnecessary constant.
693         (register_construction_vtables):  Make vtable_ptr_array parameter
694         into a vector; remove num_args parameter. Change array accesses to
695         vector accesses.
696         (register_other_binfo_vtables): Ditto.
697         (insert_call_to_register_set): Ditto.
698         (insert_call_to_register_pair): Ditto.
699         (output_set_info):  Ditto.  Also change warning calls to warning_at
700         calls, and fix format of warning messages.
701         (register_all_pairs): Change vtbl_ptr_array from an array into a
702         vector.  Remove num_vtable_args (replace with calls to vector length).
703         Change array stores & accesses to vector functions. Change calls to
704         register_construction_vtables, register_other_binfo_vtables,
705         insert_call_to_register_set, insert_call_to_register_pair and
706         output_set_info to match their new signatures.  Change warning to
707         warning_at and fix the format of the warning message.
709 2013-08-27  Jakub Jelinek  <jakub@redhat.com>
710             Aldy Hernandez  <aldyh@redhat.com>
712         * cp-tree.h (CP_OMP_CLAUSE_INFO): Adjust range for new clauses.
714 2013-08-27  Paolo Carlini  <paolo.carlini@oracle.com>
716         * decl.c (grokfndecl): Remove old bison hack.
718 2013-08-26  Jan Hubicka  <jh@suse.cz>
720         * cp-tree.h (DECL_CONSTRUCTOR_P, DECL_DESTRUCTOR_P): Use
721         middle-end flag.
723 2013-08-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
725         * cxx-pretty-print.h (cxx_pretty_printer::unary_expression):
726         Declare as overrider.
727         (cxx_pretty_printer::multiplicative_expression): Likewise.
728         (cxx_pretty_printer::conditional_expression): Likewise.
729         (cxx_pretty_printer::assignment_expression): Likewise.
730         (cxx_pretty_printer::expression): Likewise.
731         * cxx-pretty-print.c (cxx_pretty_printer::unary_expression):
732         Rename from pp_cxx_unary_expression.  Adjust.
733         (cxx_pretty_printer::multiplicative_expression): Rename from
734         pp_cxx_multiplicative_expression.  Adjust.
735         (cxx_pretty_printer::conditional_expression): Rename from
736         pp_cxx_conditional_expression.  Adjust.
737         (cxx_pretty_printer::assignment_expression): Rename from
738         pp_cxx_assignment_expression.  Adjust.
739         (cxx_pretty_printer::expression): Rename from pp_cxx_expression.
740         Adjust.
741         (cxx_pretty_printer::cxx_pretty_printer): Dot not assign to
742         unary_expression, multiplicative_expression,
743         conditional_expression, assignment_expression, expression.
745 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
747         * cxx-pretty-print.h (cxx_pretty_printer::postfix_expression):
748         Declare as overrider.
749         * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
750         Rename from pp_cxx_postfix_expression.  Adjust.
751         (pp_cxx_expression): Use pp_postfix_expression.
752         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
753         postfix_expression.
755 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
757         * cxx-pretty-print.h (cxx_pretty_printer::primary_expression): Now
758         an overrider of c_pretty_printer::primary_expression.
759         * cxx-pretty-print.c (cxx_pretty_printer::primary_expression):
760         Rename from pp_cxx_primary_expression.  Adjust.
761         (pp_cxx_postfix_expression): Use pp_primary_expression.
762         (pp_cxx_ctor_initializer): Likewise.
763         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
764         primary_expression.
766 2013-08-23  Jan Hubicka  <jh@suse.cz>
768         * cp-tree.h (struct lang_type_class): Free is_final bit.
769         (CLASSTYPE_FINAL): Define using TYPE_FINAL_P.
770         (DECL_FINAL_P): Remove.
771         * pt.c (instantiate_class_template_1): Guard that CLASSTYPE_FINAL
772         is called on CLASS_TYPE_P.
774 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
776         * cxx-pretty-print.c (M_): Remove.
777         (pp_cxx_unqualified_id): Use translate_string instead of M_.
778         (pp_cxx_canonical_template_parameter): Likewise.
780 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
782         * cxx-pretty-print.h (cxx_pretty_printer::id_expression): Declare.
783         * cxx-pretty-print.c (cxx_pretty_printer::id_expression): Rename
784         from pp_cxx_id_expression.  Adjust.
785         (pp_cxx_userdef_literal): Use pp_id_expression.
786         (pp_cxx_primary_expression): Likewise.
787         (pp_cxx_direct_declarator): Likewise.
788         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to
789         id_expression.
791 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
793         * cxx-pretty-print.h (cxx_pretty_printer::constant): Now a member
794         function, overriding c_pretty_printer::constant.
795         * cxx-pretty-print.c (cxx_pretty_printer::constant): Rename from
796         pp_cxx_constant.  Adjust.
797         (cxx_pretty_printer::cxx_pretty_printer): Do not assign to constant.
799 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutiobs.net>
801         * cp-objcp-common.c (cxx_initialize_diagnostics): Call a
802         destructor for the early printer.
803         * error.c (type_to_string): Use pp_buffer.
805 2013-08-22  Paolo Carlini  <paolo.carlini@oracle.com>
807         PR c++/56380
808         * class.c (check_field_decls): Check for const mutable and const
809         reference data members.
811 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
813         * error.c (init_error): Remove calls to pp_construct and
814         pp_cxx_pretty_printer_init.  Initialize cxx_pp with placement-new.
815         * cxx-pretty-print.h (cxx_pretty_printer::cxx_pretty_printer): Declare.
816         (cxx_pretty_printer_init): Remove.
817         * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer):
818         Rename from cxx_pretty_printer_init.  Adjust.
819         * cp-objcp-common.c (cxx_initialize_diagnostics): Simplify
820         initialization of C++ diagnostics pretty printer.
822 2013-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
824         * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
825         * cp-tree.h (REFERENCE_REF_P): Likewise.
826         * semantics.c (finish_offsetof): Likewise.
828 2013-08-21  Paolo Carlini  <paolo.carlini@oracle.com>
830         PR c++/56130
831         * semantics.c (finish_id_expression): Handle deprecated references.
833 2013-08-20  Jason Merrill  <jason@redhat.com>
835         PR c++/58119
836         * cvt.c (build_expr_type_conversion): Don't complain about a
837         template that can't match the desired type category.
839 2013-08-20  Gabriel Dos Reis  <gdr@integrable-solutions.net>
841         * error.c (pp_ggc_formatted_text): New.
842         (type_as_string): Use it in lieu of pp_formatted_text.
843         (type_as_string_translate): Likewise.
844         (expr_as_string): Likewise.
845         (decl_as_string): Likewise.
846         (decl_as_string_translate): Likewise.
847         (lang_decl_name): Likewise.
848         (decl_to_string): Likewise.
849         (expr_to_string): Likewise.
850         (fndecl_to_string): Likewise.
851         (parm_to_string): Likewise.
852         (type_to_string): Likewise.
853         (args_to_string): Likewise.
854         (subst_to_string): Likewise.
856 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
858         PR c/57490
859         * cp-array-notation.c (cp_expand_cond_array_notations): Added a
860         check for truth values.
861         (expand_array_notation_exprs): Added truth values case.  Removed an
862         unwanted else.  Added for-loop to walk through subtrees in default
863         case.
864         * call.c (build_cxx_call): Inherited the type of the array notation for
865         certain built-in array notation functions.
867 2013-08-19  Paolo Carlini  <paolo.carlini@oracle.com>
869         * parser.c (cp_parser_lambda_introducer, cp_parser_decltype_expr):
870         Use cp_parser_lookup_name_simple.
872 2013-08-19  Paolo Carlini  <paolo.carlini@oracle.com>
874         * name-lookup.h (pop_bindings_and_leave_scope): Declare.
875         * name-lookup.c (pop_bindings_and_leave_scope): Define.
876         * parser.c (cp_parser_lambda_declarator_opt,
877         cp_parser_direct_declarator, cp_parser_cache_defarg): Use it.
879 2013-08-17  Jason Merrill  <jason@redhat.com>
881         PR c++/58083
882         * name-lookup.c (push_class_level_binding_1): It's OK to push a
883         lambda type after the enclosing type is complete.
885 2013-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
887         * error.c (dump_scope): Add a cxx_pretty_printer parameter.
888         Adjust callers.
889         (dump_template_argument): Likewise.
890         (dump_template_argument_list): Likewise.
891         (dump_template_parameter): Likewise.
892         (dump_template_bindings): Likewise.
893         (dump_alias_template_specialization): Likewise.
894         (dump_type): Likewise.
895         (dump_typename): Likewise.
896         (dump_aggr_type): Likewise.
897         (dump_type_prefix): Likewise.
898         (dump_type_suffix): Likewise.
899         (dump_global_iord): Likewise.
900         (dump_simple_decl): Likewise.
901         (dump_decl): Likewise.
902         (dump_template_decl): Likewise.
903         (dump_function_decl): Likewise.
904         (dump_parameters): Likewise.
905         (dump_ref_qualifier): Likewise.
906         (dump_exception_spec): Likewise.
907         (dump_function_name): Likewise.
908         (dump_template_parms): Likewise.
909         (dump_call_expr_args): Likewise.
910         (dump_aggr_init_expr_args): Likewise.
911         (dump_expr_list): Likewise.
912         (dump_expr_init_vec): Likewise.
913         (dump_expr): Likewise.
914         (dump_binary_op): Likewise.
915         (dump_unary_op): Likewise.
917 2013-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
919         PR c++/51912
920         * cp-tree.h (LOOKUP_NO_NON_INTEGRAL): Add.
921         * decl.c (case_conversion): Use it.
922         * call.c (standard_conversion): Likewise.
923         (implicit_conversion): Adjust.
925 2013-08-13  Adam Butcher  <adam@jessamine.co.uk>
927         * pt.c: Grammar fix in comments ("it's" to "its").
929 2013-08-12  Paolo Carlini  <paolo.carlini@oracle.com>
931         * decl.c (warn_extern_redeclared_static, duplicate_decls,
932         check_elaborated_type_specifier): Use error + inform.
933         * friend.c (make_friend_class): Likewise.
934         * semantics.c (finish_id_expression): Likewise.
936 2013-08-09  Paolo Carlini  <paolo.carlini@oracle.com>
938         Revert:
939         2013-08-07  Paolo Carlini  <paolo.carlini@oracle.com>
941         PR c++/46206
942         * name-lookup.c (lookup_name_real_1): Handle iter->type before
943         iter->value.
945 2013-08-07  Paolo Carlini  <paolo.carlini@oracle.com>
947         PR c++/46206
948         * name-lookup.c (lookup_name_real_1): Handle iter->type before
949         iter->value.
951 2013-08-06  Caroline Tice  <cmtice@google.com>
953         * Make-lang.in (*CXX_AND_OBJCXX_OBJS):  Add vtable-class-hierarchy.o to
954         list.
955         (vtable-class-hierarchy.o): Add build rule.
956         * cp-tree.h (vtv_start_verification_constructor_init_function): New
957         extern function decl.
958         (vtv_finish_verification_constructor_init_function): New extern
959         function decl.
960         (build_vtbl_address): New extern function decl.
961         (get_mangled_vtable_map_var_name): New extern function decl.
962         (vtv_compute_class_hierarchy_transitive_closure): New extern function
963         decl.
964         (vtv_generate_init_routine): New extern function decl.
965         (vtv_save_class_info): New extern function decl.
966         (vtv_recover_class_info): New extern function decl.
967         (vtv_build_vtable_verify_fndecl): New extern function decl.
968         * class.c (finish_struct_1): Add call to vtv_save_class_info if
969         flag_vtable_verify is true.
970         * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list.
971         * vtable-class-hierarchy.c: New file.
972         * mangle.c (get_mangled_vtable_map_var_name):  New function.
973         * decl2.c (start_objects): Update function comment.
974         (cp_write_global_declarations):  Call vtv_recover_class_info,
975         vtv_compute_class_hierarchy_transitive_closure and
976         vtv_build_vtable_verify_fndecl, before calling
977         finalize_compilation_unit, and call vtv_generate_init_rount after, IFF
978         flag_vtable_verify is true.
979         (vtv_start_verification_constructor_init_function): New function.
980         (vtv_finish_verification_constructor_init_function): New function.
981         * init.c (build_vtbl_address): Remove static qualifier from function.
983 2013-08-06  Jason Merrill  <jason@redhat.com>
985         PR c++/57825
986         * tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.
988 2013-08-05  Paolo Carlini  <paolo.carlini@oracle.com>
990         PR c++/58080
991         * typeck.c (cp_pointer_int_sum): Add tsubst_flags_t parameter.
992         (cp_build_binary_op): Adjust.
994 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
996         * cxx-pretty-print.h (pp_c_base): Remove.
997         (cxx_pretty_printer): Derive from c_pretty_printer.
998         Adjust macros using pp_c_base.
999         * cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base.
1000         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise.
1001         (pp_cxx_colon_colon): Likewise.
1002         (pp_cxx_separate_with): Likewise.
1003         (pp_cxx_storage_class_specifier): Do not call pp_c_base.
1004         (pp_cxx_expression_list): Likewise.
1005         (pp_cxx_space_for_pointer_operator): Likewise.
1006         (pp_cxx_init_declarator): Likewise.
1007         (pp_cxx_call_argument_list): Likewise.
1008         (pp_cxx_constant): Likewise.
1009         (pp_cxx_postfix_expression): Likewise.
1010         (pp_cxx_new_expression): Likewise.
1011         (pp_cxx_unary_expression): Likewise.
1012         (pp_cxx_cast_expression): Likewise.
1013         (pp_cxx_conditional_expression): Likewise.
1014         (pp_cxx_assignment_expression): Likewise.
1015         (pp_cxx_expression): Likewise.
1016         (pp_cxx_function_specifier): Likewise.
1017         (pp_cxx_decl_specifier_seq): Likewise.
1018         (pp_cxx_simple_type_specifier): Likewise.
1019         (pp_cxx_type_specifier_seq): Likewise.
1020         (pp_cxx_ptr_operator): Likewise.
1021         (pp_cxx_parameter_declaration_clause): Likewise.
1022         (pp_cxx_direct_declarator): Likewise.
1023         (pp_cxx_direct_abstract_declarator): Likewise.
1024         (pp_cxx_type_id): Likewise.
1025         (pp_cxx_statement): Likewise.
1026         (pp_cxx_pretty_printer_init): Tidy.
1027         * error.c (init_error): Do not use pp_base.
1028         (dump_aggr_type): Likewise.
1029         (dump_type_prefix): Likewise.
1030         (dump_type_suffix): Likewise.
1031         (dump_global_iord): Likewise.
1032         (dump_decl): Likewise.
1033         (dump_function_decl): Likewise.
1034         (dump_ref_qualifier): Likewise.
1035         (reinit_cxx_pp): Likewise.
1036         (decl_as_dwarf_string): Likewise.
1037         (lang_decl_dwarf_name): Likewise.
1038         (type_to_string): Likewise.
1039         (cv_to_string): Likewise.
1040         (cxx_print_error_function): Likewise.
1041         (cp_diagnostic_starter): Likewise.
1042         (cp_diagnostic_finalizer): Likewise.
1043         (cp_print_error_function): Likewise.
1044         (print_instantiation_context): Likewise.
1045         (cp_printer): Likewise.
1047 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1049         * error.c (dump_type_prefix): Use specialized pretty printer
1050         functions instead of pp_string or operators and punctuators.
1051         (dump_decl): Likewise.
1052         (dump_expr): Likewise.
1054 2013-08-03  Jason Merrill  <jason@redhat.com>
1056         DR 1286
1057         * pt.c (get_underlying_template): New.
1058         (convert_template_argument, lookup_template_class_1): Use it.
1060         DR 1430
1061         PR c++/51239
1062         * pt.c (pack_expansion_args_count): Rename from
1063         any_pack_expanson_args_p.
1064         (coerce_template_parms): Reject pack expansion to
1065         non-pack template parameter of alias template.
1067 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1069         * error.c (dump_aggr_type): Use specialized pretty printer
1070         functions instead of pp_character.
1071         (dump_type_prefix): Likewise.
1072         (dump_simple_decl): Likewise.
1073         (type_to_string): Likewise.
1075 2013-08-02  Paolo Carlini  <paolo.carlini@oracle.com>
1077         * cp-tree.h (finish_stmt): Do not declare.
1078         * decl.c (finish_stmt): Do not define.
1079         * parser.c (cp_parser_expression_statement,
1080         cp_parser_declaration_statement,
1081         cp_parser_transaction_cancel): Don't call finish_stmt.
1082         * semantics.c (finish_expr_stmt, finish_if_stmt,
1083         finish_while_stmt, finish_do_stmt, finish_return_stmt,
1084         finish_for_stmt, finish_switch_stmt, finish_compound_stmt,
1085         finish_transaction_stmt): Likewise.
1087 2013-08-01  Fabien Chêne  <fabien@gcc.gnu.org>
1089         PR c++/54537
1090         * cp-tree.h: Check OVL_USED with OVERLOAD_CHECK.
1091         * name-lookup.c (do_nonmember_using_decl): Make sure we have an
1092         OVERLOAD before calling OVL_USED. Call diagnose_name_conflict
1093         instead of issuing an error without mentioning the conflicting
1094         declaration.
1096 2013-07-31  Paolo Carlini  <paolo.carlini@oracle.com>
1098         * parser.c (cp_parser_sizeof_pack): Check cp_parser_identifier
1099         return value for error_mark_node.
1101 2013-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
1103         PR c++/57673
1104         * parser.c (cp_parser_cache_defarg): In an NSDMI don't stop when
1105         token->type == CPP_ELLIPSIS.
1107 2013-07-30  Paolo Carlini  <paolo.carlini@oracle.com>
1109         PR c++/57947
1110         * call.c (is_std_init_list): Return false if cxx_dialect == cxx98.
1112 2013-07-29  Jason Merrill  <jason@redhat.com>
1114         PR c++/57901
1115         * semantics.c (build_data_member_initialization, constexpr_fn_retval):
1116         Use break_out_target_exprs instead of unshare_expr.
1118 2013-07-29  Paolo Carlini  <paolo.carlini@oracle.com>
1120         PR c++/57948
1121         * call.c (initialize_reference): Don't crash when reference_binding
1122         returns a conv with conv->kind == ck_ambig.
1124 2013-07-29  Jason Merrill  <jason@redhat.com>
1126         * mangle.c (write_name): Check for null context.
1127         (write_unscoped_name): Allow PARM_DECL context.
1129 2013-07-25  Paolo Carlini  <paolo.carlini@oracle.com>
1131         PR c++/57981
1132         * decl.c (check_default_argument): Take a tsubst_flags_t parameter.
1133         (grokparms): Adjust.
1134         * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
1135         * pt.c (tsubst_default_argument, tsubst_default_arguments): Take
1136         a tsubst_flags_t parameter.
1137         (tsubst_decl): Adjust.
1138         * call.c (convert_default_arg): Likewise.
1139         * cp-tree.h (check_default_argument, tsubst_default_argument):
1140         Update declarations.
1142 2013-07-25  Paolo Carlini  <paolo.carlini@oracle.com>
1144         PR c++/57880
1145         * parser.c (cp_parser_operator, case CPP_WSTRING, CPP_STRING16,
1146         CPP_STRING32, CPP_UTF8STRING, CPP_WSTRING_USERDEF,
1147         CPP_STRING16_USERDEF, CPP_STRING32_USERDEF, CPP_UTF8STRING_USERDEF):
1148         Fix string_len management, tidy.
1150 2013-07-24  Paolo Carlini  <paolo.carlini@oracle.com>
1152         PR c++/57942
1153         * typeck.c (ptr_reasonably_similar): Use COMPARE_STRICT if either
1154         target type is incomplete; return a bool, not an int.
1155         * cp-tree.h (ptr_reasonably_similar): Adjust declaration.
1157 2013-07-22  Paolo Carlini  <paolo.carlini@oracle.com>
1159         * cp-tree.h (DERIVED_FROM_P): Pass tf_none to lookup_base, not
1160         tf_warning_or_error.
1162 2013-07-21   Ondřej Bílka  <neleai@seznam.cz>
1164         * class.c: Fix typos.
1165         * cp-array-notation.c: Likewise.
1166         * cp-objcp-common.c: Likewise.
1167         * decl.c: Likewise.
1168         * init.c: Likewise.
1169         * mangle.c: Likewise.
1170         * parser.c: Likewise.
1171         * pt.c: Likewise.
1172         * semantics.c: Likewise.
1174 2013-07-14  Adam Butcher  <adam@jessamine.co.uk>
1176         * semantics.c (build_lambda_expr),
1177         (build_lambda_object), (begin_lambda_type), (lambda_return_type),
1178         (lambda_function), (lambda_capture_field_type), (is_capture_proxy),
1179         (is_normal_capture_proxy), (insert_capture_proxy),
1180         (insert_pending_capture_proxies), (lambda_proxy_type),
1181         (build_capture_proxy), (vla_capture_type),
1182         (register_capture_members), (add_default_capture),
1183         (lambda_expr_this_capture), (maybe_resolve_dummy),
1184         (nonlambda_method_basetype), (maybe_add_lambda_conv_op) and
1185         (is_lambda_ignored_entity): Moved definitions into ...
1186         * lambda.c: ... this new file.
1188 2013-07-14  Marc Glisse  <marc.glisse@inria.fr>
1190         * call.c (build_conditional_expr_1): Handle the case with 1 vector
1191         and 2 scalars. Call save_expr before building a vector.
1192         * typeck.c (cp_build_binary_op): Check complain before complaining.
1194 2013-07-13  Lubos Lunak  <l.lunak@suse.cz>
1196         PR c++/55203
1197         * init.c (build_aggr_init): Check for warn_unused attribute.
1198         * decl.c (poplevel): Likewise.
1200 2013-07-13  Jason Merrill  <jason@redhat.com>
1202         PR c++/57402
1203         * init.c (build_vec_init): Use {} for arrays of class type.
1204         (build_vec_delete): Don't take the address of the array.
1206         PR c++/57793
1207         * class.c (layout_class_type): Check for too-large class.
1209         * call.c (can_convert): Allow user-defined conversions.
1210         (can_convert_standard): New.
1211         * cp-tree.h: Declare it.
1212         * cvt.c (convert_to_reference): Use it.
1213         * pt.c (convert_nontype_argument): Likewise.
1214         * search.c (check_final_overrider): Likewise.
1215         Don't worry about user-defined conversions.
1217 2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
1219         PR c++/57869
1220         * typeck.c (build_reinterpret_cast_1): With -Wconditionally-supported
1221         warn about casting between pointer-to-function and pointer-to-object.
1223 2013-07-09  Jason Merrill  <jason@redhat.com>
1225         PR c++/57402
1226         * init.c (build_vec_init): Don't take shortcuts when initializing
1227         a VLA.
1229         PR c++/57471
1230         * parser.c (cp_parser_sizeof_pack): Clear parser scopes.
1232         PR c++/57658
1233         * semantics.c (finish_id_expression): Return the id for an
1234         unevaluated outer variable.
1236         PR c++/57526
1237         * semantics.c (lambda_capture_field_type): Build a DECLTYPE_TYPE
1238         if the variable type uses 'auto'.
1240         PR c++/57437
1241         * typeck.c (check_return_expr): Lambda proxies aren't eligible
1242         for nrv or return by move.
1244         PR c++/57532
1245         * parser.c (cp_parser_ref_qualifier_opt): Don't tentatively parse
1246         a ref-qualifier in C++98 mode.
1248         PR c++/57545
1249         * pt.c (convert_nontype_argument) [INTEGER_CST]: Force the
1250         argument to have the exact type of the parameter.
1252         PR c++/57551
1253         * semantics.c (cxx_eval_indirect_ref): Don't try to look through
1254         a POINTER_PLUS_EXPR for type punning diagnostic.
1256         PR c++/57831
1257         * pt.c (tsubst_copy): Handle USING_DECL.
1259 2013-07-09  Marc Glisse  <marc.glisse@inria.fr>
1261         PR c++/53094
1262         * semantics.c (cxx_eval_bit_field_ref): Handle VECTOR_CST.
1264 2013-07-09  Marc Glisse  <marc.glisse@inria.fr>
1266         PR c++/53000
1267         * call.c (build_conditional_expr_1): Preserve xvalues.
1269 2013-07-09  Paolo Carlini  <paolo.carlini@oracle.com>
1271         PR c++/51786
1272         * parser.c (cp_parser_simple_declaration): Before calling shadow_tag
1273         also check declares_class_or_enum.
1275 2013-07-08  Jason Merrill  <jason@redhat.com>
1277         PR c++/57550
1278         * pt.c (fn_type_unification): Only defer during substitution.
1279         (type_unification_real): Defer during defarg substitution,
1280         add checks parm to pass back deferred checks.
1281         (unify, do_auto_deduction): Adjust.
1282         * semantics.c (reopen_deferring_access_checks): New.
1283         * cp-tree.h: Declare it.
1285 2013-07-06  Paolo Carlini  <paolo.carlini@oracle.com>
1287         PR c++/28262
1288         * parser.c (cp_parser_init_declarator): If we are parsing a typedef
1289         set parser->default_arg_ok_p to false before cp_parser_declarator.
1291 2013-07-05  Paolo Carlini  <paolo.carlini@oracle.com>
1293         PR c++/14263
1294         * class.c (build_base_path): Improve diagnostic.
1296 2013-07-04  Paolo Carlini  <paolo.carlini@oracle.com>
1298         PR c++/38634
1299         * decl.c (start_preparsed_function): Return a bool, false if
1300         push_template_decl fails.
1301         (start_function): Adjust.
1302         * cp-tree.h: Update.
1304 2013-07-03  Jakub Jelinek  <jakub@redhat.com>
1306         PR c++/57771
1307         * parser.c (cp_parser_postfix_expression) <case RID_STATCAST>
1308         Temporarily set parser->greater_than_is_operator_p for
1309         cp_parser_expression and restore from saved value afterwards.
1311 2013-06-28  Ed Smith-Rowland  <3dw4rd@verizon.net>
1313         * cp-tree.h (UDLIT_OP_ANSI_PREFIX): Remove space.
1314         * parser.c (cp_parser_operator()): Parse user-defined string
1315         literal as literal operator.
1317 2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>
1319         PR c++/57645
1320         * class.c (deduce_noexcept_on_destructors): Save, set, and restore
1321         TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
1322         destructors.
1324 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1326         * parser.c (cp_parser_array_notation): Removed rejection array notation
1327         of type function pointers. Added handling of array expressions when
1328         Cilk Plus is enabled.  Took out type-checking.
1329         (cp_parser_postfix_open_square_expression): Moved normal array expr.
1330         parsing into cp_parser_array_notation when cilkplus is enabled.
1331         (cp_parser_compound_statement): Removed expansion of array notations.
1332         (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
1333         (cp_parser_function_definition_after_declarator): Likewise.
1334         (cp_parser_selection_statement): Removed error reporting.
1335         (cp_parser_iteration_statement): Likewise.
1336         (cp_parser_direct_declarator): Removed error checking/reporting if
1337         array notations are used in the declarator.
1338         * pt.c (instantiate_decl): Likewise.
1339         (type_unification_real): Removed a check for ARRAY_NOTATION_REF.
1340         (cxx_eval_constant_expression): Removed ARRAY_NOTATION_REF case.
1341         (potential_constant_expression_1): Returned false for
1342         ARRAY_NOTATION_REF case.
1343         * cp-gimplify.c (cp_genericize): Added expansion of array notation
1344         expressions here.
1345         * cp-array-notation.c (make_triplet_val_inv): Removed loc and cry 
1346         parameters.  Replaced build_decls with get_temp_regvar with type as
1347         ptrdiff.
1348         (create_array_refs): Made the type-casting to ptrdiff_type.
1349         (replace_invariant_var): Added a check for void return type before 
1350         creating new var.  Replaced build_decl and build_min_nt_loc with
1351         get_temp_regvar.
1352         (expand_an_in_modify_expr): Ditto.  Replaced body of redundant else 
1353         with gcc_unreachable.  Removed few unwanted checks.  Made induction 
1354         variable type as ptrdiff_type.  Removed loc and complain arguments 
1355         passed into make_triplet_val_inv.  Replaced all modify expression's 
1356         code from NOP EXPR to INIT EXPR.  Replaced all forceful appending 
1357         into stmt. list with the non-forceful one.  Replaced some integer 
1358         conversion and equality-checking to using tree_int_cst_equal.
1359         (expand_sec_reduce_builtin): All changes mentioned in above function
1360         expand_an_in_modify_expr.  Made the new variable type of
1361         SEC_REDUCE_ANY/ALL_{NON}ZERO intrinsic functions as bool.
1362         (expand_array_notation_exprs): Removed SWITCH_EXPR case.  Moved all
1363         the error reporting from parser to this function.  Removed unwanted
1364         statements and checks from SWITCH_STMT, WHILE_STMT, and DO_STMT cases.
1365         (cilkplus_an_triplet_types_ok_p): Removed rejection of array notation
1366         in function pointers.
1367         (cp_expand_cond_array_notations): Added a new if statements to check
1368         if condition has a zero rank.  If so, then just return.
1369         (expand_return_expr): Added a check for return expressions with a rank.
1370         Replaced get_tmp_regvar with a create_temporary_var.
1371         (build_array_notation_ref): Simplified and removed unwanted if-stmts.
1372         Moved common code outside if-statements.  Moved type-checking from
1373         parser to here.
1374         * semantics.c (finish_return_stmt): Removed a check for return exprs.
1375         with a rank.
1376         * call.c (convert_like_real): Removed a check for array notation
1377         expression in a function.
1378         (build_over_call): Likewise.
1379         (magic_varargs_p): Added a check for builtin array notation function.
1380         Made this function non-static and removed its prototype.
1381         * cp-tree.h (magic_varargs_p): New prototype.
1382         * typeck.c (cp_build_function_call_vec): Removed automatic setting of
1383         nargs to the param->length when builtin reduction function is used.
1384         (convert_arguments): Replaced check for a constant_p function with
1385         margic_varargs_p function call.
1386         (cp_build_binary_op): Removed calling of the function
1387         find_correct_array_notation_type.
1388         (cp_build_addr_expr_1): Removed an unwanted if-statement.
1389         (convert_for_assignment): Removed automatic return of rhs when array
1390         notation builtin function is used.
1392 2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>
1394         PR c++/57682
1395         * parser.c (cp_parser_save_member_function_body): Handle correctly
1396         curly braces in function-try-block mem-initializers.
1398 2013-06-27  Marc Glisse  <marc.glisse@inria.fr>
1400         PR c++/57509
1401         * typeck.c (cp_build_vec_perm_expr): New function.
1402         * cp-tree.h: Declare it.
1403         * parser.c (cp_parser_postfix_expression): Call it.
1404         * pt.c (tsubst_copy): Handle VEC_PERM_EXPR.
1405         (tsubst_copy_and_build): Likewise.
1407 2013-06-27  Marc Glisse  <marc.glisse@inria.fr>
1409         PR c++/57172
1410         * pt.c (more_specialized_fn): If both arguments are references,
1411         give priority to an lvalue.
1413 2013-06-26  Jason Merrill  <jason@redhat.com>
1415         * typeck2.c (store_init_value): Diagnose a non-constant
1416         initializer for in-class static.
1418         PR c++/57408
1419         * semantics.c (add_capture): Set type to error_mark_node after
1420         error.
1422 2013-06-25  Ed Smith-Rowland  <3dw4rd@verizon.net>
1424         PR c++/57640
1425         * parser.c (cp_parser_unqualified_id): Add declarator_p to checks
1426         to trigger warning, (cp_literal_operator_id): Remove bogus TODO comment.
1428 2013-06-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1430         * call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x.
1431         * class.c (add_implicitly_declared_members): Likewise.
1432         (check_field_decl): Likewise.
1433         (finalize_literal_type_property): Likewise.
1434         (check_bases_and_members): Likewise.
1435         * decl.c (poplevel): Likewise.
1436         (case_conversion): Likewise.
1437         (check_initializer): Likewise.
1438         (grokfndecl): Likewise.
1439         (check_static_variable_definition): Likewise.
1440         (compute_array_index_type): Likewise.
1441         (grokdeclarator): Likewise.
1442         (build_enumerator): Likewise.
1443         * friend.c (make_friend_class): Likewise.
1444         * lex.c (init_reswords): Likewise.
1445         * method.c (synthesized_method_walk): Likewise.
1446         (implicitly_declare_fn): Likewise.
1447         * parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
1448         (cp_parser_constant_expression): Likewise.
1449         (cp_parser_for_init_statement): Likewise.
1450         (cp_parser_block_declaration): Likewise.
1451         (cp_parser_type_name): Likewise.
1452         (cp_parser_enum_specifier): Likewise.
1453         (cp_parser_enumerator_list): Likewise.
1454         (cp_parser_member_declaration): Likewise.
1455         (cp_nth_tokens_can_be_std_attribute_p): Likewise.
1456         (cp_parser_template_declaration_after_export): Likewise.
1457         * pt.c (convert_nontype_argument_function): Likewise.
1458         (convert_nontype_argument): Likewise.
1459         (convert_template_argument): Likewise.
1460         (tsubst_copy_and_build): Likewise.
1461         (build_non_dependent_expr): Likewise.
1462         * semantics.c (non_const_var_error): Likewise.
1463         (potential_constant_expression_1): Likewise.
1464         * tree.c (lvalue_kind): Likewise.
1465         (build_vec_init_expr): Likewise.
1466         (cast_valid_in_integral_constant_expression_p): Likewise.
1467         * typeck.c (build_x_conditional_expr): Likewise.
1468         * typeck2.c (check_narrowing): Likewise.
1470 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1472         * cp-array-notation.c (cp_length_mismatch_in_expr_p): Remove.
1473         (expand_an_in_modify_expr): Changed a function call from the above
1474         removed function to length_mismatch_in_expr_p.
1476 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1478         * call.c (convert_like_real): Added a check if array notation is present
1479         in expression.  If so, then no conversion of arguments is necessary.
1480         (build_over_call): Likewise.
1481         * typeck.c (cp_build_function_call_vec): Likewise.
1482         (convert_for_assignment): Likewise.
1483         (cp_build_array_ref): Reject array notations with a rank greater than 1
1484         as an array's index.
1485         (cp_build_binary_op): If array notations are preent in op, then call
1486         find_correct_array_notation_type.
1487         (cp_build_addr_expr_1): Handle ARRAY_NOTATION_REF similar to ARRAY_REF.
1488         * cp-array-notation.c: New file.
1489         * cp-objcp-common.c (cp_common_init_ts): Marked ARRAY_NOTATION_REF tree
1490         as typed.
1491         * cp-tree.h (fix_array_notation_exprs): New prototype.
1492         * semantics.c (finish_return_stmt): Reject array notations as
1493         return value.
1494         (cxx_eval_constant_expression): Added ARRAY_NOTATION_REF case.
1495         (potential_constant_expression_1): Likewise.
1496         * tree.c (lvalue_kind): Likewise.
1497         * error.c (dump_decl): Likewise.
1498         (dump_expr): Likewise.
1499         * pt.c (ARRAY_NOTATION_REF): Likewise.
1500         (type_unification_real): Do not unify any arguments if array notations
1501         are found in arg.
1502         (instantiate_decl): Added a check for array notaitons inside the
1503         function body.  If so, then expand them.
1504         * parser.c (cp_parser_array_notation): New function.
1505         (cp_parser_postfix_open_square_expression): Added a check for colons
1506         inside square braces.  If found, then handle the array access as an
1507         array notation access.  Also, disable auto-correction from a single
1508         colon to scope when Cilk Plus is enabled.
1509         (cp_parser_compound_statement): Added a check for array notations
1510         inside the statement.  If found, then expand them.
1511         (cp_parser_ctor_initializer_opt_and_function_body): Likewise.
1512         (cp_parser_function_definition_after_declarator): Likewise.
1513         (cp_parser_selection_statement): Searched for array notations inside
1514         condition.  If so, then emit an error.
1515         (cp_parser_iteration_statement): Likewise.
1516         (cp_parser_direct_declarator): Reject array notations inside a
1517         variable or array declaration.
1518         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Added cp/cp-array-notation.o.
1520 2013-06-20  Jason Merrill  <jason@redhat.com>
1522         PR c++/55149
1523         * decl.c (compute_array_index_type): Don't reject VLAs in SFINAE
1524         context if we're in C++14 mode.
1525         * tree.c (array_of_runtime_bound_p): Return true for a dependent
1526         bound that is not potentually constant.
1527         * cp-tree.h (DECL_VLA_CAPTURE_P, REFERENCE_VLA_OK): New.
1528         * pt.c (tsubst) [REFERENCE_TYPE]: Check REFERENCE_VLA_OK.
1529         * semantics.c (build_lambda_object): Don't rvalue a VLA capture.
1530         (build_capture_proxy): Set REFERENCE_VLA_OK.
1531         (vla_capture_type): Make it a proper C++ class.
1532         (add_capture): Set DECL_VLA_CAPTURE_P.  Don't pre-digest the
1533         initializer.
1535         * decl.c (compute_array_index_type): Use size_one_node.
1537         * pt.c (process_partial_specialization): Build a TEMPLATE_DECL for
1538         a partial specialization.
1539         (tsubst_decl): Don't clobber CLASSTYPE_TI_TEMPLATE of a partial
1540         specialization.
1541         (most_specialized_class): Adjust.
1543         * cp-tree.h (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT)
1544         (DECL_TEMPLATE_INSTANTIATIONS, DECL_TEMPLATE_SPECIALIZATIONS): Use
1545         TEMPLATE_DECL_CHECK.
1547 2013-06-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1549         PR c++/57638
1550         * pt.c (unify, [TEMPLATE_PARM_INDEX]): Pass to unify_type_mismatch
1551         TREE_TYPE (arg), not arg itself.
1553 2013-06-18  Paolo Carlini  <paolo.carlini@oracle.com>
1555         PR c++/53211
1556         * pt.c (type_dependent_expression_p): Handle an array of unknown
1557         bound depending on a variadic parameter.
1558         * parser.c (cp_parser_range_for): Revert PR56794 changes.
1560 2013-06-17  Richard Biener  <rguenther@suse.de>
1562         * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h.
1564 2013-06-17  Paolo Carlini  <paolo.carlini@oracle.com>
1566         PR c++/16128
1567         * parser.c (cp_parser_expression_statement): Check whether
1568         cp_parser_expression returns error_mark_node.
1570 2013-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
1572         PR c++/51413
1573         * semantics.c (finish_offsetof): Handle INDIRECT_REF as expr.
1575 2013-06-14  Paolo Carlini  <paolo.carlini@oracle.com>
1577         PR c++/57599
1578         * rtti.c (build_dynamic_cast_1): In case of cast to an unambiguous
1579         accessible base simply forward to build_static_cast.
1581 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
1583         PR c++/38958
1584         * decl.c (poplevel): For the benefit of -Wunused-variable see
1585         through references.
1587 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
1589         * parser.c (cp_parser_nested_name_specifier_opt): Fix typo in comment.
1591 2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>
1593         PR c++/42021
1594         * parser.c (cp_parser_nested_name_specifier_opt): Avoid emitting
1595         again diagnostic already emitted by cp_parser_lookup_name.
1597 2013-06-11  Jan Hubicka  <jh@suse.cz>
1599         PR c++/57551
1600         * cp/pt.c (mark_decl_instantiated): Do not export explicit
1601         instantiations of anonymous namespace templates.
1603 2013-06-10  Jason Merrill  <jason@redhat.com>
1605         * name-lookup.c (add_decl_to_level): Add decls in an anonymous
1606         namespace to static_decls.
1608 2013-06-07  Sriraman Tallam  <tmsriram@google.com>
1610         PR c++/57548
1611         * call.c (build_over_call):  Check if current_function_decl is
1612         NULL.
1614 2013-06-07  Paolo Carlini  <paolo.carlini@oracle.com>
1616         PR c++/53658
1617         * pt.c (lookup_template_class_1): Consistently use TYPE_MAIN_DECL,
1618         not TYPE_STUB_DECL, to access the _DECL for a _TYPE.
1620 2013-06-06  Jason Merrill  <jason@redhat.com>
1622         PR c++/55520
1623         * semantics.c (add_capture): Diagnose capture of variable-size
1624         type that is not a C++1y array of runtime bound.
1626         * decl.c (grokdeclarator): Keep a decl with error type.
1627         (grokfield, grokbitfield): Likewise.
1628         * pt.c (instantiate_class_template_1): Likewise.
1629         (tsubst_decl): Drop redundant error.
1630         * class.c (walk_subobject_offsets): Handle erroneous fields.
1631         * typeck2.c (process_init_constructor_record): Likewise.
1633 2013-06-05  Paolo Carlini  <paolo.carlini@oracle.com>
1635         PR c++/51908
1636         * parser.c (cp_parser_postfix_expression [RID_*CAST]): Set
1637         parser->in_type_id_in_expr_p before calling cp_parser_type_id.
1639 2013-06-03  Jan Hubicka  <jh@suse.cz>
1641         * decl2.c (maybe_make_one_only): Use forced_by_abi instead of
1642         mark_decl_referenced.
1643         (mark_needed): Likewise.
1645 2013-06-03  Jason Merrill  <jason@redhat.com>
1647         * class.c (mark_type_abi_tags): New.
1648         (check_abi_tags): Use it.
1650 2013-06-03  Paolo Carlini  <paolo.carlini@oracle.com>
1652         PR c++/57419
1653         * decl2.c (mark_used): Add overload taking a tsubst_flags_t too.
1654         * semantics.c (finish_qualified_id_expr): Use it.
1655         * cp-tree.h: Update.
1657 2013-06-01  Jan Hubicka  <jh@suse.cz>
1659         * decl2.c (cp_write_global_declarations): Replace same_body_alias
1660         by symbol.cpp_implicit_alias.
1662 2013-05-30  Jason Merrill  <jason@redhat.com>
1664         PR c++/57404
1665         * cp-lang.c (cp_classify_record): Handle structs without
1666         TYPE_LANG_SPECIFIC.
1668         PR c++/52377
1669         * class.c (common_enclosing_class): New.
1670         * cp-tree.h: Declare it.
1671         * init.c (sort_mem_initializers): Don't splice out a union member
1672         with an NSDMI.
1674 2013-05-29  Jan Hubicka  <jh@suse.cz>
1676         * tree.c (cp_fix_function_decl_p): Update for new symtab flags.
1677         * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise.
1679 2013-05-25  Paolo Carlini  <paolo.carlini@oracle.com>
1681         PR c++/25666
1682         * decl2.c (check_classfn): Check for destructors declared as member
1683         templates.
1685 2013-05-24  Jason Merrill  <jason@redhat.com>
1687         PR c++/56971
1688         * pt.c (any_template_arguments_need_structural_equality_p): A
1689         TEMPLATE_TEMPLATE_PARM can require structural type comparison.
1691 2013-05-24  Paolo Carlini  <paolo.carlini@oracle.com>
1693         PR c++/19618
1694         * class.c (check_bitfield_decl): Warn for bool and enum bitfields
1695         with width exceeding the type.
1697 2013-05-24  Jason Merrill  <jason@redhat.com>
1699         PR c++/57391
1700         * semantics.c (cxx_eval_constant_expression): Handle FMA_EXPR.
1701         (cxx_eval_trinary_expression): Rename from cxx_eval_vec_perm_expr.
1703 2013-05-23  Jason Merrill  <jason@redhat.com>
1705         PR c++/57388
1706         * tree.c (build_ref_qualified_type): Clear
1707         FUNCTION_RVALUE_QUALIFIED for lvalue ref-qualifier.
1709 2013-05-22  Jason Merrill  <jason@redhat.com>
1711         PR c++/56930
1712         * call.c (convert_like_real): Use cp_convert_and_check.
1713         * cvt.c (cp_convert_and_check): Use maybe_constant_value.
1714         * semantics.c (cxx_eval_constant_expression): Handle LTGT_EXPR.
1715         (potential_constant_expression_1): Handle OMP_ATOMIC*.
1717         PR c++/56915
1718         * semantics.c (maybe_add_lambda_conv_op): Give up if the call op
1719         isn't defined.
1721 2013-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
1723         PR c++/57352
1724         * parser.c (cp_parser_conversion_type_id): Set up
1725         parser->type_definition_forbidden_message before calling
1726         cp_parser_type_specifier_seq.
1728 2013-05-22  Paolo Carlini  <paolo.carlini@oracle.com>
1730         PR c++/57211
1731         * method.c (defaultable_fn_check): Avoid do_warn_unused_parameter
1732         warnings about defaulted functions.
1734 2013-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
1736         * call.c (build_conditional_expr_1): Add location_t parameter.
1737         (build_conditional_expr): Likewise.
1738         * typeck.c (rationalize_conditional_expr, cp_build_array_ref,
1739         get_member_function_from_ptrfunc, build_x_conditional_expr,
1740         cp_build_modify_expr): Update.
1741         * init.c (build_new_1): Likewise.
1742         * cp-tree.h: Update declaration.
1744 2013-05-20  Jason Merrill  <jason@redhat.com>
1746         PR c++/57016
1747         * pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Only check type2
1748         if there is one.
1750         PR c++/57102
1751         * decl.c (fndecl_declared_return_type): Also look in
1752         DECL_SAVED_FUNCTION_DATA.
1754 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1756         PR c++/12288
1757         * parser.c (cp_parser_parameter_declaration): Check return value
1758         of cp_parser_parse_and_diagnose_invalid_type_name.
1760 2013-05-20  Jason Merrill  <jason@redhat.com>
1762         PR c++/57319
1763         * class.c (vbase_has_user_provided_move_assign): New.
1764         * method.c (synthesized_method_walk): Check it.
1765         * cp-tree.h: Declare it.
1767         PR c++/57325
1768         * tree.c (build_cplus_array_type): Copy layout info if element
1769         type is complete.
1771 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1773         PR c++/23608
1774         * call.c (build_new_op_1): Propagate loc to cp_build_binary_op.
1776 2013-05-20  Jason Merrill  <jason@redhat.com>
1778         PR c++/57317
1779         * decl2.c (determine_visibility): Use PRIMARY_TEMPLATE_P to decide
1780         whether a template has its own args.
1782 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1784         PR c++/57327
1785         * pt.c (unify_no_common_base): Swap arg and parm arguments to inform.
1787 2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
1789         PR c++/10207
1790         * parser.c (cp_parser_postfix_expression): Use cp_parser_braced_list
1791         instead of cp_parser_initializer_list for compound-literals.
1793 2013-05-20  Marc Glisse  <marc.glisse@inria.fr>
1795         PR c++/57175
1796         * typeck.c (check_return_expr): Reverse the alignment comparison.
1798 2013-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
1800         PR c++/18126
1801         * parser.c (cp_parser_sizeof_operand): As a GNU Extension, parse
1802         correctly sizeof compound-literal; update comments.
1804 2013-05-16  Marc Glisse  <marc.glisse@inria.fr>
1806         * call.c (build_conditional_expr_1): Use cp_build_binary_op
1807         instead of directly calling fold_build2.
1809 2013-05-16  Jason Merrill  <jason@redhat.com>
1811         * Make-lang.in (cc1plus$(exeext)): Use link mutex.
1813         PR c++/57279
1814         * decl.c (grokdeclarator): Allow member function qualifiers in
1815         TYPENAME context in C++11 mode.
1817 2013-05-16  Dodji Seketeli  <dodji@redhat.com>
1819         PR c++/56782 - Regression with empty pack expansions
1820         * pt.c (use_pack_expansion_extra_args_p): When at least a
1821         parameter pack has an empty argument pack, and another parameter
1822         pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
1823         mechanism.
1825 2013-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
1827         * name-lookup.c (pushdecl_maybe_friend_1): Replace pairs of
1828         warning_at and permerror with warning_at/inform and permerror/
1829         inform, respectively.
1831 2013-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
1833         PR c++/31952
1834         * name-lookup.c (pushdecl_maybe_friend_1): Diagnose illegal
1835         redeclarations.
1837 2013-05-14  Jason Merrill  <jason@redhat.com>
1839         PR c++/57243
1840         * parser.c (cp_parser_range_for): Call complete_type.
1842         PR c++/57041
1843         * pt.c (tsubst_copy_and_build): Don't recur into a designator.
1845 2013-05-14  Paolo Carlini  <paolo.carlini@oracle.com>
1847         PR c++/53903
1848         * method.c (defaulted_late_check): Check for compatible exception
1849         specification out of class explicitly defaulted functions too.
1851 2013-05-14  Jason Merrill  <jason@redhat.com>
1853         PR c++/56998
1854         * semantics.c (potential_constant_expression_1): Make sure the
1855         called function is potentially constant.
1856         * call.c (null_ptr_cst_p): Revert earlier change.
1858 2013-05-13  Jason Merrill  <jason@redhat.com>
1860         PR c++/56998
1861         * call.c (null_ptr_cst_p): An expression with side-effects can't
1862         be a C++03 null pointer constant.
1864         PR c++/57041
1865         * decl.c (reshape_init_class): Handle error_mark_node.
1867         PR c++/57254
1868         * typeck.c (merge_types): Propagate ref-qualifier
1869         in METHOD_TYPE case.
1871         PR c++/57253
1872         * decl.c (grokdeclarator): Apply ref-qualifier
1873         in the TYPENAME case.
1875         PR c++/57252
1876         * decl.c (decls_match): Compare ref-qualifiers.
1878 2013-05-10  Jason Merrill  <jason@redhat.com>
1880         PR c++/57196
1881         * pt.c (convert_template_argument): Use dependent_template_arg_p,
1882         not uses_template_parms.
1884         PR c++/57047
1885         * semantics.c (cxx_fold_indirect_ref): Fix thinko.
1887         PR c++/55149
1888         * semantics.c (add_capture): Error rather than abort on copy
1889         capture of VLA.
1890         * typeck.c (maybe_warn_about_returning_address_of_local): Don't
1891         warn about capture proxy.
1893 2013-05-09  Jason Merrill  <jason@redhat.com>
1895         * decl.c (cp_finish_decl): Only check VLA bound in C++1y mode.
1897         PR c++/57222
1898         * pt.c (lookup_template_class_1): Handle getting a template
1899         template parameter as D1.
1901         N3639 C++1y VLA diagnostics
1902         * decl.c (grokdeclarator): Complain about reference, pointer, or
1903         typedef to VLA.
1904         (create_array_type_for_decl): Complain about array of VLA.
1905         * pt.c (tsubst): Likewise.
1906         * rtti.c (get_tinfo_decl): Talk about "array of runtime bound".
1907         * semantics.c (finish_decltype_type): Complain about decltype of VLA.
1908         * typeck.c (cp_build_addr_expr_1): Complain about VLA.
1909         (cxx_sizeof_or_alignof_type): Likewise.
1911         N3639 C++1y VLA support
1912         * decl.c (compute_array_index_type): Allow VLAs in C++1y mode.
1913         (check_array_initializer): Allow VLA init.
1914         (reshape_init_array_1): Adjust.
1915         (cp_finish_decl): Check for invalid VLA length.
1916         * typeck2.c (process_init_constructor_array): Adjust.
1917         (store_init_value): Use build_vec_init for VLAs.
1918         * semantics.c (add_capture): Capture VLA as ptr+len.
1919         (vla_capture_type): New.
1920         (build_capture_proxy): Rebuild the VLA.
1921         * typeck.c (build_simple_component_ref): Split out from...
1922         (build_ptrmemfunc_access_expr): ...here.
1923         * tree.c (array_of_runtime_bound_p): New.
1924         * init.c (throw_bad_array_length): New.
1925         (build_vec_init): Use it.
1926         * parser.c (cp_convert_range_for): When iterating over a VLA,
1927         use it directly rather than bind a reference.
1928         * cp-tree.h: Declare new functions.
1930 2013-05-08  Jason Merrill  <jason@redhat.com>
1932         * except.c (is_admissible_throw_operand_or_catch_parameter): Check
1933         variably_modified_type_p.
1934         (expand_start_catch_block): Mark the typeinfo used here.
1935         * semantics.c (finish_handler_parms): Not here.
1937         * error.c (dump_type_suffix): Try harder on VLA length.
1939         Core 624/N2932
1940         * init.c (throw_bad_array_new_length): New.
1941         (build_new_1): Use it.  Don't warn about braced-init-list.
1942         (build_vec_init): Use it.
1943         * call.c (build_operator_new_call): Use it.
1945         PR c++/57068
1946         * decl.c (grokdeclarator): Warn about ref-qualifiers here.
1947         * parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
1948         * error.c (maybe_warn_cpp0x): s/0x/11/.
1950 2013-05-08  Paolo Carlini  <paolo.carlini@oracle.com>
1952         PR c++/51226
1953         * parser.c (cp_parser_enum_specifier): Handle nested_name_specifier
1954         == error_mark_node.
1956 2013-05-06  Marc Glisse  <marc.glisse@inria.fr>
1958         * typeck.c (cp_build_binary_op): Call save_expr before
1959         build_vector_from_val.
1961 2013-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
1963         PR c++/57183
1964         * decl.c (cp_finish_decl): After do_auto_deduction copy the
1965         qualifers with cp_apply_type_quals_to_decl.
1967 2013-05-05  Paolo Carlini  <paolo.carlini@oracle.com>
1969         * pt.c (convert_nontype_argument): Add missing whitespace in
1970         error message.
1972 2013-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
1974         PR c++/53745
1975         * decl.c (build_enumerator): Improve error message.
1977 2013-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
1979         PR c++/14283
1980         * parser.c (cp_parser_diagnose_invalid_type_name): Improve error
1981         messages for template types and fix column numbers.
1983 2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
1985         PR c++/57132
1986         * pt.c (tsubst_copy_and_build, MODOP_EXPR): Increase / decrease
1987         c_inhibit_evaluation_warnings around build_x_modify_expr call.
1989 2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
1991         PR c++/57092
1992         * semantics.c (finish_decltype_type): Handle instantiated template
1993         non-type arguments.
1995 2013-04-28  Paolo Carlini  <paolo.carlini@oracle.com>
1997         PR c++/56450
1998         * semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.
2000 2013-04-26  Jakub Jelinek  <jakub@redhat.com>
2002         * error.c (cp_print_error_function): Adjust file_name_as_prefix
2003         caller.
2005 2013-04-25  Jason Merrill  <jason@redhat.com>
2007         PR c++/56859
2008         * typeck.c (cxx_alignas_expr): Handle value-dependence properly.
2010         PR c++/50261
2011         * init.c (perform_member_init): Call reshape_init.
2013 2013-04-24  Jason Merrill  <jason@redhat.com>
2015         PR c++/53721
2016         * parser.c (cp_parser_postfix_dot_deref_expression): Fix thinko.
2018 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
2020         * typeck.c (cxx_sizeof_or_alignof_type): Change -Wpointer-arith
2021         pedwarn to simply use OPT_Wpointer_arith.
2022         (cp_build_unary_op): Likewise.
2024 2013-04-24  Jason Merrill  <jason@redhat.com>
2026         N3648: init-captures are named.
2027         * semantics.c (add_capture): Don't prepend "__" to init-captures.
2028         (build_capture_proxy): Adjust.
2029         * error.c (dump_simple_decl): Check DECL_NORMAL_CAPTURE_P.
2031         N3648: Allow braced and parenthesized initializers.
2032         * parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer.
2033         * pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE.
2034         * semantics.c (lambda_capture_field_type): Use do_auto_deduction.
2035         (add_capture): Collapse a parenthesized initializer into a single
2036         expression.
2037         * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New.
2039 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
2041         PR c++/56970
2042         * init.c (build_offset_ref): Add tsubst_flags_t parameter.
2043         * semantics.c (finish_qualified_id_expr): Likewise.
2044         (finish_id_expression): Update.
2045         * typeck.c (cp_build_addr_expr_1): Likewise.
2046         * pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
2047         * cp-tree.h: Update declarations.
2049 2013-04-22  Jason Merrill  <jason@redhat.com>
2051         Core 1586
2052         * parser.c (cp_parser_unqualified_id): Handle ~auto.
2053         (cp_parser_pseudo_destructor_name): Likewise.
2054         (cp_parser_postfix_dot_deref_expression): Adjust.
2055         (cp_lexer_nth_token_is_keyword): New.
2056         * semantics.c (finish_pseudo_destructor_expr): Handle ~auto.
2057         * typeck.c (lookup_destructor): Handle ~auto.
2059         * pt.c (fn_type_unification): Push tinst level around
2060         type_unification_real if we aren't explaining.
2061         * cp-tree.h (TFF_NO_TEMPLATE_BINDINGS): New.
2062         * error.c (dump_function_decl): Respect it.
2063         (subst_to_string): Pass it.
2065         PR c++/48665
2066         * rtti.c (get_typeid): Diagnose qualified function type.
2067         * pt.c (tsubst) [POINTER_TYPE]: Likewise.
2069         * error.c (dump_aggr_type): Fix lambda detection.
2070         (dump_simple_decl): Pretty-print capture field.
2072         N3323
2073         * cvt.c (build_expr_type_conversion): Two conversions that return
2074         the same type aren't necessarily ambiguous.
2076         N3648
2077         * parser.c (cp_parser_lambda_introducer): Make lambda capture init
2078         pedwarn unconditional except in C++1y mode.
2080         * semantics.c (potential_constant_expression_1): Don't crash on
2081         'this' in NSDMI.
2083         Core 1612
2084         * semantics.c (finish_id_expression): Reject capture of anonymous
2085         union member.
2087         Core 1609
2088         * decl2.c (check_default_args): Check for pack expansion.
2090         * mangle.c (write_type): Mangle decltype(auto).
2092 2013-04-19  Jason Merrill  <jason@redhat.com>
2094         N3638 changes to return type deduction
2095         * decl.c (undeduced_auto_decl): New.
2096         (require_deduced_type): New.
2097         (fndecl_declared_return_type): New.
2098         (decls_match): Use it.
2099         (duplicate_decls): Don't check for auto return.
2100         (grokdeclarator): Reject virtual auto.
2101         * class.c (resolve_address_of_overloaded_function): Handle
2102         auto function templates.
2103         * decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type.
2104         * cp-tree.h: Declare new fns.
2105         * error.c (dump_function_decl): Use fndecl_declared_return_type.
2106         * search.c (check_final_overrider): Likewise.
2107         * pt.c (make_decltype_auto): New.
2108         (do_auto_deduction): Require plain decltype(auto).
2109         (is_auto): Adjust.
2111         DR 941
2112         * decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
2113         template specializations.
2115 2013-04-16  Ed Smith-Rowland  <3dw4rd@verizon.net>
2117         Implement n3599 - Literal operator templates for strings.
2118         * parser.c (make_string_pack (tree value)): New function.
2119         (cp_parser_userdef_string_literal (cp_token *)): Use it
2120         to construct calls to character string literal operator templates.
2121         (cp_parser_template_declaration_after_export): Check for new string
2122         literal operator template parameter form.
2124 2013-04-15  Jason Merrill  <jason@redhat.com>
2126         * pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build.
2128         PR c++/52748
2129         * pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
2130         rather than a destructor name, it isn't an unqualified-name.
2131         (tsubst_copy_and_build): Pass down decltype_flag to operator
2132         handling code, too.
2134         PR c++/56388
2135         * semantics.c (insert_capture_proxy): Just use index 1 in the
2136         stmt_list_stack.
2138 2013-04-12  Jakub Jelinek  <jakub@redhat.com>
2140         * error.c (cp_print_error_function,
2141         print_instantiation_partial_context_line,
2142         maybe_print_constexpr_context): Colorize locus strings.
2144 2013-04-11  Jason Merrill  <jason@redhat.com>
2146         PR c++/52748
2147         * parser.c (complain_flags): New.
2148         (cp_parser_postfix_expression): Use it.
2149         (cp_parser_unary_expression): Likewise.
2150         (cp_parser_binary_expression): Likewise.
2151         (cp_parser_assignment_expression): Likewise.
2152         (cp_parser_expression): Likewise.
2153         (cp_parser_postfix_open_square_expression): Take decltype_p.
2154         (cp_parser_builtin_offsetof): Adjust.
2155         (cp_convert_range_for): Pass complain to finish_unary_op_expr.
2156         * decl2.c (grok_array_decl): Add decltype_p parm.
2157         * cp-tree.h: Adjust prototype.
2158         * semantics.c (finish_unary_op_expr): Add complain parm.
2160 2013-04-11  Jakub Jelinek  <jakub@redhat.com>
2162         PR c++/56895
2163         * call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
2164         calling maybe_constant_value for C++98.
2166 2013-04-11  Jason Merrill  <jason@redhat.com>
2168         PR c++/56901
2169         * semantics.c (lambda_capture_field_type, lambda_proxy_type):
2170         Strip references before checking WILDCARD_TYPE_P.
2172 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
2174         * call.c (build_conditional_expr_1, build_over_call): Protect
2175         error calls with complain & tf_error.
2176         * typeck.c (finish_class_member_access_expr, cp_build_binary_op,
2177         build_x_unary_op, cp_build_unary_op, cp_build_compound_expr,
2178         build_ptrmemfunc): Likewise.
2179         (lookup_destructor): Take tsubst_flags_t parameter, adjust.
2181         * cvt.c (warn_ref_binding): Rename to diagnose_ref_binding.
2182         (convert_to_reference): Adjust.
2184 2013-04-11  Jason Merrill  <jason@redhat.com>
2186         * pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for
2187         local variables, look them up instead.
2188         (tsubst_decl) [VAR_DECL]: Remove handling for anonymous union
2189         proxies and substitution in unevaluated context.
2190         (tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY
2191         before the iterators.
2193         PR c++/23055
2194         * pt.c (uses_deducible_template_parms): New.
2195         (deducible_array_bound, deducible_expression): New.
2196         (deducible_template_args): New.
2197         (unify_one_argument): Call uses_deducible_template_parms.
2199 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
2201         PR c++/56913
2202         * typeck2.c (build_m_component_ref): Protect error calls with
2203         (complain & tf_error).
2205 2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>
2207         PR c++/54216
2208         * parser.c (cp_parser_enum_specifier): Check for empty
2209         anonymous enums and anonymous scoped enums.
2211 2013-04-10  Jakub Jelinek  <jakub@redhat.com>
2213         PR c++/56895
2214         * typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
2215         first before calling maybe_constant_value for warn_for_div_by_zero
2216         or invalid shift count warning purposes.
2218 2013-04-09  Jason Merrill  <jason@redhat.com>
2220         PR c++/25466
2221         * rtti.c (build_typeid): Check the address of the argument
2222         rather than looking for an INDIRECT_REF.
2224 2013-04-04  Jason Merrill  <jason@redhat.com>
2226         PR c++/56838
2227         PR c++/17232
2228         * typeck2.c (abstract_virtuals_error_sfinae): Disable
2229         complete_type again.
2231 2013-04-08  Paolo Carlini  <paolo.carlini@oracle.com>
2233         PR c++/56871
2234         * decl.c (validate_constexpr_redeclaration): Allow an explicit
2235         specialization to be different wrt the constexpr specifier.
2237 2013-04-06  Jason Merrill  <jason@redhat.com>
2239         * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
2240         noreturn attribute.
2242 2013-04-05  Ed Smith-Rowland  <3dw4rd@verizon.net>
2244         * parser.c (cp_parser_ref_qualifier_seq_opt): Move to
2245         cp_parser_ref_qualifier_opt.  Error if more than one ref-qual found.
2247 2013-04-03  Jason Merrill  <jason@redhat.com>
2249         * cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
2250         (TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
2251         (FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.
2253         * mangle.c (write_type): When writing a function type with
2254         function-cv-quals, don't add the unqualified type as a
2255         substitution candidate.
2257 2013-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
2259         PR c++/56815
2260         * typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
2261         pedwarn.
2263 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
2265         PR debug/56819
2266         * tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
2267         from args to new_args.
2268         (strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
2269         r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
2271 2013-04-02  Jason Merrill  <jason@redhat.com>
2273         PR c++/56821
2274         * mangle.c (write_function_type): Mangle ref-qualifier.
2275         (write_nested_name): Likewise.
2276         (canonicalize_for_substitution): Preserve ref-qualifier.
2277         (write_type): Likewise.
2279         PR c++/34949
2280         * decl.c (begin_destructor_body): Clobber the object in a cleanup.
2282 2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>
2284         * friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
2285         * pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
2286         (for_each_template_parm_r): Use TYPE_TI_ARGS.
2288 2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>
2290         * cp-tree.h (TAGGED_TYPE_P): Remove.
2291         (IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
2292         (TYPE_ANONYMOUS_P): Adjust.
2293         * call.c (build_new_op_1): Likewise.
2294         * class.c (find_abi_tags_r): Likewise.
2295         * decl.c (warn_misplaced_attr_for_class_type, start_decl,
2296         type_is_deprecated): Likewise.
2297         * decl2.c (grokfield, min_vis_r): Likewise.
2298         * pt.c (get_template_info): Likewise.
2299         * tree.c (handle_abi_tag_attribute): Likewise.
2301 2013-04-01  Jason Merrill  <jason@redhat.com>
2303         * semantics.c (maybe_constant_value): Check
2304         instantiation_dependent_expression_p.
2305         * pt.c (build_non_dependent_expr): Don't check it here.
2307         PR c++/56772
2308         * init.c (build_new): Don't try to process an array initializer
2309         at template definition time.
2311         PR c++/56793
2312         * typeck.c (finish_class_member_access_expr): Handle enum scope.
2314         PR c++/56794
2315         * parser.c (cp_parser_range_for): Don't try to do auto deduction
2316         in a template if the type of the range is incomplete.
2318         * call.c (add_function_candidate): Take the address of 'this' here.
2319         (build_over_call): And here.
2320         (build_new_method_call_1, build_op_call_1): Not here.
2321         (build_user_type_conversion_1): Or here.
2322         (add_candidates): Adjust.
2324         * cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
2325         * class.c (same_signature_p): Use type_memfn_quals.
2326         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
2327         FUNCTION_OR_METHOD_TYPE_CHECK.
2328         * error.c (dump_type_suffix): Add padding before cv-qualifiers.
2329         * pt.c (unify): Use static_fn_type.
2331 2013-04-01  Bronek Kozicki <b.kozicki@gmail.com>
2332             Jason Merrill  <jason@redhat.com>
2334         Implement N2439 (ref-qualifiers for 'this')
2335         * cp-tree.h (FUNCTION_REF_QUALIFIED): New.
2336         (FUNCTION_RVALUE_QUALIFIED): New.
2337         (FUNCTION_OR_METHOD_TYPE_CHECK): New.
2338         (cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
2339         (cp_ref_qualifier): New enum.
2340         (cp_declarator): Add ref_qualifier.
2341         * parser.c (cp_parser_ref_qualifier_seq_opt): New.
2342         (cp_parser_direct_declarator): Use it.
2343         (make_call_declarator): Adjust.
2344         (cp_parser_lambda_declarator_opt): Adjust.
2345         * call.c (add_function_candidate): Handle ref-qualifier overload
2346         resolution semantics.
2347         (standard_conversion): Adjust.
2348         * class.c (add_method, same_signature_p): Compare ref-qualifiers.
2349         * decl.c (grokdeclarator): Handle ref-qualifiers.
2350         (grokfndecl): Check for invalid ref-qualifiers.
2351         (static_fn_type, revert_static_member_fn): Adjust.
2352         * decl2.c (build_memfn_type): Handle ref-qualifiers.
2353         (check_classfn): Check them.
2354         (cp_reconstruct_complex_type): Retain them.
2355         * error.c (dump_ref_qualifier): New.
2356         (dump_type_suffix, dump_function_decl): Use it.
2357         (maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
2358         * pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
2359         (unify): Retain them.
2360         * tree.c (cp_check_qualified_type): New.
2361         (cp_build_qualified_type_real): Keep exception spec and ref-qual.
2362         (build_ref_qualified_type): New.
2363         (strip_typedefs, build_exception_variant): Keep ref-qualifier.
2364         (cp_build_type_attribute_variant): Keep ref-qualifier.
2365         * typeck.c (merge_types): Keep ref-qualifier.
2366         (structural_comptypes): Compare ref-qualifier.
2367         (type_memfn_rqual): New.
2368         (apply_memfn_quals): Take ref-qual argument.
2369         * typeck2.c (build_m_component_ref): Check ref-qualifier.
2371 2013-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
2373         * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
2374         (DECL_FUNCTION_TEMPLATE_P): Adjust.
2376         * cxx-pretty-print.c (pp_cxx_nested_name_specifier,
2377         pp_cxx_qualified_id): Use get_containing_scope.
2378         * parser.c (cp_parser_class_head): Likewise.
2379         * pt.c (push_template_decl_real): Likewise.
2381         * decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
2382         * pt.c (unify): Use CP_INTEGRAL_TYPE_P.
2384 2013-03-31  Paolo Carlini  <paolo.carlini@oracle.com>
2386         * decl2.c (collect_candidates_for_java_method_aliases): Use
2387         DECL_CLASS_SCOPE_P.
2388         * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
2389         (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
2390         * decl.c (duplicate_decls): Likewise.
2391         * parser.c (cp_parser_template_declaration_after_export): Likewise,
2392         also DECL_DECLARES_TYPE_P.
2393         * pt.c (instantiate_class_template_1): Likewise.
2394         * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
2395         (lookup_field_r): Likewise.
2396         (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
2397         (lookup_fnfields_slot_nolazy): Likewise.
2398         * semantics.c (finish_member_declaration): Likewise.
2399         * typeck.c (convert_for_initialization): Use TYPE_REFFN_P.
2401 2013-03-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2403         * pt.c (template_parms_to_args): Fix typo in comment.
2405 2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
2407         * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
2409 2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
2411         * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
2412         (build_op_call_1): Likewise.
2413         (build_over_call): Likewise.
2414         (compare_ics): Likewise.
2415         * class.c (build_base_path): Likewise.
2416         (resolve_address_of_overloaded_function): Likewise.
2417         * cp-tree.h: Likewise.
2418         * cvt.c (cp_convert_to_pointer): Likewise.
2419         (convert_to_reference): Likewise.
2420         (ocp_convert): Likewise.
2421         (convert_force): Likewise, tidy.
2422         * cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
2423         (pp_cxx_ptr_operator): Likewise.
2424         * decl.c (duplicate_decls): Likewise.
2425         (start_decl): Likewise.
2426         (grok_op_properties): Likewise.
2427         (start_preparsed_function): Likewise.
2428         (store_parm_decls): Likewise.
2429         (finish_function): Likewise.
2430         * decl2.c (delete_sanity): Likewise.
2431         (acceptable_java_type): Likewise.
2432         (grokbitfield): Likewise.
2433         (cp_reconstruct_complex_type): Likewise.
2434         * error.c (dump_type_prefix): Likewise.
2435         (dump_expr): Likewise.
2436         * except.c (push_eh_cleanup): Likewise.
2437         (complete_ptr_ref_or_void_ptr_p): Likewise.
2438         (can_convert_eh): Likewise.
2439         * init.c (build_new_1): Likewise.
2440         (build_delete): Likewise.
2441         (build_vec_delete): Likewise.
2442         * mangle.c (write_type): Likewise.
2443         * parser.c (lookup_literal_operator): Likewise.
2444         * pt.c (convert_nontype_argument_function): Likewise.
2445         (convert_nontype_argument): Likewise.
2446         (tsubst): Likewise.
2447         (unify): Likewise.
2448         (dependent_type_p_r): Likewise.
2449         * rtti.c (build_headof): Likewise.
2450         (build_typeid): Likewise.
2451         (build_dynamic_cast_1): Likewise.
2452         (target_incomplete_p): Likewise.
2453         (typeinfo_in_lib_p): Likewise.
2454         * semantics.c (finish_omp_for): Likewise.
2455         (cxx_eval_call_expression): Likewise.
2456         (maybe_resolve_dummy): Likewise.
2457         * tree.c (build_target_expr): Likewise.
2458         (cp_build_qualified_type_real): Likewise.
2459         * typeck.c (composite_pointer_type_r): Likewise.
2460         (composite_pointer_type): Likewise.
2461         (comp_except_types): Likewise.
2462         (cxx_sizeof_nowarn): Likewise.
2463         (string_conv_p): Likewise.
2464         (cp_build_array_ref): Likewise.
2465         (cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
2466         (pointer_diff): Likewise.
2467         (cp_build_addr_expr_1): Likewise.
2468         (cp_build_unary_op): Likewise.
2469         (build_static_cast_1): Likewise.
2470         (cp_build_c_cast): Likewise.
2471         (comp_ptr_ttypes_real): Likewise.
2472         (ptr_reasonably_similar): Likewise.
2473         (comp_ptr_ttypes_const): Likewise.
2474         (casts_away_constness): Likewise.
2475         (check_literal_operator_args): Likewise.
2476         * typeck2.c (build_x_arrow): Likewise.
2477         (add_exception_specifier): Likewise.
2479 2013-03-29  Jason Merrill  <jason@redhat.com>
2481         N3582
2482         * cp-tree.h (AUTO_IS_DECLTYPE): New.
2483         * parser.c (cp_parser_decltype): Handle decltype(auto).
2484         (cp_parser_type_id_1): Allow auto without a late-specified
2485         return in C++1y.
2486         (cp_parser_primary_expression): Use the return value of
2487         finish_parenthesized_expr.
2488         (cp_parser_transaction_expression): Likewise.
2489         * semantics.c (force_paren_expr): New.
2490         (finish_parenthesized_expr): Use it.
2491         * call.c (build_conditional_expr_1): Likewise.
2492         * pt.c (do_auto_deduction): Handle decltype(auto).
2493         (tsubst_copy): Handle PAREN_EXPR.
2494         (tsubst_copy_and_build): Likewise.
2495         * error.c (dump_expr): Handle PAREN_EXPR.
2496         * cxx-pretty-print.c (pp_cxx_expression): Likewise.
2497         * mangle.c (write_expression): Ignore PAREN_EXPR.
2499         * parser.c (cp_parser_decltype_expr): Split out...
2500         (cp_parser_decltype): ...from here.
2502         PR c++/56774
2503         PR c++/35722
2504         * pt.c (unify_pack_expansion): Fix indexing.
2506 2013-03-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2508         * call.c (build_java_interface_fn_ref): Likewise.
2509         (make_temporary_var_for_ref_to_temp): Likewise.
2510         * class.c (check_field_decls): Likewise.
2511         (layout_class_type): Likewise.
2512         (finish_struct_1): Likewise.
2513         (fixed_type_or_null): Likewise.
2514         (get_vtbl_decl_for_binfo): Likewise.
2515         * cp-gimplify.c (omp_var_to_track): Likewise.
2516         (cp_genericize_r): Likewise.
2517         * cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
2518         * cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
2519         (DECL_DISCRIMINATOR_P): Likewise.
2520         * decl.c (poplevel): Likewise.
2521         (decls_match): Likewise.
2522         (duplicate_decls): Likewise.
2523         (decl_jump_unsafe): Likewise.
2524         (start_decl): Likewise.
2525         (check_for_uninitialized_const_var): Likewise.
2526         (make_rtl_for_nonlocal_decl): Likewise.
2527         (cp_finish_decl): Likewise.
2528         (expand_static_init): Likewise.
2529         (local_variable_p): Likewise.
2530         (maybe_register_incomplete_var): Likewise.
2531         * decl2.c (grokfield): Likewise.
2532         (comdat_linkage): Likewise.
2533         (determine_visibility): Likewise.
2534         (import_export_decl): Likewise.
2535         (prune_vars_needing_no_initialization): Likewise.
2536         (decl_maybe_constant_var_p): Likewise.
2537         * error.c (dump_simple_decl): Likewise.
2538         (dump_template_decl): Likewise.
2539         (cp_printer): Likewise.
2540         * except.c (build_throw): Likewise.
2541         * init.c (build_vtbl_address): Likewise.
2542         (member_init_ok_or_else): Likewise.
2543         (build_aggr_init): Likewise.
2544         (expand_aggr_init_1): Likewise.
2545         (build_offset_ref): Likewise.
2546         (constant_value_1): Likewise.
2547         * mangle.c (write_mangled_name): Likewise.
2548         (write_prefix): Likewise.
2549         * name-lookup.c (supplement_binding_1): Likewise.
2550         (add_decl_to_level): Likewise.
2551         (pushdecl_maybe_friend_1): Likewise.
2552         (check_for_out_of_scope_variable): Likewise.
2553         (validate_nonmember_using_decl): Likewise.
2554         (lookup_name_innermost_nonclass_level_1): Likewise.
2555         (lookup_arg_dependent_1): Likewise.
2556         * parser.c (cp_parser_lambda_introducer): Likewise.
2557         (cp_parser_template_argument): Likewise.
2558         (cp_parser_single_declaration): Likewise.
2559         * pt.c (convert_nontype_argument): Likewise.
2560         (instantiate_class_template_1): Likewise.
2561         (tsubst_decl): Likewise.
2562         (tsubst_expr): Likewise.
2563         (do_decl_instantiation): Likewise.
2564         (do_type_instantiation): Likewise.
2565         (regenerate_decl_from_template): Likewise.
2566         (always_instantiate_p): Likewise.
2567         (instantiate_decl): Likewise.
2568         (type_dependent_expression_p): Likewise.
2569         (build_non_dependent_expr): Likewise.
2570         * repo.c (repo_emit_p): Likewise.
2571         * rtti.c (build_dynamic_cast_1): Likewise.
2572         * search.c (shared_member_p): Likewise.
2573         * semantics.c (outer_var_p): Likewise.
2574         (finish_id_expression): Likewise.
2575         (finish_omp_clauses): Likewise.
2576         (finish_decltype_type): Likewise.
2577         (ensure_literal_type_for_constexpr_object): Likewise.
2578         * tree.c (lvalue_kind): Likewise.
2579         (bot_replace): Likewise.
2580         (cp_tree_equal): Likewise.
2581         (handle_init_priority_attribute): Likewise.
2582         (decl_storage_duration): Likewise.
2583         * typeck.c (cxx_sizeof_expr): Likewise.
2584         (cxx_alignof_expr): Likewise.
2585         (decay_conversion): Likewise.
2586         (build_class_member_access_expr): Likewise.
2587         (cp_build_array_ref): Likewise.
2588         (cxx_mark_addressable): Likewise.
2589         (maybe_warn_about_returning_address_of_local): Likewise.
2590         (check_return_expr): Likewise.
2591         * typeck2.c (cxx_readonly_error): Likewise.
2592         (abstract_virtuals_error_sfinae): Likewise.
2593         (cxx_incomplete_type_diagnostic): Likewise.
2595 2013-03-28  Lawrence Crowl  <crowl@google.com>
2597         * Make-lang.in
2598         (CXX_PARSER_H): Add header dependence.
2599         * cp-tree.h
2600         (extern debug (cp_binding_level &)): New.
2601         (extern debug (cp_binding_level *)): New.
2602         * name-lookup.h
2603         (debug (cp_binding_level &)): New.
2604         (debug (cp_binding_level *)): New.
2605         * parser.c
2606         (debug (cp_parser &)): New.
2607         (debug (cp_parser *)): New.
2608         (debug (cp_token &)): New.
2609         (debug (cp_token *)): New.
2610         (debug (vec<cp_token, va_gc> &)): New.
2611         (debug (vec<cp_token, va_gc> *)): New.
2612         * parser.c: Add header dependence.
2613         (extern debug (cp_parser &)): New.
2614         (extern debug (cp_parser *)): New.
2615         (extern debug (cp_token &)): New.
2616         (extern debug (cp_token *)): New.
2617         (extern debug (vec<cp_token, va_gc> &)): New.
2618         (extern debug (vec<cp_token, va_gc> *)): New.
2620 2013-03-28  Jason Merrill  <jason@redhat.com>
2622         PR c++/17232
2623         PR c++/52748
2624         * typeck2.c (abstract_virtuals_error_sfinae): Don't complete
2625         the type if tf_decltype is set.
2626         * pt.c (fn_type_unification): Add decltype_p parm.
2627         (get_bindings): Adjust.
2628         * cp-tree.h: Adjust.
2629         * class.c (resolve_address_of_overloaded_function): Adjust.
2630         * call.c (add_template_candidate_real, print_z_candidate): Adjust.
2632         PR c++/56679
2633         * parser.c (cp_parser_sizeof_pack): Split out from...
2634         (cp_parser_sizeof_operand): ...here.  Require (id).
2636         PR c++/56701
2637         * semantics.c (finish_this_expr): 'this' is an rvalue.
2638         * typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.
2640         PR c++/56710
2641         * semantics.c (finish_member_declaration): Don't push closure
2642         members.
2644         * name-lookup.c (pushdecl_maybe_friend_1): Use
2645         nonlambda_method_basetype and current_nonlambda_class_type.
2647         PR c++/56728
2648         * semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
2649         conversion from integer to pointer.
2650         (cxx_eval_constant_expression): Likewise.
2651         (cxx_eval_indirect_ref): Use the folded operand if we still think
2652         this might be constant.
2654 2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
2655             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2657         PR c++/56725
2658         * call.c (convert_like_real): Change series of two permerrors
2659         to permerror + inform (and likewise for two errors).
2660         (build_new_method_call_1): Likewise.
2661         * typeck.c (convert_for_initialization): Change additional
2662         warning or error to inform.
2664 2013-03-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2666         * cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
2667         (first_aggr_init_expr): Likewise.
2668         (more_aggr_init_expr_args_p): Likewise.
2669         (type_of_this_parm): Likewise.
2670         (class_of_this_parm): Likewise.
2671         * name-lookup.h (get_global_value_if_present): Likewise.
2672         (is_typename_at_global_scope): Likewise.
2674 2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
2676         * call.c (joust): Don't call inform for a permerror returning false.
2677         * parser.c (cp_parser_check_class_key): Likewise.
2678         * pt.c (tsubst_copy_and_build): Likewise.
2680 2013-03-27  Jason Merrill  <jason@redhat.com>
2682         PR c++/56749
2683         * semantics.c (finish_qualified_id_expr): Return early
2684         for enum scope.
2686 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2688         * call.c (build_new_method_call_1): Use INDIRECT_REF_P.
2689         * cvt.c (convert_to_void): Likewise.
2690         * error.c (dump_expr): Likewise.
2691         * mangle.c (write_expression): Likewise.
2692         * parser.c (cp_parser_template_argument): Likewise.
2693         * pt.c (convert_nontype_argument): Likewise.
2694         (tsubst_copy_and_build): Likewise.
2695         * rtti.c (build_typeid): Likewise.
2696         * semantics.c (finish_call_expr): Likewise.
2697         (finish_decltype_type): Likewise.
2698         (build_data_member_initialization): Likewise.
2699         * tree.c (is_dummy_object): Likewise.
2700         * typeck.c (decay_conversion): Likewise.
2701         (build_class_member_access_expr): Likewise.
2702         (cp_build_addr_expr_1): Likewise.
2703         (unary_complex_lvalue): Likewise.
2704         (check_return_expr): Likewise.
2705         * typeck2.c (cxx_readonly_error): Likewise.
2707 2013-03-26  Jason Merrill  <jason@redhat.com>
2709         PR c++/52597
2710         * typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn.  Take tree.
2711         * semantics.c (finish_decltype_type): Check it before type_unknown_p.
2712         * cp-tree.h: Adjust prototype.
2714         PR c++/45282
2715         * typeck2.c (build_m_component_ref): Handle prvalue object.
2717 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2719         * cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
2720         * decl.c (duplicate_decls): Likewise.
2721         (cp_finish_decl): Likewise.
2722         (check_class_member_definition_namespace): Likewise.
2723         * decl2.c (grokfield): Likewise.
2724         (decl_needed_p): Likewise.
2725         (import_export_decl): Likewise.
2726         (mark_used): Likewise.
2727         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
2728         * pt.c (push_access_scope): Likewise.
2729         (instantiate_decl): Likewise.
2730         * ptree.c (cxx_print_decl): Likewise.
2731         * repo.c (repo_emit_p): Likewise.
2732         * semantics.c (note_decl_for_pch): Likewise.
2733         * tree.c (decl_linkage): Likewise.
2735 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
2737         PR c++/55951
2738         * decl.c (check_array_designated_initializer): Handle CONST_DECL
2739         as ce->index.
2741 2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>
2743         * decl.c (grokfndecl): Handle separately <inline> and <constexpr>
2744         error messages.
2746         * decl.c (grokdeclarator): Declare typedef_p and use it everywhere.
2748 2013-03-25  Jason Merrill  <jason@redhat.com>
2750         PR c++/56699
2751         * semantics.c (maybe_resolve_dummy): Make sure that the enclosing
2752         class is derived from the type of the object.
2754         PR c++/52014
2755         * semantics.c (lambda_expr_this_capture): Don't capture 'this' in
2756         unevaluated context.
2758 2013-03-25  Paolo Carlini  <paolo.carlini@oracle.com>
2760         PR c++/56722
2761         * decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
2762         DECL_TEMPLATE_INSTANTIATION.
2764 2013-03-22  Jason Merrill  <jason@redhat.com>
2766         PR c++/56684
2767         * pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
2768         and CONST_DECL.
2770 2013-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2772         * cp-tree.h (identifier_p): New.
2773         * call.c: Throughout, call identifier_p insstead of direct
2774         comparaison of TREE_CODE against IDENTIFIER_NODE.
2775         * decl.c: Likewisse.
2776         * decl2.c: Likewise.
2777         * init.c: Likewise.
2778         * mangle.c: Likewise.
2779         * name-lookup.c: Likewise.
2780         * parser.c: Likewise.
2781         * pt.c: Likewise.
2782         * search.c: Likewise.
2783         * semantics.c: Likewise.
2784         * tree.c: Likewise.
2785         * typeck.c: Likewise.
2786         * typeck2.c: Likewise.
2788 2013-03-21  Jakub Jelinek  <jakub@redhat.com>
2790         PR middle-end/48087
2791         * pt.c (convert_nontype_argument): Count werrorcount as warnings.
2792         * call.c (build_temp): Likewise.
2793         * method.c (synthesize_method): Likewise.
2794         * typeck.c (convert_for_initialization): Likewise.
2796 2013-03-21  Marc Glisse  <marc.glisse@inria.fr>
2798         * call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
2800 2013-03-21  Richard Biener  <rguenther@suse.de>
2802         * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of
2803         DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
2805 2013-03-20  Jason Merrill  <jason@redhat.com>
2807         PR c++/56646
2808         * parser.c (cp_parser_late_return_type_opt): Save and restore
2809         current_class_ptr/ref.
2811         PR c++/54532
2812         * expr.c (cplus_expand_constant): Do nothing if the class is
2813         incomplete.
2814         * semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
2815         * typeck2.c (store_init_value): Use reduced_constant_expression_p.
2816         * decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
2817         (complete_vars): Likewise.
2819         * name-lookup.c (get_anonymous_namespace_name): Never use
2820         get_file_function_name.
2822         * pt.c (retrieve_specialization): Handle null tmpl argument.
2824         PR c++/17232
2825         PR c++/56642
2826         * pt.c (tsubst_decl): Check return value of register_specialization.
2827         * typeck2.c (abstract_virtuals_error_sfinae): Re-apply complete_type
2828         change.
2830 2013-03-17  Jason Merrill  <jason@redhat.com>
2832         PR c++/54359
2833         PR c++/56639
2834         * parser.c (cp_parser_direct_declarator): Bail if we see a
2835         qualified-id not at namespace scope.
2837         PR c++/17232
2838         PR c++/56642
2839         * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
2840         change for now.
2842 2013-03-16  Jason Merrill  <jason@redhat.com>
2844         * decl.c (grokdeclarator): Assert that we won't see a pointer to
2845         METHOD_TYPE.
2847         PR c++/54277
2848         * cp-tree.h (WILDCARD_TYPE_P): Split out from...
2849         (MAYBE_CLASS_TYPE_P): ...here.
2850         * semantics.c (lambda_capture_field_type): Only build a
2851         magic decltype for wildcard types.
2852         (lambda_proxy_type): Likewise.
2853         (finish_non_static_data_member): Get the quals from
2854         the object.
2856         PR c++/55931
2857         * parser.c (cp_parser_template_argument): Don't
2858         fold_non_dependent_expr.
2860         * parser.c (cp_parser_lambda_declarator_opt): Use
2861         cp_parser_trailing_type_id.
2863         PR c++/45917
2864         * parser.c (cp_parser_template_id): Don't forget access checks.
2866         PR c++/52374
2867         * pt.c (tsubst_qualified_id): Use current_nonlambda_class_type.
2869         PR c++/54764
2870         PR c++/55972
2871         * name-lookup.h (tag_scope): Add ts_lambda.
2872         * semantics.c (begin_lambda_type): Use it.
2873         * decl.c (xref_tag_1): Set CLASSTYPE_LAMBDA_EXPR.
2874         * pt.c (check_default_tmpl_args): Ignore lambdas.
2875         (push_template_decl_real): Handle lambdas.
2876         * tree.c (no_linkage_check): Adjust lambda check.
2878         PR c++/56039
2879         * tree.c (strip_typedefs_expr): Complain about lambda, don't abort.
2881         PR c++/54359
2882         * parser.c (cp_parser_direct_declarator): Fix late return
2883         for out-of-class defn of member function.
2885         PR c++/55357
2886         * semantics.c (maybe_add_lambda_conv_op): Clear DECL_NAME of copied
2887         parms to avoid duplicate -Wshadow warnings.
2889         * search.c (lookup_base): Handle NULL_TREE.
2891         PR c++/56481
2892         * semantics.c (potential_constant_expression_1): Use of 'this' in
2893         a non-constexpr function makes the expression not potentially
2894         constant.
2896         N3276
2897         PR c++/52748
2898         * cp-tree.h (tsubst_flags): Add tf_decltype.
2899         * call.c (build_cxx_call): Don't build a temporary if it's set.
2900         (build_over_call): Make sure it's only passed to build_cxx_call.
2901         * parser.c (cp_parser_primary_expression): Add decltype_p parm.
2902         (cp_parser_unary_expression): Likewise.
2903         (cp_parser_cast_expression): Likewise.
2904         (cp_parser_binary_expression): Likewise.
2905         (cp_parser_assignment_expression): Likewise.
2906         (cp_parser_postfix_expression): Likewise.  Pass tf_decltype.
2907         (cp_parser_expression): Add decltype_p.  Force a
2908         temporary for a call on the LHS of a comma.
2909         (cp_parser_decltype): Pass true to decltype_p parms.
2910         * pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
2911         (tsubst_copy_and_build): Pass tf_decltype down only for
2912         CALL_EXPR and the RHS of COMPOUND_EXPR.
2913         * tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
2915         * cp-tree.h (abstract_class_use): New enum.
2916         * typeck2.c (pending_abstract_type): Add use field.
2917         (abstract_virtuals_error_sfinae): Add overloads taking
2918         abstract_class_use instead of tree.
2919         * typeck.c (build_static_cast_1): Call it.
2920         * except.c (is_admissible_throw_operand_or_catch_parameter): Call it.
2921         * pt.c: Adjust calls.
2922         * decl.c (cp_finish_decl): Don't handle functions specially.
2923         (grokdeclarator): Always check return type.
2924         * init.c (build_new_1): Adjust call.
2926         DR 337
2927         PR c++/17232
2928         * pt.c (tsubst) [ARRAY_TYPE]: Use abstract_virtuals_error_sfinae.
2929         * typeck2.c (abstract_virtuals_error_sfinae): Call complete_type.
2931         DR 657
2932         * pt.c (tsubst_function_type): Call abstract_virtuals_error_sfinae.
2933         (tsubst_arg_types): Likewise.
2935         DR 1518
2936         PR c++/54835
2937         * call.c (convert_like_real): Check for explicit constructors
2938         even for value-initialization.
2940         PR c++/54946
2941         * pt.c (convert_nontype_argument): Handle invalid pointer.
2943         * parser.c (cp_parser_lambda_expression): Use nreverse.
2945         PR c++/56447
2946         PR c++/55532
2947         * pt.c (instantiate_class_template_1): Instantiate lambda capture
2948         list here.
2949         (tsubst_copy_and_build): Not here.
2951         PR c++/55017
2952         * method.c (walk_field_subobs): Disallow copy of rvalue ref.
2954         PR c++/55240
2955         * parser.c (parsing_nsdmi): New.
2956         * semantics.c (outer_automatic_var_p): Check it.
2957         (finish_id_expression): Likewise.
2958         * cp-tree.h: Declare it.
2960         PR c++/55241
2961         * error.c (dump_expr) [SIZEOF_EXPR]: Print sizeof... properly.
2963         * parser.c (lookup_literal_operator): Correct parm/arg naming
2964         mixup.
2966         PR c++/56238
2967         * pt.c (fold_non_dependent_expr_sfinae): Check
2968         instantiation_dependent_expression_p.
2970         PR c++/56095
2971         * class.c (resolve_address_of_overloaded_function): Accept a
2972         reference to function for target_type.
2973         (instantiate_type): Likewise.
2974         * pt.c (convert_nontype_argument): Pass it to
2975         convert_nontype_argument_function.
2977 2013-03-16  Jakub Jelinek  <jakub@redhat.com>
2979         * tree.c (cp_tree_equal): Fix a pasto.
2981         PR c++/56607
2982         * typeck.c (cp_build_binary_op): When calling warn_for_div_by_zero,
2983         pass op1 through maybe_constant_value first.
2985 2013-03-16  Paolo Carlini  <paolo.carlini@oracle.com>
2987         PR c++/56582
2988         * semantics.c (cxx_eval_array_reference): Check for negative index.
2990 2013-03-14  Jason Merrill  <jason@redhat.com>
2992         PR c++/56614
2993         * decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
2995         PR c++/56346
2996         * decl.c (register_dtor_fn): Pass null to __cxa_thread_atexit
2997         dso_handle parm on targets without __cxa_atexit.
2999 2013-03-11  Jason Merrill  <jason@redhat.com>
3001         PR c++/56567
3002         * typeck.c (check_return_expr): Disallow returning init list here.
3003         * semantics.c (apply_deduced_return_type): Not here.
3005 2013-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
3007         PR c++/51412
3008         * cxx-pretty-print.c (pp_cxx_expression): Handle LAMBDA_EXPR.
3009         * error.c (dump_expr): Likewise.
3011 2013-03-08  Jason Merrill  <jason@redhat.com>
3013         PR c++/51884
3014         * class.c (modify_all_vtables): Mangle the vtable name before
3015         entering dfs_walk.
3017         * semantics.c (lambda_expr_this_capture): In unevaluated context,
3018         just return the nearest 'this'.
3020         PR c++/51494
3021         PR c++/52183
3022         PR c++/56222
3023         * tree.c (maybe_dummy_object): Don't capture 'this'.
3024         * semantics.c (maybe_resolve_dummy): New.
3025         (finish_non_static_data_member): Use it.
3026         (finish_qualified_id_expr): Don't test is_dummy_object.
3027         * cp-tree.h: Declare maybe_resolve_dummy.
3028         * call.c (build_new_method_call_1): Use it.
3030         PR c++/56567
3031         * semantics.c (apply_deduced_return_type): Don't allow returning
3032         std::initializer_list.
3034 2013-03-06  Paolo Carlini  <paolo.carlini@oracle.com>
3036         PR c++/56534
3037         * parser.c (cp_parser_elaborated_type_specifier): Don't call
3038         check_elaborated_type_specifier when TREE_CODE (decl) != TYPE_DECL.
3039         * decl.c (check_elaborated_type_specifier): Tidy.
3041 2013-03-06  Jakub Jelinek  <jakub@redhat.com>
3043         PR c++/56543
3044         * tree.c (strip_typedefs): Don't copy args if they are NULL.
3046 2013-03-05  Jakub Jelinek  <jakub@redhat.com>
3048         * parser.c (cp_parser_braced_list): For {} initialize
3049         *non_constant_p to false.
3051 2013-03-04  Jason Merrill  <jason@redhat.com>
3053         PR c++/56464
3054         PR c++/54383
3055         * semantics.c (lambda_expr_this_capture): Handle NSDMI
3056         and non-class scopes.
3058 2013-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
3060         * decl.c (grokdeclarator): Remove dead code.
3062 2013-02-28  Jason Merrill  <jason@redhat.com>
3064         PR c++/56481
3065         * semantics.c (potential_constant_expression_1): Use
3066         cxx_eval_outermost_constant_expr rather than maybe_constant_value.
3068         PR c++/56243
3069         * call.c (build_over_call): Avoid virtual lookup in a template.
3071 2013-02-27  Jason Merrill  <jason@redhat.com>
3073         PR c++/56358
3074         PR c++/56323
3075         * name-lookup.c (do_class_using_decl): Use ctor_identifier instead
3076         of the base name for inheriting ctors.
3077         (push_class_level_binding_1): Remove inheriting ctor handling.
3078         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
3079         * class.c (add_implicitly_declared_members): Adjust.
3081 2013-02-26  David Binderman  <dcb314@hotmail.com>
3083         PR c++/55632
3084         * decl.c (grokdeclarator): Tidy publicp assignment.
3086 2013-02-25  Aldy Hernandez  <aldyh@redhat.com>
3088         PR c++/56419
3089         * semantics.c (begin_transaction_stmt): Set TREE_SIDE_EFFECTS.
3090         (build_transaction_expr): Same.
3092 2013-02-25  Jason Merrill  <jason@redhat.com>
3094         PR c++/56377
3095         * pt.c (fn_type_unification): Wait to call push_tinst_level until
3096         we know what args we're looking at.
3098         PR c++/56438
3099         * semantics.c (potential_constant_expression_1): In C++98, a cast
3100         to non-integral type can't be a constant expression.
3102 2013-02-24  Jakub Jelinek  <jakub@redhat.com>
3104         PR c++/56403
3105         * init.c (build_zero_init_1): Use RECORD_OR_UNION_CODE_P instead
3106         of CLASS_TYPE_P.
3108 2013-02-22  Jason Merrill  <jason@redhat.com>
3110         PR c++/40405
3111         * pt.c (push_template_decl_real): Set DECL_INTERFACE_KNOWN
3112         if we got the wrong number of template parms.
3114         PR c++/56377
3115         * pt.c (fn_type_unification): Use explicit args in template
3116         instantiation context.
3118         PR c++/56359
3119         * call.c (can_convert_arg): Discard access checks.
3121         PR c++/56395
3122         * tree.c (strip_typedefs): Strip typedefs from TYPENAME_TYPE template
3123         args.
3125 2013-02-20  Paolo Carlini  <paolo.carlini@oracle.com>
3127         PR c++/56373
3128         * tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
3129         * cvt.c (ocp_convert): Use the latter.
3130         (cp_convert_to_pointer): Likewise.
3131         * decl.c (check_default_argument): Likewise.
3132         * typeck.c (cp_build_binary_op): Likewise.
3133         * cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.
3135 2013-02-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
3136             Paolo Carlini  <paolo.carlini@oracle.com>
3138         PR c++/51242
3139         * decl2.c (grokbitfield): Allow scoped enumeration types.
3141 2013-02-15  Jason Merrill  <jason@redhat.com>
3143         PR c++/54276
3144         * semantics.c (finish_id_expression): Also return the identifier
3145         for an outer local static.
3147         PR c++/56343
3148         * class.c (check_bases_and_members): Deduce noexcept after
3149         checking bases.
3151         PR c++/52026
3152         * semantics.c (finish_id_expression): In a template, return
3153         the identifier for a constant variable.
3155 2013-02-14  Jason Merrill  <jason@redhat.com>
3157         PR c++/54922
3158         * semantics.c (build_anon_member_initialization): New.
3159         (build_data_member_initialization): Use it.
3161         PR c++/55003
3162         * decl.c (cp_finish_decl): Force instantiation of an
3163         auto static data member.
3165         PR c++/55220
3166         * pt.c (unify): A pack expansion that is not the last template
3167         argument makes the entire template argument list non-deduced.
3169         PR c++/56323
3170         * name-lookup.c (do_class_using_decl): Handle typedefs with
3171         inheriting constructors.
3172         (push_class_level_binding_1): Allow inheriting from template
3173         template parameter, too.
3174         * pt.c (tsubst_decl) [USING_DECL]: Likewise.
3176         PR c++/55223
3177         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Fix handling of
3178         default argument scope.
3179         * mangle.c (write_name): Likewise.
3181         PR c++/55232
3182         * error.c (find_typenames_r): Don't walk into a pack expansion.
3184 2013-02-13  Jason Merrill  <jason@redhat.com>
3186         PR c++/55670
3187         * parser.c (cp_parser_member_declaration): Check the declarator
3188         form when detecting a function declaration via typedef.
3190         PR c++/55680
3191         * pt.c (maybe_process_partial_specialization): A lambda
3192         isn't what's being specialized.
3194         PR c++/55710
3195         * semantics.c (maybe_add_lambda_conv_op): Mark static thunk
3196         TREE_USED.
3198         PR c++/55879
3199         * semantics.c (cxx_bind_parameters_in_call): Undo DECL_BY_REFERENCE.
3201         PR c++/55993
3202         * semantics.c (cxx_fold_indirect_ref): Handle empty bases at
3203         non-zero offsets, too.
3205         PR c++/56155
3206         * decl.c (build_enumerator): Always convert the value to a
3207         fixed underlying type.
3209         PR c++/56135
3210         * pt.c (tsubst_copy_and_build): Don't forget any new
3211         captures that arose from use of dependent names.
3213 2013-02-13  Jakub Jelinek  <jakub@redhat.com>
3215         PR c++/56302
3216         * semantics.c (finish_asm_stmt): If input constraints allow
3217         neither register nor memory, try maybe_constant_value to get
3218         a constant if possible.
3220 2013-02-12  Jason Merrill  <jason@redhat.com>
3222         PR c++/56285
3223         * method.c (add_one_base_init): Handle base constructor
3224         taking rvalue reference parm.
3226         PR c++/56291
3227         * semantics.c (sort_constexpr_mem_initializers): Handle
3228         vptr out of order.
3230 2013-02-09  Jason Merrill  <jason@redhat.com>
3232         PR c++/56268
3233         * semantics.c (classtype_has_nothrow_assign_or_copy_p): Call
3234         maybe_instantiate_noexcept.
3236         PR c++/56247
3237         * pt.c (eq_specializations): Set comparing_specializations.
3238         * tree.c (cp_tree_equal): Check it.
3239         * cp-tree.h: Declare it.
3241         * decl.c (decls_match): Check versions later.
3243         PR c++/56238
3244         * pt.c (build_non_dependent_expr): Don't try to fold
3245         instantiation-dependent expressions.
3246         (instantiation_dependent_r) [TRAIT_EXPR]: Split out.
3247         [BIND_EXPR]: Treat as dependent.
3249 2013-02-07  Jakub Jelinek  <jakub@redhat.com>
3251         PR c++/56241
3252         * init.c (build_vec_init): Don't append NULL values into new_vec.
3253         (build_zero_init_1): Don't push anything into v if recursive call
3254         returned NULL_TREE.
3255         (build_value_init_noctor): Don't push anything into v if
3256         build_value_init call returned NULL_TREE.
3258         PR c++/56239
3259         * parser.c (cp_parser_token_starts_cast_expression): Renamed to...
3260         (cp_parser_tokens_start_cast_expression): ... this.  Change parameter
3261         to cp_parser *, call cp_lexer_peek_token first.  For CPP_OPEN_PAREN,
3262         return true only if 2nd token isn't CPP_CLOSE_PAREN.
3263         (cp_parser_cast_expression): Adjust caller.
3265         PR c++/56237
3266         * decl.c (push_local_name): Look at DECL_DISCRIMINATOR (t)
3267         only if DECL_DISCRIMINATOR_SET_P (t) rather than just
3268         DECL_LANG_SPECIFIC (t).
3270 2013-02-07  Jason Merrill  <jason@redhat.com>
3272         PR c++/56235
3273         * method.c (do_build_copy_constructor): Don't bother turning
3274         scalars from lvalues to xvalues.
3275         (do_build_copy_assign): Likewise.
3277 2013-02-06  Jason Merrill  <jason@redhat.com>
3279         * parser.c (cp_parser_enum_specifier): Check for error_mark_node.
3281 2013-02-05  Jason Merrill  <jason@redhat.com>
3283         PR c++/54122
3284         * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for
3285         METHOD_TYPE.
3287         PR c++/56177
3288         * decl.c (start_preparsed_function): Update restype if we change
3289         decl1.
3291         PR c++/56208
3292         * pt.c (fn_type_unification): Discard any access checks from
3293         substituting explicit args.
3295 2013-01-31  Jason Merrill  <jason@redhat.com>
3297         PR c++/56162
3298         PR c++/56104
3299         * typeck.c (get_member_function_from_ptrfunc): Fix
3300         ptrmemfunc_vbit_in_delta case.
3302 2013-01-29  Jason Merrill  <jason@redhat.com>
3304         PR libstdc++/54314
3305         * class.c (build_ctor_vtbl_group): Give construction vtables
3306         hidden visibility.
3308 2013-01-25  Jason Merrill  <jason@redhat.com>
3310         PR c++/56095
3311         * pt.c (convert_nontype_argument_function): Handle invalid input.
3312         (convert_nontype_argument): Likewise.
3314         PR c++/56104
3315         * typeck.c (get_member_function_from_ptrfunc): Optimize if the
3316         dynamic type has no virtual functions.
3318 2013-01-22  Paolo Carlini  <paolo.carlini@oracle.com>
3320         PR c++/55944
3321         * decl.c (check_initializer): Use TARGET_EXPR_DIRECT_INIT_P only
3322         on TARGET_EXPR nodes.
3324 2013-01-22  Jason Merrill  <jason@redhat.com>
3326         PR c++/56071
3327         * pt.c (maybe_instantiate_noexcept): Don't defer access checks.
3329 2013-01-22  Dodji Seketeli  <dodji@redhat.com>
3331         PR c++/53609
3332         * pt.c (argument_pack_element_is_expansion_p)
3333         (make_argument_pack_select, use_pack_expansion_extra_args_p)
3334         (gen_elem_of_pack_expansion_instantiation): New static functions.
3335         (tsubst): When looking through an ARGUMENT_PACK_SELECT tree node,
3336         look through the possibly resulting pack expansion as well.
3337         (tsubst_pack_expansion): Use use_pack_expansion_extra_p to
3338         generalize when to use the PACK_EXPANSION_EXTRA_ARGS mechanism.
3339         Use gen_elem_of_pack_expansion_instantiation to build the
3340         instantiation piece-wise.  Don't use arg_from_parm_pack_p anymore,
3341         as gen_elem_of_pack_expansion_instantiation and the change in
3342         tsubst above generalize this particular case.
3343         (arg_from_parm_pack_p): Remove this for it's not used by
3344         tsubst_pack_expansion anymore.
3346 2013-01-21  Jason Merrill  <jason@redhat.com>
3348         PR c++/56059
3349         * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
3350         template args count.
3352 2013-01-18  Jason Merrill  <jason@redhat.com>
3354         PR target/54908
3355         * decl2.c (get_local_tls_init_fn): New.
3356         (get_tls_init_fn): Handle flag_extern_tls_init.  Don't bother
3357         with aliases for internal variables.  Don't use weakrefs if
3358         the variable needs destruction.
3359         (generate_tls_wrapper): Mark the wrapper as const if no
3360         initialization is needed.
3361         (handle_tls_init): Don't require aliases.
3363 2013-01-15  Dodji Seketeli  <dodji@redhat.com>
3365         PR c++/55663
3366         * pt.c (coerce_innermost_template_parms): New static function.
3367         (instantiate_alias_template):  Use it here.
3369 2013-01-09  Jason Merrill  <jason@redhat.com>
3371         PR c++/55878
3372         * rtti.c (build_typeid, get_typeid): Add complain parm.
3373         (get_tinfo_decl_dynamic): Likewise.
3374         * cp-tree.h, parser.c, pt.c: Adjust.
3376         PR c++/55893
3377         * decl.c (cp_finish_decl): Clear TREE_READONLY if the variable
3378         needs destruction.
3380 2013-01-09  Jakub Jelinek  <jakub@redhat.com>
3382         PR c/48418
3383         * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR,
3384         call maybe_constant_value for the negative or too big shift
3385         count warnings.
3387 2013-01-09  Paolo Carlini  <paolo.carlini@oracle.com>
3389         PR c++/55801
3390         * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p
3391         of the argument is true.
3393 2013-01-08  Joel Brobecker  <brobecker@adacore.com>
3395         * parser.c (cp_parser_initializer_list): Move declaration
3396         of variable non_const to start of lexical block.
3398 2013-01-07  Jason Merrill  <jason@redhat.com>
3400         PR c++/55753
3401         * tree.c (build_aggr_init_expr): Do nothing in a template.
3402         * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off
3403         a FUNCTION_DECL before tsubsting.
3405 2013-01-04  Dodji Seketeli  <dodji@redhat.com>
3407         PR c++/52343
3408         * pt.c (check_instantiated_arg): Allow type template arguments.
3410 2013-01-04  Jason Merrill  <jason@redhat.com>
3412         PR c++/55877
3413         * decl.c (reset_type_linkage, bt_reset_linkage): New.
3414         (grokdeclarator): Use reset_type_linkage.
3415         * name-lookup.c (binding_table_foreach): Handle null table.
3416         * tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
3418 2013-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
3420         PR c++/54526 (again)
3421         * parser.c (cp_parser_template_id): Revert core of previous change
3422         (keep adjusted inform message).
3424 2013-01-03  Jason Merrill  <jason@redhat.com>
3426         PR c++/55419
3427         PR c++/55753
3428         * pt.c (tsubst_copy_and_build) [TARGET_EXPR]: Don't touch
3429         TREE_CONSTANT.
3431         PR c++/55842
3432         * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
3434         PR c++/55856
3435         * semantics.c (build_data_member_initialization): Handle DECL_EXPR.
3437         PR c++/53650
3438         * call.c (type_has_extended_temps): New.
3439         * cp-tree.h: Declare it.
3440         * decl.c (check_initializer): Use build_aggr_init for arrays
3441         if it is false.
3442         * init.c (build_vec_init): Avoid mixed signed/unsigned arithmetic.
3444 2013-01-02  Jason Merrill  <jason@redhat.com>
3446         PR c++/54325
3447         * call.c (build_new_method_call_1): Don't use build_value_init for
3448         user-provided default constructors.
3450         * decl.c (check_default_argument): Use LOOKUP_IMPLICIT.
3452         PR c++/55032
3453         PR c++/55245
3454         * tree.c (build_cplus_array_type): Copy layout information
3455         to main variant if necessary.
3457 Copyright (C) 2013 Free Software Foundation, Inc.
3459 Copying and distribution of this file, with or without modification,
3460 are permitted in any medium without royalty provided the copyright
3461 notice and this notice are preserved.