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