Support C++11 thread_local destructors.
[official-gcc.git] / gcc / cp / ChangeLog
blob1807f5b0e435ecb5fdcb0c999e7163a90c6ee795
1 2012-10-08  Jason Merrill  <jason@redhat.com>
3         * decl.c (get_thread_atexit_node): New.
4         (register_dtor_fn): Use it for TLS.
6         Partial implementation of C++11 thread_local.
7         * decl.c (cp_finish_decl): Remove errors about non-trivial
8         initialization and destruction of TLS variables.
9         (register_dtor_fn): Add sorry about TLS variables.
10         (expand_static_init): Add sorry about non-local TLS variables,
11         or error with __thread.
12         Don't emit thread-safety guards for local TLS variables.
13         (grokdeclarator): thread_local in a function implies static.
14         * decl.h: Adjust prototype.
15         * decl2.c (get_guard): Copy DECL_TLS_MODEL.
16         * parser.c (cp_parser_set_storage_class, cp_parser_set_decl_spec_type)
17         (set_and_check_decl_spec_loc): Take the token rather than the location.
18         Distinguish between __thread and thread_local.
19         (cp_parser_set_storage_class): Don't complain about thread_local before
20         extern/static.
21         (token_is__thread): New.
22         * call.c (make_temporary_var_for_ref_to_temp): Handle TLS.
23         * cp-tree.h (DECL_GNU_TLS_P): New.
24         (cp_decl_specifier_seq): Add gnu_thread_keyword_p.
26 2012-10-08  Dodji Seketeli  <dodji@redhat.com>
28         PR c++/53528 C++11 attribute support
29         * cp-tree.h (enum cpp0x_warn_str::CPP0X_ATTRIBUTES): New member.
30         (enum cp_decl_spec::ds_std_attribute): New enumerator.
31         (struct cp_decl_specifier_seq::std_attributes): New field.
32         (cxx_alignas_expr, warn_misplaced_attr_for_class_type): Declare
33         new functions.
34         (check_tag_decl): Take an extra parameter for explicit
35         instantiations.
36         * decl.c (warn_misplaced_attr_for_class_type): Extract from ...
37         (check_tag_decl): ... here.  Add check for c++11 attributes being
38         applied to an explicit instantiation.  Take an extra parameter for
39         explicit instantiations.
40         (grokdeclarator): Make sure a c++11 attribute after an array
41         declarator appertains to the array, an attribute after a function
42         declarator appertains to the function type, an attribute after a
43         declarator-id appertains to the entity being declared, and an
44         attribute after a pointer declarator appertain to the pointer.
45         * decl2.c (is_late_template_attribute): Use get_attribute_name.
46         * error.c (maybe_warn_cpp0x): Support
47         CPP0X_GENERALIZED_ATTRIBUTES.
48         * parser.c (cp_next_tokens_can_be_attribute_p)
49         (cp_next_tokens_can_be_gnu_attribute_p)
50         (cp_next_tokens_can_be_std_attribute_p)
51         (cp_nth_tokens_can_be_attribute_p)
52         (cp_nth_tokens_can_be_gnu_attribute_p)
53         (cp_nth_tokens_can_be_std_attribute_p)
54         (cp_parser_gnu_attribute_list, cp_parser_std_attribute)
55         (cp_parser_std_attribute_spec, cp_parser_std_attribute_spec_seq)
56         (cp_parser_attributes_opt, cp_parser_std_attribute_list): New
57         static functions.
58         (cp_parser_gnu_attributes_opt): Replace cp_parser_attributes_opt.
59         (cp_parser_gnu_attribute_list): Replace cp_parser_attribute_list.
60         (cp_parser_postfix_expression): Disallow "[[" tokens here.
61         (cp_parser_label_for_labeled_statement): Use take an extra
62         parameter for attributes.
63         (cp_parser_block_declaration): Use
64         cp_nth_tokens_can_be_std_attribute_p here.
65         (cp_parser_decl_specifier_seq): Likewise.  Store C++11 attributes
66         that appears in in decl specifiers in cp_decl_specifier_seq::std_attributes.
67         declaration.  Emit proper warning about misplaced c++11 attributes
68         for class type.
69         (cp_parser_explicit_instantiation): Adjust call to check_tag_decl.
70         (cp_parser_init_declarator):  Parsing attributes here is no more a
71         GNU extension in c++-11.
72         (cp_parser_type_specifier_seq): Use
73         cp_next_tokens_can_be_attribute_p.
74         (cp_parser_direct_declarator): Likewise.  Hang c++11 attributes
75         following the declarator to its syntactic construct.  It'll later
76         be applied to the proper appertaining entity by grokdeclarator.
77         (cp_parser_ptr_operator): Likewise.
78         (make_declarator): Initialize cp_declarator::std_attribute.
79         (make_pointer_declarator, make_reference_declarator)
80         (make_ptrmem_declarator, cp_parser_make_indirect_declarator): Take
81         attributes that appertain to the pointer/reference in argument.
82         (cp_parser_ptr_operator): Take an out parameter for c++11
83         attributes.  Update comments.
84         (cp_parser_new_declarator_opt)
85         (cp_parser_conversion_declarator_opt): Adjust.
86         (cp_parser_declarator): Likewise.  Handle C++11 attributes.
87         Rename attributes to gnu_attribute for better legibility.
88         (cp_parser_simple_declaration): Update comment.
89         (cp_parser_class_specifier_1): Parse GNU attributes specifically
90         (cp_parser_enum_specifier): Accept only gnu attributes after the
91         specifier.
92         (cp_parser_member_declaration): Don't clear attributes -- intended
93         for the entity being declared -- too early because check_tag_decl
94         needs them.
95         (cp_parser_statement): Update comment.  Parse optional c++11
96         attributes at the beginning of the relevant kind of statements and
97         ignore them, for now, unless when calling
98         cp_parser_label_for_labeled_statement.
99         (cp_parser_label_for_labeled_statement): Take c++11 attributes
100         in parameter.
101         * semantics.c (potential_constant_expression_1): Likewise.
102         * typeck.c (fundamental_alignment_p, cxx_alignas_expr): New public
103         functions.
105 2012-10-07  Paolo Carlini  <paolo.carlini@oracle.com>
107         * pt.c (fold_non_dependent_expr_sfinae): Remove static specifier.
108         (tsubst_copy_and_build): Use get_target_expr_sfinae.
109         * call.c (build_conditional_expr_1, convert_like_real): Likewise.
110         * cvt.c (build_up_reference): Likewise.
111         (ocp_convert): Use abstract_virtuals_error_sfinae.
112         (build_up_reference): Propagate complain to cp_build_addr_expr.
113         * decl.c (compute_array_index_type): Use fold_non_dependent_expr_sfinae.
114         * cp-tree.h: Update declarations.
116         * cvt.c (build_expr_type_conversion): Tidy.
118         * tree.c (stabilize_aggr_init): Change to static.
120 2012-10-07  Paolo Carlini  <paolo.carlini@oracle.com>
122         PR c++/51422
123         * semantics.c (is_normal_capture_proxy): Return true for
124         error_mark_node as DECL_VALUE_EXPR.
126 2012-10-05  Jakub Jelinek  <jakub@redhat.com>
128         * cp-tree.h (SIZEOF_EXPR_TYPE_P): Define.
129         * tree.c (cp_tree_equal): Handle SIZEOF_EXPR with
130         SIZEOF_EXPR_TYPE_P.
131         * mangle.c (write_expression): Likewise.
132         * cxx-pretty-print.c (pp_cxx_unary_expression): Likewise.
133         * error.c (dump_expr): Likewise.
134         * parser.c (cp_parser_unary_expression): For sizeof call
135         cxx_sizeof_or_alignof_{type,expr} just for diagnostics and
136         return SIZEOF_EXPR with the operand.
137         * pt.c (tsubst_copy, tsubst_copy_and_build): For SIZEOF_EXPR,
138         call cxx_sizeof_or_alignof_{type,expr} for diagnostics, but
139         return SIZEOF_EXPR with tsubsted operand.
140         (value_dependent_expression_p): Handle SIZEOF_EXPR with
141         SIZEOF_EXPR_TYPE_P.
142         (instantiation_dependent_r): Likewise.
143         * call.c (null_ptr_cst_p): Call maybe_constant_value for C++98.
144         * semantics.c (finish_call_expr): Call
145         sizeof_pointer_memaccess_warning if needed.
146         (cxx_eval_constant_expression): Handle SIZEOF_EXPR.
147         (potential_constant_expression_1): Remove early exit for
148         C++98.  Handle PROPERTY_REF.
149         * decl.c (duplicate_decls): When redeclaring a builtin function,
150         keep the merged decl builtin also if newdecl is a gnu_inline
151         inline definition.
152         (fold_sizeof_expr_r): New function.
153         (compute_array_index_type): Fold SIZEOF_EXPRs in itype.
154         * cp-gimplify.c (cp_genericize_r): Fold SIZEOF_EXPR.
155         * typeck.c (cp_build_binary_op): For warn_for_sign_compare
156         try harder using maybe_constant_value to get INTEGER_CSTs.
158         * decl.c (stabilize_vla_size): Call pointer_set_destroy
159         at the end.
161 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
162         
163         * decl2.c (cp_write_global_declarations): Fix handling of
164         -fdump-ada-spec*.
166 2012-10-03  Jakub Jelinek  <jakub@redhat.com>
168         PR c++/54777
169         * semantics.c (cxx_eval_constant_expression) <case COMPOUND_EXPR>: If
170         not ignoring the second operand, pass the original second operand
171         and not one with stripped nops to cxx_eval_constant_expression.
173 2012-10-01  Jason Merrill  <jason@redhat.com>
175         * decl.c (check_initializer): Set DECL_NONTRIVIALLY_INITIALIZED_P
176         for a constructor call.
177         (decl_jump_unsafe): So don't bother checking
178         type_has_nontrivial_default_init.
179         * call.c (set_up_extended_ref_temp): Set
180         DECL_NONTRIVIALLY_INITIALIZED_P.
182         * cp-tree.h (TYPE_FUNCTION_OR_TEMPLATE_DECL_CHECK): New.
183         (DECL_FRIEND_P, DECL_ANTICIPATED): Use it.
184         (TYPE_FUNCTION_OR_TEMPLATE_DECL_P): New.
185         * name-lookup.c (hidden_name_p): Use it.
187         * cp-tree.h (DECL_PRETTY_FUNCTION_P): Just look at the name.
188         * decl.c (cp_make_fname_decl): Adjust.
190 2012-09-30  Sharad Singhai  <singhai@google.com>
192         * decl2.c (cp_write_global_declarations): Use a different method
193         to determine if the dump has ben initialized.
195 2012-09-29  Paolo Carlini  <paolo.carlini@oracle.com>
197         PR c++/54738
198         * decl2.c (build_offset_ref_call_from_tree): Add tsubst_flags_t
199         parameter.
200         * pt.c (tsubst_copy_and_build): Adjust.
201         * parser.c (cp_parser_postfix_expression): Likewise.
202         * cp-tree.h: Adjust declaration.
204 2012-09-28  Dodji Seketeli  <dodji@redhat.com>
206         PR c++/54372 - unused attribute inactive on dependant entities
207         * decl2.c (is_late_template_attribute): "unused" attribute is to
208         be applied at compile time.
210 2012-09-25  Dodji Seketeli  <dodji@redhat.com>
212         PR c++/29028 - Missed unused warning on using declaration
213         * decl.c (poplevel<warn_unused*>): Do not forget that some local
214         bindings are represented by a TREE_LIST.
216 2012-09-25  Dodji Seketeli  <dodji@redhat.com>
218         PR c++/53551 - -Wunused-local-typedefs misses uses
219         * decl.c (make_typename_type): Record the use of typedefs.
221 2012-09-27  Jakub Jelinek  <jakub@redhat.com>
223         * init.c (build_new_1): Don't test TREE_CONSTANT
224         of INTEGER_CST.
226 2012-09-25  Paolo Carlini  <paolo.carlini@oracle.com>
228         PR c++/54526
229         * parser.c (cp_parser_template_id): In C++11 mode simply accept
230         X<::A>.
232 2012-09-25  Zhenqiang Chen <zhenqiang.chen@linaro.org>
234         PR c++/50970
235         * typeck.c (cp_build_binary_op): Check side effects before generating
236         pfn and delta related expressions.
238 2012-09-24  Lawrence Crowl  <crowl@google.com>
240         * init.c (build_new_1): Change to new double_int API.
241         * decl.c (build_enumerator): Likewise.
242         * typeck2.c (process_init_constructor_array): Likewise.
243         * mangle.c (write_array_type): Likewise.
245 2012-09-24  Paolo Carlini  <paolo.carlini@oracle.com>
247         PR c++/50828
248         * error.c (dump_function_decl): Strip TFF_TEMPLATE_NAME from flags
249         at the outset.
251 2012-09-24  Jason Merrill  <jason@redhat.com>
253         * decl.c (get_atexit_node): Remove dead code.
255         * Make-lang.in (cp/parser.o): Depend on decl.h.
257 2012-09-20  Paolo Carlini  <paolo.carlini@oracle.com>
259         PR c++/52432
260         * pt.c (tsubst_copy_and_build): If tf_error is not set in the complain
261         argument don't call unqualified_name_lookup_error.
263 2012-09-19  Marc Glisse  <marc.glisse@inria.fr>
265         PR c++/54581
266         * semantics.c (finish_decltype_type): Make vectors not opaque.
268 2012-09-17  Jason Merrill  <jason@redhat.com>
270         PR c++/54575
271         * pt.c (instantiate_alias_template): New.
272         (tsubst): Use it.
273         (push_access_scope): Allow TYPE_DECL.
275 2012-09-14  Jason Merrill  <jason@redhat.com>
277         PR c++/53661
278         * typeck2.c (check_narrowing): Avoid false positives on conversion
279         from enumeral type.
281 2012-09-14  Marc Glisse  <marc.glisse@inria.fr>
283         PR c++/54427
284         * typeck.c (cp_build_binary_op) [LSHIFT_EXPR, RSHIFT_EXPR, EQ_EXPR,
285         NE_EXPR, LE_EXPR, GE_EXPR, LT_EXPR, GT_EXPR]: Handle VECTOR_TYPE.
287 2012-09-14  Paolo Carlini  <paolo.carlini@oracle.com>
289         * decl.c (make_typename_type): Only error out if tf_error is set
290         in complain.
292 2012-09-13  Paolo Carlini  <paolo.carlini@oracle.com>
293             Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
295         PR c++/53210
296         * init.c (perform_member_init): Use OPT_Winit_self instead of
297         OPT_Wuninitialized.
299 2012-09-13  Paolo Carlini  <paolo.carlini@oracle.com>
301         * typeck.c (build_indirect_ref, build_function_call,
302         build_function_call_vec, build_binary_op, build_unary_op,
303         build_compound_expr, build_c_cast, build_modify_expr): Remove
304         uses of ATTRIBUTE_UNUSED on the parameters.
305         * class.c (set_linkage_according_to_type, resort_type_method_vec,
306         dfs_find_final_overrider_post, empty_base_at_nonzero_offset_p):
307         Likewise.
308         * decl.c (local_variable_p_walkfn): Likewise.
309         * except.c (wrap_cleanups_r, check_noexcept_r): Likewise.
310         * error.c (find_typenames_r): Likewise.
311         * tree.c (verify_stmt_tree_r, bot_replace,
312         handle_java_interface_attribute, handle_com_interface_attribute,
313         handle_init_priority_attribute, c_register_addr_space): Likewise.
314         * cp-gimplify.c (cxx_omp_clause_default_ctor): Likewise.
315         * cp-lang.c (objcp_tsubst_copy_and_build): Likewise.
316         * pt.c (unify_success, unify_invalid, instantiation_dependent_r):
317         Likewise.
318         * semantics.c (dfs_calculate_bases_pre): Likewise.
319         * decl2.c (fix_temporary_vars_context_r, clear_decl_external):
320         Likewise.
321         * parser.c (cp_lexer_token_at, cp_parser_omp_clause_mergeable,
322         cp_parser_omp_clause_nowait, cp_parser_omp_clause_ordered,
323         cp_parser_omp_clause_untied): Likewise.
324         * mangle.c (write_unnamed_type_name,
325         discriminator_for_string_literal): Likewise.
326         * search.c (dfs_accessible_post, dfs_debug_mark): Likewise.
327         * lex.c (handle_pragma_vtable, handle_pragma_unit,
328         handle_pragma_interface, handle_pragma_implementation,
329         handle_pragma_java_exceptions): Likewise.
331 2012-09-13  Jason Merrill  <jason@redhat.com>
333         PR c++/53839
334         * semantics.c (cxx_eval_indirect_ref): If we aren't looking for an
335         address, make sure the value is constant.
337         PR c++/54511
338         * pt.c (tsubst_decl) [VAR_DECL]: Handle DECL_ANON_UNION_VAR_P.
340         PR c++/53836
341         * pt.c (value_dependent_expression_p): A TREE_LIST initializer must
342         be dependent.
344 2012-09-10  Paolo Carlini  <paolo.carlini@oracle.com>
346         PR c++/54541
347         PR c++/54542
348         * call.c (build_cxx_call): Add tsubst_flags_t parameter, use
349         require_complete_type_sfinae.
350         (build_op_delete_call, build_over_call): Adjust.
351         * typeck.c (build_x_compound_expr_from_vec): Add tsubst_flags_t
352         parameter.
353         (cp_build_function_call_vec): Adjust.
354         * init.c (build_new_1): Likewise.
355         * rtti.c (throw_bad_cast, throw_bad_typeid, build_dynamic_cast_1):
356         Likewise.
357         * optimize.c (build_delete_destructor_body): Likewise.
358         * cp-tree.h: Adjust declarations.
360         * call.c (convert_arg_to_ellipsis): Use require_complete_type_sfinae.
362 2012-09-10  Jason Merrill  <jason@redhat.com>
364         PR c++/54538
365         PR c++/53783
366         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Go back to using RECUR
367         for LAMBDA_EXPR_EXTRA_SCOPE except for function scope.
369         PR c++/54506
370         * decl.c (move_signature_fn_p): Split out from move_fn_p.
371         * method.c (process_subob_fn): Use it.
372         * cp-tree.h: Declare it.
374 2012-09-07  Jason Merrill  <jason@redhat.com>
376         * semantics.c (sort_constexpr_mem_initializers): Tweak.
378 2012-09-09  Mark Kettenis  <kettenis@openbsd.org>
380         * decl.c (reshape_init_class): Avoid dereferencing a
381         past-the-end pointer.
383 2012-09-07  Paolo Carlini  <paolo.carlini@oracle.com>
385         * pt.c (num_template_headers_for_class): Rework per the code
386         inline in cp_parser_check_declarator_template_parameters.
387         * parser.c (cp_parser_check_declarator_template_parameters):
388         Use num_template_headers_for_class.
390 2012-09-06  Jason Merrill  <jason@redhat.com>
392         PR c++/54341
393         PR c++/54253
394         * semantics.c (sort_constexpr_mem_initializers): New.
395         (build_constexpr_constructor_member_initializers): Use it.
396         (cx_check_missing_mem_inits): Skip artificial fields.
397         * init.c (expand_aggr_init_1): Don't zero out a class
398         with no data.
400 2012-09-05  Paolo Carlini  <paolo.carlini@oracle.com>
402         PR c++/54191
403         * search.c (lookup_base): Add tsubst_flags_t parameter.
404         (adjust_result_of_qualified_name_lookup, check_final_overrider):
405         Adjust.
406         * name-lookup.c (do_class_using_decl): Adjust.
407         * typeck2.c (binfo_or_else, build_scoped_ref, build_m_component_ref):
408         Likewise.
409         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
410         build_up_reference): Likewise.
411         * rtti.c (build_dynamic_cast_1): Likewise.
412         * tree.c (maybe_dummy_object): Likewise.
413         * call.c (build_conditional_expr_1, build_over_call): Likewise.
414         * cp-tree.h (UNIQUELY_DERIVED_FROM_P, PUBLICLY_UNIQUELY_DERIVED_P):
415         Remove.
416         (enum base_access_flags, ba_quiet): Remove.
417         (uniquely_derived_from_p, publicly_uniquely_derived_p): Declare.
418         * except.c (can_convert_eh): Adjust.
419         * decl.c (grokdeclarator): Likewise.
420         * typeck.c (comp_except_types, build_class_member_access_expr,
421         finish_class_member_access_expr, get_member_function_from_ptrfunc,
422         build_static_cast_1, get_delta_difference_1): Likewise.
423         * class.c (build_base_path, convert_to_base, build_vtbl_ref_1,
424         warn_about_ambiguous_bases): Likewise.
425         (uniquely_derived_from_p, publicly_uniquely_derived_p): Define.
427 2012-09-04  Jason Merrill  <jason@redhat.com>
429         PR c++/54441
430         * decl.c (reshape_init_class): Handle invalid initializer for
431         0-length array member.
433         * error.c (dump_type_suffix): Correct handling of 0-length arrays.
435         PR c++/54420
436         * cp-tree.h (LAMBDANAME_P): Remove.
437         (LAMBDA_TYPE_P): Check CLASSTYPE_LAMBDA_EXPR instead.
438         * cp-lang.c (cxx_dwarf_name): Likewise.
439         * error.c (dump_aggr_type): Likewise.
440         * semantics.c (begin_lambda_type): Set CLASSTYPE_LAMBDA_EXPR sooner.
442         PR c++/54198
443         * decl.c (check_default_argument): Set cp_unevaluated_operand
444         around call to perform_implicit_conversion_flags.
446         PR c++/54437
447         PR c++/51213
448         * pt.c (fn_type_unification): Call coerce_template_parms before
449         entering substitution context.
451 2012-08-31  Paolo Carlini  <paolo.carlini@oracle.com>
452             Jason Merrill  <jason@redhat.com>
454         PR c++/18747
455         * pt.c (check_template_variable): New.
456         (num_template_headers_for_class): Split out...
457         * decl.c (grokdeclarator): ...from here.
458         (start_decl): Remove redundant diagnostic.
459         * cp-tree.h: Declare them
460         * parser.c (cp_parser_single_declaration): Call check_template_variable.
462 2012-08-31  Ollie Wild  <aaw@google.com>
464         PR c++/54197
465         * call.c (extend_ref_init_temps_1): Handle COMPOUND_EXPR trees.
467 2012-08-30  Jason Merrill  <jason@redhat.com>
469         PR c++/50545
470         PR c++/51222
471         * pt.c (instantiation_dependent_r): New.
472         (instantiation_dependent_expression_p): New.
473         (value_dependent_expression_p): Use it.  SCOPE_REF is always dependent.
474         * semantics.c (finish_decltype_type): Use it.
475         * cp-tree.h: Declare it.
477         * semantics.c (finish_qualified_id_expr): Handle building up a
478         non-dependent SCOPE_REF here.
479         (finish_id_expression): Not here.
480         * error.c (dump_decl) [SCOPE_REF]: Only pass TFF_UNQUALIFIED_NAME.
482         * friend.c (make_friend_class): Handle template template parameters.
483         * parser.c (cp_parser_template_declaration_after_export): Likewise.
484         * pt.c (tsubst_friend_class): Likewise.
485         (instantiate_class_template_1): Likewise
486         * decl.c (check_elaborated_type_specifier): Likewise.
487         (lookup_and_check_tag): Likewise.
489         * pt.c (get_class_bindings): Call coerce_template_parms.  Add
490         main_tmpl parameter.
491         (more_specialized_class): Add main_tmpl parameter.
492         (most_specialized_class): Adjust calls.
494         * decl.c (cp_finish_decl): Check for invalid multiple initializers
495         even if the initializer is dependent.
497         * pt.c (instantiate_template_1): Keep processing_template_decl set
498         if there are dependent args.
500 2012-08-25  Paolo Carlini  <paolo.carlini@oracle.com>
502         PR c++/51421
503         * decl2.c (mark_used): Consistently return false after errors
504         about uses before deduction of auto.
505         * semantics.c (finish_id_expression): Check mark_used return
506         value and return error_mark_node in case of failure.
508 2012-08-24  Jason Merrill  <jason@redhat.com>
510         PR c++/51213 (again)
511         * pt.c (deduction_tsubst_fntype): Remove.
512         (fn_type_unification): Check deduction depth and call
513         instantiate_template here.  Handle default argument access checks.
514         (determine_specialization): Suppress access control.
515         (tsubst_decl): Check for excessive deduction depth.
516         (recheck_decl_substitution): Make sure access control is on.
517         (type_unification_real): Don't mess with access deferring here.
518         (get_bindings): Adjust for fn_type_unification return type.
519         * call.c (enum rejection_reason_code): Drop rr_template_instantiation.
520         (template_instantiation_rejection): Remove.
521         (struct rejection_reason): Change targs to num_targs.
522         (template_unification_rejection, print_z_candidate): Adjust.
523         (add_template_candidate_real): Adjust for fn_type_unification change.
524         * class.c (resolve_address_of_overloaded_function): Likewise.
525         * cp-tree.h: Adjust declaration.
527         * pt.c (tsubst_default_argument): Indicate where the default
528         argument is being instantiated for.
529         (tsubst_expr): Restore previous location.
530         (tsubst_copy_and_build): Set and restore location.
531         * call.c (build_new_method_call_1): Remember location of call.
532         * semantics.c (finish_call_expr): Here too.
533         * parser.c (cp_parser_omp_for_loop): Remember the location of the
534         increment expression.
536         * pt.c (resolve_overloaded_unification): Use coerce_template_parms
537         instead of get_bindings.
538         (resolve_nondeduced_context): Likewise.
540         * pt.c (register_specialization): Correct argument to
541         check_specialization_namespace.
542         (determine_specialization): Don't consider members of
543         unspecialized types.
545 2012-08-23  Jason Merrill  <jason@redhat.com>
547         * decl.c (compute_array_index_type): Use type_dependent_expression_p.
549 2012-08-23  Paolo Carlini  <paolo.carlini@oracle.com>
551         PR c++/20420
552         * name-lookup.c (supplement_binding_1): Handle specially enums
553         only in class templates.
554         (validate_nonmember_using_decl): Enforce 7.3.3/10 about duplicate
555         using declarations at function scope.
557 2012-08-21  Richard Guenther  <rguenther@suse.de>
559         * cp-tree.h (TREE_INDIRECT_USING): Use TREE_LANG_FLAG_0 accessor.
560         (ATTR_IS_DEPENDENT): Likewise.
561         (ARGUMENT_PACK_INCOMPLETE_P): Use TREE_ADDRESSABLE instead of
562         TREE_LANG_FLAG_0 on TREE_VECs.
564 2012-08-20  Florian Weimer  <fweimer@redhat.com>
566         PR c++/19351
567         * call.c (build_operator_new_call): Add size_check argument and
568         evaluate it.
569         * cp-tree.h (build_operator_new_call): Adjust declaration.
570         * init.c (build_new_1): Compute array size check and apply it.
572 2012-08-20  Paolo Carlini  <paolo.carlini@oracle.com>
574         PR c++/10416
575         * decl.c (poplevel): Check TYPE_HAS_NONTRIVIAL_DESTRUCTOR for
576         Wunused_variable too.
578 2012-08-20  Diego Novillo  <dnovillo@google.com>
580         * decl.c (poplevel): Start TV_NAME_LOOKUP conditionally.
582 2012-08-20  Richard Guenther  <rguenther@suse.de>
584         * name-lookup.c (store_binding_p): New predicate, split out from ...
585         (store_binding): ... here.  Always store binding and require
586         target vector with enough space.
587         (store_bindings): Collect to store bindings and reserve space
588         for them, then store them.
589         (store_class_bindings): Likewise.
591 2012-08-19  Mikael Morin  <mikael@gcc.gnu.org>
593         * Make-lang.in: Fix typo.
595 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
597         * cp-tree.def (SIZEOF_EXPR): Move to c-common.def.
599 2012-08-14   Diego Novillo  <dnovillo@google.com>
601         Merge from cxx-conversion branch.  Re-write VEC in C++.
603         * call.c (add_function_candidate): Remove const qualifier
604         from call to VEC_index.
606 2012-08-10  Richard Guenther  <rguenther@suse.de>
608         * error.c (dump_expr): Handle anonymous SSA names.
610 2012-08-07  Steven Bosscher  <steven@gcc.gnu.org>
612         * error.c (print_instantiation_context): Pretty-print a newline before
613         diagnostic_flush_buffer.
614         * cxx-pretty-print.c (pp_cxx_function_definition): Use
615         pp_newline_and_flush instead of separate pp_newline and pp_flush.
617 2012-08-06  Dodji Seketeli  <dodji@redhat.com>
619         Avoid crashing on erroneous static_assert usage
620         * semantics.c (finish_static_assert): Don't crash on erroneous
621         message or condition.
623 2012-08-06  Marc Glisse  <marc.glisse@inria.fr>
624             Paolo Carlini  <paolo.carlini@oracle.com>
626         PR c++/54165
627         * typeck.c (build_static_cast_1): Move the conversion to void case
628         before the perform_direct_initialization_if_possible call.
630 2012-08-03  Marc Glisse  <marc.glisse@inria.fr>
632         * pt.c (tsubst_copy_and_build): Handle VECTOR_TYPE like scalars.
633         * cp-tree.h (scalarish_type_p): Declare.
634         * tree.c (scalarish_type_p): Make non-static.
636 2012-08-02  Jason Merrill  <jason@redhat.com>
637             Paolo Carlini  <paolo.carlini@oracle.com>
639         PR c++/51213 (again)
640         * pt.c (type_unification_real): Call push_deferring_access_checks /
641         pop_deferring_access_checks around the substitution of default
642         template args.
643         (instantiate_template_1): When the specialization returned by
644         retrieve_specialization has FNDECL_HAS_ACCESS_ERRORS set and we
645         are in a SFINAE context, simply return error_mark_node.
646         * cp-tree.h (FNDECL_RECHECK_ACCESS_P): Rename FNDECL_HAS_ACCESS_ERRORS.
648 2012-07-31  Paolo Carlini  <paolo.carlini@oracle.com>
650         * pt.c (check_default_tmpl_args): Change is_primary and is_partial
651         parameters to bool type, adjust.
652         (push_template_decl_real): Tidy.
653         * parser.c (cp_parser_init_declarator): Adjust.
654         * decl.c (redeclaration_error_message): Likewise.
655         * cp-tree.h (check_default_tmpl_args): Update prototype.
657 2012-07-31  Paolo Carlini  <paolo.carlini@oracle.com>
659         PR c++/53624
660         * pt.c (check_default_tmpl_args): Don't check local types.
662 2012-07-25  Sandra Loosemore  <sandra@codesourcery.com>
663             Paul Brook  <paul@codesourcery.com>
665         PR target/53633
666         * decl.c (finish_function): Check targetm.warn_func_return.
668 2012-07-25  Jason Merrill  <jason@redhat.com>
670         PR c++/54086
671         * decl.c (grokdeclarator): Allow const and constexpr together.
673         PR c++/54020
674         * semantics.c (potential_constant_expression_1) [COND_EXPR]: Call
675         maybe_constant_value.
677         * cp-tree.h (tsubst_flags): Remove tf_no_access_control.
678         * call.c (standard_conversion): Don't set it.
679         * class.c (resolve_address_of_overloaded_function): Don't check it.
680         * decl.c (check_default_argument): Call
681         perform_implicit_conversion_flags.
683         * pt.c (print_candidates_1): Use inform instead of error.
685 2012-07-24  Paolo Carlini  <paolo.carlini@oracle.com>
687         * pt.c (convert_template_argument, tsubst): Simplify fourth argument
688         to make_typename_type (complain & tf_error -> complain).
690 2012-07-24  Steven Bosscher  <steven@gcc.gnu.org>
692         * class.c (n_vtables, n_vtable_entries, n_vtable_searches,
693         n_vtable_elems, n_convert_harshness, n_compute_conversion_costs,
694         n_inner_fields_searched): Always define.
695         (build_primary_vtable): Convert #ifdef GATHER_STATISTICS to if-code.
696         (print_class_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
697         * tree.c (depth_reached): Always define global.
698         (cxx_print_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
699         * pt.c (depth_reached): Always define.
700         (push_tinst_level): Convert #ifdef GATHER_STATISTICS to if-code.
701         * search.c (n_fields_searched, n_calls_lookup_field,
702         n_calls_lookup_field_1, n_calls_lookup_fnfields,
703         n_calls_lookup_fnfields_1, n_calls_get_base_type,
704         n_outer_fields_searched, n_contexts_saved): Always define.
705         (lookup_field_1): Convert #ifdef GATHER_STATISTICS to if-code.
706         (lookup_member): Likewise.
707         (lookup_fnfields_idx_nolazy): Likewise.
708         (print_search_statistics): Likewise.
709         (reinit_search_statistics): Unconditionally re-set counters.
710         * lex.c (retrofit_lang_decl): Convert #ifdef GATHER_STATISTICS
711         to if-code.
712         (cxx_dup_lang_specific_decl): Likewise.
713         (copy_lang_type): Likewise.
714         (cxx_make_type): Likewise.
716 2012-07-20  Jason Merrill  <jason@redhat.com>
718         PR c++/54038
719         * tree.c (build_cplus_array_type): Use build_cplus_array_type to build
720         canonical array type rather than mess with its TYPE_*_VARIANT.
722 2012-07-19  Jason Merrill  <jason@redhat.com>
724         PR c++/54026
725         * typeck.c (cp_apply_type_quals_to_decl): Check COMPLETE_TYPE_P.
727         PR c++/54021
728         * call.c (build_cxx_call): Set optimize when folding
729         __builtin_constant_p in a constexpr function.
731 2012-07-18  Jason Merrill  <jason@redhat.com>
733         * pt.c (instantiate_decl): Don't recheck substitutions.
735 2012-07-18  Paolo Carlini  <paolo.carlini@oracle.com>
736             Jason Merrill  <jason@redhat.com>
738         DR 1170
739         PR c++/51213
740         * semantics.c (perform_access_checks): Add complain parm, return bool.
741         (perform_deferred_access_checks): Likewise.
742         (perform_or_defer_access_check): Likewise.
743         (speculative_access_check): Remove.
744         * call.c (enforce_access): Add complain parm, return bool.
745         * decl.c, friend.c, class.c, init.c, parser.c: Adjust callers.
746         * search.c: Adjust callers.
747         * cp-tree.h (TINFO_RECHECK_ACCESS_P): New macro.
748         (FNDECL_RECHECK_ACCESS_P): New macro.
749         * method.c (synthesized_method_walk): Stop deferring access checks.
750         * pt.c (recheck_decl_substitution): New.
751         (instantiate_template_1): Set and check FNDECL_RECHECK_ACCESS_P.
753 2012-07-18  Jason Merrill  <jason@redhat.com>
755         * method.c (process_subob_fn): Make sure no_implicit_p is non-null
756         before trying to store through it.
758 2012-07-17  Jason Merrill  <jason@redhat.com>
760         PR c++/53995
761         * decl.c (finish_enum_value_list): Only call
762         insert_late_enum_def_into_classtype_sorted_fields in class scope.
764         PR c++/53989
765         * tree.c (build_cplus_array_type): Also add TYPE_CANONICAL
766         to the list of variants.
768         * decl.c (xref_basetypes): Complain about incomplete template base.
769         * class.c (finish_struct): Adjust variants in templates, too.
771         PR c++/53549
772         * parser.c (cp_parser_class_head): Call xref_basetypes here.
773         (cp_parser_class_specifier_1): Not here.
774         * pt.c (tsubst_decl) [USING_DECL]: Check uses_template_parms
775         as well as DECL_DEPENDENT_P.
777 2012-07-16  Jason Merrill  <jason@redhat.com>
779         * cp-tree.h (struct deferred_access_check): Add location.
780         * semantics.c (perform_access_checks): Use it.
781         (perform_or_defer_access_check): Store it.
783 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
785         * dump.c (dump_stmt): Moved here from c-dump.c.
786         * optimize.c: Include dumpfile.h instead of tree-dump.h.
787         * class.c: Likewise.
788         * decl2.c: Likewise.
789         * Make-lang.in: Fix dependencies.
791 2012-07-13  Jason Merrill  <jason@redhat.com>
793         PR c++/53953
794         * method.c (synthesized_method_walk): Initialize no_implicit_p sooner.
796 2012-07-12  Jason Merrill  <jason@redhat.com>
798         * pt.c (instantiate_decl): Check typedefs access here.
799         (instantiate_template_1): Not here.
801         * pt.c (deduction_tsubst_fntype): Just suppress access checking.
802         (instantiate_template_1): Set DECL_TI_TEMPLATE before access checking.
803         (push_deduction_access_scope, pop_deduction_access_scope): Remove.
805 2012-07-11  Jason Merrill  <jason@redhat.com>
807         DR 1402
808         * method.c (synthesized_method_walk): Replace uses of msg with diag.
809         Correct handling of virtual bases with move operations.
810         (process_subob_fn, walk_field_subobs): Replace uses of msg with diag.
812 2012-07-11  Steven Bosscher  <steven@gcc.gnu.org>
814         * method.c: Do not include tree-pass.h.
816 2012-07-10  Jason Merrill  <jason@redhat.com>
818         DR 1402
819         PR c++/53733
820         * cp-tree.h (FNDECL_SUPPRESS_IMPLICIT_DECL): New.
821         (struct lang_decl_fn): Add suppress_implicit_decl field.
822         * method.c (implicitly_declare_fn): Check it.
823         (process_subob_fn): Add no_implicit_p parm.
824         (walk_field_subobs, synthesized_method_walk): Likewise.
825         (maybe_explain_implicit_delete): Adjust.
826         (explain_implicit_non_constexpr): Adjust.
828         * method.c (synthesized_method_walk): Avoid changing
829         EH spec based on cleanups in other places, too.
831 2012-07-09  Sterling Augustine  <saugustine@google.com>
833         * error.c (lang_decl_name): Use TFF_UNQUALIFIED_NAME flag.
835 2012-07-08  Steven Bosscher  <steven@gcc.gnu.org>
837         * decl.c (cp_finish_decl): Add FIXME at add_local_decl call site.
839 2012-07-06  Jason Merrill  <jason@redhat.com>
841         PR c++/53862
842         * pt.c (tsubst_arg_types): Add "end" parameter.
843         (check_undeduced_parms): Use it.
845         * cp-tree.h (DECL_DECLARES_TYPE_P): Check DECL_TYPE_TEMPLATE_P.
847         PR c++/53858
848         * name-lookup.c (ambiguous_decl): Use DECL_TYPE_TEMPLATE_P.
850 2012-07-05  Jason Merrill  <jason@redhat.com>
852         PR c++/53039
853         * pt.c (arg_from_parm_pack_p): Go back to using same_type_p or
854         cp_tree_equal.
856         * cp-tree.h (TEMPLATE_PARM_NUM_SIBLINGS): Remove.
857         (struct template_parm_index_s): Remove num_siblings.
858         * pt.c (fixup_template_parms, fixup_template_parm_index): Remove.
859         (fixup_template_type_parm_type): Remove.
860         (build_template_parm_index): Remove num_siblings parm.
861         (process_template_parm): Likewise.
862         * parser.c (cp_parser_template_parameter_list): Adjust.
863         * tree.c (cp_tree_equal): Don't compare num_siblings.
864         * typeck.c (comp_template_parms_position): Likewise.
866         PR c++/50852
867         PR c++/53039
868         * tree.c (strip_typedefs_expr): New.
869         * cp-tree.h: Declare it.
870         * pt.c (convert_template_argument, unify): Use it.
871         * parser.c (cp_parser_template_declaration_after_export): Don't call
872         fixup_template_parms.
874 2012-07-04  Jason Merrill  <jason@redhat.com>
876         PR c++/53848
877         PR c++/53524
878         * decl.c (build_enumerator): Don't use build_lang_decl_loc.
880 2012-07-03  Jakub Jelinek  <jakub@redhat.com>
882         PR c++/53812
883         * semantics.c (finish_goto_stmt): Surround computed goto argument
884         with CLEANUP_POINT_EXPR if needed.
886 2012-07-02  Jason Merrill  <jason@redhat.com>
888         PR c++/53619
889         * pt.c (in_template_function): New.
890         * cp-tree.h: Declare it.
891         * class.c (build_base_path, resolves_to_fixed_type_p): Use it.
893         PR c++/53783
894         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Use tsubst
895         for LAMBDA_EXPR_EXTRA_SCOPE.
897         PR c++/53788
898         * pt.c (build_non_dependent_expr): Don't wrap a dummy object.
900         PR c++/53816
901         * class.c (resolves_to_fixed_type_p): Check uses_template_parms
902         (current_function_decl) instead of processing_template_decl.
904         PR c++/53821
905         * semantics.c (maybe_add_lambda_conv_op): Don't set
906         DECL_INTERFACE_KNOWN.
908         PR c++/53524
909         * call.c (build_conditional_expr_1): Don't warn about comparison of
910         two enumerators before their enumeration is complete.
911         (build_new_op_1): Call decay_conversion before warn_logical_operator.
912         * decl.c (build_enumerator): Set DECL_CONTEXT of an enumerator to
913         its enumeration.
914         * decl2.c (mark_used): Call used_types_insert for enums.
915         * semantics.c (finish_id_expression): Don't decay CONST_DECL.
916         (finish_member_declaration): Don't change DECL_CONTEXT of enumerators.
917         * class.c (check_field_decls): Don't change DECL_CONTEXT of enums.
918         * typeck.c (convert_for_assignment): Don't decay CONST_DECL.
919         (build_class_member_access_expr): Look through unscoped enums.
920         * search.c (context_for_name_lookup): Look through unscoped enums.
921         * pt.c (tsubst_copy_and_build): Don't decay CONST_DECL.
922         (tsubst_copy): Use DECL_CONTEXT to find the enumeration.
923         * tree.c (decl_linkage): Likewise.
924         * cvt.c (ocp_convert): Check decayed expr for enum range warning.
926 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
928         * Make-lang.in: Remove tree-mudflap.o from CXX_AND_OBJCXX_OBJS.
930 2012-06-27  Jason Merrill  <jason@redhat.com>
932         * parser.c (cp_parser_check_for_invalid_template_id): tag_type parm.
933         (cp_parser_simple_type_specifier, cp_parser_class_head): Adjust.
934         (cp_parser_elaborated_type_specifier): Adjust.
935         * decl.c (duplicate_decls): Return error_mark_node on template
936         mismatch.
938         PR c++/53563
939         * parser.c (cp_parser_template_id): Add tag_type parm.
940         (cp_parser_template_name): Likewise.
941         (cp_parser_id_expression, cp_parser_unqualified_id): Adjust.
942         (cp_parser_pseudo_destructor_name, cp_parser_type_name): Adjust.
943         (cp_parser_simple_type_specifier, cp_parser_class_name): Adjust.
944         (cp_parser_elaborated_type_specifier, cp_parser_class_head): Adjust.
946 2012-06-27  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
948         PR C++/51033
949         * semantics.c (constexpr_call): Fix typo in comment.
950         (cxx_eval_vec_perm_expr): New.
951         (cxx_eval_constant_expression): Fold VEC_PERM_EXPRs.
953 2012-06-26  Richard Guenther  <rguenther@suse.de>
955         PR c++/53752
956         * mangle.c (write_array_type): Truncate the number-of-elements
957         result.
959 2012-06-25  Jason Merrill  <jason@redhat.com>
961         PR c++/53498
962         PR c++/53305
963         * pt.c (tsubst_decl) [PARM_DECL]: Don't recurse into DECL_CHAIN
964         if cp_unevaluated_operand is set.
965         (tsubst_copy) [PARM_DECL]: Don't copy before tsubsting.
967         PR c++/52988
968         * typeck.c (decay_conversion): Don't discard side-effects from
969         expressions of nullptr_t.
971 2012-06-25  Florian Weimer  <fweimer@redhat.com>
973         * init.c (build_new_1): Warn about (T[N]) for variable N, and
974         reject T[M][N].
976         * parser.c (cp_parser_direct_new_declarator): Accept non-constant
977         expressions.  Handled now in build_new_1.
979 2012-06-25  Jason Merrill  <jason@redhat.com>
981         PR c++/53202
982         * semantics.c (build_data_member_initialization): Always keep
983         initializer for empty base.
984         (cxx_eval_bare_aggregate): Discard it here.
986         PR c++/53565
987         * pt.c (tsubst_omp_for_iterator): Simplify DECL_EXPR handling.
988         (tsubst_expr) [OMP_FOR]: Here, too.
990 2012-06-25  Jakub Jelinek  <jakub@redhat.com>
992         PR c++/53594
993         * class.c (check_bases_and_members): Avoid -Wuninitialized
994         diagnostics for non-static const members or references if they
995         use NSDMI.
997 2012-06-16  Ville Voutilainen  <ville.voutilainen@gmail.com>
999         * parser.c (cp_parser_direct_declarator): Move virt-specifier
1000         parsing after late-specified return type parsing.
1002 2012-06-14  Jason Merrill  <jason@redhat.com>
1004         PR c++/53651
1005         * name-lookup.c (constructor_name_p): Don't try to look at the
1006         name of a DECLTYPE_TYPE.
1008 2012-06-18  Lawrence Crowl  <crowl@google.com>
1010         * decl2.c (cp_write_global_declarations): Rename use of TV_PHASE_CGRAPH
1011         to TV_PHASE_OPT_GEN.
1013 2012-06-18  Steven Bosscher  <steven@gcc.gnu.org>
1015         * decl.c (finish_function): Remove code conditional on VMS_TARGET.
1017 2012-06-15  Marc Glisse  <marc.glisse@inria.fr>
1019         PR c++/51033
1020         * semantics.c (literal_type_p): Handle VECTOR_TYPE.
1021         (potential_constant_expression_1): Handle VEC_PERM_EXPR.
1022         * parser.c (cp_parser_postfix_expression): Handle RID_BUILTIN_SHUFFLE.
1024 2012-06-09  Jason Merrill  <jason@redhat.com>
1026         * pt.c (tsubst_expr) [TAG_DEFN]: Instantiate local class.
1027         * class.c (finish_struct): Don't add a TAG_DEFN for a lambda.
1028         * decl2.c (finish_static_data_member_decl): Avoid redundant error.
1030         PR c++/53599
1031         * name-lookup.c (pushtag_1): Add a DECL_EXPR for a local class.
1032         * semantics.c (finish_cond): Build a COMPOUND_EXPR.
1033         * pt.c (tsubst_expr) [COMPOUND_EXPR]: Handle.
1034         [DECL_EXPR]: Don't call cp_finish_decl for an implicit typedef.
1035         Don't return the decl.
1037 2012-06-11  Richard Guenther  <rguenther@suse.de>
1039         PR c++/53605
1040         * mangle.c (write_array_type): Use double-ints for array domain
1041         arithmetic.
1043 2012-06-07  Fabien ChĂȘne  <fabien@gcc.gnu.org>
1045         PR c++/51214
1046         * cp-tree.h (insert_late_enum_def_into_classtype_sorted_fields):
1047         Declare.
1048         * class.c (insert_into_classtype_sorted_fields): New.
1049         (add_enum_fields_to_record_type): New.
1050         (count_fields): Adjust the comment.
1051         (add_fields_to_record_type): Likewise.
1052         (finish_struct_1): Move the code that inserts the fields for the
1053         sorted case, into insert_into_classtype_sorted_fields, and call
1054         it.
1055         (insert_late_enum_def_into_classtype_sorted_fields): Define.
1056         * decl.c (finish_enum_value_list): Call
1057         insert_late_enum_def_into_classtype_sorted_fields if a late enum
1058         definition is encountered.
1060 2012-06-06  Paolo Carlini  <paolo.carlini@oracle.com>
1062         PR c++/53567
1063         * typeck.c (cp_perform_integral_promotions): New, like
1064         perform_integral_promotions but also takes a tsubst_flags_t parameter.
1065         (pointer_diff): Add tsubst_flags_t parameter.
1066         (decay_conversion, cp_default_conversion, cp_build_array_ref,
1067         cp_build_binary_op, cp_build_unary_op, build_static_cast_1,
1068         build_reinterpret_cast_1, cp_build_modify_expr,
1069         convert_for_assignment): Adjust.
1070         * optimize.c (build_delete_destructor_body): Adjust.
1071         * init.c (expand_virtual_init, expand_default_init, build_new_1,
1072         build_new, build_vec_delete_1, build_vec_init, build_delete): Adjust.
1073         (construct_virtual_base): Adjust LOOKUP_COMPLAIN -> 0.
1074         * class.c (build_base_path): Adjust.
1075         * decl.c (compute_array_index_type, finish_destructor_body): Likewise.
1076         * method.c (synthesized_method_walk): Adjust flag and complain.
1077         * rtti.c (ifnonnull): Add tsubst_flags_t parameter.
1078         (build_typeid, build_dynamic_cast_1): Adjust.
1079         * except.c (initialize_handler_parm): Likewise.
1080         * typeck2.c (process_init_constructor_record): Likewise.
1081         * pt.c (tsubst_friend_class): Don't change flags.
1082         * semantics.c (finish_goto_stmt, handle_omp_for_class_iterator,
1083         finish_static_assert): Likewise.
1084         * parser.c (cp_parser_lookup_name): Just pass 0 as flags to
1085         lookup_name_real.
1086         * call.c (build_op_delete_call): Add tsubst_flags_t parameter.
1087         (convert_like_real, convert_arg_to_ellipsis, convert_for_arg_passing):
1088         Adjust.
1089         (standard_conversion): Adjust LOOKUP_COMPLAIN -> 0.
1090         (implicit_conversion): Mask out tf_error with a FIXME.
1091         (build_user_type_conversion_1, build_new_op_1, build_over_call): Use
1092         complain & tf_error instead of flags & LOOKUP_COMPLAIN.
1093         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1094         build_up_reference, convert_to_reference, cp_convert,
1095         cp_convert_and_check, ocp_convert, convert_force): Add tsubst_flags_t
1096         parameter.
1097         (convert_to_reference, ocp_convert): Use complain & tf_error instead
1098         of flags & LOOKUP_COMPLAIN.
1099         (convert_force): Adjust LOOKUP_COMPLAIN -> 0.
1100         * name-lookup.c (identifier_type_value_1, lookup_qualified_name,
1101         lookup_name_real, lookup_function_nonclass, lookup_name,
1102         lookup_name_prefer_type): Adjust LOOKUP_COMPLAIN -> 0.
1103         * cp-tree.h: Adjust prototypes; remove LOOKUP_COMPLAIN.
1105 2012-06-06  Steven Bosscher  <steven@gcc.gnu.org>
1107         * decl.c: Do not include output.h.
1108         (start_decl): Remove code for flag_conserve_space.
1110 2012-06-06  Fabien ChĂȘne  <fabien@gcc.gnu.org>
1112         PR c++/52841
1113         * parser.c (cp_parser_alias_declaration): Return earlier
1114         if an error occured.
1116 2012-06-04  Paolo Carlini  <paolo.carlini@oracle.com>
1118         PR c++/53524
1119         * call.c (build_conditional_expr_1): Use OPT_Wenum_compare
1120         to control enumeral mismatch in conditional expression too.
1122 2012-06-04   Sterling Augustine  <saugustine@google.com>
1124         * cp-tree.h: Declare decl_as_dwarf_string, lang_decl_dwarf_name.
1125         * cp-lang.c (cxx_dwarf_name): Call them.
1127 2012-06-04  Steven Bosscher  <steven@gcc.gnu.org>
1129         * semantics.c: Do not include output.h.
1130         * decl2.c: Likewise.
1131         * friend.c: Likewise.
1132         * typeck.c: Likewise.
1133         * typeck2.c: Likewise.
1134         * Make-lang.in: Fix dependencies.
1136 2012-06-01  Jason Merrill  <jason@redhat.com>
1138         PR c++/52973
1139         * parser.c (cp_parser_class_head): Apply attributes here.
1140         * semantics.c (begin_class_definition): Not here.
1141         * cp-tree.h: Adjust.
1143         PR c++/52725
1144         * parser.c (cp_parser_binary_expression): Bail early if we're parsing
1145         tentatively and the LHS has a parse error.
1147         PR c++/53137
1148         * pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
1149         (instantiate_decl): Don't push_to_top_level for local class methods.
1150         (instantiate_class_template_1): Or for local classes.
1152         PR c++/53484
1153         * pt.c (do_auto_deduction): Don't try to deduce from a
1154         type-dependent initializer.
1156 2012-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
1158         PR c++/26155
1159         * name-lookup.c (push_namespace): When error recovery is
1160         impossible just error out in duplicate_decls.
1162 2012-05-31  Steven Bosscher  <steven@gcc.gnu.org>
1164         * call.c: Do not include output.h.
1165         * class.c: Likewise.
1166         * except.c: Likewise.
1167         * friend.c: Likewise.
1168         * init.c: Likewise.
1169         * lex.c: Likewise.
1170         * method.c: Likewise.
1171         * parser.c: Likewise.
1172         * pt.c: Likewise.
1173         * rtti.c: Likewise.
1174         * search.c: Likewise.
1176 2012-05-30  Jason Merrill  <jason@redhat.com>
1178         PR c++/53356
1179         * tree.c (stabilize_init): Handle stabilizing a TARGET_EXPR
1180         representing a bitwise copy of a glvalue.
1182         * tree.c (stabilize_expr): Tweak logic.
1184         PR c++/53356
1185         * tree.c (stabilize_init): Side effects make the init unstable.
1187 2012-05-28  Paolo Carlini  <paolo.carlini@oracle.com>
1189         PR c++/53503
1190         * semantics.c (potential_constant_expression_1): Handle LTGT_EXPR.
1192 2012-05-26  Paolo Carlini  <paolo.carlini@oracle.com>
1194         PR c++/53491
1195         * tree.c (stabilize_expr): Handle exp of void type.
1197 2012-05-26  Jason Merrill  <jason@redhat.com>
1199         PR c++/53220
1200         * call.c (convert_like_real) [ck_list]: Take array address directly.
1201         * typeck.c (decay_conversion): Reject decay of an array compound
1202         literal.
1204 2012-05-25  Paolo Carlini  <paolo.carlini@oracle.com>
1206         PR c++/32054
1207         * parser.c (cp_parser_member_declaration): A storage class is not
1208         allowed in a declaration of an anonymous aggregate in a class scope.
1210 2012-05-24  Uros Bizjak  <ubizjak@gmail.com>
1212         PR obj-c++/53441
1213         * decl.c (grokdeclarator): Check that current_class_type is non-NULL
1214         before calling constructor_name_p.
1216 2012-05-24  Paolo Carlini  <paolo.carlini@oracle.com>
1218         PR c++/32080
1219         * parser.c (cp_parser_ctor_initializer_opt_and_function_body,
1220         cp_parser_function_body): Add a bool parameter, true when parsing
1221         a function-try-block.
1222         (cp_parser_function_try_block): Pass true to the above.
1223         (cp_parser_function_definition_after_declarator,
1224         cp_parser_function_transaction): Adjust.
1226 2012-05-23  Paolo Carlini  <paolo.carlini@oracle.com>
1228         PR c++/29185
1229         * decl2.c (delete_sanity): Extend 'deleting array' warning to
1230         any array type.
1232 2012-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
1234         PR c++/51184
1235         * decl.c (grokdeclarator): Diagnose functions returning abstract
1236         class types as TYPENAME.
1237         * cp-tree.h (ABSTRACT_CLASS_TYPE_P): Add.
1238         * except.c (is_admissible_throw_operand_or_catch_parameter): Use it.
1239         * pt.c (tsubst): Likewise.
1240         * semantics.c (trait_expr_value): Likewise.
1242 2012-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
1244         PR c++/40821
1245         * parser.c (cp_parser_attributes_opt): Enforce error checking of
1246         unbalanced parentheses in the presence of tentative parsing.
1248 2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
1250         PR c++/39681
1251         * parser.c (cp_parser_new_type_id): Early return error_mark_node
1252         if the cp_parser_type_specifier_seq call has type_specifier_seq.type
1253         error_mark_node; tidy.
1254         (cp_parser_new_expression): Always initialize nelts to NULL_TREE to
1255         avoid uninitialized warnings.
1256         (cp_parser_init_declarator, cp_parser_late_parse_one_default_arg):
1257         Call cp_parser_skip_to_end_of_statement if cp_parser_initializer
1258         returns error_mark_node.
1260 2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
1262         PR c++/53371
1263         * except.c (is_admissible_throw_operand): Rename to
1264         is_admissible_throw_operand_or_catch_parameter and handle
1265         catch parameter too.
1266         (expand_start_catch_block): Use it.
1267         (build_throw): Adjust.
1269 2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
1271         PR c++/44516
1272         * typeck.c (build_x_array_ref, build_x_conditional_expr,
1273         build_x_compound_expr, build_x_modify_expr): Add location_t parameter.
1274         (finish_class_member_access_expr, build_x_indirect_ref,
1275         build_x_binary_op, build_x_compound_expr_from_list,
1276         build_x_compound_expr_from_vec): Adjust callers.
1277         * tree.c (build_min_nt_loc): New.
1278         (build_min_nt): Remove.
1279         * typeck2.c (build_x_arrow): Adjust callers.
1280         * pt.c (tsubst_qualified_id, tsubst_omp_for_iterator,
1281         tsubst_copy_and_build): Likewise.
1282         * semantics.c (finish_mem_initializers, handle_omp_for_class_iterator,
1283          finish_omp_atomic): Likewise.
1284         * decl2.c (grok_array_decl, build_anon_union_vars): Adjust.
1285         * parser.c (cp_parser_question_colon_clause,
1286         cp_parser_assignment_expression, cp_parser_expression,
1287         cp_parser_template_id, cp_parser_omp_for_loop): Likewise.
1288         * cp-tree.h: Update.
1290 2012-05-16  Dodji Seketeli  <dodji@redhat.com>
1292         PR preprocessor/7263
1293         * cp-tree.h (enum cp_decl_spec): Add new enumerators to cover all
1294         the possible declarator specifiers so far.
1295         (struct cp_decl_specifier_seq::locations): Declare new member.
1296         (cp_decl_specifier_seq::{specs, type_location}): Remove.
1297         (decl_spec_seq_has_spec_p): Declare new function.
1298         * parser.c (cp_parser_check_decl_spec): Remove.
1299         (set_and_check_decl_spec_loc): Define new static function.
1300         (decl_spec_seq_has_spec_p): Define new public function.
1301         (cp_parser_decl_specifier_seq, cp_parser_function_specifier_opt)
1302         (cp_parser_type_specifier, cp_parser_simple_type_specifier)
1303         (cp_parser_set_storage_class, cp_parser_set_decl_spec_type)
1304         (cp_parser_alias_declaration): Set the locations for each
1305         declspec, using set_and_check_decl_spec_loc.
1306         (cp_parser_explicit_instantiation, cp_parser_init_declarator)
1307         (cp_parser_member_declaration, cp_parser_init_declarator): Use the
1308         new declspec location for specifiers.  Use the new
1309         decl_spec_seq_has_spec_p.
1310         (cp_parser_type_specifier_seq): Use the new
1311         set_and_check_decl_spec_loc.  Stop using
1312         cp_parser_check_decl_spec.  Use the new decl_spec_seq_has_spec_p.
1313         (, cp_parser_init_declarator): Use the new
1314         set_and_check_decl_spec_loc.
1315         (cp_parser_single_declaration, cp_parser_friend_p)
1316         (cp_parser_objc_class_ivars, cp_parser_objc_struct_declaration):
1317         Use the new decl_spec_seq_has_spec_p.
1318         * decl.c (check_tag_decl): Use new decl_spec_seq_has_spec_p.  Use
1319         the more precise ds_redefined_builtin_type_spec location for
1320         diagnostics about re-declaring C++ built-in types.
1321         (start_decl, grokvardecl, grokdeclarator): Use the new
1322         decl_spec_seq_has_spec_p.
1324 2012-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
1326         PR c++/11856
1327         * pt.c (tsubst_copy_and_build): Increase / decrease
1328         c_inhibit_evaluation_warnings around build_x_binary_op call.
1330 2012-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
1332         * cp-tree.h (TYPE_PTRMEM_P): Rename to TYPE_PTRDATAMEM_P.
1333         (TYPE_PTR_TO_MEMBER_P): Rename to TYPE_PTRMEM_P.
1334         (TYPE_PTR_OR_PTRMEM_P): Add.
1335         * typeck.c (composite_pointer_type_r, composite_pointer_type,
1336         common_pointer_type, cp_build_indirect_ref, cp_build_binary_op,
1337         cp_truthvalue_conversion, convert_ptrmem, build_static_cast_1,
1338         build_reinterpret_cast_1, build_const_cast_1, comp_ptr_ttypes_real,
1339         casts_away_constness_r, casts_away_constness): Adjust.
1340         * init.c (build_zero_init_1): Adjust.
1341         * class.c (check_field_decls): Likewise.
1342         * decl.c (check_default_argument): Likewise.
1343         * rtti.c (target_incomplete_p): Likewise.
1344         * tree.c (zero_init_p): Likewise.
1345         * cxx-pretty-print.c (pp_cxx_ptr_operator,
1346         pp_cxx_abstract_declarator): Likewise.
1347         * typeck2.c (build_m_component_ref): Likewise.
1348         * pt.c (convert_nontype_argument, invalid_nontype_parm_type_p,
1349         dependent_type_p_r): Likewise.
1350         * call.c (null_member_pointer_value_p, standard_conversion,
1351         add_builtin_candidate, build_conditional_expr_1, compare_ics):
1352         Likewise.
1353         * cp-objcp-common.c (cp_var_mod_type_p): Likewise.
1354         * cvt.c (cp_convert_to_pointer, ocp_convert,
1355         perform_qualification_conversions): Likewise.
1356         * mangle.c (write_type): Likewise.
1357         * name-lookup.c (arg_assoc_type): Likewise.
1359 2012-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
1361         * parser.c (struct cp_parser_expression_stack_entry): Add location_t
1362         field.
1363         (cp_parser_binary_expression): Rework to always update at the same
1364         time tree_type and loc.
1365         * call.c (print_z_candidate): Add location_t parameter.
1366         (print_z_candidates, convert_like_real, joust): Adjust.
1368 2012-05-11  Alexandre Oliva  <aoliva@redhat.com>
1370         PR c++/53209
1371         * pt.c (tsubst_decl): Bail out if argvec is error_mark_node.
1373 2012-05-11  Paolo Carlini  <paolo.carlini@oracle.com>
1375         PR c++/53305
1376         * pt.c (tsubst_copy: case PARM_DECL): Return error_mark_node if
1377         tsubst_decl returns NULL_TREE.
1378         * cxx-pretty-print.c (pp_cxx_simple_type_specifier): Handle
1379         BOUND_TEMPLATE_TEMPLATE_PARM.
1381 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
1383         PR c++/53158
1384         * cvt.c (ocp_convert): Error out early for void -> bool conversions.
1385         * typeck.c (decay_conversion): Use error_at.
1386         * call.c (build_integral_nontype_arg_conv, convert_like_real,
1387         convert_arg_to_ellipsis, perform_implicit_conversion_flags,
1388         initialize_reference): Likewise.
1389         * cvt.c (warn_ref_binding): Add location_t parameter.
1390         (cp_convert_to_pointer, convert_to_reference, ocp_convert,
1391         convert_to_void, ): Use error_at and warning_at.
1393 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
1395         PR c++/53301
1396         * decl.c (check_default_argument): Fix typo (POINTER_TYPE_P
1397         instead of TYPE_PTR_P) in zero-as-null-pointer-constant warning.
1399 2012-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
1401         PR c++/53152
1402         * call.c (op_error, build_new_op_1, build_new_op): Add location_t
1403         parameter.
1404         (build_conditional_expr_1): Adjust.
1405         * typeck.c (build_x_indirect_ref, build_x_binary_op,
1406         build_x_unary_op): Add location_t parameter.
1407         (rationalize_conditional_expr, build_x_array_ref,
1408         build_x_compound_expr, cp_build_modify_expr, build_x_modify_expr):
1409         Adjust.
1410         * typeck2.c (build_x_arrow): Add location_t parameter.
1411         * semantics.c (finish_unary_op_expr): Likewise.
1412         (finish_increment_expr, handle_omp_for_class_iterator): Adjust.
1413         * decl2.c (grok_array_decl): Add location_t parameter.
1414         * parser.c (cp_parser_postfix_open_square_expression,
1415         cp_parser_postfix_dot_deref_expression, cp_parser_unary_expression,
1416         cp_parser_binary_expression, cp_parser_builtin_offsetof,
1417         do_range_for_auto_deduction, cp_convert_range_for,
1418         cp_parser_template_argument, cp_parser_omp_for_cond): Pass the
1419         location, adjust.
1420         * pt.c (tsubst_copy_and_build): Adjust.
1421         * tree.c (maybe_dummy_object): Likewise.
1422         * cp-tree.h: Update declarations.
1424 2012-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
1426         * semantics.c (cxx_eval_constant_expression, case CONVERT_EXPR): Tidy.
1428 2012-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
1430         PR c++/53166
1431         * pt.c (instantiate_class_template_1): Increase / decrease
1432         c_inhibit_evaluation_warnings around the tsubst_expr call
1433         for STATIC_ASSERT_CONDITION.
1434         (tsubst_expr, case STATIC_ASSERT): Likewise.
1435         * typeck.c (cp_build_binary_op, case EQ_EXPR/NE_EXPR): Check
1436         c_inhibit_evaluation_warnings in the OPT_Waddress warnings.
1438 2012-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
1440         PR c++/53186
1441         * call.c (build_over_call): Handle final member functions
1442         and class types.
1443         (build_new_method_call_1): Do not handle here.
1445 2012-05-02  Richard Guenther  <rguenther@suse.de>
1447         * decl.c (grokdeclarator): Properly check for sizes that
1448         cover more than half of the address-space.
1450 2012-04-30  Marc Glisse  <marc.glisse@inria.fr>
1452         PR c++/51033
1453         * typeck.c (cp_build_array_ref): Handle VECTOR_TYPE.
1454         * decl2.c (grok_array_decl): Likewise.
1456         PR c++/51314
1457         * parser.c (cp_parser_sizeof_operand): Require parentheses for
1458         sizeof...
1460 2012-04-30  Dodji Seketeli  <dodji@redhat.com>
1462         Fix location for static class members
1463         * decl.c (grokdeclarator): Use the location carried by the
1464         declarator for the DECL of the static class member.
1466         Fix va_arg type location
1467         * cp-tree.h (build_x_va_arg): Take an additional location
1468         parameter.
1469         * call.c (build_x_va_arg): Take a loc parameter for the location
1470         of the type of the va_arg expression.
1471         * parser.c (cp_parser_primary_expression): Pass the type of the
1472         type in the va_arg expression to build_x_va_arg.
1473         * pt.c (tsubst_copy): Adjust calls to build_x_va_arg.
1475         Make conversion warnings work on NULL with -ftrack-macro-expansion
1476         * call.c (conversion_null_warnings): Use the new
1477         expansion_point_location_if_in_system_header.
1478         * cvt.c (build_expr_type_conversion): Likewise.
1479         * typeck.c (cp_build_binary_op): Likewise.
1481 2012-04-30  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
1483         * typeck.c (convert_for_assignment):  Replace
1484         Wmissing-format-attribute with Wsuggest-attribute=format.
1485         * call.c (convert_for_arg_passing): Likewise.
1487 2012-04-26  Paolo Carlini  <paolo.carlini@oracle.com>
1489         PR c++/53096
1490         * class.c (check_bases_and_members): Implement core/1333, do not
1491         disallow defaulted in the class body non-const ref special members.
1493 2012-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
1495         PR c++/52363
1496         * call.c (tourney, perform_overload_resolution,
1497         build_operator_new_call, build_user_type_conversion_1,
1498         build_user_type_conversion, perform_overload_resolution,
1499         add_template_candidate, add_template_candidate_real,
1500         add_template_conv_candidate, add_builtin_candidates,
1501         add_builtin_candidate, build_builtin_candidate,
1502         add_conv_candidate, add_function_candidate, implicit_conversion,
1503         reference_binding, build_list_conv, conditional_conversion,
1504         add_candidates, can_convert_array, build_aggr_conv,
1505         build_array_conv, build_complex_conv, conditional_conversion):
1506         Add tsubst_flags_t parameter.
1507         (joust): Likewise, use it to handle SFINAE as if pedantic.
1508         (add_list_candidates, build_integral_nontype_arg_conv,
1509         perform_overload_resolution, build_new_function_call,
1510         build_operator_new_call, build_op_call_1,
1511         build_conditional_expr_1, build_new_op_1, convert_like_real,
1512         convert_arg_to_ellipsis, convert_default_arg,
1513         convert_for_arg_passing, build_over_call,
1514         build_new_method_call_1, can_convert_arg, can_convert_arg_bad,
1515         perform_implicit_conversion_flags,
1516         perform_direct_initialization_if_possible,
1517         initialize_reference): Adjust.
1518         * typeck.c (casts_away_constness, casts_away_constness_r):
1519         Add tsubst_flags_t parameter.
1520         (convert_arguments, check_for_casting_away_constness,
1521         build_static_cast_1, build_ptrmemfunc, convert_for_assignment):
1522         Adjust.
1523         * decl.c (reshape_init_r, check_default_argument): Likewise.
1524         * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1525         * pt.c (convert_nontype_argument, check_non_deducible_conversion):
1526         Likewise.
1527         * init.c (build_new_1): Likewise.
1528         * cvt.c (convert_to_reference, ocp_convert, build_type_conversion,
1529         build_expr_type_conversion, ): Likewise.
1530         * search.c (check_final_overrider): Likewise.
1531         * cp-tree.h (build_user_type_conversion,
1532         build_operator_new_call, can_convert, can_convert_arg,
1533         can_convert_arg_bad, convert_default_arg,
1534         convert_arg_to_ellipsis, convert_for_arg_passing):
1535         Adjust declaration.
1537 2012-04-22  Jan Hubicka  <jh@suse.cz>
1539         * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they
1540         gets finalized.
1542 2012-04-22  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
1544         PR c/44774
1545         * typeck.c (composite_pointer_type): Likewise.
1546         (cxx_sizeof_or_alignof_type): Likewise.
1547         (cp_build_array_ref): Likewise.
1548         (cp_build_function_call_vec): Likewise.
1549         (cp_build_addr_expr_1): Likewise.
1550         (convert_member_func_to_ptr): Likewise.
1551         * decl.c (check_tag_decl): Likewise.
1552         (check_static_variable_definition): Likewise.
1553         (compute_array_index_type): Likewise.
1554         (create_array_type_for_decl): Likewise.
1555         (grokdeclarator): Likewise.
1556         (grok_op_properties): Likewise.
1557         * error.c (maybe_warn_cpp0x): Likewise.
1558         * pt.c (maybe_process_partial_specialization): Likewise.
1559         (convert_template_argument): Likewise.
1560         (do_decl_instantiation): Likewise.
1561         (do_type_instantiation): Likewise.
1562         * parser.c (cp_parser_primary_expression): Likewise.
1563         (cp_parser_postfix_expression): Likewise.
1564         (cp_parser_unary_expression): Likewise.
1565         (cp_parser_question_colon_clause): Likewise.
1566         (cp_parser_lambda_introducer): Likewise.
1567         (cp_parser_lambda_declarator_opt): Likewise.
1568         (cp_parser_compound_statement): Likewise.
1569         (cp_parser_jump_statement): Likewise.
1570         (cp_parser_declaration_seq_opt): Likewise.
1571         (cp_parser_enum_specifier): Likewise.
1572         (cp_parser_enumerator_list): Likewise.
1573         (cp_parser_initializer_list): Likewise.
1574         (cp_parser_member_declaration): Likewise.
1575         * call.c (build_conditional_expr_1): Likewise.
1576         * friend.c (make_friend_class): Likewise.
1577         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
1579 2012-04-21  Jan Hubicka  <jh@suse.cz>
1581         * method.c (make_alias_for): Do not set TREE_SYMBOL_REFERENCED.
1582         * decl2.c (mark_needed): Likewise.
1583         (decl_needed_p): Do not test TREE_SYMBOL_REFERENCED.
1585         * decl2.c (cxx_callgraph_analyze_expr): Remove.
1586         * cp-objcp-common.h (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Remove.
1587         * cp-tree.h (cxx_callgraph_analyze_expr): Remove.
1589 2012-04-21  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
1591         PR 35441
1592         * typeck.c (cp_build_function_call_vec): Do not pretty-print
1593         expressions when caret is enabled.
1595 2012-04-20  Jan Hubicka  <jh@suse.cz>
1597         PR target/53042
1598         * decl2.c (maybe_emit_vtables): Do not initialize same_comdat_group
1599         list when target has no support for it.
1601 2012-04-20  Michael Matz  <matz@suse.de>
1603         * error.c (pedwarn_cxx98): Move va_end call after user
1604         of the va_list.
1606 2012-04-18  Paolo Carlini  <paolo.carlini@oracle.com>
1608         PR c++/52422
1609         * cp-tree.h (build_addr_func, decay_conversion,
1610         get_member_function_from_ptrfunc,
1611         build_m_component_ref, convert_member_func_to_ptr):
1612         Add tsubst_flags_t parameter.
1613         * typeck.c (cp_default_conversion): Add.
1614         (decay_conversion, default_conversion,
1615         get_member_function_from_ptrfunc, convert_member_func_to_ptr):
1616         Add tsubst_flags_t parameter and use it throughout.
1617         (cp_build_indirect_ref, cp_build_array_ref,
1618         cp_build_function_call_vec, convert_arguments, build_x_binary_op,
1619         cp_build_binary_op, cp_build_unary_op, build_reinterpret_cast_1,
1620         build_const_cast_1, expand_ptrmemfunc_cst,
1621         convert_for_initialization): Adjust.
1622         * init.c (build_vec_init): Adjust.
1623         * decl.c (grok_reference_init, get_atexit_node): Likewise.
1624         * rtti.c (build_dynamic_cast_1, tinfo_base_init): Likewise.
1625         * except.c (build_throw): Likewise.
1626         * typeck2.c (build_x_arrow): Likewise.
1627         (build_m_component_ref): Add tsubst_flags_t parameter and
1628         use it throughout.
1629         * pt.c (convert_nontype_argument): Adjust.
1630         * semantics.c (finish_asm_stmt, maybe_add_lambda_conv_op): Likewise.
1631         * decl2.c (build_offset_ref_call_from_tree): Likewise.
1632         * call.c (build_addr_func): Add tsubst_flags_t parameter and
1633         use it throughout.
1634         (build_call_a, build_conditional_expr_1, build_new_op_1,
1635         convert_like_real, convert_arg_to_ellipsis, build_over_call,
1636         build_special_member_call): Adjust.
1637         * cvt.c (cp_convert_to_pointer, force_rvalue,
1638         build_expr_type_conversion): Likewise.
1640 2012-04-17  Tom de Vries  <tom@codesourcery.com>
1642         * cp-gimplify.c (begin_bc_block): Add location parameter and use as
1643         location argument to create_artificial_label.
1644         (finish_bc_block): Change return type to void.  Remove body_seq
1645         parameter, and add block parameter.  Append label to STMT_LIST and
1646         return in block.
1647         (gimplify_cp_loop, gimplify_for_stmt, gimplify_while_stmt)
1648         (gimplify_do_stmt, gimplify_switch_stmt): Remove function.
1649         (genericize_cp_loop, genericize_for_stmt, genericize_while_stmt)
1650         (genericize_do_stmt, genericize_switch_stmt, genericize_continue_stmt)
1651         (genericize_break_stmt, genericize_omp_for_stmt): New function.
1652         (cp_gimplify_omp_for): Remove bc_continue processing.
1653         (cp_gimplify_expr): Genericize VEC_INIT_EXPR.
1654         (cp_gimplify_expr): Mark FOR_STMT, WHILE_STMT, DO_STMT, SWITCH_STMT,
1655         CONTINUE_STMT, and BREAK_STMT as unreachable.
1656         (cp_genericize_r): Genericize FOR_STMT, WHILE_STMT, DO_STMT,
1657         SWITCH_STMT, CONTINUE_STMT, BREAK_STMT and OMP_FOR.
1658         (cp_genericize_tree): New function, factored out of ...
1659         (cp_genericize): ... this function.
1661 2012-04-17  Paolo Carlini  <paolo.carlini@oracle.com>
1663         PR c++/52599
1664         * semantics.c (build_constexpr_constructor_member_initializers):
1665         Check for function-try-block as function-body.
1667 2012-04-17  Paolo Carlini  <paolo.carlini@oracle.com>
1669         PR c++/53003
1670         * parser.c (cp_parser_member_declaration): Check that
1671         initializer_token_start is non null before dereferencing it.
1673 2012-04-16  Jason Merrill  <jason@redhat.com>
1675         PR c++/38543
1676         * pt.c (determine_specialization): Instead of comparing the number
1677         of parms, check that tsubst gives the right answer.
1679         PR c++/52008
1680         * pt.c (process_partial_specialization): Complain about a partial
1681         specialization with fewer args than primary template parms.
1683         PR c++/50830
1684         * pt.c (convert_template_argument): Handle template template
1685         argument packs.
1687         PR c++/50303
1688         * pt.c (tsubst_pack_expansion): Use tsubst_expr for template
1689         template parameters.
1691 2012-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
1693         PR c++/49152
1694         * call.c (op_error): Print types; when flag_diagnostics_show_caret
1695         is false print expressions too.
1696         (op_error_string): Add.
1698 2012-04-16  Jason Merrill  <jason@redhat.com>
1700         PR c++/51148
1701         * friend.c (make_friend_class): Call check_for_bare_parameter_packs.
1703 2012-04-16  Jan Hubicka  <jh@suse.cz>
1705         * decl2.c (collect_candidates_for_java_method_alias): Use FOR_EACH
1706         walkers to walk cgraph and varpool.
1708 2012-04-15  Jason Merrill  <jason@redhat.com>
1710         PR c++/47220
1711         * pt.c (coerce_template_parameter_pack): Check for error_mark_node.
1713         PR c++/52292
1714         PR c++/52380
1715         * pt.c (coerce_template_parms): Even if we aren't converting we
1716         want to expand argument packs.
1718         PR c++/52706
1719         * mangle.c (write_type): nullptr_t is a builtin type.
1721 2012-04-14  Jan Hubicka  <jh@suse.cz>
1723         * tree.c: Update field referenced for new cgraph/varpool layout.
1724         * decl2.c: Likewise.
1726 2012-04-13  Jason Merrill  <jason@redhat.com>
1728         PR c++/52824
1729         * pt.c (any_pack_expanson_args_p): New.
1730         (coerce_template_parms): Use it.
1732         PR c++/52905
1733         * call.c (joust): Handle comparing list and non-list ctors.
1735         PR c++/52915
1736         * decl2.c (finish_anon_union): Use cp_finish_decl.
1737         * error.c (dump_function_name): Avoid showing anonymous "name".
1739 2012-04-11  Fabien ChĂȘne  <fabien@gcc.gnu.org>
1741         PR c++/52465
1742         * parser.c (cp_parser_class_name): Call strip_using_decl and
1743         return the target decl.
1744         * name-lookup.c (strip_using_decl): Returns NULL_TREE if the decl
1745         to be stripped is NULL_TREE.
1746         (qualify_lookup): Call strip_using_decl and perform some checks on
1747         the target decl.
1749 2012-04-11  Jason Merrill  <jason@redhat.com>
1751         PR debug/45088
1752         * decl.c (grokdeclarator): Strip the injected-class-name typedef
1753         if we are building a declaration or compound type.
1755         PR c++/52906
1756         * decl.c (check_tag_decl): Don't complain about attributes if we
1757         don't even have a type.
1759 2012-04-10  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
1761         * cvt.c (convert_to_void): Update comment.
1763 2012-04-05  Jason Merrill  <jason@redhat.com>
1765         PR c++/52596
1766         * semantics.c (finish_non_static_data_member): In templates, pass
1767         the decl to build_qualified_name.
1768         * tree.c (lvalue_kind) [SCOPE_REF]: Handle FIELD_DECL.
1770 2012-04-04  Jason Merrill  <jason@redhat.com>
1772         PR c++/52845
1773         * decl.c (finish_function): Update fntype after deducing return type.
1775 2012-04-03  Jason Merrill  <jason@redhat.com>
1777         PR c++/52796
1778         * pt.c (tsubst_initializer_list): A pack expansion with no elements
1779         means value-initialization.
1781 2012-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
1783         PR c++/50043
1784         * class.c (deduce_noexcept_on_destructor,
1785         deduce_noexcept_on_destructors): New.
1786         (check_bases_and_members): Call the latter.
1787         * decl.c (grokfndecl): Call the former.
1788         * method.c (implicitly_declare_fn): Not static.
1789         * cp-tree.h (deduce_noexcept_on_destructor, implicitly_declare_fn):
1790         Declare
1792 2012-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
1794         PR c++/52718
1795         * decl.c (check_default_argument): With -Wzero-as-null-pointer-constant
1796         warn for a zero as null pointer constant default argument.
1798 2012-03-29  Jason Merrill  <jason@redhat.com>
1800         PR c++/52685
1801         * tree.c (copy_binfo): Handle BINFO_DEPENDENT_BASE_P.
1803 2012-03-29  Jakub Jelinek  <jakub@redhat.com>
1805         PR c++/52759
1806         * decl.c (start_decl): Don't call maybe_apply_pragma_weak
1807         if processing_template_decl.
1809 2012-03-29  Jason Merrill  <jason@redhat.com>
1811         PR c++/52743
1812         * call.c (compare_ics): Handle ck_aggr like ck_list.
1814 2012-03-28  Jason Merrill  <jason@redhat.com>
1816         PR c++/52746
1817         * typeck.c (lookup_destructor): Clear BASELINK_QUALIFIED_P if
1818         we didn't get an explicit scope.
1819         * pt.c (tsubst_baselink): Likewise.
1821 2012-03-28  Richard Guenther  <rguenther@suse.de>
1823         * typeck2.c (process_init_constructor_array): Use the proper
1824         type for computing the array length.
1826 2012-03-27  Meador Inge  <meadori@codesourcery.com>
1828         PR c++/52672
1829         * semantics.c (cxx_fold_indirect_ref): Don't attempt to fold
1830         stripped child trees that are not pointer types.
1832 2012-03-21  Jason Merrill  <jason@redhat.com>
1834         Implement return type deduction for normal functions with -std=c++1y.
1835         * cp-tree.h (FNDECL_USED_AUTO): New macro.
1836         (LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P): Remove.
1837         (dependent_lambda_return_type_node): Remove.
1838         (CPTI_DEPENDENT_LAMBDA_RETURN_TYPE): Remove.
1839         (struct language_function): Add x_auto_return_pattern field.
1840         (current_function_auto_return_pattern): New.
1841         (enum tsubst_flags): Add tf_partial.
1842         * decl.c (decls_match): Handle auto return comparison.
1843         (duplicate_decls): Adjust error message for auto return.
1844         (cxx_init_decl_processing): Remove dependent_lambda_return_type_node.
1845         (cp_finish_decl): Don't do auto deduction for functions.
1846         (grokdeclarator): Allow auto return without trailing return type in
1847         C++1y mode.
1848         (check_function_type): Defer checking of deduced return type.
1849         (start_preparsed_function): Set current_function_auto_return_pattern.
1850         (finish_function): Set deduced return type to void if not previously
1851         deduced.
1852         * decl2.c (change_return_type): Handle error_mark_node.
1853         (mark_used): Always instantiate functions with deduced return type.
1854         Complain about use if deduction isn't done.
1855         * parser.c (cp_parser_lambda_declarator_opt): Use 'auto' for
1856         initial return type.
1857         (cp_parser_lambda_body): Don't deduce return type in a template.
1858         (cp_parser_conversion_type_id): Allow auto in C++1y.
1859         * pt.c (instantiate_class_template_1): Don't mess with
1860         LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P.
1861         (tsubst_copy_and_build): Likewise.
1862         (fn_type_unification, tsubst): Don't reduce the template parm level
1863         of 'auto' during deduction.
1864         (unify): Compare 'auto' specially.
1865         (get_bindings): Change test.
1866         (always_instantiate_p): Always instantiate functions with deduced
1867         return type.
1868         (do_auto_deduction): Handle error_mark_node and lambda context.
1869         Don't check for use in initializer.
1870         (contains_auto_r): Remove.
1871         * search.c (lookup_conversions_r): Handle auto conversion function.
1872         * semantics.c (lambda_return_type): Handle null return.  Don't mess
1873         with dependent_lambda_return_type_node.
1874         (apply_deduced_return_type): Rename from apply_lambda_return_type.
1875         * typeck.c (merge_types): Handle auto.
1876         (check_return_expr): Do auto deduction.
1877         * typeck2.c (add_exception_specifier): Fix complain check.
1879 2012-03-22  Paolo Carlini  <paolo.carlini@oracle.com>
1881         PR c++/52487
1882         * class.c (check_field_decls): Call literal_type_p only
1883         on complete types.
1885 2012-03-22  Jakub Jelinek  <jakub@redhat.com>
1887         PR c++/52671
1888         * decl.c (check_tag_decl): Only use CLASSTYPE_TEMPLATE_INSTANTIATION
1889         on CLASS_TYPE_P types.
1891 2012-03-20  Jason Merrill  <jason@redhat.com>
1893         * lex.c (init_reswords): Use >= for cxx_dialect test.
1894         * parser.c (cp_parser_exception_specification_opt): Likewise.
1896         * mangle.c (write_type): Handle 'auto'.
1897         * init.c (build_new): Don't do auto deduction where it might
1898         affect template mangling.
1900         PR c++/52510
1901         * decl.c (reshape_init_class): Handle repeated reshaping.
1902         * search.c (lookup_field_1): Add sanity check.
1904 2012-03-19  Paolo Carlini  <paolo.carlini@oracle.com>
1906         PR c++/14710
1907         * cp-tree.h (xvalue_p, maybe_warn_about_useless_cast): Declare.
1908         * tree.c (xvalue_p): Define.
1909         * typeck.c (maybe_warn_about_useless_cast): Define.
1910         (build_reinterpret_cast, build_const_cast,
1911         build_static_cast, cp_build_c_cast): Use maybe_warn_about_useless_cast.
1912         * rtti.c (build_dynamic_cast): Likewise.
1913         * pt.c (tsubst_copy_and_build, case CAST_EXPR): Increment/decrement
1914         c_inhibit_evaluation_warnings before/after the build_* calls.
1916 2012-03-15  Jason Merrill  <jason@redhat.com>
1918         PR c++/52582
1919         * method.c (implicitly_declare_fn): Set DECL_EXTERNAL.
1921 2012-03-15  Manuel LĂłpez-Ibåñez  <manu@gcc.gnu.org>
1923         PR c++/44783
1924         * error.c (print_instantiation_partial_context): Use
1925         template_backtrace_limit.
1927 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1929         * Make-lang.in (doc/g++.1): Remove IRIX 6.5 reference.
1931 2012-03-14  Jakub Jelinek  <jakub@redhat.com>
1933         PR c++/52521
1934         * parser.c (lookup_literal_operator): Return fn only if
1935         processed all arguments from args vector and argtypes is
1936         void_list_node.
1938 2012-01-30  Dodji Seketeli  <dodji@redhat.com>
1940         PR c++/51641
1941         * cp-tree.h (template_type_parameter_p): Declare new function.
1942         (parameter_of_template_p): Remove.
1943         * pt.c (template_type_parameter_p): Define new function.
1944         (parameter_of_template_p): Remove.
1945         * name-lookup.c (binding_to_template_parms_of_scope_p): Don't rely
1946         on parameter_of_template_p anymore.  Compare the level of the
1947         template parameter to the depth of the template.
1949 2011-12-15  Dodji Seketeli  <dodji@redhat.com>
1951         * call.c (standard_conversion, build_integral_nontype_arg_conv)
1952         (build_new_op_1, convert_like_real, is_subseq)
1953         (maybe_handle_implicit_object, maybe_handle_ref_bind, compare_ics)
1954         (joust): Use next_conversion instead of accessing fields of struct
1955         conversion directly.
1957 2012-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
1959         PR c++/52299
1960         * pt.c (tsubst_copy_and_build, case COND_EXPR): Avoid bogus
1961         division by zero warnings.
1963 2012-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
1965         * typeck.c (build_array_ref, cp_build_addr_expr_1, convert_ptrmem,
1966         build_ptrmemfunc): Consistently forward the tsubst_flags_t
1967         parameter.
1968         * call.c (resolve_args): Likewise.
1970 2012-03-07  Jason Merrill  <jason@redhat.com>
1972         PR c++/52521
1973         * mangle.c (write_literal_operator_name): The length comes after the
1974         operator prefix.
1976 2012-03-05  Jakub Jelinek  <jakub@redhat.com>
1978         * pt.c (local_specializations): Change from htab_t into
1979         struct pointer_map_t *.
1980         (retrieve_local_specializations, register_local_specialization,
1981         tsubst_pack_expansion, instantiate_decl): Adjust users.
1982         (eq_local_specializations, hash_local_specialization): Remove.
1984 2012-03-05  Jason Merrill  <jason@redhat.com>
1986         PR c++/51930
1987         * decl2.c (determine_visibility): Correct calculation of class
1988         args depth.
1989         * decl.c (check_tag_decl): Adjust warning.
1991         * method.c (synthesized_method_walk): Cleanups don't affect the EH
1992         spec either.
1994 2012-03-03  Jason Merrill  <jason@redhat.com>
1996         * init.c (perform_member_init): Cope with uninstantiated NSDMI.
1998         Core 1270
1999         * call.c (build_aggr_conv): Call reshape_init.
2000         (convert_like_real): Likewise.
2001         * typeck2.c (process_init_constructor): Clear TREE_CONSTANT if
2002         not all constant.
2004         * mangle.c (write_nested_name): Use decl_mangling_context.
2005         (write_prefix, write_template_prefix): Likewise.
2007         PR c++/36797
2008         * mangle.c (write_expression): Improve diagnostic for TRAIT_EXPR.
2010         * class.c (add_method): Always build an OVERLOAD for using-decls.
2011         * search.c (lookup_member): Handle getting an OVERLOAD for a
2012         single function.
2014 2012-03-02  Paolo Carlini  <paolo.carlini@oracle.com>
2016         PR c++/51989
2017         * typeck2.c (build_x_arrow): Take a tsubst_flags_t argument and
2018         propagate it.
2019         * cp-tree.h (build_x_arrow): Adjust prototype.
2020         * pt.c (tsubst_copy_and_build): Adjust call.
2021         * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
2023 2012-03-02  Paolo Carlini  <paolo.carlini@oracle.com>
2025         * name-lookup.c (binding_to_template_parms_of_scope_p): Clean up.
2027 2012-02-29  Jason Merrill  <jason@redhat.com>
2029         PR c++/51930
2030         * decl.c (check_tag_decl): Move warning for misplaced attributes here.
2031         (shadow_tag): From here.
2032         * parser.c (cp_parser_explicit_instantiation): Don't warn here.
2034 2012-02-21  Jakub Jelinek  <jakub@redhat.com>
2036         PR c++/52312
2037         * typeck.c (check_literal_operator_args): Initialize *long_double_p
2038         and *long_long_unsigned_p even if processing_template_decl.
2040 2012-02-16  Jason Merrill  <jason@redhat.com>
2042         PR c++/52248
2043         * decl.c (define_label): Use timevar_cond_start/stop.
2045 2012-02-16  Fabien ChĂȘne  <fabien@gcc.gnu.org>
2047         PR c++/52126
2048         * decl.c (xref_basetypes): call dependent_scope_p instead of
2049         dependent_type_p.
2051 2012-02-16  Jason Merrill  <jason@redhat.com>
2053         PR c++/51415
2054         * error.c (dump_expr): Handle lambda closures specifically.
2056 2012-02-14  Jason Merrill  <jason@redhat.com>
2058         * parser.c (cp_parser_explicit_instantiation): Give a warning
2059         for ignored attributes on explicit class instantiation.
2061 2012-02-14  Jakub Jelinek  <jakub@redhat.com>
2063         PR c++/52247
2064         * pt.c (tsubst_copy_asm_operands): For LABEL_DECL values call
2065         lookup_label on label's name and set TREE_USED.
2067 2012-02-14  Jason Merrill  <jason@redhat.com>
2069         PR c++/39055
2070         * decl.c (local_variable_p_walkfn): Don't check DECL_ARTIFICIAL.
2072 2012-02-14  Jakub Jelinek  <jakub@redhat.com>
2074         PR c/52181
2075         * decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than
2076         newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits.
2078 2012-02-07  Jason Merrill  <jason@redhat.com>
2080         PR c++/51675
2081         * semantics.c (cx_check_missing_mem_inits): Handle unions.
2082         Fix constexpr default constructor logic.
2084         PR c++/52035
2085         * pt.c (tsubst): Strip uninstantiated typedef.
2087 2012-02-06  Jason Merrill  <jason@redhat.com>
2089         PR c++/52088
2090         * cvt.c (build_expr_type_conversion): Check for template conversion.
2092 2012-01-31  Jason Merrill  <jason@redhat.com>
2094         PR c++/52043
2095         * cp-tree.h (PACK_EXPANSION_LOCAL_P): New.
2096         * pt.c (make_pack_expansion, tsubst_initializer_list): Set it.
2097         (tsubst_pack_expansion): Check it.
2099 2012-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
2101         PR c++/51327
2102         * class.c (explain_non_literal_class): Correctly handle implicitly
2103         deleted constructors.
2105 2012-01-27  Jakub Jelinek  <jakub@redhat.com>
2107         PR c++/51852
2108         * pt.c (tsubst_pack_expansion): Delete and restore
2109         local_specialization whenever need_local_specialization, not just
2110         when saved_local_specializations is non-NULL.
2112 2012-01-26  Paolo Carlini  <paolo.carlini@oracle.com>
2114         PR c++/51370
2115         * error.c (dump_decl, [TEMPLATE_ID_EXPR]): Handle error_mark_node
2116         as TREE_OPERAND (t, 1).
2118 2012-01-24  Jason Merrill  <jason@redhat.com>
2120         PR c++/51917
2121         * decl.c (xref_basetypes): Check VEC_length instead of VEC_space.
2123         PR c++/51973
2124         * tree.c (called_fns_equal): Check template args.
2125         (cp_tree_equal): Call it.
2127 2012-01-24  Aldy Hernandez  <aldyh@redhat.com>
2128             Patrick Marlier  <patrick.marlier@gmail.com>
2130         PR c++/51928
2131         * class.c (set_method_tm_attributes): Use TARGET_THUNK instead of
2132         thunk for set_one_vmethod_tm_attributes.
2134 2012-01-24  Paolo Carlini  <paolo.carlini@oracle.com>
2136         PR c++/51223
2137         * call.c (build_over_call): Check for error_mark_node as
2138         TREE_VALUE when default arguments are processed.
2140 2012-01-23  Jason Merrill  <jason@redhat.com>
2142         PR c++/51930
2143         * decl2.c (determine_visibility): Check for visibility attribute
2144         on template specialization.
2146 2012-01-23  Paolo Carlini  <paolo.carlini@oracle.com>
2148         PR c++/51398
2149         * pt.c (parameter_of_template_p): Skip error_mark_node parameters.
2151 2012-01-23  Jason Merrill  <jason@redhat.com>
2153         PR c++/51925
2154         * class.c (add_method): Set OVL_USED for using-decls.
2155         * tree.c (ovl_scope): New.
2156         * cp-tree.h: Declare it.
2157         * parser.c (cp_parser_template_name): Use it.
2158         * semantics.c (baselink_for_fns): Likewise.
2159         * name-lookup.c (set_inherited_value_binding_p): Likewise.
2161 2012-01-20  Paolo Carlini  <paolo.carlini@oracle.com>
2163         PR c++/51402
2164         * pt.c (lookup_template_class_1): Check context returned by
2165         tsubst for error_mark_node.
2167 2012-01-19  Kai Tietz  <ktietz@redhat.com>
2169         PR c++/51344
2170         * decl2.c (save_template_attributes): Use merge_attributes
2171         instead of chaining up via TREE_CHAIN.
2173 2012-01-19  Jason Merrill  <jason@redhat.com>
2175         PR c++/51889
2176         * class.c (finish_struct): Call add_method here for function usings.
2177         * semantics.c (finish_member_declaration): Not here.
2179 2012-01-18  Paolo Carlini  <paolo.carlini@oracle.com>
2181         PR c++/51225
2182         * typeck2.c (store_init_value): Within a template guard
2183         cxx_constant_value with require_potential_constant_expression.
2184         * pt.c (convert_nontype_argument): Likewise.
2186 2012-01-16  Jakub Jelinek  <jakub@redhat.com>
2188         PR c++/51854
2189         * mangle.c (write_template_arg_literal): Handle complex.
2191 2012-01-16  Jason Merrill  <jason@redhat.com>
2193         PR c++/51827
2194         * mangle.c (mangle_decl): Don't mangle uninstantiated templates.
2196         PR c++/51868
2197         * typeck.c (build_static_cast_1): Handle bit-fields properly.
2199 2012-01-13  Ian Lance Taylor  <iant@google.com>
2201         PR c++/50012
2202         * typeck.c (enum_cast_to_int): New static function.
2203         (cp_build_binary_op): When handling warn_sign_compare, don't test
2204         for TREE_NO_WARNING.  Do call enum_cast_to_int.
2205         * call.c (avoid_sign_compare_warnings): Remove static function.
2206         (build_new_op_1): Don't call avoid_sign_compare_warnings.
2208 2012-01-13  Steven Bosscher  <steven@gcc.gnu.org>
2210         * decl2.c: Do not include tree-mudflap.h
2211         * semantics.c: Likewise.
2213 2012-01-13  Jason Merrill  <jason@redhat.com>
2215         PR c++/20681
2216         * semantics.c (finish_break_stmt): Avoid adding an unreachable
2217         BREAK_STMT.
2219         PR c++/51813
2220         * decl2.c (constrain_visibility): Clear DECL_VISIBILITY_SPECIFIED
2221         when reducing the visibility.
2223         PR c++/51620
2224         * class.c (build_vtbl_initializer): Use __cxa_deleted_virtual.
2226 2012-01-12  Jason Merrill  <jason@redhat.com>
2228         PR c++/51714
2229         * pt.c (value_dependent_expression_p): Treat STMT_EXPR as
2230         value-dependent.
2232 2012-01-13  Dodji Seketeli  <dodji@redhat.com>
2234         PR c++/51633
2235         * semantics.c (cp_parser_ctor_initializer_opt_and_function_body):
2236         Set the pointer to the last block of the constructor to the
2237         current statement.
2238         (build_constexpr_constructor_member_initializers): Get
2239         build_data_member_initialization a chance to deal with more
2240         statements before we choke.
2242 2012-01-12  Jason Merrill  <jason@redhat.com>
2244         PR c++/48051
2245         * mangle.c (write_expression): Mangle BASELINK scope if
2246         BASELINK_QUALIFIED_P.
2247         * search.c (adjust_result_of_qualified_name_lookup): Set
2248         BASELINK_QUALIFIED_P.
2249         * tree.c (cp_tree_equal) [BASELINK]: Compare BASELINK_QUALIFIED_P.
2250         * parser.c (cp_parser_postfix_dot_deref_expression): Don't call
2251         adjust_result_of_qualified_name_lookup for non-qualified names.
2253         PR c++/51403
2254         * pt.c (unify): Handle error_mark_node.
2256 2012-01-11  Jason Merrill  <jason@redhat.com>
2258         PR c++/51565
2259         * call.c (standard_conversion): For ptrmemfuncs, compare the
2260         static_fn_types.
2262         PR c++/51818
2263         * mangle.c (find_substitution): A type is only a substitution
2264         match if we're looking for a type.
2265         (write_nested_name): Use decl_mangling_context.
2267         * decl.c (decls_match): Assert that the arguments are decls.
2269         PR c++/51613
2270         * pt.c (resolve_overloaded_unification): Compare types with
2271         same_type_p, not decls_match.
2273 2012-01-10  Jason Merrill  <jason@redhat.com>
2275         PR c++/51614
2276         * class.c (build_base_path): Diagnose ambiguous base.
2278         PR c++/51433
2279         * semantics.c (cxx_eval_call_expression): Always retry previously
2280         non-constant expressions.
2282 2012-01-06  Jason Merrill  <jason@redhat.com>
2284         DR 686
2285         PR c++/47450
2286         * parser.c (cp_parser_new_expression): Set
2287         type_definition_forbidden_message.
2289         PR c++/6057
2290         PR c++/48051
2291         PR c++/50855
2292         PR c++/51322
2293         * mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR,
2294         THROW_EXPR, CONSTRUCTOR, OVERLOAD.  Fix PREINCREMENT_EXPR and
2295         PREDECREMENT_EXPR.
2296         (write_template_arg): Fix mangling of class-scope functions and
2297         argument packs.
2298         (mangle_decl): Update suggested -fabi-version argument.
2299         * operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR,
2300         DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR.
2301         * tree.c (dependent_name): No longer static.
2302         * cp-tree.h: Declare it.
2303         * pt.c (unify): Defer handling of unconverted functions.
2305         * mangle.c (mangle_decl): Don't generate mangling aliases
2306         for maybe-in-charge [cd]tors.
2308         * error.c (dump_expr): Print type of CONSTRUCTOR.
2310 2012-01-05  Dodji Seketeli  <dodji@redhat.com>
2312         PR c++/51541
2313         * parser.c (cp_parser_alias_declaration): Get out early upon
2314         errors in the identifier or the attributes.
2316 2012-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
2318         PR c++/51064
2319         * pt.c (tsubst_copy_and_build): Maybe set TREE_NO_WARNING on
2320         the tree returned by build_x_binary_op.
2322 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
2324         PR c++/51738
2325         * parser.c (cp_parser_postfix_open_square_expression): Handle
2326         postfix-expression [ braced-init-list ].
2328 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
2330         PR c++/29273
2331         * rtti.c (build_dynamic_cast_1): In case of T a pointer type,
2332         call decay_conversion on v.
2334 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
2336         PR c++/15867
2337         * decl.c (duplicate_decls): With -Wredundant-decls don't warn for
2338         declaration followed by specialization.
2340 2012-01-03  Jakub Jelinek  <jakub@redhat.com>
2342         PR c++/51669
2343         * semantics.c (finish_omp_clauses): Call fold_build_cleanup_point_expr
2344         on OMP_CLAUSE_{IF,FINAL,NUM_THREADS,SCHEDULE_CHUNK}_EXPR.
2346 2012-01-02  Jason Merrill  <jason@redhat.com>
2348         DR 1359
2349         PR c++/51675
2350         * method.c (walk_field_subobs): Don't check for uninitialized
2351         fields in a union.
2352         (synthesized_method_walk): Check here.
2354         DR 325
2355         PR c++/51666
2356         * parser.c (cp_parser_cache_defarg): Split out...
2357         (cp_parser_parameter_declaration): ...from here.
2358         (cp_parser_save_nsdmi): Use it.
2359         (cp_parser_cache_group): Remove CPP_COMMA support.
2361 2012-01-02  Dodji Seketeli  <dodji@redhat.com>
2363         PR c++/51462
2364         * semantics.c (cx_check_missing_mem_inits): Don't assert in case
2365         of error.
2367 2012-01-02  Paolo Carlini  <paolo.carlini@oracle.com>
2369         PR c++/20140
2370         * typeck2.c (digest_init_r): Use copy_init when initializing
2371         an array of chars.
2373 2012-01-01  Paolo Carlini  <paolo.carlini@oracle.com>
2375         PR c++/16603
2376         * decl.c (build_enumerator): Don't call perform_integral_promotions
2377         on the value.
2379 2012-01-01  Paolo Carlini  <paolo.carlini@oracle.com>
2381         PR c++/51379
2382         * typeck.c (build_reinterpret_cast_1): Implement resolution of
2383         DR 799.
2385 2012-01-01  Fabien ChĂȘne  <fabien@gcc.gnu.org>
2387         * parser.c (cp_parser_using_declaration): Add a warning about
2388         deprecated access declarations when no errors were encountered
2389         while parsing the access declaration. Save the first token in
2390         order to emit the warning at the right place.
2392 Copyright (C) 2012 Free Software Foundation, Inc.
2394 Copying and distribution of this file, with or without modification,
2395 are permitted in any medium without royalty provided the copyright
2396 notice and this notice are preserved.