* method.c (synthesized_method_walk): Avoid changing
[official-gcc.git] / gcc / cp / ChangeLog
blobe4c5506986c83fff1804ad5037234bb8c76a2836
1 2012-07-10  Jason Merrill  <jason@redhat.com>
3         * method.c (synthesized_method_walk): Avoid changing
4         EH spec based on cleanups in other places, too.
6 2012-07-09  Sterling Augustine  <saugustine@google.com>
8         * error.c (lang_decl_name): Use TFF_UNQUALIFIED_NAME flag.
10 2012-07-08  Steven Bosscher  <steven@gcc.gnu.org>
12         * decl.c (cp_finish_decl): Add FIXME at add_local_decl call site.
14 2012-07-06  Jason Merrill  <jason@redhat.com>
16         PR c++/53862
17         * pt.c (tsubst_arg_types): Add "end" parameter.
18         (check_undeduced_parms): Use it.
20         * cp-tree.h (DECL_DECLARES_TYPE_P): Check DECL_TYPE_TEMPLATE_P.
22         PR c++/53858
23         * name-lookup.c (ambiguous_decl): Use DECL_TYPE_TEMPLATE_P.
25 2012-07-05  Jason Merrill  <jason@redhat.com>
27         PR c++/53039
28         * pt.c (arg_from_parm_pack_p): Go back to using same_type_p or
29         cp_tree_equal.
31         * cp-tree.h (TEMPLATE_PARM_NUM_SIBLINGS): Remove.
32         (struct template_parm_index_s): Remove num_siblings.
33         * pt.c (fixup_template_parms, fixup_template_parm_index): Remove.
34         (fixup_template_type_parm_type): Remove.
35         (build_template_parm_index): Remove num_siblings parm.
36         (process_template_parm): Likewise.
37         * parser.c (cp_parser_template_parameter_list): Adjust.
38         * tree.c (cp_tree_equal): Don't compare num_siblings.
39         * typeck.c (comp_template_parms_position): Likewise.
41         PR c++/50852
42         PR c++/53039
43         * tree.c (strip_typedefs_expr): New.
44         * cp-tree.h: Declare it.
45         * pt.c (convert_template_argument, unify): Use it.
46         * parser.c (cp_parser_template_declaration_after_export): Don't call
47         fixup_template_parms.
49 2012-07-04  Jason Merrill  <jason@redhat.com>
51         PR c++/53848
52         PR c++/53524
53         * decl.c (build_enumerator): Don't use build_lang_decl_loc.
55 2012-07-03  Jakub Jelinek  <jakub@redhat.com>
57         PR c++/53812
58         * semantics.c (finish_goto_stmt): Surround computed goto argument
59         with CLEANUP_POINT_EXPR if needed.
61 2012-07-02  Jason Merrill  <jason@redhat.com>
63         PR c++/53619
64         * pt.c (in_template_function): New.
65         * cp-tree.h: Declare it.
66         * class.c (build_base_path, resolves_to_fixed_type_p): Use it.
68         PR c++/53783
69         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Use tsubst
70         for LAMBDA_EXPR_EXTRA_SCOPE.
72         PR c++/53788
73         * pt.c (build_non_dependent_expr): Don't wrap a dummy object.
75         PR c++/53816
76         * class.c (resolves_to_fixed_type_p): Check uses_template_parms
77         (current_function_decl) instead of processing_template_decl.
79         PR c++/53821
80         * semantics.c (maybe_add_lambda_conv_op): Don't set
81         DECL_INTERFACE_KNOWN.
83         PR c++/53524
84         * call.c (build_conditional_expr_1): Don't warn about comparison of
85         two enumerators before their enumeration is complete.
86         (build_new_op_1): Call decay_conversion before warn_logical_operator.
87         * decl.c (build_enumerator): Set DECL_CONTEXT of an enumerator to
88         its enumeration.
89         * decl2.c (mark_used): Call used_types_insert for enums.
90         * semantics.c (finish_id_expression): Don't decay CONST_DECL.
91         (finish_member_declaration): Don't change DECL_CONTEXT of enumerators.
92         * class.c (check_field_decls): Don't change DECL_CONTEXT of enums.
93         * typeck.c (convert_for_assignment): Don't decay CONST_DECL.
94         (build_class_member_access_expr): Look through unscoped enums.
95         * search.c (context_for_name_lookup): Look through unscoped enums.
96         * pt.c (tsubst_copy_and_build): Don't decay CONST_DECL.
97         (tsubst_copy): Use DECL_CONTEXT to find the enumeration.
98         * tree.c (decl_linkage): Likewise.
99         * cvt.c (ocp_convert): Check decayed expr for enum range warning.
101 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
103         * Make-lang.in: Remove tree-mudflap.o from CXX_AND_OBJCXX_OBJS.
105 2012-06-27  Jason Merrill  <jason@redhat.com>
107         * parser.c (cp_parser_check_for_invalid_template_id): tag_type parm.
108         (cp_parser_simple_type_specifier, cp_parser_class_head): Adjust.
109         (cp_parser_elaborated_type_specifier): Adjust.
110         * decl.c (duplicate_decls): Return error_mark_node on template
111         mismatch.
113         PR c++/53563
114         * parser.c (cp_parser_template_id): Add tag_type parm.
115         (cp_parser_template_name): Likewise.
116         (cp_parser_id_expression, cp_parser_unqualified_id): Adjust.
117         (cp_parser_pseudo_destructor_name, cp_parser_type_name): Adjust.
118         (cp_parser_simple_type_specifier, cp_parser_class_name): Adjust.
119         (cp_parser_elaborated_type_specifier, cp_parser_class_head): Adjust.
121 2012-06-27  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
123         PR C++/51033
124         * semantics.c (constexpr_call): Fix typo in comment.
125         (cxx_eval_vec_perm_expr): New.
126         (cxx_eval_constant_expression): Fold VEC_PERM_EXPRs.
128 2012-06-26  Richard Guenther  <rguenther@suse.de>
130         PR c++/53752
131         * mangle.c (write_array_type): Truncate the number-of-elements
132         result.
134 2012-06-25  Jason Merrill  <jason@redhat.com>
136         PR c++/53498
137         PR c++/53305
138         * pt.c (tsubst_decl) [PARM_DECL]: Don't recurse into DECL_CHAIN
139         if cp_unevaluated_operand is set.
140         (tsubst_copy) [PARM_DECL]: Don't copy before tsubsting.
142         PR c++/52988
143         * typeck.c (decay_conversion): Don't discard side-effects from
144         expressions of nullptr_t.
146 2012-06-25  Florian Weimer  <fweimer@redhat.com>
148         * init.c (build_new_1): Warn about (T[N]) for variable N, and
149         reject T[M][N].
151         * parser.c (cp_parser_direct_new_declarator): Accept non-constant
152         expressions.  Handled now in build_new_1.
154 2012-06-25  Jason Merrill  <jason@redhat.com>
156         PR c++/53202
157         * semantics.c (build_data_member_initialization): Always keep
158         initializer for empty base.
159         (cxx_eval_bare_aggregate): Discard it here.
161         PR c++/53565
162         * pt.c (tsubst_omp_for_iterator): Simplify DECL_EXPR handling.
163         (tsubst_expr) [OMP_FOR]: Here, too.
165 2012-06-25  Jakub Jelinek  <jakub@redhat.com>
167         PR c++/53594
168         * class.c (check_bases_and_members): Avoid -Wuninitialized
169         diagnostics for non-static const members or references if they
170         use NSDMI.
172 2012-06-16  Ville Voutilainen  <ville.voutilainen@gmail.com>
174         * parser.c (cp_parser_direct_declarator): Move virt-specifier
175         parsing after late-specified return type parsing.
177 2012-06-14  Jason Merrill  <jason@redhat.com>
179         PR c++/53651
180         * name-lookup.c (constructor_name_p): Don't try to look at the
181         name of a DECLTYPE_TYPE.
183 2012-06-18  Lawrence Crowl  <crowl@google.com>
185         * decl2.c (cp_write_global_declarations): Rename use of TV_PHASE_CGRAPH
186         to TV_PHASE_OPT_GEN.
188 2012-06-18  Steven Bosscher  <steven@gcc.gnu.org>
190         * decl.c (finish_function): Remove code conditional on VMS_TARGET.
192 2012-06-15  Marc Glisse  <marc.glisse@inria.fr>
194         PR c++/51033
195         * semantics.c (literal_type_p): Handle VECTOR_TYPE.
196         (potential_constant_expression_1): Handle VEC_PERM_EXPR.
197         * parser.c (cp_parser_postfix_expression): Handle RID_BUILTIN_SHUFFLE.
199 2012-06-09  Jason Merrill  <jason@redhat.com>
201         * pt.c (tsubst_expr) [TAG_DEFN]: Instantiate local class.
202         * class.c (finish_struct): Don't add a TAG_DEFN for a lambda.
203         * decl2.c (finish_static_data_member_decl): Avoid redundant error.
205         PR c++/53599
206         * name-lookup.c (pushtag_1): Add a DECL_EXPR for a local class.
207         * semantics.c (finish_cond): Build a COMPOUND_EXPR.
208         * pt.c (tsubst_expr) [COMPOUND_EXPR]: Handle.
209         [DECL_EXPR]: Don't call cp_finish_decl for an implicit typedef.
210         Don't return the decl.
212 2012-06-11  Richard Guenther  <rguenther@suse.de>
214         PR c++/53605
215         * mangle.c (write_array_type): Use double-ints for array domain
216         arithmetic.
218 2012-06-07  Fabien ChĂȘne  <fabien@gcc.gnu.org>
220         PR c++/51214
221         * cp-tree.h (insert_late_enum_def_into_classtype_sorted_fields):
222         Declare.
223         * class.c (insert_into_classtype_sorted_fields): New.
224         (add_enum_fields_to_record_type): New.
225         (count_fields): Adjust the comment.
226         (add_fields_to_record_type): Likewise.
227         (finish_struct_1): Move the code that inserts the fields for the
228         sorted case, into insert_into_classtype_sorted_fields, and call
229         it.
230         (insert_late_enum_def_into_classtype_sorted_fields): Define.
231         * decl.c (finish_enum_value_list): Call
232         insert_late_enum_def_into_classtype_sorted_fields if a late enum
233         definition is encountered.
235 2012-06-06  Paolo Carlini  <paolo.carlini@oracle.com>
237         PR c++/53567
238         * typeck.c (cp_perform_integral_promotions): New, like
239         perform_integral_promotions but also takes a tsubst_flags_t parameter.
240         (pointer_diff): Add tsubst_flags_t parameter.
241         (decay_conversion, cp_default_conversion, cp_build_array_ref,
242         cp_build_binary_op, cp_build_unary_op, build_static_cast_1,
243         build_reinterpret_cast_1, cp_build_modify_expr,
244         convert_for_assignment): Adjust.
245         * optimize.c (build_delete_destructor_body): Adjust.
246         * init.c (expand_virtual_init, expand_default_init, build_new_1,
247         build_new, build_vec_delete_1, build_vec_init, build_delete): Adjust.
248         (construct_virtual_base): Adjust LOOKUP_COMPLAIN -> 0.
249         * class.c (build_base_path): Adjust.
250         * decl.c (compute_array_index_type, finish_destructor_body): Likewise.
251         * method.c (synthesized_method_walk): Adjust flag and complain.
252         * rtti.c (ifnonnull): Add tsubst_flags_t parameter.
253         (build_typeid, build_dynamic_cast_1): Adjust.
254         * except.c (initialize_handler_parm): Likewise.
255         * typeck2.c (process_init_constructor_record): Likewise.
256         * pt.c (tsubst_friend_class): Don't change flags.
257         * semantics.c (finish_goto_stmt, handle_omp_for_class_iterator,
258         finish_static_assert): Likewise.
259         * parser.c (cp_parser_lookup_name): Just pass 0 as flags to
260         lookup_name_real.
261         * call.c (build_op_delete_call): Add tsubst_flags_t parameter.
262         (convert_like_real, convert_arg_to_ellipsis, convert_for_arg_passing):
263         Adjust.
264         (standard_conversion): Adjust LOOKUP_COMPLAIN -> 0.
265         (implicit_conversion): Mask out tf_error with a FIXME.
266         (build_user_type_conversion_1, build_new_op_1, build_over_call): Use
267         complain & tf_error instead of flags & LOOKUP_COMPLAIN.
268         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
269         build_up_reference, convert_to_reference, cp_convert,
270         cp_convert_and_check, ocp_convert, convert_force): Add tsubst_flags_t
271         parameter.
272         (convert_to_reference, ocp_convert): Use complain & tf_error instead
273         of flags & LOOKUP_COMPLAIN.
274         (convert_force): Adjust LOOKUP_COMPLAIN -> 0.
275         * name-lookup.c (identifier_type_value_1, lookup_qualified_name,
276         lookup_name_real, lookup_function_nonclass, lookup_name,
277         lookup_name_prefer_type): Adjust LOOKUP_COMPLAIN -> 0.
278         * cp-tree.h: Adjust prototypes; remove LOOKUP_COMPLAIN.
280 2012-06-06  Steven Bosscher  <steven@gcc.gnu.org>
282         * decl.c: Do not include output.h.
283         (start_decl): Remove code for flag_conserve_space.
285 2012-06-06  Fabien ChĂȘne  <fabien@gcc.gnu.org>
287         PR c++/52841
288         * parser.c (cp_parser_alias_declaration): Return earlier
289         if an error occured.
291 2012-06-04  Paolo Carlini  <paolo.carlini@oracle.com>
293         PR c++/53524
294         * call.c (build_conditional_expr_1): Use OPT_Wenum_compare
295         to control enumeral mismatch in conditional expression too.
297 2012-06-04   Sterling Augustine  <saugustine@google.com>
299         * cp-tree.h: Declare decl_as_dwarf_string, lang_decl_dwarf_name.
300         * cp-lang.c (cxx_dwarf_name): Call them.
302 2012-06-04  Steven Bosscher  <steven@gcc.gnu.org>
304         * semantics.c: Do not include output.h.
305         * decl2.c: Likewise.
306         * friend.c: Likewise.
307         * typeck.c: Likewise.
308         * typeck2.c: Likewise.
309         * Make-lang.in: Fix dependencies.
311 2012-06-01  Jason Merrill  <jason@redhat.com>
313         PR c++/52973
314         * parser.c (cp_parser_class_head): Apply attributes here.
315         * semantics.c (begin_class_definition): Not here.
316         * cp-tree.h: Adjust.
318         PR c++/52725
319         * parser.c (cp_parser_binary_expression): Bail early if we're parsing
320         tentatively and the LHS has a parse error.
322         PR c++/53137
323         * pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
324         (instantiate_decl): Don't push_to_top_level for local class methods.
325         (instantiate_class_template_1): Or for local classes.
327         PR c++/53484
328         * pt.c (do_auto_deduction): Don't try to deduce from a
329         type-dependent initializer.
331 2012-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
333         PR c++/26155
334         * name-lookup.c (push_namespace): When error recovery is
335         impossible just error out in duplicate_decls.
337 2012-05-31  Steven Bosscher  <steven@gcc.gnu.org>
339         * call.c: Do not include output.h.
340         * class.c: Likewise.
341         * except.c: Likewise.
342         * friend.c: Likewise.
343         * init.c: Likewise.
344         * lex.c: Likewise.
345         * method.c: Likewise.
346         * parser.c: Likewise.
347         * pt.c: Likewise.
348         * rtti.c: Likewise.
349         * search.c: Likewise.
351 2012-05-30  Jason Merrill  <jason@redhat.com>
353         PR c++/53356
354         * tree.c (stabilize_init): Handle stabilizing a TARGET_EXPR
355         representing a bitwise copy of a glvalue.
357         * tree.c (stabilize_expr): Tweak logic.
359         PR c++/53356
360         * tree.c (stabilize_init): Side effects make the init unstable.
362 2012-05-28  Paolo Carlini  <paolo.carlini@oracle.com>
364         PR c++/53503
365         * semantics.c (potential_constant_expression_1): Handle LTGT_EXPR.
367 2012-05-26  Paolo Carlini  <paolo.carlini@oracle.com>
369         PR c++/53491
370         * tree.c (stabilize_expr): Handle exp of void type.
372 2012-05-26  Jason Merrill  <jason@redhat.com>
374         PR c++/53220
375         * call.c (convert_like_real) [ck_list]: Take array address directly.
376         * typeck.c (decay_conversion): Reject decay of an array compound
377         literal.
379 2012-05-25  Paolo Carlini  <paolo.carlini@oracle.com>
381         PR c++/32054
382         * parser.c (cp_parser_member_declaration): A storage class is not
383         allowed in a declaration of an anonymous aggregate in a class scope.
385 2012-05-24  Uros Bizjak  <ubizjak@gmail.com>
387         PR obj-c++/53441
388         * decl.c (grokdeclarator): Check that current_class_type is non-NULL
389         before calling constructor_name_p.
391 2012-05-24  Paolo Carlini  <paolo.carlini@oracle.com>
393         PR c++/32080
394         * parser.c (cp_parser_ctor_initializer_opt_and_function_body,
395         cp_parser_function_body): Add a bool parameter, true when parsing
396         a function-try-block.
397         (cp_parser_function_try_block): Pass true to the above.
398         (cp_parser_function_definition_after_declarator,
399         cp_parser_function_transaction): Adjust.
401 2012-05-23  Paolo Carlini  <paolo.carlini@oracle.com>
403         PR c++/29185
404         * decl2.c (delete_sanity): Extend 'deleting array' warning to
405         any array type.
407 2012-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
409         PR c++/51184
410         * decl.c (grokdeclarator): Diagnose functions returning abstract
411         class types as TYPENAME.
412         * cp-tree.h (ABSTRACT_CLASS_TYPE_P): Add.
413         * except.c (is_admissible_throw_operand_or_catch_parameter): Use it.
414         * pt.c (tsubst): Likewise.
415         * semantics.c (trait_expr_value): Likewise.
417 2012-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
419         PR c++/40821
420         * parser.c (cp_parser_attributes_opt): Enforce error checking of
421         unbalanced parentheses in the presence of tentative parsing.
423 2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
425         PR c++/39681
426         * parser.c (cp_parser_new_type_id): Early return error_mark_node
427         if the cp_parser_type_specifier_seq call has type_specifier_seq.type
428         error_mark_node; tidy.
429         (cp_parser_new_expression): Always initialize nelts to NULL_TREE to
430         avoid uninitialized warnings.
431         (cp_parser_init_declarator, cp_parser_late_parse_one_default_arg):
432         Call cp_parser_skip_to_end_of_statement if cp_parser_initializer
433         returns error_mark_node.
435 2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
437         PR c++/53371
438         * except.c (is_admissible_throw_operand): Rename to
439         is_admissible_throw_operand_or_catch_parameter and handle
440         catch parameter too.
441         (expand_start_catch_block): Use it.
442         (build_throw): Adjust.
444 2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
446         PR c++/44516
447         * typeck.c (build_x_array_ref, build_x_conditional_expr,
448         build_x_compound_expr, build_x_modify_expr): Add location_t parameter.
449         (finish_class_member_access_expr, build_x_indirect_ref,
450         build_x_binary_op, build_x_compound_expr_from_list,
451         build_x_compound_expr_from_vec): Adjust callers.
452         * tree.c (build_min_nt_loc): New.
453         (build_min_nt): Remove.
454         * typeck2.c (build_x_arrow): Adjust callers.
455         * pt.c (tsubst_qualified_id, tsubst_omp_for_iterator,
456         tsubst_copy_and_build): Likewise.
457         * semantics.c (finish_mem_initializers, handle_omp_for_class_iterator,
458          finish_omp_atomic): Likewise.
459         * decl2.c (grok_array_decl, build_anon_union_vars): Adjust.
460         * parser.c (cp_parser_question_colon_clause,
461         cp_parser_assignment_expression, cp_parser_expression,
462         cp_parser_template_id, cp_parser_omp_for_loop): Likewise.
463         * cp-tree.h: Update.
465 2012-05-16  Dodji Seketeli  <dodji@redhat.com>
467         PR preprocessor/7263
468         * cp-tree.h (enum cp_decl_spec): Add new enumerators to cover all
469         the possible declarator specifiers so far.
470         (struct cp_decl_specifier_seq::locations): Declare new member.
471         (cp_decl_specifier_seq::{specs, type_location}): Remove.
472         (decl_spec_seq_has_spec_p): Declare new function.
473         * parser.c (cp_parser_check_decl_spec): Remove.
474         (set_and_check_decl_spec_loc): Define new static function.
475         (decl_spec_seq_has_spec_p): Define new public function.
476         (cp_parser_decl_specifier_seq, cp_parser_function_specifier_opt)
477         (cp_parser_type_specifier, cp_parser_simple_type_specifier)
478         (cp_parser_set_storage_class, cp_parser_set_decl_spec_type)
479         (cp_parser_alias_declaration): Set the locations for each
480         declspec, using set_and_check_decl_spec_loc.
481         (cp_parser_explicit_instantiation, cp_parser_init_declarator)
482         (cp_parser_member_declaration, cp_parser_init_declarator): Use the
483         new declspec location for specifiers.  Use the new
484         decl_spec_seq_has_spec_p.
485         (cp_parser_type_specifier_seq): Use the new
486         set_and_check_decl_spec_loc.  Stop using
487         cp_parser_check_decl_spec.  Use the new decl_spec_seq_has_spec_p.
488         (, cp_parser_init_declarator): Use the new
489         set_and_check_decl_spec_loc.
490         (cp_parser_single_declaration, cp_parser_friend_p)
491         (cp_parser_objc_class_ivars, cp_parser_objc_struct_declaration):
492         Use the new decl_spec_seq_has_spec_p.
493         * decl.c (check_tag_decl): Use new decl_spec_seq_has_spec_p.  Use
494         the more precise ds_redefined_builtin_type_spec location for
495         diagnostics about re-declaring C++ built-in types.
496         (start_decl, grokvardecl, grokdeclarator): Use the new
497         decl_spec_seq_has_spec_p.
499 2012-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
501         PR c++/11856
502         * pt.c (tsubst_copy_and_build): Increase / decrease
503         c_inhibit_evaluation_warnings around build_x_binary_op call.
505 2012-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
507         * cp-tree.h (TYPE_PTRMEM_P): Rename to TYPE_PTRDATAMEM_P.
508         (TYPE_PTR_TO_MEMBER_P): Rename to TYPE_PTRMEM_P.
509         (TYPE_PTR_OR_PTRMEM_P): Add.
510         * typeck.c (composite_pointer_type_r, composite_pointer_type,
511         common_pointer_type, cp_build_indirect_ref, cp_build_binary_op,
512         cp_truthvalue_conversion, convert_ptrmem, build_static_cast_1,
513         build_reinterpret_cast_1, build_const_cast_1, comp_ptr_ttypes_real,
514         casts_away_constness_r, casts_away_constness): Adjust.
515         * init.c (build_zero_init_1): Adjust.
516         * class.c (check_field_decls): Likewise.
517         * decl.c (check_default_argument): Likewise.
518         * rtti.c (target_incomplete_p): Likewise.
519         * tree.c (zero_init_p): Likewise.
520         * cxx-pretty-print.c (pp_cxx_ptr_operator,
521         pp_cxx_abstract_declarator): Likewise.
522         * typeck2.c (build_m_component_ref): Likewise.
523         * pt.c (convert_nontype_argument, invalid_nontype_parm_type_p,
524         dependent_type_p_r): Likewise.
525         * call.c (null_member_pointer_value_p, standard_conversion,
526         add_builtin_candidate, build_conditional_expr_1, compare_ics):
527         Likewise.
528         * cp-objcp-common.c (cp_var_mod_type_p): Likewise.
529         * cvt.c (cp_convert_to_pointer, ocp_convert,
530         perform_qualification_conversions): Likewise.
531         * mangle.c (write_type): Likewise.
532         * name-lookup.c (arg_assoc_type): Likewise.
534 2012-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
536         * parser.c (struct cp_parser_expression_stack_entry): Add location_t
537         field.
538         (cp_parser_binary_expression): Rework to always update at the same
539         time tree_type and loc.
540         * call.c (print_z_candidate): Add location_t parameter.
541         (print_z_candidates, convert_like_real, joust): Adjust.
543 2012-05-11  Alexandre Oliva  <aoliva@redhat.com>
545         PR c++/53209
546         * pt.c (tsubst_decl): Bail out if argvec is error_mark_node.
548 2012-05-11  Paolo Carlini  <paolo.carlini@oracle.com>
550         PR c++/53305
551         * pt.c (tsubst_copy: case PARM_DECL): Return error_mark_node if
552         tsubst_decl returns NULL_TREE.
553         * cxx-pretty-print.c (pp_cxx_simple_type_specifier): Handle
554         BOUND_TEMPLATE_TEMPLATE_PARM.
556 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
558         PR c++/53158
559         * cvt.c (ocp_convert): Error out early for void -> bool conversions.
560         * typeck.c (decay_conversion): Use error_at.
561         * call.c (build_integral_nontype_arg_conv, convert_like_real,
562         convert_arg_to_ellipsis, perform_implicit_conversion_flags,
563         initialize_reference): Likewise.
564         * cvt.c (warn_ref_binding): Add location_t parameter.
565         (cp_convert_to_pointer, convert_to_reference, ocp_convert,
566         convert_to_void, ): Use error_at and warning_at.
568 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
570         PR c++/53301
571         * decl.c (check_default_argument): Fix typo (POINTER_TYPE_P
572         instead of TYPE_PTR_P) in zero-as-null-pointer-constant warning.
574 2012-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
576         PR c++/53152
577         * call.c (op_error, build_new_op_1, build_new_op): Add location_t
578         parameter.
579         (build_conditional_expr_1): Adjust.
580         * typeck.c (build_x_indirect_ref, build_x_binary_op,
581         build_x_unary_op): Add location_t parameter.
582         (rationalize_conditional_expr, build_x_array_ref,
583         build_x_compound_expr, cp_build_modify_expr, build_x_modify_expr):
584         Adjust.
585         * typeck2.c (build_x_arrow): Add location_t parameter.
586         * semantics.c (finish_unary_op_expr): Likewise.
587         (finish_increment_expr, handle_omp_for_class_iterator): Adjust.
588         * decl2.c (grok_array_decl): Add location_t parameter.
589         * parser.c (cp_parser_postfix_open_square_expression,
590         cp_parser_postfix_dot_deref_expression, cp_parser_unary_expression,
591         cp_parser_binary_expression, cp_parser_builtin_offsetof,
592         do_range_for_auto_deduction, cp_convert_range_for,
593         cp_parser_template_argument, cp_parser_omp_for_cond): Pass the
594         location, adjust.
595         * pt.c (tsubst_copy_and_build): Adjust.
596         * tree.c (maybe_dummy_object): Likewise.
597         * cp-tree.h: Update declarations.
599 2012-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
601         * semantics.c (cxx_eval_constant_expression, case CONVERT_EXPR): Tidy.
603 2012-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
605         PR c++/53166
606         * pt.c (instantiate_class_template_1): Increase / decrease
607         c_inhibit_evaluation_warnings around the tsubst_expr call
608         for STATIC_ASSERT_CONDITION.
609         (tsubst_expr, case STATIC_ASSERT): Likewise.
610         * typeck.c (cp_build_binary_op, case EQ_EXPR/NE_EXPR): Check
611         c_inhibit_evaluation_warnings in the OPT_Waddress warnings.
613 2012-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
615         PR c++/53186
616         * call.c (build_over_call): Handle final member functions
617         and class types.
618         (build_new_method_call_1): Do not handle here.
620 2012-05-02  Richard Guenther  <rguenther@suse.de>
622         * decl.c (grokdeclarator): Properly check for sizes that
623         cover more than half of the address-space.
625 2012-04-30  Marc Glisse  <marc.glisse@inria.fr>
627         PR c++/51033
628         * typeck.c (cp_build_array_ref): Handle VECTOR_TYPE.
629         * decl2.c (grok_array_decl): Likewise.
631         PR c++/51314
632         * parser.c (cp_parser_sizeof_operand): Require parentheses for
633         sizeof...
635 2012-04-30  Dodji Seketeli  <dodji@redhat.com>
637         Fix location for static class members
638         * decl.c (grokdeclarator): Use the location carried by the
639         declarator for the DECL of the static class member.
641         Fix va_arg type location
642         * cp-tree.h (build_x_va_arg): Take an additional location
643         parameter.
644         * call.c (build_x_va_arg): Take a loc parameter for the location
645         of the type of the va_arg expression.
646         * parser.c (cp_parser_primary_expression): Pass the type of the
647         type in the va_arg expression to build_x_va_arg.
648         * pt.c (tsubst_copy): Adjust calls to build_x_va_arg.
650         Make conversion warnings work on NULL with -ftrack-macro-expansion
651         * call.c (conversion_null_warnings): Use the new
652         expansion_point_location_if_in_system_header.
653         * cvt.c (build_expr_type_conversion): Likewise.
654         * typeck.c (cp_build_binary_op): Likewise.
656 2012-04-30  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
658         * typeck.c (convert_for_assignment):  Replace
659         Wmissing-format-attribute with Wsuggest-attribute=format.
660         * call.c (convert_for_arg_passing): Likewise.
662 2012-04-26  Paolo Carlini  <paolo.carlini@oracle.com>
664         PR c++/53096
665         * class.c (check_bases_and_members): Implement core/1333, do not
666         disallow defaulted in the class body non-const ref special members.
668 2012-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
670         PR c++/52363
671         * call.c (tourney, perform_overload_resolution,
672         build_operator_new_call, build_user_type_conversion_1,
673         build_user_type_conversion, perform_overload_resolution,
674         add_template_candidate, add_template_candidate_real,
675         add_template_conv_candidate, add_builtin_candidates,
676         add_builtin_candidate, build_builtin_candidate,
677         add_conv_candidate, add_function_candidate, implicit_conversion,
678         reference_binding, build_list_conv, conditional_conversion,
679         add_candidates, can_convert_array, build_aggr_conv,
680         build_array_conv, build_complex_conv, conditional_conversion):
681         Add tsubst_flags_t parameter.
682         (joust): Likewise, use it to handle SFINAE as if pedantic.
683         (add_list_candidates, build_integral_nontype_arg_conv,
684         perform_overload_resolution, build_new_function_call,
685         build_operator_new_call, build_op_call_1,
686         build_conditional_expr_1, build_new_op_1, convert_like_real,
687         convert_arg_to_ellipsis, convert_default_arg,
688         convert_for_arg_passing, build_over_call,
689         build_new_method_call_1, can_convert_arg, can_convert_arg_bad,
690         perform_implicit_conversion_flags,
691         perform_direct_initialization_if_possible,
692         initialize_reference): Adjust.
693         * typeck.c (casts_away_constness, casts_away_constness_r):
694         Add tsubst_flags_t parameter.
695         (convert_arguments, check_for_casting_away_constness,
696         build_static_cast_1, build_ptrmemfunc, convert_for_assignment):
697         Adjust.
698         * decl.c (reshape_init_r, check_default_argument): Likewise.
699         * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
700         * pt.c (convert_nontype_argument, check_non_deducible_conversion):
701         Likewise.
702         * init.c (build_new_1): Likewise.
703         * cvt.c (convert_to_reference, ocp_convert, build_type_conversion,
704         build_expr_type_conversion, ): Likewise.
705         * search.c (check_final_overrider): Likewise.
706         * cp-tree.h (build_user_type_conversion,
707         build_operator_new_call, can_convert, can_convert_arg,
708         can_convert_arg_bad, convert_default_arg,
709         convert_arg_to_ellipsis, convert_for_arg_passing):
710         Adjust declaration.
712 2012-04-22  Jan Hubicka  <jh@suse.cz>
714         * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they
715         gets finalized.
717 2012-04-22  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
719         PR c/44774
720         * typeck.c (composite_pointer_type): Likewise.
721         (cxx_sizeof_or_alignof_type): Likewise.
722         (cp_build_array_ref): Likewise.
723         (cp_build_function_call_vec): Likewise.
724         (cp_build_addr_expr_1): Likewise.
725         (convert_member_func_to_ptr): Likewise.
726         * decl.c (check_tag_decl): Likewise.
727         (check_static_variable_definition): Likewise.
728         (compute_array_index_type): Likewise.
729         (create_array_type_for_decl): Likewise.
730         (grokdeclarator): Likewise.
731         (grok_op_properties): Likewise.
732         * error.c (maybe_warn_cpp0x): Likewise.
733         * pt.c (maybe_process_partial_specialization): Likewise.
734         (convert_template_argument): Likewise.
735         (do_decl_instantiation): Likewise.
736         (do_type_instantiation): Likewise.
737         * parser.c (cp_parser_primary_expression): Likewise.
738         (cp_parser_postfix_expression): Likewise.
739         (cp_parser_unary_expression): Likewise.
740         (cp_parser_question_colon_clause): Likewise.
741         (cp_parser_lambda_introducer): Likewise.
742         (cp_parser_lambda_declarator_opt): Likewise.
743         (cp_parser_compound_statement): Likewise.
744         (cp_parser_jump_statement): Likewise.
745         (cp_parser_declaration_seq_opt): Likewise.
746         (cp_parser_enum_specifier): Likewise.
747         (cp_parser_enumerator_list): Likewise.
748         (cp_parser_initializer_list): Likewise.
749         (cp_parser_member_declaration): Likewise.
750         * call.c (build_conditional_expr_1): Likewise.
751         * friend.c (make_friend_class): Likewise.
752         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
754 2012-04-21  Jan Hubicka  <jh@suse.cz>
756         * method.c (make_alias_for): Do not set TREE_SYMBOL_REFERENCED.
757         * decl2.c (mark_needed): Likewise.
758         (decl_needed_p): Do not test TREE_SYMBOL_REFERENCED.
760         * decl2.c (cxx_callgraph_analyze_expr): Remove.
761         * cp-objcp-common.h (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Remove.
762         * cp-tree.h (cxx_callgraph_analyze_expr): Remove.
764 2012-04-21  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
766         PR 35441
767         * typeck.c (cp_build_function_call_vec): Do not pretty-print
768         expressions when caret is enabled.
770 2012-04-20  Jan Hubicka  <jh@suse.cz>
772         PR target/53042
773         * decl2.c (maybe_emit_vtables): Do not initialize same_comdat_group
774         list when target has no support for it.
776 2012-04-20  Michael Matz  <matz@suse.de>
778         * error.c (pedwarn_cxx98): Move va_end call after user
779         of the va_list.
781 2012-04-18  Paolo Carlini  <paolo.carlini@oracle.com>
783         PR c++/52422
784         * cp-tree.h (build_addr_func, decay_conversion,
785         get_member_function_from_ptrfunc,
786         build_m_component_ref, convert_member_func_to_ptr):
787         Add tsubst_flags_t parameter.
788         * typeck.c (cp_default_conversion): Add.
789         (decay_conversion, default_conversion,
790         get_member_function_from_ptrfunc, convert_member_func_to_ptr):
791         Add tsubst_flags_t parameter and use it throughout.
792         (cp_build_indirect_ref, cp_build_array_ref,
793         cp_build_function_call_vec, convert_arguments, build_x_binary_op,
794         cp_build_binary_op, cp_build_unary_op, build_reinterpret_cast_1,
795         build_const_cast_1, expand_ptrmemfunc_cst,
796         convert_for_initialization): Adjust.
797         * init.c (build_vec_init): Adjust.
798         * decl.c (grok_reference_init, get_atexit_node): Likewise.
799         * rtti.c (build_dynamic_cast_1, tinfo_base_init): Likewise.
800         * except.c (build_throw): Likewise.
801         * typeck2.c (build_x_arrow): Likewise.
802         (build_m_component_ref): Add tsubst_flags_t parameter and
803         use it throughout.
804         * pt.c (convert_nontype_argument): Adjust.
805         * semantics.c (finish_asm_stmt, maybe_add_lambda_conv_op): Likewise.
806         * decl2.c (build_offset_ref_call_from_tree): Likewise.
807         * call.c (build_addr_func): Add tsubst_flags_t parameter and
808         use it throughout.
809         (build_call_a, build_conditional_expr_1, build_new_op_1,
810         convert_like_real, convert_arg_to_ellipsis, build_over_call,
811         build_special_member_call): Adjust.
812         * cvt.c (cp_convert_to_pointer, force_rvalue,
813         build_expr_type_conversion): Likewise.
815 2012-04-17  Tom de Vries  <tom@codesourcery.com>
817         * cp-gimplify.c (begin_bc_block): Add location parameter and use as
818         location argument to create_artificial_label.
819         (finish_bc_block): Change return type to void.  Remove body_seq
820         parameter, and add block parameter.  Append label to STMT_LIST and
821         return in block.
822         (gimplify_cp_loop, gimplify_for_stmt, gimplify_while_stmt)
823         (gimplify_do_stmt, gimplify_switch_stmt): Remove function.
824         (genericize_cp_loop, genericize_for_stmt, genericize_while_stmt)
825         (genericize_do_stmt, genericize_switch_stmt, genericize_continue_stmt)
826         (genericize_break_stmt, genericize_omp_for_stmt): New function.
827         (cp_gimplify_omp_for): Remove bc_continue processing.
828         (cp_gimplify_expr): Genericize VEC_INIT_EXPR.
829         (cp_gimplify_expr): Mark FOR_STMT, WHILE_STMT, DO_STMT, SWITCH_STMT,
830         CONTINUE_STMT, and BREAK_STMT as unreachable.
831         (cp_genericize_r): Genericize FOR_STMT, WHILE_STMT, DO_STMT,
832         SWITCH_STMT, CONTINUE_STMT, BREAK_STMT and OMP_FOR.
833         (cp_genericize_tree): New function, factored out of ...
834         (cp_genericize): ... this function.
836 2012-04-17  Paolo Carlini  <paolo.carlini@oracle.com>
838         PR c++/52599
839         * semantics.c (build_constexpr_constructor_member_initializers):
840         Check for function-try-block as function-body.
842 2012-04-17  Paolo Carlini  <paolo.carlini@oracle.com>
844         PR c++/53003
845         * parser.c (cp_parser_member_declaration): Check that
846         initializer_token_start is non null before dereferencing it.
848 2012-04-16  Jason Merrill  <jason@redhat.com>
850         PR c++/38543
851         * pt.c (determine_specialization): Instead of comparing the number
852         of parms, check that tsubst gives the right answer.
854         PR c++/52008
855         * pt.c (process_partial_specialization): Complain about a partial
856         specialization with fewer args than primary template parms.
858         PR c++/50830
859         * pt.c (convert_template_argument): Handle template template
860         argument packs.
862         PR c++/50303
863         * pt.c (tsubst_pack_expansion): Use tsubst_expr for template
864         template parameters.
866 2012-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
868         PR c++/49152
869         * call.c (op_error): Print types; when flag_diagnostics_show_caret
870         is false print expressions too.
871         (op_error_string): Add.
873 2012-04-16  Jason Merrill  <jason@redhat.com>
875         PR c++/51148
876         * friend.c (make_friend_class): Call check_for_bare_parameter_packs.
878 2012-04-16  Jan Hubicka  <jh@suse.cz>
880         * decl2.c (collect_candidates_for_java_method_alias): Use FOR_EACH
881         walkers to walk cgraph and varpool.
883 2012-04-15  Jason Merrill  <jason@redhat.com>
885         PR c++/47220
886         * pt.c (coerce_template_parameter_pack): Check for error_mark_node.
888         PR c++/52292
889         PR c++/52380
890         * pt.c (coerce_template_parms): Even if we aren't converting we
891         want to expand argument packs.
893         PR c++/52706
894         * mangle.c (write_type): nullptr_t is a builtin type.
896 2012-04-14  Jan Hubicka  <jh@suse.cz>
898         * tree.c: Update field referenced for new cgraph/varpool layout.
899         * decl2.c: Likewise.
901 2012-04-13  Jason Merrill  <jason@redhat.com>
903         PR c++/52824
904         * pt.c (any_pack_expanson_args_p): New.
905         (coerce_template_parms): Use it.
907         PR c++/52905
908         * call.c (joust): Handle comparing list and non-list ctors.
910         PR c++/52915
911         * decl2.c (finish_anon_union): Use cp_finish_decl.
912         * error.c (dump_function_name): Avoid showing anonymous "name".
914 2012-04-11  Fabien ChĂȘne  <fabien@gcc.gnu.org>
916         PR c++/52465
917         * parser.c (cp_parser_class_name): Call strip_using_decl and
918         return the target decl.
919         * name-lookup.c (strip_using_decl): Returns NULL_TREE if the decl
920         to be stripped is NULL_TREE.
921         (qualify_lookup): Call strip_using_decl and perform some checks on
922         the target decl.
924 2012-04-11  Jason Merrill  <jason@redhat.com>
926         PR debug/45088
927         * decl.c (grokdeclarator): Strip the injected-class-name typedef
928         if we are building a declaration or compound type.
930         PR c++/52906
931         * decl.c (check_tag_decl): Don't complain about attributes if we
932         don't even have a type.
934 2012-04-10  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
936         * cvt.c (convert_to_void): Update comment.
938 2012-04-05  Jason Merrill  <jason@redhat.com>
940         PR c++/52596
941         * semantics.c (finish_non_static_data_member): In templates, pass
942         the decl to build_qualified_name.
943         * tree.c (lvalue_kind) [SCOPE_REF]: Handle FIELD_DECL.
945 2012-04-04  Jason Merrill  <jason@redhat.com>
947         PR c++/52845
948         * decl.c (finish_function): Update fntype after deducing return type.
950 2012-04-03  Jason Merrill  <jason@redhat.com>
952         PR c++/52796
953         * pt.c (tsubst_initializer_list): A pack expansion with no elements
954         means value-initialization.
956 2012-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
958         PR c++/50043
959         * class.c (deduce_noexcept_on_destructor,
960         deduce_noexcept_on_destructors): New.
961         (check_bases_and_members): Call the latter.
962         * decl.c (grokfndecl): Call the former.
963         * method.c (implicitly_declare_fn): Not static.
964         * cp-tree.h (deduce_noexcept_on_destructor, implicitly_declare_fn):
965         Declare
967 2012-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
969         PR c++/52718
970         * decl.c (check_default_argument): With -Wzero-as-null-pointer-constant
971         warn for a zero as null pointer constant default argument.
973 2012-03-29  Jason Merrill  <jason@redhat.com>
975         PR c++/52685
976         * tree.c (copy_binfo): Handle BINFO_DEPENDENT_BASE_P.
978 2012-03-29  Jakub Jelinek  <jakub@redhat.com>
980         PR c++/52759
981         * decl.c (start_decl): Don't call maybe_apply_pragma_weak
982         if processing_template_decl.
984 2012-03-29  Jason Merrill  <jason@redhat.com>
986         PR c++/52743
987         * call.c (compare_ics): Handle ck_aggr like ck_list.
989 2012-03-28  Jason Merrill  <jason@redhat.com>
991         PR c++/52746
992         * typeck.c (lookup_destructor): Clear BASELINK_QUALIFIED_P if
993         we didn't get an explicit scope.
994         * pt.c (tsubst_baselink): Likewise.
996 2012-03-28  Richard Guenther  <rguenther@suse.de>
998         * typeck2.c (process_init_constructor_array): Use the proper
999         type for computing the array length.
1001 2012-03-27  Meador Inge  <meadori@codesourcery.com>
1003         PR c++/52672
1004         * semantics.c (cxx_fold_indirect_ref): Don't attempt to fold
1005         stripped child trees that are not pointer types.
1007 2012-03-21  Jason Merrill  <jason@redhat.com>
1009         Implement return type deduction for normal functions with -std=c++1y.
1010         * cp-tree.h (FNDECL_USED_AUTO): New macro.
1011         (LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P): Remove.
1012         (dependent_lambda_return_type_node): Remove.
1013         (CPTI_DEPENDENT_LAMBDA_RETURN_TYPE): Remove.
1014         (struct language_function): Add x_auto_return_pattern field.
1015         (current_function_auto_return_pattern): New.
1016         (enum tsubst_flags): Add tf_partial.
1017         * decl.c (decls_match): Handle auto return comparison.
1018         (duplicate_decls): Adjust error message for auto return.
1019         (cxx_init_decl_processing): Remove dependent_lambda_return_type_node.
1020         (cp_finish_decl): Don't do auto deduction for functions.
1021         (grokdeclarator): Allow auto return without trailing return type in
1022         C++1y mode.
1023         (check_function_type): Defer checking of deduced return type.
1024         (start_preparsed_function): Set current_function_auto_return_pattern.
1025         (finish_function): Set deduced return type to void if not previously
1026         deduced.
1027         * decl2.c (change_return_type): Handle error_mark_node.
1028         (mark_used): Always instantiate functions with deduced return type.
1029         Complain about use if deduction isn't done.
1030         * parser.c (cp_parser_lambda_declarator_opt): Use 'auto' for
1031         initial return type.
1032         (cp_parser_lambda_body): Don't deduce return type in a template.
1033         (cp_parser_conversion_type_id): Allow auto in C++1y.
1034         * pt.c (instantiate_class_template_1): Don't mess with
1035         LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P.
1036         (tsubst_copy_and_build): Likewise.
1037         (fn_type_unification, tsubst): Don't reduce the template parm level
1038         of 'auto' during deduction.
1039         (unify): Compare 'auto' specially.
1040         (get_bindings): Change test.
1041         (always_instantiate_p): Always instantiate functions with deduced
1042         return type.
1043         (do_auto_deduction): Handle error_mark_node and lambda context.
1044         Don't check for use in initializer.
1045         (contains_auto_r): Remove.
1046         * search.c (lookup_conversions_r): Handle auto conversion function.
1047         * semantics.c (lambda_return_type): Handle null return.  Don't mess
1048         with dependent_lambda_return_type_node.
1049         (apply_deduced_return_type): Rename from apply_lambda_return_type.
1050         * typeck.c (merge_types): Handle auto.
1051         (check_return_expr): Do auto deduction.
1052         * typeck2.c (add_exception_specifier): Fix complain check.
1054 2012-03-22  Paolo Carlini  <paolo.carlini@oracle.com>
1056         PR c++/52487
1057         * class.c (check_field_decls): Call literal_type_p only
1058         on complete types.
1060 2012-03-22  Jakub Jelinek  <jakub@redhat.com>
1062         PR c++/52671
1063         * decl.c (check_tag_decl): Only use CLASSTYPE_TEMPLATE_INSTANTIATION
1064         on CLASS_TYPE_P types.
1066 2012-03-20  Jason Merrill  <jason@redhat.com>
1068         * lex.c (init_reswords): Use >= for cxx_dialect test.
1069         * parser.c (cp_parser_exception_specification_opt): Likewise.
1071         * mangle.c (write_type): Handle 'auto'.
1072         * init.c (build_new): Don't do auto deduction where it might
1073         affect template mangling.
1075         PR c++/52510
1076         * decl.c (reshape_init_class): Handle repeated reshaping.
1077         * search.c (lookup_field_1): Add sanity check.
1079 2012-03-19  Paolo Carlini  <paolo.carlini@oracle.com>
1081         PR c++/14710
1082         * cp-tree.h (xvalue_p, maybe_warn_about_useless_cast): Declare.
1083         * tree.c (xvalue_p): Define.
1084         * typeck.c (maybe_warn_about_useless_cast): Define.
1085         (build_reinterpret_cast, build_const_cast,
1086         build_static_cast, cp_build_c_cast): Use maybe_warn_about_useless_cast.
1087         * rtti.c (build_dynamic_cast): Likewise.
1088         * pt.c (tsubst_copy_and_build, case CAST_EXPR): Increment/decrement
1089         c_inhibit_evaluation_warnings before/after the build_* calls.
1091 2012-03-15  Jason Merrill  <jason@redhat.com>
1093         PR c++/52582
1094         * method.c (implicitly_declare_fn): Set DECL_EXTERNAL.
1096 2012-03-15  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
1098         PR c++/44783
1099         * error.c (print_instantiation_partial_context): Use
1100         template_backtrace_limit.
1102 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1104         * Make-lang.in (doc/g++.1): Remove IRIX 6.5 reference.
1106 2012-03-14  Jakub Jelinek  <jakub@redhat.com>
1108         PR c++/52521
1109         * parser.c (lookup_literal_operator): Return fn only if
1110         processed all arguments from args vector and argtypes is
1111         void_list_node.
1113 2012-01-30  Dodji Seketeli  <dodji@redhat.com>
1115         PR c++/51641
1116         * cp-tree.h (template_type_parameter_p): Declare new function.
1117         (parameter_of_template_p): Remove.
1118         * pt.c (template_type_parameter_p): Define new function.
1119         (parameter_of_template_p): Remove.
1120         * name-lookup.c (binding_to_template_parms_of_scope_p): Don't rely
1121         on parameter_of_template_p anymore.  Compare the level of the
1122         template parameter to the depth of the template.
1124 2011-12-15  Dodji Seketeli  <dodji@redhat.com>
1126         * call.c (standard_conversion, build_integral_nontype_arg_conv)
1127         (build_new_op_1, convert_like_real, is_subseq)
1128         (maybe_handle_implicit_object, maybe_handle_ref_bind, compare_ics)
1129         (joust): Use next_conversion instead of accessing fields of struct
1130         conversion directly.
1132 2012-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
1134         PR c++/52299
1135         * pt.c (tsubst_copy_and_build, case COND_EXPR): Avoid bogus
1136         division by zero warnings.
1138 2012-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
1140         * typeck.c (build_array_ref, cp_build_addr_expr_1, convert_ptrmem,
1141         build_ptrmemfunc): Consistently forward the tsubst_flags_t
1142         parameter.
1143         * call.c (resolve_args): Likewise.
1145 2012-03-07  Jason Merrill  <jason@redhat.com>
1147         PR c++/52521
1148         * mangle.c (write_literal_operator_name): The length comes after the
1149         operator prefix.
1151 2012-03-05  Jakub Jelinek  <jakub@redhat.com>
1153         * pt.c (local_specializations): Change from htab_t into
1154         struct pointer_map_t *.
1155         (retrieve_local_specializations, register_local_specialization,
1156         tsubst_pack_expansion, instantiate_decl): Adjust users.
1157         (eq_local_specializations, hash_local_specialization): Remove.
1159 2012-03-05  Jason Merrill  <jason@redhat.com>
1161         PR c++/51930
1162         * decl2.c (determine_visibility): Correct calculation of class
1163         args depth.
1164         * decl.c (check_tag_decl): Adjust warning.
1166         * method.c (synthesized_method_walk): Cleanups don't affect the EH
1167         spec either.
1169 2012-03-03  Jason Merrill  <jason@redhat.com>
1171         * init.c (perform_member_init): Cope with uninstantiated NSDMI.
1173         Core 1270
1174         * call.c (build_aggr_conv): Call reshape_init.
1175         (convert_like_real): Likewise.
1176         * typeck2.c (process_init_constructor): Clear TREE_CONSTANT if
1177         not all constant.
1179         * mangle.c (write_nested_name): Use decl_mangling_context.
1180         (write_prefix, write_template_prefix): Likewise.
1182         PR c++/36797
1183         * mangle.c (write_expression): Improve diagnostic for TRAIT_EXPR.
1185         * class.c (add_method): Always build an OVERLOAD for using-decls.
1186         * search.c (lookup_member): Handle getting an OVERLOAD for a
1187         single function.
1189 2012-03-02  Paolo Carlini  <paolo.carlini@oracle.com>
1191         PR c++/51989
1192         * typeck2.c (build_x_arrow): Take a tsubst_flags_t argument and
1193         propagate it.
1194         * cp-tree.h (build_x_arrow): Adjust prototype.
1195         * pt.c (tsubst_copy_and_build): Adjust call.
1196         * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
1198 2012-03-02  Paolo Carlini  <paolo.carlini@oracle.com>
1200         * name-lookup.c (binding_to_template_parms_of_scope_p): Clean up.
1202 2012-02-29  Jason Merrill  <jason@redhat.com>
1204         PR c++/51930
1205         * decl.c (check_tag_decl): Move warning for misplaced attributes here.
1206         (shadow_tag): From here.
1207         * parser.c (cp_parser_explicit_instantiation): Don't warn here.
1209 2012-02-21  Jakub Jelinek  <jakub@redhat.com>
1211         PR c++/52312
1212         * typeck.c (check_literal_operator_args): Initialize *long_double_p
1213         and *long_long_unsigned_p even if processing_template_decl.
1215 2012-02-16  Jason Merrill  <jason@redhat.com>
1217         PR c++/52248
1218         * decl.c (define_label): Use timevar_cond_start/stop.
1220 2012-02-16  Fabien ChĂȘne  <fabien@gcc.gnu.org>
1222         PR c++/52126
1223         * decl.c (xref_basetypes): call dependent_scope_p instead of
1224         dependent_type_p.
1226 2012-02-16  Jason Merrill  <jason@redhat.com>
1228         PR c++/51415
1229         * error.c (dump_expr): Handle lambda closures specifically.
1231 2012-02-14  Jason Merrill  <jason@redhat.com>
1233         * parser.c (cp_parser_explicit_instantiation): Give a warning
1234         for ignored attributes on explicit class instantiation.
1236 2012-02-14  Jakub Jelinek  <jakub@redhat.com>
1238         PR c++/52247
1239         * pt.c (tsubst_copy_asm_operands): For LABEL_DECL values call
1240         lookup_label on label's name and set TREE_USED.
1242 2012-02-14  Jason Merrill  <jason@redhat.com>
1244         PR c++/39055
1245         * decl.c (local_variable_p_walkfn): Don't check DECL_ARTIFICIAL.
1247 2012-02-14  Jakub Jelinek  <jakub@redhat.com>
1249         PR c/52181
1250         * decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than
1251         newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits.
1253 2012-02-07  Jason Merrill  <jason@redhat.com>
1255         PR c++/51675
1256         * semantics.c (cx_check_missing_mem_inits): Handle unions.
1257         Fix constexpr default constructor logic.
1259         PR c++/52035
1260         * pt.c (tsubst): Strip uninstantiated typedef.
1262 2012-02-06  Jason Merrill  <jason@redhat.com>
1264         PR c++/52088
1265         * cvt.c (build_expr_type_conversion): Check for template conversion.
1267 2012-01-31  Jason Merrill  <jason@redhat.com>
1269         PR c++/52043
1270         * cp-tree.h (PACK_EXPANSION_LOCAL_P): New.
1271         * pt.c (make_pack_expansion, tsubst_initializer_list): Set it.
1272         (tsubst_pack_expansion): Check it.
1274 2012-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
1276         PR c++/51327
1277         * class.c (explain_non_literal_class): Correctly handle implicitly
1278         deleted constructors.
1280 2012-01-27  Jakub Jelinek  <jakub@redhat.com>
1282         PR c++/51852
1283         * pt.c (tsubst_pack_expansion): Delete and restore
1284         local_specialization whenever need_local_specialization, not just
1285         when saved_local_specializations is non-NULL.
1287 2012-01-26  Paolo Carlini  <paolo.carlini@oracle.com>
1289         PR c++/51370
1290         * error.c (dump_decl, [TEMPLATE_ID_EXPR]): Handle error_mark_node
1291         as TREE_OPERAND (t, 1).
1293 2012-01-24  Jason Merrill  <jason@redhat.com>
1295         PR c++/51917
1296         * decl.c (xref_basetypes): Check VEC_length instead of VEC_space.
1298         PR c++/51973
1299         * tree.c (called_fns_equal): Check template args.
1300         (cp_tree_equal): Call it.
1302 2012-01-24  Aldy Hernandez  <aldyh@redhat.com>
1303             Patrick Marlier  <patrick.marlier@gmail.com>
1305         PR c++/51928
1306         * class.c (set_method_tm_attributes): Use TARGET_THUNK instead of
1307         thunk for set_one_vmethod_tm_attributes.
1309 2012-01-24  Paolo Carlini  <paolo.carlini@oracle.com>
1311         PR c++/51223
1312         * call.c (build_over_call): Check for error_mark_node as
1313         TREE_VALUE when default arguments are processed.
1315 2012-01-23  Jason Merrill  <jason@redhat.com>
1317         PR c++/51930
1318         * decl2.c (determine_visibility): Check for visibility attribute
1319         on template specialization.
1321 2012-01-23  Paolo Carlini  <paolo.carlini@oracle.com>
1323         PR c++/51398
1324         * pt.c (parameter_of_template_p): Skip error_mark_node parameters.
1326 2012-01-23  Jason Merrill  <jason@redhat.com>
1328         PR c++/51925
1329         * class.c (add_method): Set OVL_USED for using-decls.
1330         * tree.c (ovl_scope): New.
1331         * cp-tree.h: Declare it.
1332         * parser.c (cp_parser_template_name): Use it.
1333         * semantics.c (baselink_for_fns): Likewise.
1334         * name-lookup.c (set_inherited_value_binding_p): Likewise.
1336 2012-01-20  Paolo Carlini  <paolo.carlini@oracle.com>
1338         PR c++/51402
1339         * pt.c (lookup_template_class_1): Check context returned by
1340         tsubst for error_mark_node.
1342 2012-01-19  Kai Tietz  <ktietz@redhat.com>
1344         PR c++/51344
1345         * decl2.c (save_template_attributes): Use merge_attributes
1346         instead of chaining up via TREE_CHAIN.
1348 2012-01-19  Jason Merrill  <jason@redhat.com>
1350         PR c++/51889
1351         * class.c (finish_struct): Call add_method here for function usings.
1352         * semantics.c (finish_member_declaration): Not here.
1354 2012-01-18  Paolo Carlini  <paolo.carlini@oracle.com>
1356         PR c++/51225
1357         * typeck2.c (store_init_value): Within a template guard
1358         cxx_constant_value with require_potential_constant_expression.
1359         * pt.c (convert_nontype_argument): Likewise.
1361 2012-01-16  Jakub Jelinek  <jakub@redhat.com>
1363         PR c++/51854
1364         * mangle.c (write_template_arg_literal): Handle complex.
1366 2012-01-16  Jason Merrill  <jason@redhat.com>
1368         PR c++/51827
1369         * mangle.c (mangle_decl): Don't mangle uninstantiated templates.
1371         PR c++/51868
1372         * typeck.c (build_static_cast_1): Handle bit-fields properly.
1374 2012-01-13  Ian Lance Taylor  <iant@google.com>
1376         PR c++/50012
1377         * typeck.c (enum_cast_to_int): New static function.
1378         (cp_build_binary_op): When handling warn_sign_compare, don't test
1379         for TREE_NO_WARNING.  Do call enum_cast_to_int.
1380         * call.c (avoid_sign_compare_warnings): Remove static function.
1381         (build_new_op_1): Don't call avoid_sign_compare_warnings.
1383 2012-01-13  Steven Bosscher  <steven@gcc.gnu.org>
1385         * decl2.c: Do not include tree-mudflap.h
1386         * semantics.c: Likewise.
1388 2012-01-13  Jason Merrill  <jason@redhat.com>
1390         PR c++/20681
1391         * semantics.c (finish_break_stmt): Avoid adding an unreachable
1392         BREAK_STMT.
1394         PR c++/51813
1395         * decl2.c (constrain_visibility): Clear DECL_VISIBILITY_SPECIFIED
1396         when reducing the visibility.
1398         PR c++/51620
1399         * class.c (build_vtbl_initializer): Use __cxa_deleted_virtual.
1401 2012-01-12  Jason Merrill  <jason@redhat.com>
1403         PR c++/51714
1404         * pt.c (value_dependent_expression_p): Treat STMT_EXPR as
1405         value-dependent.
1407 2012-01-13  Dodji Seketeli  <dodji@redhat.com>
1409         PR c++/51633
1410         * semantics.c (cp_parser_ctor_initializer_opt_and_function_body):
1411         Set the pointer to the last block of the constructor to the
1412         current statement.
1413         (build_constexpr_constructor_member_initializers): Get
1414         build_data_member_initialization a chance to deal with more
1415         statements before we choke.
1417 2012-01-12  Jason Merrill  <jason@redhat.com>
1419         PR c++/48051
1420         * mangle.c (write_expression): Mangle BASELINK scope if
1421         BASELINK_QUALIFIED_P.
1422         * search.c (adjust_result_of_qualified_name_lookup): Set
1423         BASELINK_QUALIFIED_P.
1424         * tree.c (cp_tree_equal) [BASELINK]: Compare BASELINK_QUALIFIED_P.
1425         * parser.c (cp_parser_postfix_dot_deref_expression): Don't call
1426         adjust_result_of_qualified_name_lookup for non-qualified names.
1428         PR c++/51403
1429         * pt.c (unify): Handle error_mark_node.
1431 2012-01-11  Jason Merrill  <jason@redhat.com>
1433         PR c++/51565
1434         * call.c (standard_conversion): For ptrmemfuncs, compare the
1435         static_fn_types.
1437         PR c++/51818
1438         * mangle.c (find_substitution): A type is only a substitution
1439         match if we're looking for a type.
1440         (write_nested_name): Use decl_mangling_context.
1442         * decl.c (decls_match): Assert that the arguments are decls.
1444         PR c++/51613
1445         * pt.c (resolve_overloaded_unification): Compare types with
1446         same_type_p, not decls_match.
1448 2012-01-10  Jason Merrill  <jason@redhat.com>
1450         PR c++/51614
1451         * class.c (build_base_path): Diagnose ambiguous base.
1453         PR c++/51433
1454         * semantics.c (cxx_eval_call_expression): Always retry previously
1455         non-constant expressions.
1457 2012-01-06  Jason Merrill  <jason@redhat.com>
1459         DR 686
1460         PR c++/47450
1461         * parser.c (cp_parser_new_expression): Set
1462         type_definition_forbidden_message.
1464         PR c++/6057
1465         PR c++/48051
1466         PR c++/50855
1467         PR c++/51322
1468         * mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR,
1469         THROW_EXPR, CONSTRUCTOR, OVERLOAD.  Fix PREINCREMENT_EXPR and
1470         PREDECREMENT_EXPR.
1471         (write_template_arg): Fix mangling of class-scope functions and
1472         argument packs.
1473         (mangle_decl): Update suggested -fabi-version argument.
1474         * operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR,
1475         DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR.
1476         * tree.c (dependent_name): No longer static.
1477         * cp-tree.h: Declare it.
1478         * pt.c (unify): Defer handling of unconverted functions.
1480         * mangle.c (mangle_decl): Don't generate mangling aliases
1481         for maybe-in-charge [cd]tors.
1483         * error.c (dump_expr): Print type of CONSTRUCTOR.
1485 2012-01-05  Dodji Seketeli  <dodji@redhat.com>
1487         PR c++/51541
1488         * parser.c (cp_parser_alias_declaration): Get out early upon
1489         errors in the identifier or the attributes.
1491 2012-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
1493         PR c++/51064
1494         * pt.c (tsubst_copy_and_build): Maybe set TREE_NO_WARNING on
1495         the tree returned by build_x_binary_op.
1497 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
1499         PR c++/51738
1500         * parser.c (cp_parser_postfix_open_square_expression): Handle
1501         postfix-expression [ braced-init-list ].
1503 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
1505         PR c++/29273
1506         * rtti.c (build_dynamic_cast_1): In case of T a pointer type,
1507         call decay_conversion on v.
1509 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
1511         PR c++/15867
1512         * decl.c (duplicate_decls): With -Wredundant-decls don't warn for
1513         declaration followed by specialization.
1515 2012-01-03  Jakub Jelinek  <jakub@redhat.com>
1517         PR c++/51669
1518         * semantics.c (finish_omp_clauses): Call fold_build_cleanup_point_expr
1519         on OMP_CLAUSE_{IF,FINAL,NUM_THREADS,SCHEDULE_CHUNK}_EXPR.
1521 2012-01-02  Jason Merrill  <jason@redhat.com>
1523         DR 1359
1524         PR c++/51675
1525         * method.c (walk_field_subobs): Don't check for uninitialized
1526         fields in a union.
1527         (synthesized_method_walk): Check here.
1529         DR 325
1530         PR c++/51666
1531         * parser.c (cp_parser_cache_defarg): Split out...
1532         (cp_parser_parameter_declaration): ...from here.
1533         (cp_parser_save_nsdmi): Use it.
1534         (cp_parser_cache_group): Remove CPP_COMMA support.
1536 2012-01-02  Dodji Seketeli  <dodji@redhat.com>
1538         PR c++/51462
1539         * semantics.c (cx_check_missing_mem_inits): Don't assert in case
1540         of error.
1542 2012-01-02  Paolo Carlini  <paolo.carlini@oracle.com>
1544         PR c++/20140
1545         * typeck2.c (digest_init_r): Use copy_init when initializing
1546         an array of chars.
1548 2012-01-01  Paolo Carlini  <paolo.carlini@oracle.com>
1550         PR c++/16603
1551         * decl.c (build_enumerator): Don't call perform_integral_promotions
1552         on the value.
1554 2012-01-01  Paolo Carlini  <paolo.carlini@oracle.com>
1556         PR c++/51379
1557         * typeck.c (build_reinterpret_cast_1): Implement resolution of
1558         DR 799.
1560 2012-01-01  Fabien ChĂȘne  <fabien@gcc.gnu.org>
1562         * parser.c (cp_parser_using_declaration): Add a warning about
1563         deprecated access declarations when no errors were encountered
1564         while parsing the access declaration. Save the first token in
1565         order to emit the warning at the right place.
1567 Copyright (C) 2012 Free Software Foundation, Inc.
1569 Copying and distribution of this file, with or without modification,
1570 are permitted in any medium without royalty provided the copyright
1571 notice and this notice are preserved.