PR c++/54420
[official-gcc.git] / gcc / cp / ChangeLog
blob4501217f056e1c1a99e208e97632b4421ade5b12
1 2012-09-04  Jason Merrill  <jason@redhat.com>
3         PR c++/54420
4         * cp-tree.h (LAMBDANAME_P): Remove.
5         (LAMBDA_TYPE_P): Check CLASSTYPE_LAMBDA_EXPR instead.
6         * cp-lang.c (cxx_dwarf_name): Likewise.
7         * error.c (dump_aggr_type): Likewise.
8         * semantics.c (begin_lambda_type): Set CLASSTYPE_LAMBDA_EXPR sooner.
10         PR c++/54198
11         * decl.c (check_default_argument): Set cp_unevaluated_operand
12         around call to perform_implicit_conversion_flags.
14         PR c++/54437
15         PR c++/51213
16         * pt.c (fn_type_unification): Call coerce_template_parms before
17         entering substitution context.
19 2012-08-31  Paolo Carlini  <paolo.carlini@oracle.com>
20             Jason Merrill  <jason@redhat.com>
22         PR c++/18747
23         * pt.c (check_template_variable): New.
24         (num_template_headers_for_class): Split out...
25         * decl.c (grokdeclarator): ...from here.
26         (start_decl): Remove redundant diagnostic.
27         * cp-tree.h: Declare them
28         * parser.c (cp_parser_single_declaration): Call check_template_variable.
30 2012-08-31  Ollie Wild  <aaw@google.com>
32         PR c++/54197
33         * call.c (extend_ref_init_temps_1): Handle COMPOUND_EXPR trees.
35 2012-08-30  Jason Merrill  <jason@redhat.com>
37         PR c++/50545
38         PR c++/51222
39         * pt.c (instantiation_dependent_r): New.
40         (instantiation_dependent_expression_p): New.
41         (value_dependent_expression_p): Use it.  SCOPE_REF is always dependent.
42         * semantics.c (finish_decltype_type): Use it.
43         * cp-tree.h: Declare it.
45         * semantics.c (finish_qualified_id_expr): Handle building up a
46         non-dependent SCOPE_REF here.
47         (finish_id_expression): Not here.
48         * error.c (dump_decl) [SCOPE_REF]: Only pass TFF_UNQUALIFIED_NAME.
50         * friend.c (make_friend_class): Handle template template parameters.
51         * parser.c (cp_parser_template_declaration_after_export): Likewise.
52         * pt.c (tsubst_friend_class): Likewise.
53         (instantiate_class_template_1): Likewise
54         * decl.c (check_elaborated_type_specifier): Likewise.
55         (lookup_and_check_tag): Likewise.
57         * pt.c (get_class_bindings): Call coerce_template_parms.  Add
58         main_tmpl parameter.
59         (more_specialized_class): Add main_tmpl parameter.
60         (most_specialized_class): Adjust calls.
62         * decl.c (cp_finish_decl): Check for invalid multiple initializers
63         even if the initializer is dependent.
65         * pt.c (instantiate_template_1): Keep processing_template_decl set
66         if there are dependent args.
68 2012-08-25  Paolo Carlini  <paolo.carlini@oracle.com>
70         PR c++/51421
71         * decl2.c (mark_used): Consistently return false after errors
72         about uses before deduction of auto.
73         * semantics.c (finish_id_expression): Check mark_used return
74         value and return error_mark_node in case of failure.
76 2012-08-24  Jason Merrill  <jason@redhat.com>
78         PR c++/51213 (again)
79         * pt.c (deduction_tsubst_fntype): Remove.
80         (fn_type_unification): Check deduction depth and call
81         instantiate_template here.  Handle default argument access checks.
82         (determine_specialization): Suppress access control.
83         (tsubst_decl): Check for excessive deduction depth.
84         (recheck_decl_substitution): Make sure access control is on.
85         (type_unification_real): Don't mess with access deferring here.
86         (get_bindings): Adjust for fn_type_unification return type.
87         * call.c (enum rejection_reason_code): Drop rr_template_instantiation.
88         (template_instantiation_rejection): Remove.
89         (struct rejection_reason): Change targs to num_targs.
90         (template_unification_rejection, print_z_candidate): Adjust.
91         (add_template_candidate_real): Adjust for fn_type_unification change.
92         * class.c (resolve_address_of_overloaded_function): Likewise.
93         * cp-tree.h: Adjust declaration.
95         * pt.c (tsubst_default_argument): Indicate where the default
96         argument is being instantiated for.
97         (tsubst_expr): Restore previous location.
98         (tsubst_copy_and_build): Set and restore location.
99         * call.c (build_new_method_call_1): Remember location of call.
100         * semantics.c (finish_call_expr): Here too.
101         * parser.c (cp_parser_omp_for_loop): Remember the location of the
102         increment expression.
104         * pt.c (resolve_overloaded_unification): Use coerce_template_parms
105         instead of get_bindings.
106         (resolve_nondeduced_context): Likewise.
108         * pt.c (register_specialization): Correct argument to
109         check_specialization_namespace.
110         (determine_specialization): Don't consider members of
111         unspecialized types.
113 2012-08-23  Jason Merrill  <jason@redhat.com>
115         * decl.c (compute_array_index_type): Use type_dependent_expression_p.
117 2012-08-23  Paolo Carlini  <paolo.carlini@oracle.com>
119         PR c++/20420
120         * name-lookup.c (supplement_binding_1): Handle specially enums
121         only in class templates.
122         (validate_nonmember_using_decl): Enforce 7.3.3/10 about duplicate
123         using declarations at function scope.
125 2012-08-21  Richard Guenther  <rguenther@suse.de>
127         * cp-tree.h (TREE_INDIRECT_USING): Use TREE_LANG_FLAG_0 accessor.
128         (ATTR_IS_DEPENDENT): Likewise.
129         (ARGUMENT_PACK_INCOMPLETE_P): Use TREE_ADDRESSABLE instead of
130         TREE_LANG_FLAG_0 on TREE_VECs.
132 2012-08-20  Paolo Carlini  <paolo.carlini@oracle.com>
134         PR c++/10416
135         * decl.c (poplevel): Check TYPE_HAS_NONTRIVIAL_DESTRUCTOR for
136         Wunused_variable too.
138 2012-08-20  Diego Novillo  <dnovillo@google.com>
140         * decl.c (poplevel): Start TV_NAME_LOOKUP conditionally.
142 2012-08-20  Richard Guenther  <rguenther@suse.de>
144         * name-lookup.c (store_binding_p): New predicate, split out from ...
145         (store_binding): ... here.  Always store binding and require
146         target vector with enough space.
147         (store_bindings): Collect to store bindings and reserve space
148         for them, then store them.
149         (store_class_bindings): Likewise.
151 2012-08-19  Mikael Morin  <mikael@gcc.gnu.org>
153         * Make-lang.in: Fix typo.
155 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
157         * cp-tree.def (SIZEOF_EXPR): Move to c-common.def.
159 2012-08-14   Diego Novillo  <dnovillo@google.com>
161         Merge from cxx-conversion branch.  Re-write VEC in C++.
163         * call.c (add_function_candidate): Remove const qualifier
164         from call to VEC_index.
166 2012-08-10  Richard Guenther  <rguenther@suse.de>
168         * error.c (dump_expr): Handle anonymous SSA names.
170 2012-08-07  Steven Bosscher  <steven@gcc.gnu.org>
172         * error.c (print_instantiation_context): Pretty-print a newline before
173         diagnostic_flush_buffer.
174         * cxx-pretty-print.c (pp_cxx_function_definition): Use
175         pp_newline_and_flush instead of separate pp_newline and pp_flush.
177 2012-08-06  Dodji Seketeli  <dodji@redhat.com>
179         Avoid crashing on erroneous static_assert usage
180         * semantics.c (finish_static_assert): Don't crash on erroneous
181         message or condition.
183 2012-08-06  Marc Glisse  <marc.glisse@inria.fr>
184             Paolo Carlini  <paolo.carlini@oracle.com>
186         PR c++/54165
187         * typeck.c (build_static_cast_1): Move the conversion to void case
188         before the perform_direct_initialization_if_possible call.
190 2012-08-03  Marc Glisse  <marc.glisse@inria.fr>
192         * pt.c (tsubst_copy_and_build): Handle VECTOR_TYPE like scalars.
193         * cp-tree.h (scalarish_type_p): Declare.
194         * tree.c (scalarish_type_p): Make non-static.
196 2012-08-02  Jason Merrill  <jason@redhat.com>
197             Paolo Carlini  <paolo.carlini@oracle.com>
199         PR c++/51213 (again)
200         * pt.c (type_unification_real): Call push_deferring_access_checks /
201         pop_deferring_access_checks around the substitution of default
202         template args.
203         (instantiate_template_1): When the specialization returned by
204         retrieve_specialization has FNDECL_HAS_ACCESS_ERRORS set and we
205         are in a SFINAE context, simply return error_mark_node.
206         * cp-tree.h (FNDECL_RECHECK_ACCESS_P): Rename FNDECL_HAS_ACCESS_ERRORS.
208 2012-07-31  Paolo Carlini  <paolo.carlini@oracle.com>
210         * pt.c (check_default_tmpl_args): Change is_primary and is_partial
211         parameters to bool type, adjust.
212         (push_template_decl_real): Tidy.
213         * parser.c (cp_parser_init_declarator): Adjust.
214         * decl.c (redeclaration_error_message): Likewise.
215         * cp-tree.h (check_default_tmpl_args): Update prototype.
217 2012-07-31  Paolo Carlini  <paolo.carlini@oracle.com>
219         PR c++/53624
220         * pt.c (check_default_tmpl_args): Don't check local types.
222 2012-07-25  Sandra Loosemore  <sandra@codesourcery.com>
223             Paul Brook  <paul@codesourcery.com>
225         PR target/53633
226         * decl.c (finish_function): Check targetm.warn_func_return.
228 2012-07-25  Jason Merrill  <jason@redhat.com>
230         PR c++/54086
231         * decl.c (grokdeclarator): Allow const and constexpr together.
233         PR c++/54020
234         * semantics.c (potential_constant_expression_1) [COND_EXPR]: Call
235         maybe_constant_value.
237         * cp-tree.h (tsubst_flags): Remove tf_no_access_control.
238         * call.c (standard_conversion): Don't set it.
239         * class.c (resolve_address_of_overloaded_function): Don't check it.
240         * decl.c (check_default_argument): Call
241         perform_implicit_conversion_flags.
243         * pt.c (print_candidates_1): Use inform instead of error.
245 2012-07-24  Paolo Carlini  <paolo.carlini@oracle.com>
247         * pt.c (convert_template_argument, tsubst): Simplify fourth argument
248         to make_typename_type (complain & tf_error -> complain).
250 2012-07-24  Steven Bosscher  <steven@gcc.gnu.org>
252         * class.c (n_vtables, n_vtable_entries, n_vtable_searches,
253         n_vtable_elems, n_convert_harshness, n_compute_conversion_costs,
254         n_inner_fields_searched): Always define.
255         (build_primary_vtable): Convert #ifdef GATHER_STATISTICS to if-code.
256         (print_class_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
257         * tree.c (depth_reached): Always define global.
258         (cxx_print_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
259         * pt.c (depth_reached): Always define.
260         (push_tinst_level): Convert #ifdef GATHER_STATISTICS to if-code.
261         * search.c (n_fields_searched, n_calls_lookup_field,
262         n_calls_lookup_field_1, n_calls_lookup_fnfields,
263         n_calls_lookup_fnfields_1, n_calls_get_base_type,
264         n_outer_fields_searched, n_contexts_saved): Always define.
265         (lookup_field_1): Convert #ifdef GATHER_STATISTICS to if-code.
266         (lookup_member): Likewise.
267         (lookup_fnfields_idx_nolazy): Likewise.
268         (print_search_statistics): Likewise.
269         (reinit_search_statistics): Unconditionally re-set counters.
270         * lex.c (retrofit_lang_decl): Convert #ifdef GATHER_STATISTICS
271         to if-code.
272         (cxx_dup_lang_specific_decl): Likewise.
273         (copy_lang_type): Likewise.
274         (cxx_make_type): Likewise.
276 2012-07-20  Jason Merrill  <jason@redhat.com>
278         PR c++/54038
279         * tree.c (build_cplus_array_type): Use build_cplus_array_type to build
280         canonical array type rather than mess with its TYPE_*_VARIANT.
282 2012-07-19  Jason Merrill  <jason@redhat.com>
284         PR c++/54026
285         * typeck.c (cp_apply_type_quals_to_decl): Check COMPLETE_TYPE_P.
287         PR c++/54021
288         * call.c (build_cxx_call): Set optimize when folding
289         __builtin_constant_p in a constexpr function.
291 2012-07-18  Jason Merrill  <jason@redhat.com>
293         * pt.c (instantiate_decl): Don't recheck substitutions.
295 2012-07-18  Paolo Carlini  <paolo.carlini@oracle.com>
296             Jason Merrill  <jason@redhat.com>
298         DR 1170
299         PR c++/51213
300         * semantics.c (perform_access_checks): Add complain parm, return bool.
301         (perform_deferred_access_checks): Likewise.
302         (perform_or_defer_access_check): Likewise.
303         (speculative_access_check): Remove.
304         * call.c (enforce_access): Add complain parm, return bool.
305         * decl.c, friend.c, class.c, init.c, parser.c: Adjust callers.
306         * search.c: Adjust callers.
307         * cp-tree.h (TINFO_RECHECK_ACCESS_P): New macro.
308         (FNDECL_RECHECK_ACCESS_P): New macro.
309         * method.c (synthesized_method_walk): Stop deferring access checks.
310         * pt.c (recheck_decl_substitution): New.
311         (instantiate_template_1): Set and check FNDECL_RECHECK_ACCESS_P.
313 2012-07-18  Jason Merrill  <jason@redhat.com>
315         * method.c (process_subob_fn): Make sure no_implicit_p is non-null
316         before trying to store through it.
318 2012-07-17  Jason Merrill  <jason@redhat.com>
320         PR c++/53995
321         * decl.c (finish_enum_value_list): Only call
322         insert_late_enum_def_into_classtype_sorted_fields in class scope.
324         PR c++/53989
325         * tree.c (build_cplus_array_type): Also add TYPE_CANONICAL
326         to the list of variants.
328         * decl.c (xref_basetypes): Complain about incomplete template base.
329         * class.c (finish_struct): Adjust variants in templates, too.
331         PR c++/53549
332         * parser.c (cp_parser_class_head): Call xref_basetypes here.
333         (cp_parser_class_specifier_1): Not here.
334         * pt.c (tsubst_decl) [USING_DECL]: Check uses_template_parms
335         as well as DECL_DEPENDENT_P.
337 2012-07-16  Jason Merrill  <jason@redhat.com>
339         * cp-tree.h (struct deferred_access_check): Add location.
340         * semantics.c (perform_access_checks): Use it.
341         (perform_or_defer_access_check): Store it.
343 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
345         * dump.c (dump_stmt): Moved here from c-dump.c.
346         * optimize.c: Include dumpfile.h instead of tree-dump.h.
347         * class.c: Likewise.
348         * decl2.c: Likewise.
349         * Make-lang.in: Fix dependencies.
351 2012-07-13  Jason Merrill  <jason@redhat.com>
353         PR c++/53953
354         * method.c (synthesized_method_walk): Initialize no_implicit_p sooner.
356 2012-07-12  Jason Merrill  <jason@redhat.com>
358         * pt.c (instantiate_decl): Check typedefs access here.
359         (instantiate_template_1): Not here.
361         * pt.c (deduction_tsubst_fntype): Just suppress access checking.
362         (instantiate_template_1): Set DECL_TI_TEMPLATE before access checking.
363         (push_deduction_access_scope, pop_deduction_access_scope): Remove.
365 2012-07-11  Jason Merrill  <jason@redhat.com>
367         DR 1402
368         * method.c (synthesized_method_walk): Replace uses of msg with diag.
369         Correct handling of virtual bases with move operations.
370         (process_subob_fn, walk_field_subobs): Replace uses of msg with diag.
372 2012-07-11  Steven Bosscher  <steven@gcc.gnu.org>
374         * method.c: Do not include tree-pass.h.
376 2012-07-10  Jason Merrill  <jason@redhat.com>
378         DR 1402
379         PR c++/53733
380         * cp-tree.h (FNDECL_SUPPRESS_IMPLICIT_DECL): New.
381         (struct lang_decl_fn): Add suppress_implicit_decl field.
382         * method.c (implicitly_declare_fn): Check it.
383         (process_subob_fn): Add no_implicit_p parm.
384         (walk_field_subobs, synthesized_method_walk): Likewise.
385         (maybe_explain_implicit_delete): Adjust.
386         (explain_implicit_non_constexpr): Adjust.
388         * method.c (synthesized_method_walk): Avoid changing
389         EH spec based on cleanups in other places, too.
391 2012-07-09  Sterling Augustine  <saugustine@google.com>
393         * error.c (lang_decl_name): Use TFF_UNQUALIFIED_NAME flag.
395 2012-07-08  Steven Bosscher  <steven@gcc.gnu.org>
397         * decl.c (cp_finish_decl): Add FIXME at add_local_decl call site.
399 2012-07-06  Jason Merrill  <jason@redhat.com>
401         PR c++/53862
402         * pt.c (tsubst_arg_types): Add "end" parameter.
403         (check_undeduced_parms): Use it.
405         * cp-tree.h (DECL_DECLARES_TYPE_P): Check DECL_TYPE_TEMPLATE_P.
407         PR c++/53858
408         * name-lookup.c (ambiguous_decl): Use DECL_TYPE_TEMPLATE_P.
410 2012-07-05  Jason Merrill  <jason@redhat.com>
412         PR c++/53039
413         * pt.c (arg_from_parm_pack_p): Go back to using same_type_p or
414         cp_tree_equal.
416         * cp-tree.h (TEMPLATE_PARM_NUM_SIBLINGS): Remove.
417         (struct template_parm_index_s): Remove num_siblings.
418         * pt.c (fixup_template_parms, fixup_template_parm_index): Remove.
419         (fixup_template_type_parm_type): Remove.
420         (build_template_parm_index): Remove num_siblings parm.
421         (process_template_parm): Likewise.
422         * parser.c (cp_parser_template_parameter_list): Adjust.
423         * tree.c (cp_tree_equal): Don't compare num_siblings.
424         * typeck.c (comp_template_parms_position): Likewise.
426         PR c++/50852
427         PR c++/53039
428         * tree.c (strip_typedefs_expr): New.
429         * cp-tree.h: Declare it.
430         * pt.c (convert_template_argument, unify): Use it.
431         * parser.c (cp_parser_template_declaration_after_export): Don't call
432         fixup_template_parms.
434 2012-07-04  Jason Merrill  <jason@redhat.com>
436         PR c++/53848
437         PR c++/53524
438         * decl.c (build_enumerator): Don't use build_lang_decl_loc.
440 2012-07-03  Jakub Jelinek  <jakub@redhat.com>
442         PR c++/53812
443         * semantics.c (finish_goto_stmt): Surround computed goto argument
444         with CLEANUP_POINT_EXPR if needed.
446 2012-07-02  Jason Merrill  <jason@redhat.com>
448         PR c++/53619
449         * pt.c (in_template_function): New.
450         * cp-tree.h: Declare it.
451         * class.c (build_base_path, resolves_to_fixed_type_p): Use it.
453         PR c++/53783
454         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Use tsubst
455         for LAMBDA_EXPR_EXTRA_SCOPE.
457         PR c++/53788
458         * pt.c (build_non_dependent_expr): Don't wrap a dummy object.
460         PR c++/53816
461         * class.c (resolves_to_fixed_type_p): Check uses_template_parms
462         (current_function_decl) instead of processing_template_decl.
464         PR c++/53821
465         * semantics.c (maybe_add_lambda_conv_op): Don't set
466         DECL_INTERFACE_KNOWN.
468         PR c++/53524
469         * call.c (build_conditional_expr_1): Don't warn about comparison of
470         two enumerators before their enumeration is complete.
471         (build_new_op_1): Call decay_conversion before warn_logical_operator.
472         * decl.c (build_enumerator): Set DECL_CONTEXT of an enumerator to
473         its enumeration.
474         * decl2.c (mark_used): Call used_types_insert for enums.
475         * semantics.c (finish_id_expression): Don't decay CONST_DECL.
476         (finish_member_declaration): Don't change DECL_CONTEXT of enumerators.
477         * class.c (check_field_decls): Don't change DECL_CONTEXT of enums.
478         * typeck.c (convert_for_assignment): Don't decay CONST_DECL.
479         (build_class_member_access_expr): Look through unscoped enums.
480         * search.c (context_for_name_lookup): Look through unscoped enums.
481         * pt.c (tsubst_copy_and_build): Don't decay CONST_DECL.
482         (tsubst_copy): Use DECL_CONTEXT to find the enumeration.
483         * tree.c (decl_linkage): Likewise.
484         * cvt.c (ocp_convert): Check decayed expr for enum range warning.
486 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
488         * Make-lang.in: Remove tree-mudflap.o from CXX_AND_OBJCXX_OBJS.
490 2012-06-27  Jason Merrill  <jason@redhat.com>
492         * parser.c (cp_parser_check_for_invalid_template_id): tag_type parm.
493         (cp_parser_simple_type_specifier, cp_parser_class_head): Adjust.
494         (cp_parser_elaborated_type_specifier): Adjust.
495         * decl.c (duplicate_decls): Return error_mark_node on template
496         mismatch.
498         PR c++/53563
499         * parser.c (cp_parser_template_id): Add tag_type parm.
500         (cp_parser_template_name): Likewise.
501         (cp_parser_id_expression, cp_parser_unqualified_id): Adjust.
502         (cp_parser_pseudo_destructor_name, cp_parser_type_name): Adjust.
503         (cp_parser_simple_type_specifier, cp_parser_class_name): Adjust.
504         (cp_parser_elaborated_type_specifier, cp_parser_class_head): Adjust.
506 2012-06-27  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
508         PR C++/51033
509         * semantics.c (constexpr_call): Fix typo in comment.
510         (cxx_eval_vec_perm_expr): New.
511         (cxx_eval_constant_expression): Fold VEC_PERM_EXPRs.
513 2012-06-26  Richard Guenther  <rguenther@suse.de>
515         PR c++/53752
516         * mangle.c (write_array_type): Truncate the number-of-elements
517         result.
519 2012-06-25  Jason Merrill  <jason@redhat.com>
521         PR c++/53498
522         PR c++/53305
523         * pt.c (tsubst_decl) [PARM_DECL]: Don't recurse into DECL_CHAIN
524         if cp_unevaluated_operand is set.
525         (tsubst_copy) [PARM_DECL]: Don't copy before tsubsting.
527         PR c++/52988
528         * typeck.c (decay_conversion): Don't discard side-effects from
529         expressions of nullptr_t.
531 2012-06-25  Florian Weimer  <fweimer@redhat.com>
533         * init.c (build_new_1): Warn about (T[N]) for variable N, and
534         reject T[M][N].
536         * parser.c (cp_parser_direct_new_declarator): Accept non-constant
537         expressions.  Handled now in build_new_1.
539 2012-06-25  Jason Merrill  <jason@redhat.com>
541         PR c++/53202
542         * semantics.c (build_data_member_initialization): Always keep
543         initializer for empty base.
544         (cxx_eval_bare_aggregate): Discard it here.
546         PR c++/53565
547         * pt.c (tsubst_omp_for_iterator): Simplify DECL_EXPR handling.
548         (tsubst_expr) [OMP_FOR]: Here, too.
550 2012-06-25  Jakub Jelinek  <jakub@redhat.com>
552         PR c++/53594
553         * class.c (check_bases_and_members): Avoid -Wuninitialized
554         diagnostics for non-static const members or references if they
555         use NSDMI.
557 2012-06-16  Ville Voutilainen  <ville.voutilainen@gmail.com>
559         * parser.c (cp_parser_direct_declarator): Move virt-specifier
560         parsing after late-specified return type parsing.
562 2012-06-14  Jason Merrill  <jason@redhat.com>
564         PR c++/53651
565         * name-lookup.c (constructor_name_p): Don't try to look at the
566         name of a DECLTYPE_TYPE.
568 2012-06-18  Lawrence Crowl  <crowl@google.com>
570         * decl2.c (cp_write_global_declarations): Rename use of TV_PHASE_CGRAPH
571         to TV_PHASE_OPT_GEN.
573 2012-06-18  Steven Bosscher  <steven@gcc.gnu.org>
575         * decl.c (finish_function): Remove code conditional on VMS_TARGET.
577 2012-06-15  Marc Glisse  <marc.glisse@inria.fr>
579         PR c++/51033
580         * semantics.c (literal_type_p): Handle VECTOR_TYPE.
581         (potential_constant_expression_1): Handle VEC_PERM_EXPR.
582         * parser.c (cp_parser_postfix_expression): Handle RID_BUILTIN_SHUFFLE.
584 2012-06-09  Jason Merrill  <jason@redhat.com>
586         * pt.c (tsubst_expr) [TAG_DEFN]: Instantiate local class.
587         * class.c (finish_struct): Don't add a TAG_DEFN for a lambda.
588         * decl2.c (finish_static_data_member_decl): Avoid redundant error.
590         PR c++/53599
591         * name-lookup.c (pushtag_1): Add a DECL_EXPR for a local class.
592         * semantics.c (finish_cond): Build a COMPOUND_EXPR.
593         * pt.c (tsubst_expr) [COMPOUND_EXPR]: Handle.
594         [DECL_EXPR]: Don't call cp_finish_decl for an implicit typedef.
595         Don't return the decl.
597 2012-06-11  Richard Guenther  <rguenther@suse.de>
599         PR c++/53605
600         * mangle.c (write_array_type): Use double-ints for array domain
601         arithmetic.
603 2012-06-07  Fabien ChĂȘne  <fabien@gcc.gnu.org>
605         PR c++/51214
606         * cp-tree.h (insert_late_enum_def_into_classtype_sorted_fields):
607         Declare.
608         * class.c (insert_into_classtype_sorted_fields): New.
609         (add_enum_fields_to_record_type): New.
610         (count_fields): Adjust the comment.
611         (add_fields_to_record_type): Likewise.
612         (finish_struct_1): Move the code that inserts the fields for the
613         sorted case, into insert_into_classtype_sorted_fields, and call
614         it.
615         (insert_late_enum_def_into_classtype_sorted_fields): Define.
616         * decl.c (finish_enum_value_list): Call
617         insert_late_enum_def_into_classtype_sorted_fields if a late enum
618         definition is encountered.
620 2012-06-06  Paolo Carlini  <paolo.carlini@oracle.com>
622         PR c++/53567
623         * typeck.c (cp_perform_integral_promotions): New, like
624         perform_integral_promotions but also takes a tsubst_flags_t parameter.
625         (pointer_diff): Add tsubst_flags_t parameter.
626         (decay_conversion, cp_default_conversion, cp_build_array_ref,
627         cp_build_binary_op, cp_build_unary_op, build_static_cast_1,
628         build_reinterpret_cast_1, cp_build_modify_expr,
629         convert_for_assignment): Adjust.
630         * optimize.c (build_delete_destructor_body): Adjust.
631         * init.c (expand_virtual_init, expand_default_init, build_new_1,
632         build_new, build_vec_delete_1, build_vec_init, build_delete): Adjust.
633         (construct_virtual_base): Adjust LOOKUP_COMPLAIN -> 0.
634         * class.c (build_base_path): Adjust.
635         * decl.c (compute_array_index_type, finish_destructor_body): Likewise.
636         * method.c (synthesized_method_walk): Adjust flag and complain.
637         * rtti.c (ifnonnull): Add tsubst_flags_t parameter.
638         (build_typeid, build_dynamic_cast_1): Adjust.
639         * except.c (initialize_handler_parm): Likewise.
640         * typeck2.c (process_init_constructor_record): Likewise.
641         * pt.c (tsubst_friend_class): Don't change flags.
642         * semantics.c (finish_goto_stmt, handle_omp_for_class_iterator,
643         finish_static_assert): Likewise.
644         * parser.c (cp_parser_lookup_name): Just pass 0 as flags to
645         lookup_name_real.
646         * call.c (build_op_delete_call): Add tsubst_flags_t parameter.
647         (convert_like_real, convert_arg_to_ellipsis, convert_for_arg_passing):
648         Adjust.
649         (standard_conversion): Adjust LOOKUP_COMPLAIN -> 0.
650         (implicit_conversion): Mask out tf_error with a FIXME.
651         (build_user_type_conversion_1, build_new_op_1, build_over_call): Use
652         complain & tf_error instead of flags & LOOKUP_COMPLAIN.
653         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
654         build_up_reference, convert_to_reference, cp_convert,
655         cp_convert_and_check, ocp_convert, convert_force): Add tsubst_flags_t
656         parameter.
657         (convert_to_reference, ocp_convert): Use complain & tf_error instead
658         of flags & LOOKUP_COMPLAIN.
659         (convert_force): Adjust LOOKUP_COMPLAIN -> 0.
660         * name-lookup.c (identifier_type_value_1, lookup_qualified_name,
661         lookup_name_real, lookup_function_nonclass, lookup_name,
662         lookup_name_prefer_type): Adjust LOOKUP_COMPLAIN -> 0.
663         * cp-tree.h: Adjust prototypes; remove LOOKUP_COMPLAIN.
665 2012-06-06  Steven Bosscher  <steven@gcc.gnu.org>
667         * decl.c: Do not include output.h.
668         (start_decl): Remove code for flag_conserve_space.
670 2012-06-06  Fabien ChĂȘne  <fabien@gcc.gnu.org>
672         PR c++/52841
673         * parser.c (cp_parser_alias_declaration): Return earlier
674         if an error occured.
676 2012-06-04  Paolo Carlini  <paolo.carlini@oracle.com>
678         PR c++/53524
679         * call.c (build_conditional_expr_1): Use OPT_Wenum_compare
680         to control enumeral mismatch in conditional expression too.
682 2012-06-04   Sterling Augustine  <saugustine@google.com>
684         * cp-tree.h: Declare decl_as_dwarf_string, lang_decl_dwarf_name.
685         * cp-lang.c (cxx_dwarf_name): Call them.
687 2012-06-04  Steven Bosscher  <steven@gcc.gnu.org>
689         * semantics.c: Do not include output.h.
690         * decl2.c: Likewise.
691         * friend.c: Likewise.
692         * typeck.c: Likewise.
693         * typeck2.c: Likewise.
694         * Make-lang.in: Fix dependencies.
696 2012-06-01  Jason Merrill  <jason@redhat.com>
698         PR c++/52973
699         * parser.c (cp_parser_class_head): Apply attributes here.
700         * semantics.c (begin_class_definition): Not here.
701         * cp-tree.h: Adjust.
703         PR c++/52725
704         * parser.c (cp_parser_binary_expression): Bail early if we're parsing
705         tentatively and the LHS has a parse error.
707         PR c++/53137
708         * pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
709         (instantiate_decl): Don't push_to_top_level for local class methods.
710         (instantiate_class_template_1): Or for local classes.
712         PR c++/53484
713         * pt.c (do_auto_deduction): Don't try to deduce from a
714         type-dependent initializer.
716 2012-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
718         PR c++/26155
719         * name-lookup.c (push_namespace): When error recovery is
720         impossible just error out in duplicate_decls.
722 2012-05-31  Steven Bosscher  <steven@gcc.gnu.org>
724         * call.c: Do not include output.h.
725         * class.c: Likewise.
726         * except.c: Likewise.
727         * friend.c: Likewise.
728         * init.c: Likewise.
729         * lex.c: Likewise.
730         * method.c: Likewise.
731         * parser.c: Likewise.
732         * pt.c: Likewise.
733         * rtti.c: Likewise.
734         * search.c: Likewise.
736 2012-05-30  Jason Merrill  <jason@redhat.com>
738         PR c++/53356
739         * tree.c (stabilize_init): Handle stabilizing a TARGET_EXPR
740         representing a bitwise copy of a glvalue.
742         * tree.c (stabilize_expr): Tweak logic.
744         PR c++/53356
745         * tree.c (stabilize_init): Side effects make the init unstable.
747 2012-05-28  Paolo Carlini  <paolo.carlini@oracle.com>
749         PR c++/53503
750         * semantics.c (potential_constant_expression_1): Handle LTGT_EXPR.
752 2012-05-26  Paolo Carlini  <paolo.carlini@oracle.com>
754         PR c++/53491
755         * tree.c (stabilize_expr): Handle exp of void type.
757 2012-05-26  Jason Merrill  <jason@redhat.com>
759         PR c++/53220
760         * call.c (convert_like_real) [ck_list]: Take array address directly.
761         * typeck.c (decay_conversion): Reject decay of an array compound
762         literal.
764 2012-05-25  Paolo Carlini  <paolo.carlini@oracle.com>
766         PR c++/32054
767         * parser.c (cp_parser_member_declaration): A storage class is not
768         allowed in a declaration of an anonymous aggregate in a class scope.
770 2012-05-24  Uros Bizjak  <ubizjak@gmail.com>
772         PR obj-c++/53441
773         * decl.c (grokdeclarator): Check that current_class_type is non-NULL
774         before calling constructor_name_p.
776 2012-05-24  Paolo Carlini  <paolo.carlini@oracle.com>
778         PR c++/32080
779         * parser.c (cp_parser_ctor_initializer_opt_and_function_body,
780         cp_parser_function_body): Add a bool parameter, true when parsing
781         a function-try-block.
782         (cp_parser_function_try_block): Pass true to the above.
783         (cp_parser_function_definition_after_declarator,
784         cp_parser_function_transaction): Adjust.
786 2012-05-23  Paolo Carlini  <paolo.carlini@oracle.com>
788         PR c++/29185
789         * decl2.c (delete_sanity): Extend 'deleting array' warning to
790         any array type.
792 2012-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
794         PR c++/51184
795         * decl.c (grokdeclarator): Diagnose functions returning abstract
796         class types as TYPENAME.
797         * cp-tree.h (ABSTRACT_CLASS_TYPE_P): Add.
798         * except.c (is_admissible_throw_operand_or_catch_parameter): Use it.
799         * pt.c (tsubst): Likewise.
800         * semantics.c (trait_expr_value): Likewise.
802 2012-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
804         PR c++/40821
805         * parser.c (cp_parser_attributes_opt): Enforce error checking of
806         unbalanced parentheses in the presence of tentative parsing.
808 2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
810         PR c++/39681
811         * parser.c (cp_parser_new_type_id): Early return error_mark_node
812         if the cp_parser_type_specifier_seq call has type_specifier_seq.type
813         error_mark_node; tidy.
814         (cp_parser_new_expression): Always initialize nelts to NULL_TREE to
815         avoid uninitialized warnings.
816         (cp_parser_init_declarator, cp_parser_late_parse_one_default_arg):
817         Call cp_parser_skip_to_end_of_statement if cp_parser_initializer
818         returns error_mark_node.
820 2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
822         PR c++/53371
823         * except.c (is_admissible_throw_operand): Rename to
824         is_admissible_throw_operand_or_catch_parameter and handle
825         catch parameter too.
826         (expand_start_catch_block): Use it.
827         (build_throw): Adjust.
829 2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
831         PR c++/44516
832         * typeck.c (build_x_array_ref, build_x_conditional_expr,
833         build_x_compound_expr, build_x_modify_expr): Add location_t parameter.
834         (finish_class_member_access_expr, build_x_indirect_ref,
835         build_x_binary_op, build_x_compound_expr_from_list,
836         build_x_compound_expr_from_vec): Adjust callers.
837         * tree.c (build_min_nt_loc): New.
838         (build_min_nt): Remove.
839         * typeck2.c (build_x_arrow): Adjust callers.
840         * pt.c (tsubst_qualified_id, tsubst_omp_for_iterator,
841         tsubst_copy_and_build): Likewise.
842         * semantics.c (finish_mem_initializers, handle_omp_for_class_iterator,
843          finish_omp_atomic): Likewise.
844         * decl2.c (grok_array_decl, build_anon_union_vars): Adjust.
845         * parser.c (cp_parser_question_colon_clause,
846         cp_parser_assignment_expression, cp_parser_expression,
847         cp_parser_template_id, cp_parser_omp_for_loop): Likewise.
848         * cp-tree.h: Update.
850 2012-05-16  Dodji Seketeli  <dodji@redhat.com>
852         PR preprocessor/7263
853         * cp-tree.h (enum cp_decl_spec): Add new enumerators to cover all
854         the possible declarator specifiers so far.
855         (struct cp_decl_specifier_seq::locations): Declare new member.
856         (cp_decl_specifier_seq::{specs, type_location}): Remove.
857         (decl_spec_seq_has_spec_p): Declare new function.
858         * parser.c (cp_parser_check_decl_spec): Remove.
859         (set_and_check_decl_spec_loc): Define new static function.
860         (decl_spec_seq_has_spec_p): Define new public function.
861         (cp_parser_decl_specifier_seq, cp_parser_function_specifier_opt)
862         (cp_parser_type_specifier, cp_parser_simple_type_specifier)
863         (cp_parser_set_storage_class, cp_parser_set_decl_spec_type)
864         (cp_parser_alias_declaration): Set the locations for each
865         declspec, using set_and_check_decl_spec_loc.
866         (cp_parser_explicit_instantiation, cp_parser_init_declarator)
867         (cp_parser_member_declaration, cp_parser_init_declarator): Use the
868         new declspec location for specifiers.  Use the new
869         decl_spec_seq_has_spec_p.
870         (cp_parser_type_specifier_seq): Use the new
871         set_and_check_decl_spec_loc.  Stop using
872         cp_parser_check_decl_spec.  Use the new decl_spec_seq_has_spec_p.
873         (, cp_parser_init_declarator): Use the new
874         set_and_check_decl_spec_loc.
875         (cp_parser_single_declaration, cp_parser_friend_p)
876         (cp_parser_objc_class_ivars, cp_parser_objc_struct_declaration):
877         Use the new decl_spec_seq_has_spec_p.
878         * decl.c (check_tag_decl): Use new decl_spec_seq_has_spec_p.  Use
879         the more precise ds_redefined_builtin_type_spec location for
880         diagnostics about re-declaring C++ built-in types.
881         (start_decl, grokvardecl, grokdeclarator): Use the new
882         decl_spec_seq_has_spec_p.
884 2012-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
886         PR c++/11856
887         * pt.c (tsubst_copy_and_build): Increase / decrease
888         c_inhibit_evaluation_warnings around build_x_binary_op call.
890 2012-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
892         * cp-tree.h (TYPE_PTRMEM_P): Rename to TYPE_PTRDATAMEM_P.
893         (TYPE_PTR_TO_MEMBER_P): Rename to TYPE_PTRMEM_P.
894         (TYPE_PTR_OR_PTRMEM_P): Add.
895         * typeck.c (composite_pointer_type_r, composite_pointer_type,
896         common_pointer_type, cp_build_indirect_ref, cp_build_binary_op,
897         cp_truthvalue_conversion, convert_ptrmem, build_static_cast_1,
898         build_reinterpret_cast_1, build_const_cast_1, comp_ptr_ttypes_real,
899         casts_away_constness_r, casts_away_constness): Adjust.
900         * init.c (build_zero_init_1): Adjust.
901         * class.c (check_field_decls): Likewise.
902         * decl.c (check_default_argument): Likewise.
903         * rtti.c (target_incomplete_p): Likewise.
904         * tree.c (zero_init_p): Likewise.
905         * cxx-pretty-print.c (pp_cxx_ptr_operator,
906         pp_cxx_abstract_declarator): Likewise.
907         * typeck2.c (build_m_component_ref): Likewise.
908         * pt.c (convert_nontype_argument, invalid_nontype_parm_type_p,
909         dependent_type_p_r): Likewise.
910         * call.c (null_member_pointer_value_p, standard_conversion,
911         add_builtin_candidate, build_conditional_expr_1, compare_ics):
912         Likewise.
913         * cp-objcp-common.c (cp_var_mod_type_p): Likewise.
914         * cvt.c (cp_convert_to_pointer, ocp_convert,
915         perform_qualification_conversions): Likewise.
916         * mangle.c (write_type): Likewise.
917         * name-lookup.c (arg_assoc_type): Likewise.
919 2012-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
921         * parser.c (struct cp_parser_expression_stack_entry): Add location_t
922         field.
923         (cp_parser_binary_expression): Rework to always update at the same
924         time tree_type and loc.
925         * call.c (print_z_candidate): Add location_t parameter.
926         (print_z_candidates, convert_like_real, joust): Adjust.
928 2012-05-11  Alexandre Oliva  <aoliva@redhat.com>
930         PR c++/53209
931         * pt.c (tsubst_decl): Bail out if argvec is error_mark_node.
933 2012-05-11  Paolo Carlini  <paolo.carlini@oracle.com>
935         PR c++/53305
936         * pt.c (tsubst_copy: case PARM_DECL): Return error_mark_node if
937         tsubst_decl returns NULL_TREE.
938         * cxx-pretty-print.c (pp_cxx_simple_type_specifier): Handle
939         BOUND_TEMPLATE_TEMPLATE_PARM.
941 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
943         PR c++/53158
944         * cvt.c (ocp_convert): Error out early for void -> bool conversions.
945         * typeck.c (decay_conversion): Use error_at.
946         * call.c (build_integral_nontype_arg_conv, convert_like_real,
947         convert_arg_to_ellipsis, perform_implicit_conversion_flags,
948         initialize_reference): Likewise.
949         * cvt.c (warn_ref_binding): Add location_t parameter.
950         (cp_convert_to_pointer, convert_to_reference, ocp_convert,
951         convert_to_void, ): Use error_at and warning_at.
953 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
955         PR c++/53301
956         * decl.c (check_default_argument): Fix typo (POINTER_TYPE_P
957         instead of TYPE_PTR_P) in zero-as-null-pointer-constant warning.
959 2012-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
961         PR c++/53152
962         * call.c (op_error, build_new_op_1, build_new_op): Add location_t
963         parameter.
964         (build_conditional_expr_1): Adjust.
965         * typeck.c (build_x_indirect_ref, build_x_binary_op,
966         build_x_unary_op): Add location_t parameter.
967         (rationalize_conditional_expr, build_x_array_ref,
968         build_x_compound_expr, cp_build_modify_expr, build_x_modify_expr):
969         Adjust.
970         * typeck2.c (build_x_arrow): Add location_t parameter.
971         * semantics.c (finish_unary_op_expr): Likewise.
972         (finish_increment_expr, handle_omp_for_class_iterator): Adjust.
973         * decl2.c (grok_array_decl): Add location_t parameter.
974         * parser.c (cp_parser_postfix_open_square_expression,
975         cp_parser_postfix_dot_deref_expression, cp_parser_unary_expression,
976         cp_parser_binary_expression, cp_parser_builtin_offsetof,
977         do_range_for_auto_deduction, cp_convert_range_for,
978         cp_parser_template_argument, cp_parser_omp_for_cond): Pass the
979         location, adjust.
980         * pt.c (tsubst_copy_and_build): Adjust.
981         * tree.c (maybe_dummy_object): Likewise.
982         * cp-tree.h: Update declarations.
984 2012-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
986         * semantics.c (cxx_eval_constant_expression, case CONVERT_EXPR): Tidy.
988 2012-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
990         PR c++/53166
991         * pt.c (instantiate_class_template_1): Increase / decrease
992         c_inhibit_evaluation_warnings around the tsubst_expr call
993         for STATIC_ASSERT_CONDITION.
994         (tsubst_expr, case STATIC_ASSERT): Likewise.
995         * typeck.c (cp_build_binary_op, case EQ_EXPR/NE_EXPR): Check
996         c_inhibit_evaluation_warnings in the OPT_Waddress warnings.
998 2012-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
1000         PR c++/53186
1001         * call.c (build_over_call): Handle final member functions
1002         and class types.
1003         (build_new_method_call_1): Do not handle here.
1005 2012-05-02  Richard Guenther  <rguenther@suse.de>
1007         * decl.c (grokdeclarator): Properly check for sizes that
1008         cover more than half of the address-space.
1010 2012-04-30  Marc Glisse  <marc.glisse@inria.fr>
1012         PR c++/51033
1013         * typeck.c (cp_build_array_ref): Handle VECTOR_TYPE.
1014         * decl2.c (grok_array_decl): Likewise.
1016         PR c++/51314
1017         * parser.c (cp_parser_sizeof_operand): Require parentheses for
1018         sizeof...
1020 2012-04-30  Dodji Seketeli  <dodji@redhat.com>
1022         Fix location for static class members
1023         * decl.c (grokdeclarator): Use the location carried by the
1024         declarator for the DECL of the static class member.
1026         Fix va_arg type location
1027         * cp-tree.h (build_x_va_arg): Take an additional location
1028         parameter.
1029         * call.c (build_x_va_arg): Take a loc parameter for the location
1030         of the type of the va_arg expression.
1031         * parser.c (cp_parser_primary_expression): Pass the type of the
1032         type in the va_arg expression to build_x_va_arg.
1033         * pt.c (tsubst_copy): Adjust calls to build_x_va_arg.
1035         Make conversion warnings work on NULL with -ftrack-macro-expansion
1036         * call.c (conversion_null_warnings): Use the new
1037         expansion_point_location_if_in_system_header.
1038         * cvt.c (build_expr_type_conversion): Likewise.
1039         * typeck.c (cp_build_binary_op): Likewise.
1041 2012-04-30  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
1043         * typeck.c (convert_for_assignment):  Replace
1044         Wmissing-format-attribute with Wsuggest-attribute=format.
1045         * call.c (convert_for_arg_passing): Likewise.
1047 2012-04-26  Paolo Carlini  <paolo.carlini@oracle.com>
1049         PR c++/53096
1050         * class.c (check_bases_and_members): Implement core/1333, do not
1051         disallow defaulted in the class body non-const ref special members.
1053 2012-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
1055         PR c++/52363
1056         * call.c (tourney, perform_overload_resolution,
1057         build_operator_new_call, build_user_type_conversion_1,
1058         build_user_type_conversion, perform_overload_resolution,
1059         add_template_candidate, add_template_candidate_real,
1060         add_template_conv_candidate, add_builtin_candidates,
1061         add_builtin_candidate, build_builtin_candidate,
1062         add_conv_candidate, add_function_candidate, implicit_conversion,
1063         reference_binding, build_list_conv, conditional_conversion,
1064         add_candidates, can_convert_array, build_aggr_conv,
1065         build_array_conv, build_complex_conv, conditional_conversion):
1066         Add tsubst_flags_t parameter.
1067         (joust): Likewise, use it to handle SFINAE as if pedantic.
1068         (add_list_candidates, build_integral_nontype_arg_conv,
1069         perform_overload_resolution, build_new_function_call,
1070         build_operator_new_call, build_op_call_1,
1071         build_conditional_expr_1, build_new_op_1, convert_like_real,
1072         convert_arg_to_ellipsis, convert_default_arg,
1073         convert_for_arg_passing, build_over_call,
1074         build_new_method_call_1, can_convert_arg, can_convert_arg_bad,
1075         perform_implicit_conversion_flags,
1076         perform_direct_initialization_if_possible,
1077         initialize_reference): Adjust.
1078         * typeck.c (casts_away_constness, casts_away_constness_r):
1079         Add tsubst_flags_t parameter.
1080         (convert_arguments, check_for_casting_away_constness,
1081         build_static_cast_1, build_ptrmemfunc, convert_for_assignment):
1082         Adjust.
1083         * decl.c (reshape_init_r, check_default_argument): Likewise.
1084         * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1085         * pt.c (convert_nontype_argument, check_non_deducible_conversion):
1086         Likewise.
1087         * init.c (build_new_1): Likewise.
1088         * cvt.c (convert_to_reference, ocp_convert, build_type_conversion,
1089         build_expr_type_conversion, ): Likewise.
1090         * search.c (check_final_overrider): Likewise.
1091         * cp-tree.h (build_user_type_conversion,
1092         build_operator_new_call, can_convert, can_convert_arg,
1093         can_convert_arg_bad, convert_default_arg,
1094         convert_arg_to_ellipsis, convert_for_arg_passing):
1095         Adjust declaration.
1097 2012-04-22  Jan Hubicka  <jh@suse.cz>
1099         * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they
1100         gets finalized.
1102 2012-04-22  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
1104         PR c/44774
1105         * typeck.c (composite_pointer_type): Likewise.
1106         (cxx_sizeof_or_alignof_type): Likewise.
1107         (cp_build_array_ref): Likewise.
1108         (cp_build_function_call_vec): Likewise.
1109         (cp_build_addr_expr_1): Likewise.
1110         (convert_member_func_to_ptr): Likewise.
1111         * decl.c (check_tag_decl): Likewise.
1112         (check_static_variable_definition): Likewise.
1113         (compute_array_index_type): Likewise.
1114         (create_array_type_for_decl): Likewise.
1115         (grokdeclarator): Likewise.
1116         (grok_op_properties): Likewise.
1117         * error.c (maybe_warn_cpp0x): Likewise.
1118         * pt.c (maybe_process_partial_specialization): Likewise.
1119         (convert_template_argument): Likewise.
1120         (do_decl_instantiation): Likewise.
1121         (do_type_instantiation): Likewise.
1122         * parser.c (cp_parser_primary_expression): Likewise.
1123         (cp_parser_postfix_expression): Likewise.
1124         (cp_parser_unary_expression): Likewise.
1125         (cp_parser_question_colon_clause): Likewise.
1126         (cp_parser_lambda_introducer): Likewise.
1127         (cp_parser_lambda_declarator_opt): Likewise.
1128         (cp_parser_compound_statement): Likewise.
1129         (cp_parser_jump_statement): Likewise.
1130         (cp_parser_declaration_seq_opt): Likewise.
1131         (cp_parser_enum_specifier): Likewise.
1132         (cp_parser_enumerator_list): Likewise.
1133         (cp_parser_initializer_list): Likewise.
1134         (cp_parser_member_declaration): Likewise.
1135         * call.c (build_conditional_expr_1): Likewise.
1136         * friend.c (make_friend_class): Likewise.
1137         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
1139 2012-04-21  Jan Hubicka  <jh@suse.cz>
1141         * method.c (make_alias_for): Do not set TREE_SYMBOL_REFERENCED.
1142         * decl2.c (mark_needed): Likewise.
1143         (decl_needed_p): Do not test TREE_SYMBOL_REFERENCED.
1145         * decl2.c (cxx_callgraph_analyze_expr): Remove.
1146         * cp-objcp-common.h (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Remove.
1147         * cp-tree.h (cxx_callgraph_analyze_expr): Remove.
1149 2012-04-21  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
1151         PR 35441
1152         * typeck.c (cp_build_function_call_vec): Do not pretty-print
1153         expressions when caret is enabled.
1155 2012-04-20  Jan Hubicka  <jh@suse.cz>
1157         PR target/53042
1158         * decl2.c (maybe_emit_vtables): Do not initialize same_comdat_group
1159         list when target has no support for it.
1161 2012-04-20  Michael Matz  <matz@suse.de>
1163         * error.c (pedwarn_cxx98): Move va_end call after user
1164         of the va_list.
1166 2012-04-18  Paolo Carlini  <paolo.carlini@oracle.com>
1168         PR c++/52422
1169         * cp-tree.h (build_addr_func, decay_conversion,
1170         get_member_function_from_ptrfunc,
1171         build_m_component_ref, convert_member_func_to_ptr):
1172         Add tsubst_flags_t parameter.
1173         * typeck.c (cp_default_conversion): Add.
1174         (decay_conversion, default_conversion,
1175         get_member_function_from_ptrfunc, convert_member_func_to_ptr):
1176         Add tsubst_flags_t parameter and use it throughout.
1177         (cp_build_indirect_ref, cp_build_array_ref,
1178         cp_build_function_call_vec, convert_arguments, build_x_binary_op,
1179         cp_build_binary_op, cp_build_unary_op, build_reinterpret_cast_1,
1180         build_const_cast_1, expand_ptrmemfunc_cst,
1181         convert_for_initialization): Adjust.
1182         * init.c (build_vec_init): Adjust.
1183         * decl.c (grok_reference_init, get_atexit_node): Likewise.
1184         * rtti.c (build_dynamic_cast_1, tinfo_base_init): Likewise.
1185         * except.c (build_throw): Likewise.
1186         * typeck2.c (build_x_arrow): Likewise.
1187         (build_m_component_ref): Add tsubst_flags_t parameter and
1188         use it throughout.
1189         * pt.c (convert_nontype_argument): Adjust.
1190         * semantics.c (finish_asm_stmt, maybe_add_lambda_conv_op): Likewise.
1191         * decl2.c (build_offset_ref_call_from_tree): Likewise.
1192         * call.c (build_addr_func): Add tsubst_flags_t parameter and
1193         use it throughout.
1194         (build_call_a, build_conditional_expr_1, build_new_op_1,
1195         convert_like_real, convert_arg_to_ellipsis, build_over_call,
1196         build_special_member_call): Adjust.
1197         * cvt.c (cp_convert_to_pointer, force_rvalue,
1198         build_expr_type_conversion): Likewise.
1200 2012-04-17  Tom de Vries  <tom@codesourcery.com>
1202         * cp-gimplify.c (begin_bc_block): Add location parameter and use as
1203         location argument to create_artificial_label.
1204         (finish_bc_block): Change return type to void.  Remove body_seq
1205         parameter, and add block parameter.  Append label to STMT_LIST and
1206         return in block.
1207         (gimplify_cp_loop, gimplify_for_stmt, gimplify_while_stmt)
1208         (gimplify_do_stmt, gimplify_switch_stmt): Remove function.
1209         (genericize_cp_loop, genericize_for_stmt, genericize_while_stmt)
1210         (genericize_do_stmt, genericize_switch_stmt, genericize_continue_stmt)
1211         (genericize_break_stmt, genericize_omp_for_stmt): New function.
1212         (cp_gimplify_omp_for): Remove bc_continue processing.
1213         (cp_gimplify_expr): Genericize VEC_INIT_EXPR.
1214         (cp_gimplify_expr): Mark FOR_STMT, WHILE_STMT, DO_STMT, SWITCH_STMT,
1215         CONTINUE_STMT, and BREAK_STMT as unreachable.
1216         (cp_genericize_r): Genericize FOR_STMT, WHILE_STMT, DO_STMT,
1217         SWITCH_STMT, CONTINUE_STMT, BREAK_STMT and OMP_FOR.
1218         (cp_genericize_tree): New function, factored out of ...
1219         (cp_genericize): ... this function.
1221 2012-04-17  Paolo Carlini  <paolo.carlini@oracle.com>
1223         PR c++/52599
1224         * semantics.c (build_constexpr_constructor_member_initializers):
1225         Check for function-try-block as function-body.
1227 2012-04-17  Paolo Carlini  <paolo.carlini@oracle.com>
1229         PR c++/53003
1230         * parser.c (cp_parser_member_declaration): Check that
1231         initializer_token_start is non null before dereferencing it.
1233 2012-04-16  Jason Merrill  <jason@redhat.com>
1235         PR c++/38543
1236         * pt.c (determine_specialization): Instead of comparing the number
1237         of parms, check that tsubst gives the right answer.
1239         PR c++/52008
1240         * pt.c (process_partial_specialization): Complain about a partial
1241         specialization with fewer args than primary template parms.
1243         PR c++/50830
1244         * pt.c (convert_template_argument): Handle template template
1245         argument packs.
1247         PR c++/50303
1248         * pt.c (tsubst_pack_expansion): Use tsubst_expr for template
1249         template parameters.
1251 2012-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
1253         PR c++/49152
1254         * call.c (op_error): Print types; when flag_diagnostics_show_caret
1255         is false print expressions too.
1256         (op_error_string): Add.
1258 2012-04-16  Jason Merrill  <jason@redhat.com>
1260         PR c++/51148
1261         * friend.c (make_friend_class): Call check_for_bare_parameter_packs.
1263 2012-04-16  Jan Hubicka  <jh@suse.cz>
1265         * decl2.c (collect_candidates_for_java_method_alias): Use FOR_EACH
1266         walkers to walk cgraph and varpool.
1268 2012-04-15  Jason Merrill  <jason@redhat.com>
1270         PR c++/47220
1271         * pt.c (coerce_template_parameter_pack): Check for error_mark_node.
1273         PR c++/52292
1274         PR c++/52380
1275         * pt.c (coerce_template_parms): Even if we aren't converting we
1276         want to expand argument packs.
1278         PR c++/52706
1279         * mangle.c (write_type): nullptr_t is a builtin type.
1281 2012-04-14  Jan Hubicka  <jh@suse.cz>
1283         * tree.c: Update field referenced for new cgraph/varpool layout.
1284         * decl2.c: Likewise.
1286 2012-04-13  Jason Merrill  <jason@redhat.com>
1288         PR c++/52824
1289         * pt.c (any_pack_expanson_args_p): New.
1290         (coerce_template_parms): Use it.
1292         PR c++/52905
1293         * call.c (joust): Handle comparing list and non-list ctors.
1295         PR c++/52915
1296         * decl2.c (finish_anon_union): Use cp_finish_decl.
1297         * error.c (dump_function_name): Avoid showing anonymous "name".
1299 2012-04-11  Fabien ChĂȘne  <fabien@gcc.gnu.org>
1301         PR c++/52465
1302         * parser.c (cp_parser_class_name): Call strip_using_decl and
1303         return the target decl.
1304         * name-lookup.c (strip_using_decl): Returns NULL_TREE if the decl
1305         to be stripped is NULL_TREE.
1306         (qualify_lookup): Call strip_using_decl and perform some checks on
1307         the target decl.
1309 2012-04-11  Jason Merrill  <jason@redhat.com>
1311         PR debug/45088
1312         * decl.c (grokdeclarator): Strip the injected-class-name typedef
1313         if we are building a declaration or compound type.
1315         PR c++/52906
1316         * decl.c (check_tag_decl): Don't complain about attributes if we
1317         don't even have a type.
1319 2012-04-10  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
1321         * cvt.c (convert_to_void): Update comment.
1323 2012-04-05  Jason Merrill  <jason@redhat.com>
1325         PR c++/52596
1326         * semantics.c (finish_non_static_data_member): In templates, pass
1327         the decl to build_qualified_name.
1328         * tree.c (lvalue_kind) [SCOPE_REF]: Handle FIELD_DECL.
1330 2012-04-04  Jason Merrill  <jason@redhat.com>
1332         PR c++/52845
1333         * decl.c (finish_function): Update fntype after deducing return type.
1335 2012-04-03  Jason Merrill  <jason@redhat.com>
1337         PR c++/52796
1338         * pt.c (tsubst_initializer_list): A pack expansion with no elements
1339         means value-initialization.
1341 2012-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
1343         PR c++/50043
1344         * class.c (deduce_noexcept_on_destructor,
1345         deduce_noexcept_on_destructors): New.
1346         (check_bases_and_members): Call the latter.
1347         * decl.c (grokfndecl): Call the former.
1348         * method.c (implicitly_declare_fn): Not static.
1349         * cp-tree.h (deduce_noexcept_on_destructor, implicitly_declare_fn):
1350         Declare
1352 2012-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
1354         PR c++/52718
1355         * decl.c (check_default_argument): With -Wzero-as-null-pointer-constant
1356         warn for a zero as null pointer constant default argument.
1358 2012-03-29  Jason Merrill  <jason@redhat.com>
1360         PR c++/52685
1361         * tree.c (copy_binfo): Handle BINFO_DEPENDENT_BASE_P.
1363 2012-03-29  Jakub Jelinek  <jakub@redhat.com>
1365         PR c++/52759
1366         * decl.c (start_decl): Don't call maybe_apply_pragma_weak
1367         if processing_template_decl.
1369 2012-03-29  Jason Merrill  <jason@redhat.com>
1371         PR c++/52743
1372         * call.c (compare_ics): Handle ck_aggr like ck_list.
1374 2012-03-28  Jason Merrill  <jason@redhat.com>
1376         PR c++/52746
1377         * typeck.c (lookup_destructor): Clear BASELINK_QUALIFIED_P if
1378         we didn't get an explicit scope.
1379         * pt.c (tsubst_baselink): Likewise.
1381 2012-03-28  Richard Guenther  <rguenther@suse.de>
1383         * typeck2.c (process_init_constructor_array): Use the proper
1384         type for computing the array length.
1386 2012-03-27  Meador Inge  <meadori@codesourcery.com>
1388         PR c++/52672
1389         * semantics.c (cxx_fold_indirect_ref): Don't attempt to fold
1390         stripped child trees that are not pointer types.
1392 2012-03-21  Jason Merrill  <jason@redhat.com>
1394         Implement return type deduction for normal functions with -std=c++1y.
1395         * cp-tree.h (FNDECL_USED_AUTO): New macro.
1396         (LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P): Remove.
1397         (dependent_lambda_return_type_node): Remove.
1398         (CPTI_DEPENDENT_LAMBDA_RETURN_TYPE): Remove.
1399         (struct language_function): Add x_auto_return_pattern field.
1400         (current_function_auto_return_pattern): New.
1401         (enum tsubst_flags): Add tf_partial.
1402         * decl.c (decls_match): Handle auto return comparison.
1403         (duplicate_decls): Adjust error message for auto return.
1404         (cxx_init_decl_processing): Remove dependent_lambda_return_type_node.
1405         (cp_finish_decl): Don't do auto deduction for functions.
1406         (grokdeclarator): Allow auto return without trailing return type in
1407         C++1y mode.
1408         (check_function_type): Defer checking of deduced return type.
1409         (start_preparsed_function): Set current_function_auto_return_pattern.
1410         (finish_function): Set deduced return type to void if not previously
1411         deduced.
1412         * decl2.c (change_return_type): Handle error_mark_node.
1413         (mark_used): Always instantiate functions with deduced return type.
1414         Complain about use if deduction isn't done.
1415         * parser.c (cp_parser_lambda_declarator_opt): Use 'auto' for
1416         initial return type.
1417         (cp_parser_lambda_body): Don't deduce return type in a template.
1418         (cp_parser_conversion_type_id): Allow auto in C++1y.
1419         * pt.c (instantiate_class_template_1): Don't mess with
1420         LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P.
1421         (tsubst_copy_and_build): Likewise.
1422         (fn_type_unification, tsubst): Don't reduce the template parm level
1423         of 'auto' during deduction.
1424         (unify): Compare 'auto' specially.
1425         (get_bindings): Change test.
1426         (always_instantiate_p): Always instantiate functions with deduced
1427         return type.
1428         (do_auto_deduction): Handle error_mark_node and lambda context.
1429         Don't check for use in initializer.
1430         (contains_auto_r): Remove.
1431         * search.c (lookup_conversions_r): Handle auto conversion function.
1432         * semantics.c (lambda_return_type): Handle null return.  Don't mess
1433         with dependent_lambda_return_type_node.
1434         (apply_deduced_return_type): Rename from apply_lambda_return_type.
1435         * typeck.c (merge_types): Handle auto.
1436         (check_return_expr): Do auto deduction.
1437         * typeck2.c (add_exception_specifier): Fix complain check.
1439 2012-03-22  Paolo Carlini  <paolo.carlini@oracle.com>
1441         PR c++/52487
1442         * class.c (check_field_decls): Call literal_type_p only
1443         on complete types.
1445 2012-03-22  Jakub Jelinek  <jakub@redhat.com>
1447         PR c++/52671
1448         * decl.c (check_tag_decl): Only use CLASSTYPE_TEMPLATE_INSTANTIATION
1449         on CLASS_TYPE_P types.
1451 2012-03-20  Jason Merrill  <jason@redhat.com>
1453         * lex.c (init_reswords): Use >= for cxx_dialect test.
1454         * parser.c (cp_parser_exception_specification_opt): Likewise.
1456         * mangle.c (write_type): Handle 'auto'.
1457         * init.c (build_new): Don't do auto deduction where it might
1458         affect template mangling.
1460         PR c++/52510
1461         * decl.c (reshape_init_class): Handle repeated reshaping.
1462         * search.c (lookup_field_1): Add sanity check.
1464 2012-03-19  Paolo Carlini  <paolo.carlini@oracle.com>
1466         PR c++/14710
1467         * cp-tree.h (xvalue_p, maybe_warn_about_useless_cast): Declare.
1468         * tree.c (xvalue_p): Define.
1469         * typeck.c (maybe_warn_about_useless_cast): Define.
1470         (build_reinterpret_cast, build_const_cast,
1471         build_static_cast, cp_build_c_cast): Use maybe_warn_about_useless_cast.
1472         * rtti.c (build_dynamic_cast): Likewise.
1473         * pt.c (tsubst_copy_and_build, case CAST_EXPR): Increment/decrement
1474         c_inhibit_evaluation_warnings before/after the build_* calls.
1476 2012-03-15  Jason Merrill  <jason@redhat.com>
1478         PR c++/52582
1479         * method.c (implicitly_declare_fn): Set DECL_EXTERNAL.
1481 2012-03-15  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
1483         PR c++/44783
1484         * error.c (print_instantiation_partial_context): Use
1485         template_backtrace_limit.
1487 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1489         * Make-lang.in (doc/g++.1): Remove IRIX 6.5 reference.
1491 2012-03-14  Jakub Jelinek  <jakub@redhat.com>
1493         PR c++/52521
1494         * parser.c (lookup_literal_operator): Return fn only if
1495         processed all arguments from args vector and argtypes is
1496         void_list_node.
1498 2012-01-30  Dodji Seketeli  <dodji@redhat.com>
1500         PR c++/51641
1501         * cp-tree.h (template_type_parameter_p): Declare new function.
1502         (parameter_of_template_p): Remove.
1503         * pt.c (template_type_parameter_p): Define new function.
1504         (parameter_of_template_p): Remove.
1505         * name-lookup.c (binding_to_template_parms_of_scope_p): Don't rely
1506         on parameter_of_template_p anymore.  Compare the level of the
1507         template parameter to the depth of the template.
1509 2011-12-15  Dodji Seketeli  <dodji@redhat.com>
1511         * call.c (standard_conversion, build_integral_nontype_arg_conv)
1512         (build_new_op_1, convert_like_real, is_subseq)
1513         (maybe_handle_implicit_object, maybe_handle_ref_bind, compare_ics)
1514         (joust): Use next_conversion instead of accessing fields of struct
1515         conversion directly.
1517 2012-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
1519         PR c++/52299
1520         * pt.c (tsubst_copy_and_build, case COND_EXPR): Avoid bogus
1521         division by zero warnings.
1523 2012-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
1525         * typeck.c (build_array_ref, cp_build_addr_expr_1, convert_ptrmem,
1526         build_ptrmemfunc): Consistently forward the tsubst_flags_t
1527         parameter.
1528         * call.c (resolve_args): Likewise.
1530 2012-03-07  Jason Merrill  <jason@redhat.com>
1532         PR c++/52521
1533         * mangle.c (write_literal_operator_name): The length comes after the
1534         operator prefix.
1536 2012-03-05  Jakub Jelinek  <jakub@redhat.com>
1538         * pt.c (local_specializations): Change from htab_t into
1539         struct pointer_map_t *.
1540         (retrieve_local_specializations, register_local_specialization,
1541         tsubst_pack_expansion, instantiate_decl): Adjust users.
1542         (eq_local_specializations, hash_local_specialization): Remove.
1544 2012-03-05  Jason Merrill  <jason@redhat.com>
1546         PR c++/51930
1547         * decl2.c (determine_visibility): Correct calculation of class
1548         args depth.
1549         * decl.c (check_tag_decl): Adjust warning.
1551         * method.c (synthesized_method_walk): Cleanups don't affect the EH
1552         spec either.
1554 2012-03-03  Jason Merrill  <jason@redhat.com>
1556         * init.c (perform_member_init): Cope with uninstantiated NSDMI.
1558         Core 1270
1559         * call.c (build_aggr_conv): Call reshape_init.
1560         (convert_like_real): Likewise.
1561         * typeck2.c (process_init_constructor): Clear TREE_CONSTANT if
1562         not all constant.
1564         * mangle.c (write_nested_name): Use decl_mangling_context.
1565         (write_prefix, write_template_prefix): Likewise.
1567         PR c++/36797
1568         * mangle.c (write_expression): Improve diagnostic for TRAIT_EXPR.
1570         * class.c (add_method): Always build an OVERLOAD for using-decls.
1571         * search.c (lookup_member): Handle getting an OVERLOAD for a
1572         single function.
1574 2012-03-02  Paolo Carlini  <paolo.carlini@oracle.com>
1576         PR c++/51989
1577         * typeck2.c (build_x_arrow): Take a tsubst_flags_t argument and
1578         propagate it.
1579         * cp-tree.h (build_x_arrow): Adjust prototype.
1580         * pt.c (tsubst_copy_and_build): Adjust call.
1581         * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
1583 2012-03-02  Paolo Carlini  <paolo.carlini@oracle.com>
1585         * name-lookup.c (binding_to_template_parms_of_scope_p): Clean up.
1587 2012-02-29  Jason Merrill  <jason@redhat.com>
1589         PR c++/51930
1590         * decl.c (check_tag_decl): Move warning for misplaced attributes here.
1591         (shadow_tag): From here.
1592         * parser.c (cp_parser_explicit_instantiation): Don't warn here.
1594 2012-02-21  Jakub Jelinek  <jakub@redhat.com>
1596         PR c++/52312
1597         * typeck.c (check_literal_operator_args): Initialize *long_double_p
1598         and *long_long_unsigned_p even if processing_template_decl.
1600 2012-02-16  Jason Merrill  <jason@redhat.com>
1602         PR c++/52248
1603         * decl.c (define_label): Use timevar_cond_start/stop.
1605 2012-02-16  Fabien ChĂȘne  <fabien@gcc.gnu.org>
1607         PR c++/52126
1608         * decl.c (xref_basetypes): call dependent_scope_p instead of
1609         dependent_type_p.
1611 2012-02-16  Jason Merrill  <jason@redhat.com>
1613         PR c++/51415
1614         * error.c (dump_expr): Handle lambda closures specifically.
1616 2012-02-14  Jason Merrill  <jason@redhat.com>
1618         * parser.c (cp_parser_explicit_instantiation): Give a warning
1619         for ignored attributes on explicit class instantiation.
1621 2012-02-14  Jakub Jelinek  <jakub@redhat.com>
1623         PR c++/52247
1624         * pt.c (tsubst_copy_asm_operands): For LABEL_DECL values call
1625         lookup_label on label's name and set TREE_USED.
1627 2012-02-14  Jason Merrill  <jason@redhat.com>
1629         PR c++/39055
1630         * decl.c (local_variable_p_walkfn): Don't check DECL_ARTIFICIAL.
1632 2012-02-14  Jakub Jelinek  <jakub@redhat.com>
1634         PR c/52181
1635         * decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than
1636         newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits.
1638 2012-02-07  Jason Merrill  <jason@redhat.com>
1640         PR c++/51675
1641         * semantics.c (cx_check_missing_mem_inits): Handle unions.
1642         Fix constexpr default constructor logic.
1644         PR c++/52035
1645         * pt.c (tsubst): Strip uninstantiated typedef.
1647 2012-02-06  Jason Merrill  <jason@redhat.com>
1649         PR c++/52088
1650         * cvt.c (build_expr_type_conversion): Check for template conversion.
1652 2012-01-31  Jason Merrill  <jason@redhat.com>
1654         PR c++/52043
1655         * cp-tree.h (PACK_EXPANSION_LOCAL_P): New.
1656         * pt.c (make_pack_expansion, tsubst_initializer_list): Set it.
1657         (tsubst_pack_expansion): Check it.
1659 2012-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
1661         PR c++/51327
1662         * class.c (explain_non_literal_class): Correctly handle implicitly
1663         deleted constructors.
1665 2012-01-27  Jakub Jelinek  <jakub@redhat.com>
1667         PR c++/51852
1668         * pt.c (tsubst_pack_expansion): Delete and restore
1669         local_specialization whenever need_local_specialization, not just
1670         when saved_local_specializations is non-NULL.
1672 2012-01-26  Paolo Carlini  <paolo.carlini@oracle.com>
1674         PR c++/51370
1675         * error.c (dump_decl, [TEMPLATE_ID_EXPR]): Handle error_mark_node
1676         as TREE_OPERAND (t, 1).
1678 2012-01-24  Jason Merrill  <jason@redhat.com>
1680         PR c++/51917
1681         * decl.c (xref_basetypes): Check VEC_length instead of VEC_space.
1683         PR c++/51973
1684         * tree.c (called_fns_equal): Check template args.
1685         (cp_tree_equal): Call it.
1687 2012-01-24  Aldy Hernandez  <aldyh@redhat.com>
1688             Patrick Marlier  <patrick.marlier@gmail.com>
1690         PR c++/51928
1691         * class.c (set_method_tm_attributes): Use TARGET_THUNK instead of
1692         thunk for set_one_vmethod_tm_attributes.
1694 2012-01-24  Paolo Carlini  <paolo.carlini@oracle.com>
1696         PR c++/51223
1697         * call.c (build_over_call): Check for error_mark_node as
1698         TREE_VALUE when default arguments are processed.
1700 2012-01-23  Jason Merrill  <jason@redhat.com>
1702         PR c++/51930
1703         * decl2.c (determine_visibility): Check for visibility attribute
1704         on template specialization.
1706 2012-01-23  Paolo Carlini  <paolo.carlini@oracle.com>
1708         PR c++/51398
1709         * pt.c (parameter_of_template_p): Skip error_mark_node parameters.
1711 2012-01-23  Jason Merrill  <jason@redhat.com>
1713         PR c++/51925
1714         * class.c (add_method): Set OVL_USED for using-decls.
1715         * tree.c (ovl_scope): New.
1716         * cp-tree.h: Declare it.
1717         * parser.c (cp_parser_template_name): Use it.
1718         * semantics.c (baselink_for_fns): Likewise.
1719         * name-lookup.c (set_inherited_value_binding_p): Likewise.
1721 2012-01-20  Paolo Carlini  <paolo.carlini@oracle.com>
1723         PR c++/51402
1724         * pt.c (lookup_template_class_1): Check context returned by
1725         tsubst for error_mark_node.
1727 2012-01-19  Kai Tietz  <ktietz@redhat.com>
1729         PR c++/51344
1730         * decl2.c (save_template_attributes): Use merge_attributes
1731         instead of chaining up via TREE_CHAIN.
1733 2012-01-19  Jason Merrill  <jason@redhat.com>
1735         PR c++/51889
1736         * class.c (finish_struct): Call add_method here for function usings.
1737         * semantics.c (finish_member_declaration): Not here.
1739 2012-01-18  Paolo Carlini  <paolo.carlini@oracle.com>
1741         PR c++/51225
1742         * typeck2.c (store_init_value): Within a template guard
1743         cxx_constant_value with require_potential_constant_expression.
1744         * pt.c (convert_nontype_argument): Likewise.
1746 2012-01-16  Jakub Jelinek  <jakub@redhat.com>
1748         PR c++/51854
1749         * mangle.c (write_template_arg_literal): Handle complex.
1751 2012-01-16  Jason Merrill  <jason@redhat.com>
1753         PR c++/51827
1754         * mangle.c (mangle_decl): Don't mangle uninstantiated templates.
1756         PR c++/51868
1757         * typeck.c (build_static_cast_1): Handle bit-fields properly.
1759 2012-01-13  Ian Lance Taylor  <iant@google.com>
1761         PR c++/50012
1762         * typeck.c (enum_cast_to_int): New static function.
1763         (cp_build_binary_op): When handling warn_sign_compare, don't test
1764         for TREE_NO_WARNING.  Do call enum_cast_to_int.
1765         * call.c (avoid_sign_compare_warnings): Remove static function.
1766         (build_new_op_1): Don't call avoid_sign_compare_warnings.
1768 2012-01-13  Steven Bosscher  <steven@gcc.gnu.org>
1770         * decl2.c: Do not include tree-mudflap.h
1771         * semantics.c: Likewise.
1773 2012-01-13  Jason Merrill  <jason@redhat.com>
1775         PR c++/20681
1776         * semantics.c (finish_break_stmt): Avoid adding an unreachable
1777         BREAK_STMT.
1779         PR c++/51813
1780         * decl2.c (constrain_visibility): Clear DECL_VISIBILITY_SPECIFIED
1781         when reducing the visibility.
1783         PR c++/51620
1784         * class.c (build_vtbl_initializer): Use __cxa_deleted_virtual.
1786 2012-01-12  Jason Merrill  <jason@redhat.com>
1788         PR c++/51714
1789         * pt.c (value_dependent_expression_p): Treat STMT_EXPR as
1790         value-dependent.
1792 2012-01-13  Dodji Seketeli  <dodji@redhat.com>
1794         PR c++/51633
1795         * semantics.c (cp_parser_ctor_initializer_opt_and_function_body):
1796         Set the pointer to the last block of the constructor to the
1797         current statement.
1798         (build_constexpr_constructor_member_initializers): Get
1799         build_data_member_initialization a chance to deal with more
1800         statements before we choke.
1802 2012-01-12  Jason Merrill  <jason@redhat.com>
1804         PR c++/48051
1805         * mangle.c (write_expression): Mangle BASELINK scope if
1806         BASELINK_QUALIFIED_P.
1807         * search.c (adjust_result_of_qualified_name_lookup): Set
1808         BASELINK_QUALIFIED_P.
1809         * tree.c (cp_tree_equal) [BASELINK]: Compare BASELINK_QUALIFIED_P.
1810         * parser.c (cp_parser_postfix_dot_deref_expression): Don't call
1811         adjust_result_of_qualified_name_lookup for non-qualified names.
1813         PR c++/51403
1814         * pt.c (unify): Handle error_mark_node.
1816 2012-01-11  Jason Merrill  <jason@redhat.com>
1818         PR c++/51565
1819         * call.c (standard_conversion): For ptrmemfuncs, compare the
1820         static_fn_types.
1822         PR c++/51818
1823         * mangle.c (find_substitution): A type is only a substitution
1824         match if we're looking for a type.
1825         (write_nested_name): Use decl_mangling_context.
1827         * decl.c (decls_match): Assert that the arguments are decls.
1829         PR c++/51613
1830         * pt.c (resolve_overloaded_unification): Compare types with
1831         same_type_p, not decls_match.
1833 2012-01-10  Jason Merrill  <jason@redhat.com>
1835         PR c++/51614
1836         * class.c (build_base_path): Diagnose ambiguous base.
1838         PR c++/51433
1839         * semantics.c (cxx_eval_call_expression): Always retry previously
1840         non-constant expressions.
1842 2012-01-06  Jason Merrill  <jason@redhat.com>
1844         DR 686
1845         PR c++/47450
1846         * parser.c (cp_parser_new_expression): Set
1847         type_definition_forbidden_message.
1849         PR c++/6057
1850         PR c++/48051
1851         PR c++/50855
1852         PR c++/51322
1853         * mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR,
1854         THROW_EXPR, CONSTRUCTOR, OVERLOAD.  Fix PREINCREMENT_EXPR and
1855         PREDECREMENT_EXPR.
1856         (write_template_arg): Fix mangling of class-scope functions and
1857         argument packs.
1858         (mangle_decl): Update suggested -fabi-version argument.
1859         * operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR,
1860         DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR.
1861         * tree.c (dependent_name): No longer static.
1862         * cp-tree.h: Declare it.
1863         * pt.c (unify): Defer handling of unconverted functions.
1865         * mangle.c (mangle_decl): Don't generate mangling aliases
1866         for maybe-in-charge [cd]tors.
1868         * error.c (dump_expr): Print type of CONSTRUCTOR.
1870 2012-01-05  Dodji Seketeli  <dodji@redhat.com>
1872         PR c++/51541
1873         * parser.c (cp_parser_alias_declaration): Get out early upon
1874         errors in the identifier or the attributes.
1876 2012-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
1878         PR c++/51064
1879         * pt.c (tsubst_copy_and_build): Maybe set TREE_NO_WARNING on
1880         the tree returned by build_x_binary_op.
1882 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
1884         PR c++/51738
1885         * parser.c (cp_parser_postfix_open_square_expression): Handle
1886         postfix-expression [ braced-init-list ].
1888 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
1890         PR c++/29273
1891         * rtti.c (build_dynamic_cast_1): In case of T a pointer type,
1892         call decay_conversion on v.
1894 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
1896         PR c++/15867
1897         * decl.c (duplicate_decls): With -Wredundant-decls don't warn for
1898         declaration followed by specialization.
1900 2012-01-03  Jakub Jelinek  <jakub@redhat.com>
1902         PR c++/51669
1903         * semantics.c (finish_omp_clauses): Call fold_build_cleanup_point_expr
1904         on OMP_CLAUSE_{IF,FINAL,NUM_THREADS,SCHEDULE_CHUNK}_EXPR.
1906 2012-01-02  Jason Merrill  <jason@redhat.com>
1908         DR 1359
1909         PR c++/51675
1910         * method.c (walk_field_subobs): Don't check for uninitialized
1911         fields in a union.
1912         (synthesized_method_walk): Check here.
1914         DR 325
1915         PR c++/51666
1916         * parser.c (cp_parser_cache_defarg): Split out...
1917         (cp_parser_parameter_declaration): ...from here.
1918         (cp_parser_save_nsdmi): Use it.
1919         (cp_parser_cache_group): Remove CPP_COMMA support.
1921 2012-01-02  Dodji Seketeli  <dodji@redhat.com>
1923         PR c++/51462
1924         * semantics.c (cx_check_missing_mem_inits): Don't assert in case
1925         of error.
1927 2012-01-02  Paolo Carlini  <paolo.carlini@oracle.com>
1929         PR c++/20140
1930         * typeck2.c (digest_init_r): Use copy_init when initializing
1931         an array of chars.
1933 2012-01-01  Paolo Carlini  <paolo.carlini@oracle.com>
1935         PR c++/16603
1936         * decl.c (build_enumerator): Don't call perform_integral_promotions
1937         on the value.
1939 2012-01-01  Paolo Carlini  <paolo.carlini@oracle.com>
1941         PR c++/51379
1942         * typeck.c (build_reinterpret_cast_1): Implement resolution of
1943         DR 799.
1945 2012-01-01  Fabien ChĂȘne  <fabien@gcc.gnu.org>
1947         * parser.c (cp_parser_using_declaration): Add a warning about
1948         deprecated access declarations when no errors were encountered
1949         while parsing the access declaration. Save the first token in
1950         order to emit the warning at the right place.
1952 Copyright (C) 2012 Free Software Foundation, Inc.
1954 Copying and distribution of this file, with or without modification,
1955 are permitted in any medium without royalty provided the copyright
1956 notice and this notice are preserved.