* config/avr/avr.md: Fix indentations of insn C snippets.
[official-gcc.git] / gcc / cp / ChangeLog
blobfe72a9ca7e4d97d01ac974717266e2116adfb97e
1 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
2         
3         * decl2.c (cp_write_global_declarations): Fix handling of
4         -fdump-ada-spec*.
6 2012-10-03  Jakub Jelinek  <jakub@redhat.com>
8         PR c++/54777
9         * semantics.c (cxx_eval_constant_expression) <case COMPOUND_EXPR>: If
10         not ignoring the second operand, pass the original second operand
11         and not one with stripped nops to cxx_eval_constant_expression.
13 2012-10-01  Jason Merrill  <jason@redhat.com>
15         * decl.c (check_initializer): Set DECL_NONTRIVIALLY_INITIALIZED_P
16         for a constructor call.
17         (decl_jump_unsafe): So don't bother checking
18         type_has_nontrivial_default_init.
19         * call.c (set_up_extended_ref_temp): Set
20         DECL_NONTRIVIALLY_INITIALIZED_P.
22         * cp-tree.h (TYPE_FUNCTION_OR_TEMPLATE_DECL_CHECK): New.
23         (DECL_FRIEND_P, DECL_ANTICIPATED): Use it.
24         (TYPE_FUNCTION_OR_TEMPLATE_DECL_P): New.
25         * name-lookup.c (hidden_name_p): Use it.
27         * cp-tree.h (DECL_PRETTY_FUNCTION_P): Just look at the name.
28         * decl.c (cp_make_fname_decl): Adjust.
30 2012-09-30  Sharad Singhai  <singhai@google.com>
32         * decl2.c (cp_write_global_declarations): Use a different method
33         to determine if the dump has ben initialized.
35 2012-09-29  Paolo Carlini  <paolo.carlini@oracle.com>
37         PR c++/54738
38         * decl2.c (build_offset_ref_call_from_tree): Add tsubst_flags_t
39         parameter.
40         * pt.c (tsubst_copy_and_build): Adjust.
41         * parser.c (cp_parser_postfix_expression): Likewise.
42         * cp-tree.h: Adjust declaration.
44 2012-09-28  Dodji Seketeli  <dodji@redhat.com>
46         PR c++/54372 - unused attribute inactive on dependant entities
47         * decl2.c (is_late_template_attribute): "unused" attribute is to
48         be applied at compile time.
50 2012-09-25  Dodji Seketeli  <dodji@redhat.com>
52         PR c++/29028 - Missed unused warning on using declaration
53         * decl.c (poplevel<warn_unused*>): Do not forget that some local
54         bindings are represented by a TREE_LIST.
56 2012-09-25  Dodji Seketeli  <dodji@redhat.com>
58         PR c++/53551 - -Wunused-local-typedefs misses uses
59         * decl.c (make_typename_type): Record the use of typedefs.
61 2012-09-27  Jakub Jelinek  <jakub@redhat.com>
63         * init.c (build_new_1): Don't test TREE_CONSTANT
64         of INTEGER_CST.
66 2012-09-25  Paolo Carlini  <paolo.carlini@oracle.com>
68         PR c++/54526
69         * parser.c (cp_parser_template_id): In C++11 mode simply accept
70         X<::A>.
72 2012-09-25  Zhenqiang Chen <zhenqiang.chen@linaro.org>
74         PR c++/50970
75         * typeck.c (cp_build_binary_op): Check side effects before generating
76         pfn and delta related expressions.
78 2012-09-24  Lawrence Crowl  <crowl@google.com>
80         * init.c (build_new_1): Change to new double_int API.
81         * decl.c (build_enumerator): Likewise.
82         * typeck2.c (process_init_constructor_array): Likewise.
83         * mangle.c (write_array_type): Likewise.
85 2012-09-24  Paolo Carlini  <paolo.carlini@oracle.com>
87         PR c++/50828
88         * error.c (dump_function_decl): Strip TFF_TEMPLATE_NAME from flags
89         at the outset.
91 2012-09-24  Jason Merrill  <jason@redhat.com>
93         * decl.c (get_atexit_node): Remove dead code.
95         * Make-lang.in (cp/parser.o): Depend on decl.h.
97 2012-09-20  Paolo Carlini  <paolo.carlini@oracle.com>
99         PR c++/52432
100         * pt.c (tsubst_copy_and_build): If tf_error is not set in the complain
101         argument don't call unqualified_name_lookup_error.
103 2012-09-19  Marc Glisse  <marc.glisse@inria.fr>
105         PR c++/54581
106         * semantics.c (finish_decltype_type): Make vectors not opaque.
108 2012-09-17  Jason Merrill  <jason@redhat.com>
110         PR c++/54575
111         * pt.c (instantiate_alias_template): New.
112         (tsubst): Use it.
113         (push_access_scope): Allow TYPE_DECL.
115 2012-09-14  Jason Merrill  <jason@redhat.com>
117         PR c++/53661
118         * typeck2.c (check_narrowing): Avoid false positives on conversion
119         from enumeral type.
121 2012-09-14  Marc Glisse  <marc.glisse@inria.fr>
123         PR c++/54427
124         * typeck.c (cp_build_binary_op) [LSHIFT_EXPR, RSHIFT_EXPR, EQ_EXPR,
125         NE_EXPR, LE_EXPR, GE_EXPR, LT_EXPR, GT_EXPR]: Handle VECTOR_TYPE.
127 2012-09-14  Paolo Carlini  <paolo.carlini@oracle.com>
129         * decl.c (make_typename_type): Only error out if tf_error is set
130         in complain.
132 2012-09-13  Paolo Carlini  <paolo.carlini@oracle.com>
133             Manuel López-Ibáñez  <manu@gcc.gnu.org>
135         PR c++/53210
136         * init.c (perform_member_init): Use OPT_Winit_self instead of
137         OPT_Wuninitialized.
139 2012-09-13  Paolo Carlini  <paolo.carlini@oracle.com>
141         * typeck.c (build_indirect_ref, build_function_call,
142         build_function_call_vec, build_binary_op, build_unary_op,
143         build_compound_expr, build_c_cast, build_modify_expr): Remove
144         uses of ATTRIBUTE_UNUSED on the parameters.
145         * class.c (set_linkage_according_to_type, resort_type_method_vec,
146         dfs_find_final_overrider_post, empty_base_at_nonzero_offset_p):
147         Likewise.
148         * decl.c (local_variable_p_walkfn): Likewise.
149         * except.c (wrap_cleanups_r, check_noexcept_r): Likewise.
150         * error.c (find_typenames_r): Likewise.
151         * tree.c (verify_stmt_tree_r, bot_replace,
152         handle_java_interface_attribute, handle_com_interface_attribute,
153         handle_init_priority_attribute, c_register_addr_space): Likewise.
154         * cp-gimplify.c (cxx_omp_clause_default_ctor): Likewise.
155         * cp-lang.c (objcp_tsubst_copy_and_build): Likewise.
156         * pt.c (unify_success, unify_invalid, instantiation_dependent_r):
157         Likewise.
158         * semantics.c (dfs_calculate_bases_pre): Likewise.
159         * decl2.c (fix_temporary_vars_context_r, clear_decl_external):
160         Likewise.
161         * parser.c (cp_lexer_token_at, cp_parser_omp_clause_mergeable,
162         cp_parser_omp_clause_nowait, cp_parser_omp_clause_ordered,
163         cp_parser_omp_clause_untied): Likewise.
164         * mangle.c (write_unnamed_type_name,
165         discriminator_for_string_literal): Likewise.
166         * search.c (dfs_accessible_post, dfs_debug_mark): Likewise.
167         * lex.c (handle_pragma_vtable, handle_pragma_unit,
168         handle_pragma_interface, handle_pragma_implementation,
169         handle_pragma_java_exceptions): Likewise.
171 2012-09-13  Jason Merrill  <jason@redhat.com>
173         PR c++/53839
174         * semantics.c (cxx_eval_indirect_ref): If we aren't looking for an
175         address, make sure the value is constant.
177         PR c++/54511
178         * pt.c (tsubst_decl) [VAR_DECL]: Handle DECL_ANON_UNION_VAR_P.
180         PR c++/53836
181         * pt.c (value_dependent_expression_p): A TREE_LIST initializer must
182         be dependent.
184 2012-09-10  Paolo Carlini  <paolo.carlini@oracle.com>
186         PR c++/54541
187         PR c++/54542
188         * call.c (build_cxx_call): Add tsubst_flags_t parameter, use
189         require_complete_type_sfinae.
190         (build_op_delete_call, build_over_call): Adjust.
191         * typeck.c (build_x_compound_expr_from_vec): Add tsubst_flags_t
192         parameter.
193         (cp_build_function_call_vec): Adjust.
194         * init.c (build_new_1): Likewise.
195         * rtti.c (throw_bad_cast, throw_bad_typeid, build_dynamic_cast_1):
196         Likewise.
197         * optimize.c (build_delete_destructor_body): Likewise.
198         * cp-tree.h: Adjust declarations.
200         * call.c (convert_arg_to_ellipsis): Use require_complete_type_sfinae.
202 2012-09-10  Jason Merrill  <jason@redhat.com>
204         PR c++/54538
205         PR c++/53783
206         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Go back to using RECUR
207         for LAMBDA_EXPR_EXTRA_SCOPE except for function scope.
209         PR c++/54506
210         * decl.c (move_signature_fn_p): Split out from move_fn_p.
211         * method.c (process_subob_fn): Use it.
212         * cp-tree.h: Declare it.
214 2012-09-07  Jason Merrill  <jason@redhat.com>
216         * semantics.c (sort_constexpr_mem_initializers): Tweak.
218 2012-09-09  Mark Kettenis  <kettenis@openbsd.org>
220         * decl.c (reshape_init_class): Avoid dereferencing a
221         past-the-end pointer.
223 2012-09-07  Paolo Carlini  <paolo.carlini@oracle.com>
225         * pt.c (num_template_headers_for_class): Rework per the code
226         inline in cp_parser_check_declarator_template_parameters.
227         * parser.c (cp_parser_check_declarator_template_parameters):
228         Use num_template_headers_for_class.
230 2012-09-06  Jason Merrill  <jason@redhat.com>
232         PR c++/54341
233         PR c++/54253
234         * semantics.c (sort_constexpr_mem_initializers): New.
235         (build_constexpr_constructor_member_initializers): Use it.
236         (cx_check_missing_mem_inits): Skip artificial fields.
237         * init.c (expand_aggr_init_1): Don't zero out a class
238         with no data.
240 2012-09-05  Paolo Carlini  <paolo.carlini@oracle.com>
242         PR c++/54191
243         * search.c (lookup_base): Add tsubst_flags_t parameter.
244         (adjust_result_of_qualified_name_lookup, check_final_overrider):
245         Adjust.
246         * name-lookup.c (do_class_using_decl): Adjust.
247         * typeck2.c (binfo_or_else, build_scoped_ref, build_m_component_ref):
248         Likewise.
249         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
250         build_up_reference): Likewise.
251         * rtti.c (build_dynamic_cast_1): Likewise.
252         * tree.c (maybe_dummy_object): Likewise.
253         * call.c (build_conditional_expr_1, build_over_call): Likewise.
254         * cp-tree.h (UNIQUELY_DERIVED_FROM_P, PUBLICLY_UNIQUELY_DERIVED_P):
255         Remove.
256         (enum base_access_flags, ba_quiet): Remove.
257         (uniquely_derived_from_p, publicly_uniquely_derived_p): Declare.
258         * except.c (can_convert_eh): Adjust.
259         * decl.c (grokdeclarator): Likewise.
260         * typeck.c (comp_except_types, build_class_member_access_expr,
261         finish_class_member_access_expr, get_member_function_from_ptrfunc,
262         build_static_cast_1, get_delta_difference_1): Likewise.
263         * class.c (build_base_path, convert_to_base, build_vtbl_ref_1,
264         warn_about_ambiguous_bases): Likewise.
265         (uniquely_derived_from_p, publicly_uniquely_derived_p): Define.
267 2012-09-04  Jason Merrill  <jason@redhat.com>
269         PR c++/54441
270         * decl.c (reshape_init_class): Handle invalid initializer for
271         0-length array member.
273         * error.c (dump_type_suffix): Correct handling of 0-length arrays.
275         PR c++/54420
276         * cp-tree.h (LAMBDANAME_P): Remove.
277         (LAMBDA_TYPE_P): Check CLASSTYPE_LAMBDA_EXPR instead.
278         * cp-lang.c (cxx_dwarf_name): Likewise.
279         * error.c (dump_aggr_type): Likewise.
280         * semantics.c (begin_lambda_type): Set CLASSTYPE_LAMBDA_EXPR sooner.
282         PR c++/54198
283         * decl.c (check_default_argument): Set cp_unevaluated_operand
284         around call to perform_implicit_conversion_flags.
286         PR c++/54437
287         PR c++/51213
288         * pt.c (fn_type_unification): Call coerce_template_parms before
289         entering substitution context.
291 2012-08-31  Paolo Carlini  <paolo.carlini@oracle.com>
292             Jason Merrill  <jason@redhat.com>
294         PR c++/18747
295         * pt.c (check_template_variable): New.
296         (num_template_headers_for_class): Split out...
297         * decl.c (grokdeclarator): ...from here.
298         (start_decl): Remove redundant diagnostic.
299         * cp-tree.h: Declare them
300         * parser.c (cp_parser_single_declaration): Call check_template_variable.
302 2012-08-31  Ollie Wild  <aaw@google.com>
304         PR c++/54197
305         * call.c (extend_ref_init_temps_1): Handle COMPOUND_EXPR trees.
307 2012-08-30  Jason Merrill  <jason@redhat.com>
309         PR c++/50545
310         PR c++/51222
311         * pt.c (instantiation_dependent_r): New.
312         (instantiation_dependent_expression_p): New.
313         (value_dependent_expression_p): Use it.  SCOPE_REF is always dependent.
314         * semantics.c (finish_decltype_type): Use it.
315         * cp-tree.h: Declare it.
317         * semantics.c (finish_qualified_id_expr): Handle building up a
318         non-dependent SCOPE_REF here.
319         (finish_id_expression): Not here.
320         * error.c (dump_decl) [SCOPE_REF]: Only pass TFF_UNQUALIFIED_NAME.
322         * friend.c (make_friend_class): Handle template template parameters.
323         * parser.c (cp_parser_template_declaration_after_export): Likewise.
324         * pt.c (tsubst_friend_class): Likewise.
325         (instantiate_class_template_1): Likewise
326         * decl.c (check_elaborated_type_specifier): Likewise.
327         (lookup_and_check_tag): Likewise.
329         * pt.c (get_class_bindings): Call coerce_template_parms.  Add
330         main_tmpl parameter.
331         (more_specialized_class): Add main_tmpl parameter.
332         (most_specialized_class): Adjust calls.
334         * decl.c (cp_finish_decl): Check for invalid multiple initializers
335         even if the initializer is dependent.
337         * pt.c (instantiate_template_1): Keep processing_template_decl set
338         if there are dependent args.
340 2012-08-25  Paolo Carlini  <paolo.carlini@oracle.com>
342         PR c++/51421
343         * decl2.c (mark_used): Consistently return false after errors
344         about uses before deduction of auto.
345         * semantics.c (finish_id_expression): Check mark_used return
346         value and return error_mark_node in case of failure.
348 2012-08-24  Jason Merrill  <jason@redhat.com>
350         PR c++/51213 (again)
351         * pt.c (deduction_tsubst_fntype): Remove.
352         (fn_type_unification): Check deduction depth and call
353         instantiate_template here.  Handle default argument access checks.
354         (determine_specialization): Suppress access control.
355         (tsubst_decl): Check for excessive deduction depth.
356         (recheck_decl_substitution): Make sure access control is on.
357         (type_unification_real): Don't mess with access deferring here.
358         (get_bindings): Adjust for fn_type_unification return type.
359         * call.c (enum rejection_reason_code): Drop rr_template_instantiation.
360         (template_instantiation_rejection): Remove.
361         (struct rejection_reason): Change targs to num_targs.
362         (template_unification_rejection, print_z_candidate): Adjust.
363         (add_template_candidate_real): Adjust for fn_type_unification change.
364         * class.c (resolve_address_of_overloaded_function): Likewise.
365         * cp-tree.h: Adjust declaration.
367         * pt.c (tsubst_default_argument): Indicate where the default
368         argument is being instantiated for.
369         (tsubst_expr): Restore previous location.
370         (tsubst_copy_and_build): Set and restore location.
371         * call.c (build_new_method_call_1): Remember location of call.
372         * semantics.c (finish_call_expr): Here too.
373         * parser.c (cp_parser_omp_for_loop): Remember the location of the
374         increment expression.
376         * pt.c (resolve_overloaded_unification): Use coerce_template_parms
377         instead of get_bindings.
378         (resolve_nondeduced_context): Likewise.
380         * pt.c (register_specialization): Correct argument to
381         check_specialization_namespace.
382         (determine_specialization): Don't consider members of
383         unspecialized types.
385 2012-08-23  Jason Merrill  <jason@redhat.com>
387         * decl.c (compute_array_index_type): Use type_dependent_expression_p.
389 2012-08-23  Paolo Carlini  <paolo.carlini@oracle.com>
391         PR c++/20420
392         * name-lookup.c (supplement_binding_1): Handle specially enums
393         only in class templates.
394         (validate_nonmember_using_decl): Enforce 7.3.3/10 about duplicate
395         using declarations at function scope.
397 2012-08-21  Richard Guenther  <rguenther@suse.de>
399         * cp-tree.h (TREE_INDIRECT_USING): Use TREE_LANG_FLAG_0 accessor.
400         (ATTR_IS_DEPENDENT): Likewise.
401         (ARGUMENT_PACK_INCOMPLETE_P): Use TREE_ADDRESSABLE instead of
402         TREE_LANG_FLAG_0 on TREE_VECs.
404 2012-08-20  Florian Weimer  <fweimer@redhat.com>
406         PR c++/19351
407         * call.c (build_operator_new_call): Add size_check argument and
408         evaluate it.
409         * cp-tree.h (build_operator_new_call): Adjust declaration.
410         * init.c (build_new_1): Compute array size check and apply it.
412 2012-08-20  Paolo Carlini  <paolo.carlini@oracle.com>
414         PR c++/10416
415         * decl.c (poplevel): Check TYPE_HAS_NONTRIVIAL_DESTRUCTOR for
416         Wunused_variable too.
418 2012-08-20  Diego Novillo  <dnovillo@google.com>
420         * decl.c (poplevel): Start TV_NAME_LOOKUP conditionally.
422 2012-08-20  Richard Guenther  <rguenther@suse.de>
424         * name-lookup.c (store_binding_p): New predicate, split out from ...
425         (store_binding): ... here.  Always store binding and require
426         target vector with enough space.
427         (store_bindings): Collect to store bindings and reserve space
428         for them, then store them.
429         (store_class_bindings): Likewise.
431 2012-08-19  Mikael Morin  <mikael@gcc.gnu.org>
433         * Make-lang.in: Fix typo.
435 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
437         * cp-tree.def (SIZEOF_EXPR): Move to c-common.def.
439 2012-08-14   Diego Novillo  <dnovillo@google.com>
441         Merge from cxx-conversion branch.  Re-write VEC in C++.
443         * call.c (add_function_candidate): Remove const qualifier
444         from call to VEC_index.
446 2012-08-10  Richard Guenther  <rguenther@suse.de>
448         * error.c (dump_expr): Handle anonymous SSA names.
450 2012-08-07  Steven Bosscher  <steven@gcc.gnu.org>
452         * error.c (print_instantiation_context): Pretty-print a newline before
453         diagnostic_flush_buffer.
454         * cxx-pretty-print.c (pp_cxx_function_definition): Use
455         pp_newline_and_flush instead of separate pp_newline and pp_flush.
457 2012-08-06  Dodji Seketeli  <dodji@redhat.com>
459         Avoid crashing on erroneous static_assert usage
460         * semantics.c (finish_static_assert): Don't crash on erroneous
461         message or condition.
463 2012-08-06  Marc Glisse  <marc.glisse@inria.fr>
464             Paolo Carlini  <paolo.carlini@oracle.com>
466         PR c++/54165
467         * typeck.c (build_static_cast_1): Move the conversion to void case
468         before the perform_direct_initialization_if_possible call.
470 2012-08-03  Marc Glisse  <marc.glisse@inria.fr>
472         * pt.c (tsubst_copy_and_build): Handle VECTOR_TYPE like scalars.
473         * cp-tree.h (scalarish_type_p): Declare.
474         * tree.c (scalarish_type_p): Make non-static.
476 2012-08-02  Jason Merrill  <jason@redhat.com>
477             Paolo Carlini  <paolo.carlini@oracle.com>
479         PR c++/51213 (again)
480         * pt.c (type_unification_real): Call push_deferring_access_checks /
481         pop_deferring_access_checks around the substitution of default
482         template args.
483         (instantiate_template_1): When the specialization returned by
484         retrieve_specialization has FNDECL_HAS_ACCESS_ERRORS set and we
485         are in a SFINAE context, simply return error_mark_node.
486         * cp-tree.h (FNDECL_RECHECK_ACCESS_P): Rename FNDECL_HAS_ACCESS_ERRORS.
488 2012-07-31  Paolo Carlini  <paolo.carlini@oracle.com>
490         * pt.c (check_default_tmpl_args): Change is_primary and is_partial
491         parameters to bool type, adjust.
492         (push_template_decl_real): Tidy.
493         * parser.c (cp_parser_init_declarator): Adjust.
494         * decl.c (redeclaration_error_message): Likewise.
495         * cp-tree.h (check_default_tmpl_args): Update prototype.
497 2012-07-31  Paolo Carlini  <paolo.carlini@oracle.com>
499         PR c++/53624
500         * pt.c (check_default_tmpl_args): Don't check local types.
502 2012-07-25  Sandra Loosemore  <sandra@codesourcery.com>
503             Paul Brook  <paul@codesourcery.com>
505         PR target/53633
506         * decl.c (finish_function): Check targetm.warn_func_return.
508 2012-07-25  Jason Merrill  <jason@redhat.com>
510         PR c++/54086
511         * decl.c (grokdeclarator): Allow const and constexpr together.
513         PR c++/54020
514         * semantics.c (potential_constant_expression_1) [COND_EXPR]: Call
515         maybe_constant_value.
517         * cp-tree.h (tsubst_flags): Remove tf_no_access_control.
518         * call.c (standard_conversion): Don't set it.
519         * class.c (resolve_address_of_overloaded_function): Don't check it.
520         * decl.c (check_default_argument): Call
521         perform_implicit_conversion_flags.
523         * pt.c (print_candidates_1): Use inform instead of error.
525 2012-07-24  Paolo Carlini  <paolo.carlini@oracle.com>
527         * pt.c (convert_template_argument, tsubst): Simplify fourth argument
528         to make_typename_type (complain & tf_error -> complain).
530 2012-07-24  Steven Bosscher  <steven@gcc.gnu.org>
532         * class.c (n_vtables, n_vtable_entries, n_vtable_searches,
533         n_vtable_elems, n_convert_harshness, n_compute_conversion_costs,
534         n_inner_fields_searched): Always define.
535         (build_primary_vtable): Convert #ifdef GATHER_STATISTICS to if-code.
536         (print_class_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
537         * tree.c (depth_reached): Always define global.
538         (cxx_print_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
539         * pt.c (depth_reached): Always define.
540         (push_tinst_level): Convert #ifdef GATHER_STATISTICS to if-code.
541         * search.c (n_fields_searched, n_calls_lookup_field,
542         n_calls_lookup_field_1, n_calls_lookup_fnfields,
543         n_calls_lookup_fnfields_1, n_calls_get_base_type,
544         n_outer_fields_searched, n_contexts_saved): Always define.
545         (lookup_field_1): Convert #ifdef GATHER_STATISTICS to if-code.
546         (lookup_member): Likewise.
547         (lookup_fnfields_idx_nolazy): Likewise.
548         (print_search_statistics): Likewise.
549         (reinit_search_statistics): Unconditionally re-set counters.
550         * lex.c (retrofit_lang_decl): Convert #ifdef GATHER_STATISTICS
551         to if-code.
552         (cxx_dup_lang_specific_decl): Likewise.
553         (copy_lang_type): Likewise.
554         (cxx_make_type): Likewise.
556 2012-07-20  Jason Merrill  <jason@redhat.com>
558         PR c++/54038
559         * tree.c (build_cplus_array_type): Use build_cplus_array_type to build
560         canonical array type rather than mess with its TYPE_*_VARIANT.
562 2012-07-19  Jason Merrill  <jason@redhat.com>
564         PR c++/54026
565         * typeck.c (cp_apply_type_quals_to_decl): Check COMPLETE_TYPE_P.
567         PR c++/54021
568         * call.c (build_cxx_call): Set optimize when folding
569         __builtin_constant_p in a constexpr function.
571 2012-07-18  Jason Merrill  <jason@redhat.com>
573         * pt.c (instantiate_decl): Don't recheck substitutions.
575 2012-07-18  Paolo Carlini  <paolo.carlini@oracle.com>
576             Jason Merrill  <jason@redhat.com>
578         DR 1170
579         PR c++/51213
580         * semantics.c (perform_access_checks): Add complain parm, return bool.
581         (perform_deferred_access_checks): Likewise.
582         (perform_or_defer_access_check): Likewise.
583         (speculative_access_check): Remove.
584         * call.c (enforce_access): Add complain parm, return bool.
585         * decl.c, friend.c, class.c, init.c, parser.c: Adjust callers.
586         * search.c: Adjust callers.
587         * cp-tree.h (TINFO_RECHECK_ACCESS_P): New macro.
588         (FNDECL_RECHECK_ACCESS_P): New macro.
589         * method.c (synthesized_method_walk): Stop deferring access checks.
590         * pt.c (recheck_decl_substitution): New.
591         (instantiate_template_1): Set and check FNDECL_RECHECK_ACCESS_P.
593 2012-07-18  Jason Merrill  <jason@redhat.com>
595         * method.c (process_subob_fn): Make sure no_implicit_p is non-null
596         before trying to store through it.
598 2012-07-17  Jason Merrill  <jason@redhat.com>
600         PR c++/53995
601         * decl.c (finish_enum_value_list): Only call
602         insert_late_enum_def_into_classtype_sorted_fields in class scope.
604         PR c++/53989
605         * tree.c (build_cplus_array_type): Also add TYPE_CANONICAL
606         to the list of variants.
608         * decl.c (xref_basetypes): Complain about incomplete template base.
609         * class.c (finish_struct): Adjust variants in templates, too.
611         PR c++/53549
612         * parser.c (cp_parser_class_head): Call xref_basetypes here.
613         (cp_parser_class_specifier_1): Not here.
614         * pt.c (tsubst_decl) [USING_DECL]: Check uses_template_parms
615         as well as DECL_DEPENDENT_P.
617 2012-07-16  Jason Merrill  <jason@redhat.com>
619         * cp-tree.h (struct deferred_access_check): Add location.
620         * semantics.c (perform_access_checks): Use it.
621         (perform_or_defer_access_check): Store it.
623 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
625         * dump.c (dump_stmt): Moved here from c-dump.c.
626         * optimize.c: Include dumpfile.h instead of tree-dump.h.
627         * class.c: Likewise.
628         * decl2.c: Likewise.
629         * Make-lang.in: Fix dependencies.
631 2012-07-13  Jason Merrill  <jason@redhat.com>
633         PR c++/53953
634         * method.c (synthesized_method_walk): Initialize no_implicit_p sooner.
636 2012-07-12  Jason Merrill  <jason@redhat.com>
638         * pt.c (instantiate_decl): Check typedefs access here.
639         (instantiate_template_1): Not here.
641         * pt.c (deduction_tsubst_fntype): Just suppress access checking.
642         (instantiate_template_1): Set DECL_TI_TEMPLATE before access checking.
643         (push_deduction_access_scope, pop_deduction_access_scope): Remove.
645 2012-07-11  Jason Merrill  <jason@redhat.com>
647         DR 1402
648         * method.c (synthesized_method_walk): Replace uses of msg with diag.
649         Correct handling of virtual bases with move operations.
650         (process_subob_fn, walk_field_subobs): Replace uses of msg with diag.
652 2012-07-11  Steven Bosscher  <steven@gcc.gnu.org>
654         * method.c: Do not include tree-pass.h.
656 2012-07-10  Jason Merrill  <jason@redhat.com>
658         DR 1402
659         PR c++/53733
660         * cp-tree.h (FNDECL_SUPPRESS_IMPLICIT_DECL): New.
661         (struct lang_decl_fn): Add suppress_implicit_decl field.
662         * method.c (implicitly_declare_fn): Check it.
663         (process_subob_fn): Add no_implicit_p parm.
664         (walk_field_subobs, synthesized_method_walk): Likewise.
665         (maybe_explain_implicit_delete): Adjust.
666         (explain_implicit_non_constexpr): Adjust.
668         * method.c (synthesized_method_walk): Avoid changing
669         EH spec based on cleanups in other places, too.
671 2012-07-09  Sterling Augustine  <saugustine@google.com>
673         * error.c (lang_decl_name): Use TFF_UNQUALIFIED_NAME flag.
675 2012-07-08  Steven Bosscher  <steven@gcc.gnu.org>
677         * decl.c (cp_finish_decl): Add FIXME at add_local_decl call site.
679 2012-07-06  Jason Merrill  <jason@redhat.com>
681         PR c++/53862
682         * pt.c (tsubst_arg_types): Add "end" parameter.
683         (check_undeduced_parms): Use it.
685         * cp-tree.h (DECL_DECLARES_TYPE_P): Check DECL_TYPE_TEMPLATE_P.
687         PR c++/53858
688         * name-lookup.c (ambiguous_decl): Use DECL_TYPE_TEMPLATE_P.
690 2012-07-05  Jason Merrill  <jason@redhat.com>
692         PR c++/53039
693         * pt.c (arg_from_parm_pack_p): Go back to using same_type_p or
694         cp_tree_equal.
696         * cp-tree.h (TEMPLATE_PARM_NUM_SIBLINGS): Remove.
697         (struct template_parm_index_s): Remove num_siblings.
698         * pt.c (fixup_template_parms, fixup_template_parm_index): Remove.
699         (fixup_template_type_parm_type): Remove.
700         (build_template_parm_index): Remove num_siblings parm.
701         (process_template_parm): Likewise.
702         * parser.c (cp_parser_template_parameter_list): Adjust.
703         * tree.c (cp_tree_equal): Don't compare num_siblings.
704         * typeck.c (comp_template_parms_position): Likewise.
706         PR c++/50852
707         PR c++/53039
708         * tree.c (strip_typedefs_expr): New.
709         * cp-tree.h: Declare it.
710         * pt.c (convert_template_argument, unify): Use it.
711         * parser.c (cp_parser_template_declaration_after_export): Don't call
712         fixup_template_parms.
714 2012-07-04  Jason Merrill  <jason@redhat.com>
716         PR c++/53848
717         PR c++/53524
718         * decl.c (build_enumerator): Don't use build_lang_decl_loc.
720 2012-07-03  Jakub Jelinek  <jakub@redhat.com>
722         PR c++/53812
723         * semantics.c (finish_goto_stmt): Surround computed goto argument
724         with CLEANUP_POINT_EXPR if needed.
726 2012-07-02  Jason Merrill  <jason@redhat.com>
728         PR c++/53619
729         * pt.c (in_template_function): New.
730         * cp-tree.h: Declare it.
731         * class.c (build_base_path, resolves_to_fixed_type_p): Use it.
733         PR c++/53783
734         * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Use tsubst
735         for LAMBDA_EXPR_EXTRA_SCOPE.
737         PR c++/53788
738         * pt.c (build_non_dependent_expr): Don't wrap a dummy object.
740         PR c++/53816
741         * class.c (resolves_to_fixed_type_p): Check uses_template_parms
742         (current_function_decl) instead of processing_template_decl.
744         PR c++/53821
745         * semantics.c (maybe_add_lambda_conv_op): Don't set
746         DECL_INTERFACE_KNOWN.
748         PR c++/53524
749         * call.c (build_conditional_expr_1): Don't warn about comparison of
750         two enumerators before their enumeration is complete.
751         (build_new_op_1): Call decay_conversion before warn_logical_operator.
752         * decl.c (build_enumerator): Set DECL_CONTEXT of an enumerator to
753         its enumeration.
754         * decl2.c (mark_used): Call used_types_insert for enums.
755         * semantics.c (finish_id_expression): Don't decay CONST_DECL.
756         (finish_member_declaration): Don't change DECL_CONTEXT of enumerators.
757         * class.c (check_field_decls): Don't change DECL_CONTEXT of enums.
758         * typeck.c (convert_for_assignment): Don't decay CONST_DECL.
759         (build_class_member_access_expr): Look through unscoped enums.
760         * search.c (context_for_name_lookup): Look through unscoped enums.
761         * pt.c (tsubst_copy_and_build): Don't decay CONST_DECL.
762         (tsubst_copy): Use DECL_CONTEXT to find the enumeration.
763         * tree.c (decl_linkage): Likewise.
764         * cvt.c (ocp_convert): Check decayed expr for enum range warning.
766 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
768         * Make-lang.in: Remove tree-mudflap.o from CXX_AND_OBJCXX_OBJS.
770 2012-06-27  Jason Merrill  <jason@redhat.com>
772         * parser.c (cp_parser_check_for_invalid_template_id): tag_type parm.
773         (cp_parser_simple_type_specifier, cp_parser_class_head): Adjust.
774         (cp_parser_elaborated_type_specifier): Adjust.
775         * decl.c (duplicate_decls): Return error_mark_node on template
776         mismatch.
778         PR c++/53563
779         * parser.c (cp_parser_template_id): Add tag_type parm.
780         (cp_parser_template_name): Likewise.
781         (cp_parser_id_expression, cp_parser_unqualified_id): Adjust.
782         (cp_parser_pseudo_destructor_name, cp_parser_type_name): Adjust.
783         (cp_parser_simple_type_specifier, cp_parser_class_name): Adjust.
784         (cp_parser_elaborated_type_specifier, cp_parser_class_head): Adjust.
786 2012-06-27  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
788         PR C++/51033
789         * semantics.c (constexpr_call): Fix typo in comment.
790         (cxx_eval_vec_perm_expr): New.
791         (cxx_eval_constant_expression): Fold VEC_PERM_EXPRs.
793 2012-06-26  Richard Guenther  <rguenther@suse.de>
795         PR c++/53752
796         * mangle.c (write_array_type): Truncate the number-of-elements
797         result.
799 2012-06-25  Jason Merrill  <jason@redhat.com>
801         PR c++/53498
802         PR c++/53305
803         * pt.c (tsubst_decl) [PARM_DECL]: Don't recurse into DECL_CHAIN
804         if cp_unevaluated_operand is set.
805         (tsubst_copy) [PARM_DECL]: Don't copy before tsubsting.
807         PR c++/52988
808         * typeck.c (decay_conversion): Don't discard side-effects from
809         expressions of nullptr_t.
811 2012-06-25  Florian Weimer  <fweimer@redhat.com>
813         * init.c (build_new_1): Warn about (T[N]) for variable N, and
814         reject T[M][N].
816         * parser.c (cp_parser_direct_new_declarator): Accept non-constant
817         expressions.  Handled now in build_new_1.
819 2012-06-25  Jason Merrill  <jason@redhat.com>
821         PR c++/53202
822         * semantics.c (build_data_member_initialization): Always keep
823         initializer for empty base.
824         (cxx_eval_bare_aggregate): Discard it here.
826         PR c++/53565
827         * pt.c (tsubst_omp_for_iterator): Simplify DECL_EXPR handling.
828         (tsubst_expr) [OMP_FOR]: Here, too.
830 2012-06-25  Jakub Jelinek  <jakub@redhat.com>
832         PR c++/53594
833         * class.c (check_bases_and_members): Avoid -Wuninitialized
834         diagnostics for non-static const members or references if they
835         use NSDMI.
837 2012-06-16  Ville Voutilainen  <ville.voutilainen@gmail.com>
839         * parser.c (cp_parser_direct_declarator): Move virt-specifier
840         parsing after late-specified return type parsing.
842 2012-06-14  Jason Merrill  <jason@redhat.com>
844         PR c++/53651
845         * name-lookup.c (constructor_name_p): Don't try to look at the
846         name of a DECLTYPE_TYPE.
848 2012-06-18  Lawrence Crowl  <crowl@google.com>
850         * decl2.c (cp_write_global_declarations): Rename use of TV_PHASE_CGRAPH
851         to TV_PHASE_OPT_GEN.
853 2012-06-18  Steven Bosscher  <steven@gcc.gnu.org>
855         * decl.c (finish_function): Remove code conditional on VMS_TARGET.
857 2012-06-15  Marc Glisse  <marc.glisse@inria.fr>
859         PR c++/51033
860         * semantics.c (literal_type_p): Handle VECTOR_TYPE.
861         (potential_constant_expression_1): Handle VEC_PERM_EXPR.
862         * parser.c (cp_parser_postfix_expression): Handle RID_BUILTIN_SHUFFLE.
864 2012-06-09  Jason Merrill  <jason@redhat.com>
866         * pt.c (tsubst_expr) [TAG_DEFN]: Instantiate local class.
867         * class.c (finish_struct): Don't add a TAG_DEFN for a lambda.
868         * decl2.c (finish_static_data_member_decl): Avoid redundant error.
870         PR c++/53599
871         * name-lookup.c (pushtag_1): Add a DECL_EXPR for a local class.
872         * semantics.c (finish_cond): Build a COMPOUND_EXPR.
873         * pt.c (tsubst_expr) [COMPOUND_EXPR]: Handle.
874         [DECL_EXPR]: Don't call cp_finish_decl for an implicit typedef.
875         Don't return the decl.
877 2012-06-11  Richard Guenther  <rguenther@suse.de>
879         PR c++/53605
880         * mangle.c (write_array_type): Use double-ints for array domain
881         arithmetic.
883 2012-06-07  Fabien Chêne  <fabien@gcc.gnu.org>
885         PR c++/51214
886         * cp-tree.h (insert_late_enum_def_into_classtype_sorted_fields):
887         Declare.
888         * class.c (insert_into_classtype_sorted_fields): New.
889         (add_enum_fields_to_record_type): New.
890         (count_fields): Adjust the comment.
891         (add_fields_to_record_type): Likewise.
892         (finish_struct_1): Move the code that inserts the fields for the
893         sorted case, into insert_into_classtype_sorted_fields, and call
894         it.
895         (insert_late_enum_def_into_classtype_sorted_fields): Define.
896         * decl.c (finish_enum_value_list): Call
897         insert_late_enum_def_into_classtype_sorted_fields if a late enum
898         definition is encountered.
900 2012-06-06  Paolo Carlini  <paolo.carlini@oracle.com>
902         PR c++/53567
903         * typeck.c (cp_perform_integral_promotions): New, like
904         perform_integral_promotions but also takes a tsubst_flags_t parameter.
905         (pointer_diff): Add tsubst_flags_t parameter.
906         (decay_conversion, cp_default_conversion, cp_build_array_ref,
907         cp_build_binary_op, cp_build_unary_op, build_static_cast_1,
908         build_reinterpret_cast_1, cp_build_modify_expr,
909         convert_for_assignment): Adjust.
910         * optimize.c (build_delete_destructor_body): Adjust.
911         * init.c (expand_virtual_init, expand_default_init, build_new_1,
912         build_new, build_vec_delete_1, build_vec_init, build_delete): Adjust.
913         (construct_virtual_base): Adjust LOOKUP_COMPLAIN -> 0.
914         * class.c (build_base_path): Adjust.
915         * decl.c (compute_array_index_type, finish_destructor_body): Likewise.
916         * method.c (synthesized_method_walk): Adjust flag and complain.
917         * rtti.c (ifnonnull): Add tsubst_flags_t parameter.
918         (build_typeid, build_dynamic_cast_1): Adjust.
919         * except.c (initialize_handler_parm): Likewise.
920         * typeck2.c (process_init_constructor_record): Likewise.
921         * pt.c (tsubst_friend_class): Don't change flags.
922         * semantics.c (finish_goto_stmt, handle_omp_for_class_iterator,
923         finish_static_assert): Likewise.
924         * parser.c (cp_parser_lookup_name): Just pass 0 as flags to
925         lookup_name_real.
926         * call.c (build_op_delete_call): Add tsubst_flags_t parameter.
927         (convert_like_real, convert_arg_to_ellipsis, convert_for_arg_passing):
928         Adjust.
929         (standard_conversion): Adjust LOOKUP_COMPLAIN -> 0.
930         (implicit_conversion): Mask out tf_error with a FIXME.
931         (build_user_type_conversion_1, build_new_op_1, build_over_call): Use
932         complain & tf_error instead of flags & LOOKUP_COMPLAIN.
933         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
934         build_up_reference, convert_to_reference, cp_convert,
935         cp_convert_and_check, ocp_convert, convert_force): Add tsubst_flags_t
936         parameter.
937         (convert_to_reference, ocp_convert): Use complain & tf_error instead
938         of flags & LOOKUP_COMPLAIN.
939         (convert_force): Adjust LOOKUP_COMPLAIN -> 0.
940         * name-lookup.c (identifier_type_value_1, lookup_qualified_name,
941         lookup_name_real, lookup_function_nonclass, lookup_name,
942         lookup_name_prefer_type): Adjust LOOKUP_COMPLAIN -> 0.
943         * cp-tree.h: Adjust prototypes; remove LOOKUP_COMPLAIN.
945 2012-06-06  Steven Bosscher  <steven@gcc.gnu.org>
947         * decl.c: Do not include output.h.
948         (start_decl): Remove code for flag_conserve_space.
950 2012-06-06  Fabien Chêne  <fabien@gcc.gnu.org>
952         PR c++/52841
953         * parser.c (cp_parser_alias_declaration): Return earlier
954         if an error occured.
956 2012-06-04  Paolo Carlini  <paolo.carlini@oracle.com>
958         PR c++/53524
959         * call.c (build_conditional_expr_1): Use OPT_Wenum_compare
960         to control enumeral mismatch in conditional expression too.
962 2012-06-04   Sterling Augustine  <saugustine@google.com>
964         * cp-tree.h: Declare decl_as_dwarf_string, lang_decl_dwarf_name.
965         * cp-lang.c (cxx_dwarf_name): Call them.
967 2012-06-04  Steven Bosscher  <steven@gcc.gnu.org>
969         * semantics.c: Do not include output.h.
970         * decl2.c: Likewise.
971         * friend.c: Likewise.
972         * typeck.c: Likewise.
973         * typeck2.c: Likewise.
974         * Make-lang.in: Fix dependencies.
976 2012-06-01  Jason Merrill  <jason@redhat.com>
978         PR c++/52973
979         * parser.c (cp_parser_class_head): Apply attributes here.
980         * semantics.c (begin_class_definition): Not here.
981         * cp-tree.h: Adjust.
983         PR c++/52725
984         * parser.c (cp_parser_binary_expression): Bail early if we're parsing
985         tentatively and the LHS has a parse error.
987         PR c++/53137
988         * pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
989         (instantiate_decl): Don't push_to_top_level for local class methods.
990         (instantiate_class_template_1): Or for local classes.
992         PR c++/53484
993         * pt.c (do_auto_deduction): Don't try to deduce from a
994         type-dependent initializer.
996 2012-06-01  Paolo Carlini  <paolo.carlini@oracle.com>
998         PR c++/26155
999         * name-lookup.c (push_namespace): When error recovery is
1000         impossible just error out in duplicate_decls.
1002 2012-05-31  Steven Bosscher  <steven@gcc.gnu.org>
1004         * call.c: Do not include output.h.
1005         * class.c: Likewise.
1006         * except.c: Likewise.
1007         * friend.c: Likewise.
1008         * init.c: Likewise.
1009         * lex.c: Likewise.
1010         * method.c: Likewise.
1011         * parser.c: Likewise.
1012         * pt.c: Likewise.
1013         * rtti.c: Likewise.
1014         * search.c: Likewise.
1016 2012-05-30  Jason Merrill  <jason@redhat.com>
1018         PR c++/53356
1019         * tree.c (stabilize_init): Handle stabilizing a TARGET_EXPR
1020         representing a bitwise copy of a glvalue.
1022         * tree.c (stabilize_expr): Tweak logic.
1024         PR c++/53356
1025         * tree.c (stabilize_init): Side effects make the init unstable.
1027 2012-05-28  Paolo Carlini  <paolo.carlini@oracle.com>
1029         PR c++/53503
1030         * semantics.c (potential_constant_expression_1): Handle LTGT_EXPR.
1032 2012-05-26  Paolo Carlini  <paolo.carlini@oracle.com>
1034         PR c++/53491
1035         * tree.c (stabilize_expr): Handle exp of void type.
1037 2012-05-26  Jason Merrill  <jason@redhat.com>
1039         PR c++/53220
1040         * call.c (convert_like_real) [ck_list]: Take array address directly.
1041         * typeck.c (decay_conversion): Reject decay of an array compound
1042         literal.
1044 2012-05-25  Paolo Carlini  <paolo.carlini@oracle.com>
1046         PR c++/32054
1047         * parser.c (cp_parser_member_declaration): A storage class is not
1048         allowed in a declaration of an anonymous aggregate in a class scope.
1050 2012-05-24  Uros Bizjak  <ubizjak@gmail.com>
1052         PR obj-c++/53441
1053         * decl.c (grokdeclarator): Check that current_class_type is non-NULL
1054         before calling constructor_name_p.
1056 2012-05-24  Paolo Carlini  <paolo.carlini@oracle.com>
1058         PR c++/32080
1059         * parser.c (cp_parser_ctor_initializer_opt_and_function_body,
1060         cp_parser_function_body): Add a bool parameter, true when parsing
1061         a function-try-block.
1062         (cp_parser_function_try_block): Pass true to the above.
1063         (cp_parser_function_definition_after_declarator,
1064         cp_parser_function_transaction): Adjust.
1066 2012-05-23  Paolo Carlini  <paolo.carlini@oracle.com>
1068         PR c++/29185
1069         * decl2.c (delete_sanity): Extend 'deleting array' warning to
1070         any array type.
1072 2012-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
1074         PR c++/51184
1075         * decl.c (grokdeclarator): Diagnose functions returning abstract
1076         class types as TYPENAME.
1077         * cp-tree.h (ABSTRACT_CLASS_TYPE_P): Add.
1078         * except.c (is_admissible_throw_operand_or_catch_parameter): Use it.
1079         * pt.c (tsubst): Likewise.
1080         * semantics.c (trait_expr_value): Likewise.
1082 2012-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
1084         PR c++/40821
1085         * parser.c (cp_parser_attributes_opt): Enforce error checking of
1086         unbalanced parentheses in the presence of tentative parsing.
1088 2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
1090         PR c++/39681
1091         * parser.c (cp_parser_new_type_id): Early return error_mark_node
1092         if the cp_parser_type_specifier_seq call has type_specifier_seq.type
1093         error_mark_node; tidy.
1094         (cp_parser_new_expression): Always initialize nelts to NULL_TREE to
1095         avoid uninitialized warnings.
1096         (cp_parser_init_declarator, cp_parser_late_parse_one_default_arg):
1097         Call cp_parser_skip_to_end_of_statement if cp_parser_initializer
1098         returns error_mark_node.
1100 2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
1102         PR c++/53371
1103         * except.c (is_admissible_throw_operand): Rename to
1104         is_admissible_throw_operand_or_catch_parameter and handle
1105         catch parameter too.
1106         (expand_start_catch_block): Use it.
1107         (build_throw): Adjust.
1109 2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>
1111         PR c++/44516
1112         * typeck.c (build_x_array_ref, build_x_conditional_expr,
1113         build_x_compound_expr, build_x_modify_expr): Add location_t parameter.
1114         (finish_class_member_access_expr, build_x_indirect_ref,
1115         build_x_binary_op, build_x_compound_expr_from_list,
1116         build_x_compound_expr_from_vec): Adjust callers.
1117         * tree.c (build_min_nt_loc): New.
1118         (build_min_nt): Remove.
1119         * typeck2.c (build_x_arrow): Adjust callers.
1120         * pt.c (tsubst_qualified_id, tsubst_omp_for_iterator,
1121         tsubst_copy_and_build): Likewise.
1122         * semantics.c (finish_mem_initializers, handle_omp_for_class_iterator,
1123          finish_omp_atomic): Likewise.
1124         * decl2.c (grok_array_decl, build_anon_union_vars): Adjust.
1125         * parser.c (cp_parser_question_colon_clause,
1126         cp_parser_assignment_expression, cp_parser_expression,
1127         cp_parser_template_id, cp_parser_omp_for_loop): Likewise.
1128         * cp-tree.h: Update.
1130 2012-05-16  Dodji Seketeli  <dodji@redhat.com>
1132         PR preprocessor/7263
1133         * cp-tree.h (enum cp_decl_spec): Add new enumerators to cover all
1134         the possible declarator specifiers so far.
1135         (struct cp_decl_specifier_seq::locations): Declare new member.
1136         (cp_decl_specifier_seq::{specs, type_location}): Remove.
1137         (decl_spec_seq_has_spec_p): Declare new function.
1138         * parser.c (cp_parser_check_decl_spec): Remove.
1139         (set_and_check_decl_spec_loc): Define new static function.
1140         (decl_spec_seq_has_spec_p): Define new public function.
1141         (cp_parser_decl_specifier_seq, cp_parser_function_specifier_opt)
1142         (cp_parser_type_specifier, cp_parser_simple_type_specifier)
1143         (cp_parser_set_storage_class, cp_parser_set_decl_spec_type)
1144         (cp_parser_alias_declaration): Set the locations for each
1145         declspec, using set_and_check_decl_spec_loc.
1146         (cp_parser_explicit_instantiation, cp_parser_init_declarator)
1147         (cp_parser_member_declaration, cp_parser_init_declarator): Use the
1148         new declspec location for specifiers.  Use the new
1149         decl_spec_seq_has_spec_p.
1150         (cp_parser_type_specifier_seq): Use the new
1151         set_and_check_decl_spec_loc.  Stop using
1152         cp_parser_check_decl_spec.  Use the new decl_spec_seq_has_spec_p.
1153         (, cp_parser_init_declarator): Use the new
1154         set_and_check_decl_spec_loc.
1155         (cp_parser_single_declaration, cp_parser_friend_p)
1156         (cp_parser_objc_class_ivars, cp_parser_objc_struct_declaration):
1157         Use the new decl_spec_seq_has_spec_p.
1158         * decl.c (check_tag_decl): Use new decl_spec_seq_has_spec_p.  Use
1159         the more precise ds_redefined_builtin_type_spec location for
1160         diagnostics about re-declaring C++ built-in types.
1161         (start_decl, grokvardecl, grokdeclarator): Use the new
1162         decl_spec_seq_has_spec_p.
1164 2012-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
1166         PR c++/11856
1167         * pt.c (tsubst_copy_and_build): Increase / decrease
1168         c_inhibit_evaluation_warnings around build_x_binary_op call.
1170 2012-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
1172         * cp-tree.h (TYPE_PTRMEM_P): Rename to TYPE_PTRDATAMEM_P.
1173         (TYPE_PTR_TO_MEMBER_P): Rename to TYPE_PTRMEM_P.
1174         (TYPE_PTR_OR_PTRMEM_P): Add.
1175         * typeck.c (composite_pointer_type_r, composite_pointer_type,
1176         common_pointer_type, cp_build_indirect_ref, cp_build_binary_op,
1177         cp_truthvalue_conversion, convert_ptrmem, build_static_cast_1,
1178         build_reinterpret_cast_1, build_const_cast_1, comp_ptr_ttypes_real,
1179         casts_away_constness_r, casts_away_constness): Adjust.
1180         * init.c (build_zero_init_1): Adjust.
1181         * class.c (check_field_decls): Likewise.
1182         * decl.c (check_default_argument): Likewise.
1183         * rtti.c (target_incomplete_p): Likewise.
1184         * tree.c (zero_init_p): Likewise.
1185         * cxx-pretty-print.c (pp_cxx_ptr_operator,
1186         pp_cxx_abstract_declarator): Likewise.
1187         * typeck2.c (build_m_component_ref): Likewise.
1188         * pt.c (convert_nontype_argument, invalid_nontype_parm_type_p,
1189         dependent_type_p_r): Likewise.
1190         * call.c (null_member_pointer_value_p, standard_conversion,
1191         add_builtin_candidate, build_conditional_expr_1, compare_ics):
1192         Likewise.
1193         * cp-objcp-common.c (cp_var_mod_type_p): Likewise.
1194         * cvt.c (cp_convert_to_pointer, ocp_convert,
1195         perform_qualification_conversions): Likewise.
1196         * mangle.c (write_type): Likewise.
1197         * name-lookup.c (arg_assoc_type): Likewise.
1199 2012-05-12  Paolo Carlini  <paolo.carlini@oracle.com>
1201         * parser.c (struct cp_parser_expression_stack_entry): Add location_t
1202         field.
1203         (cp_parser_binary_expression): Rework to always update at the same
1204         time tree_type and loc.
1205         * call.c (print_z_candidate): Add location_t parameter.
1206         (print_z_candidates, convert_like_real, joust): Adjust.
1208 2012-05-11  Alexandre Oliva  <aoliva@redhat.com>
1210         PR c++/53209
1211         * pt.c (tsubst_decl): Bail out if argvec is error_mark_node.
1213 2012-05-11  Paolo Carlini  <paolo.carlini@oracle.com>
1215         PR c++/53305
1216         * pt.c (tsubst_copy: case PARM_DECL): Return error_mark_node if
1217         tsubst_decl returns NULL_TREE.
1218         * cxx-pretty-print.c (pp_cxx_simple_type_specifier): Handle
1219         BOUND_TEMPLATE_TEMPLATE_PARM.
1221 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
1223         PR c++/53158
1224         * cvt.c (ocp_convert): Error out early for void -> bool conversions.
1225         * typeck.c (decay_conversion): Use error_at.
1226         * call.c (build_integral_nontype_arg_conv, convert_like_real,
1227         convert_arg_to_ellipsis, perform_implicit_conversion_flags,
1228         initialize_reference): Likewise.
1229         * cvt.c (warn_ref_binding): Add location_t parameter.
1230         (cp_convert_to_pointer, convert_to_reference, ocp_convert,
1231         convert_to_void, ): Use error_at and warning_at.
1233 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
1235         PR c++/53301
1236         * decl.c (check_default_argument): Fix typo (POINTER_TYPE_P
1237         instead of TYPE_PTR_P) in zero-as-null-pointer-constant warning.
1239 2012-05-06  Paolo Carlini  <paolo.carlini@oracle.com>
1241         PR c++/53152
1242         * call.c (op_error, build_new_op_1, build_new_op): Add location_t
1243         parameter.
1244         (build_conditional_expr_1): Adjust.
1245         * typeck.c (build_x_indirect_ref, build_x_binary_op,
1246         build_x_unary_op): Add location_t parameter.
1247         (rationalize_conditional_expr, build_x_array_ref,
1248         build_x_compound_expr, cp_build_modify_expr, build_x_modify_expr):
1249         Adjust.
1250         * typeck2.c (build_x_arrow): Add location_t parameter.
1251         * semantics.c (finish_unary_op_expr): Likewise.
1252         (finish_increment_expr, handle_omp_for_class_iterator): Adjust.
1253         * decl2.c (grok_array_decl): Add location_t parameter.
1254         * parser.c (cp_parser_postfix_open_square_expression,
1255         cp_parser_postfix_dot_deref_expression, cp_parser_unary_expression,
1256         cp_parser_binary_expression, cp_parser_builtin_offsetof,
1257         do_range_for_auto_deduction, cp_convert_range_for,
1258         cp_parser_template_argument, cp_parser_omp_for_cond): Pass the
1259         location, adjust.
1260         * pt.c (tsubst_copy_and_build): Adjust.
1261         * tree.c (maybe_dummy_object): Likewise.
1262         * cp-tree.h: Update declarations.
1264 2012-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
1266         * semantics.c (cxx_eval_constant_expression, case CONVERT_EXPR): Tidy.
1268 2012-05-04  Paolo Carlini  <paolo.carlini@oracle.com>
1270         PR c++/53166
1271         * pt.c (instantiate_class_template_1): Increase / decrease
1272         c_inhibit_evaluation_warnings around the tsubst_expr call
1273         for STATIC_ASSERT_CONDITION.
1274         (tsubst_expr, case STATIC_ASSERT): Likewise.
1275         * typeck.c (cp_build_binary_op, case EQ_EXPR/NE_EXPR): Check
1276         c_inhibit_evaluation_warnings in the OPT_Waddress warnings.
1278 2012-05-03  Paolo Carlini  <paolo.carlini@oracle.com>
1280         PR c++/53186
1281         * call.c (build_over_call): Handle final member functions
1282         and class types.
1283         (build_new_method_call_1): Do not handle here.
1285 2012-05-02  Richard Guenther  <rguenther@suse.de>
1287         * decl.c (grokdeclarator): Properly check for sizes that
1288         cover more than half of the address-space.
1290 2012-04-30  Marc Glisse  <marc.glisse@inria.fr>
1292         PR c++/51033
1293         * typeck.c (cp_build_array_ref): Handle VECTOR_TYPE.
1294         * decl2.c (grok_array_decl): Likewise.
1296         PR c++/51314
1297         * parser.c (cp_parser_sizeof_operand): Require parentheses for
1298         sizeof...
1300 2012-04-30  Dodji Seketeli  <dodji@redhat.com>
1302         Fix location for static class members
1303         * decl.c (grokdeclarator): Use the location carried by the
1304         declarator for the DECL of the static class member.
1306         Fix va_arg type location
1307         * cp-tree.h (build_x_va_arg): Take an additional location
1308         parameter.
1309         * call.c (build_x_va_arg): Take a loc parameter for the location
1310         of the type of the va_arg expression.
1311         * parser.c (cp_parser_primary_expression): Pass the type of the
1312         type in the va_arg expression to build_x_va_arg.
1313         * pt.c (tsubst_copy): Adjust calls to build_x_va_arg.
1315         Make conversion warnings work on NULL with -ftrack-macro-expansion
1316         * call.c (conversion_null_warnings): Use the new
1317         expansion_point_location_if_in_system_header.
1318         * cvt.c (build_expr_type_conversion): Likewise.
1319         * typeck.c (cp_build_binary_op): Likewise.
1321 2012-04-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1323         * typeck.c (convert_for_assignment):  Replace
1324         Wmissing-format-attribute with Wsuggest-attribute=format.
1325         * call.c (convert_for_arg_passing): Likewise.
1327 2012-04-26  Paolo Carlini  <paolo.carlini@oracle.com>
1329         PR c++/53096
1330         * class.c (check_bases_and_members): Implement core/1333, do not
1331         disallow defaulted in the class body non-const ref special members.
1333 2012-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
1335         PR c++/52363
1336         * call.c (tourney, perform_overload_resolution,
1337         build_operator_new_call, build_user_type_conversion_1,
1338         build_user_type_conversion, perform_overload_resolution,
1339         add_template_candidate, add_template_candidate_real,
1340         add_template_conv_candidate, add_builtin_candidates,
1341         add_builtin_candidate, build_builtin_candidate,
1342         add_conv_candidate, add_function_candidate, implicit_conversion,
1343         reference_binding, build_list_conv, conditional_conversion,
1344         add_candidates, can_convert_array, build_aggr_conv,
1345         build_array_conv, build_complex_conv, conditional_conversion):
1346         Add tsubst_flags_t parameter.
1347         (joust): Likewise, use it to handle SFINAE as if pedantic.
1348         (add_list_candidates, build_integral_nontype_arg_conv,
1349         perform_overload_resolution, build_new_function_call,
1350         build_operator_new_call, build_op_call_1,
1351         build_conditional_expr_1, build_new_op_1, convert_like_real,
1352         convert_arg_to_ellipsis, convert_default_arg,
1353         convert_for_arg_passing, build_over_call,
1354         build_new_method_call_1, can_convert_arg, can_convert_arg_bad,
1355         perform_implicit_conversion_flags,
1356         perform_direct_initialization_if_possible,
1357         initialize_reference): Adjust.
1358         * typeck.c (casts_away_constness, casts_away_constness_r):
1359         Add tsubst_flags_t parameter.
1360         (convert_arguments, check_for_casting_away_constness,
1361         build_static_cast_1, build_ptrmemfunc, convert_for_assignment):
1362         Adjust.
1363         * decl.c (reshape_init_r, check_default_argument): Likewise.
1364         * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1365         * pt.c (convert_nontype_argument, check_non_deducible_conversion):
1366         Likewise.
1367         * init.c (build_new_1): Likewise.
1368         * cvt.c (convert_to_reference, ocp_convert, build_type_conversion,
1369         build_expr_type_conversion, ): Likewise.
1370         * search.c (check_final_overrider): Likewise.
1371         * cp-tree.h (build_user_type_conversion,
1372         build_operator_new_call, can_convert, can_convert_arg,
1373         can_convert_arg_bad, convert_default_arg,
1374         convert_arg_to_ellipsis, convert_for_arg_passing):
1375         Adjust declaration.
1377 2012-04-22  Jan Hubicka  <jh@suse.cz>
1379         * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they
1380         gets finalized.
1382 2012-04-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1384         PR c/44774
1385         * typeck.c (composite_pointer_type): Likewise.
1386         (cxx_sizeof_or_alignof_type): Likewise.
1387         (cp_build_array_ref): Likewise.
1388         (cp_build_function_call_vec): Likewise.
1389         (cp_build_addr_expr_1): Likewise.
1390         (convert_member_func_to_ptr): Likewise.
1391         * decl.c (check_tag_decl): Likewise.
1392         (check_static_variable_definition): Likewise.
1393         (compute_array_index_type): Likewise.
1394         (create_array_type_for_decl): Likewise.
1395         (grokdeclarator): Likewise.
1396         (grok_op_properties): Likewise.
1397         * error.c (maybe_warn_cpp0x): Likewise.
1398         * pt.c (maybe_process_partial_specialization): Likewise.
1399         (convert_template_argument): Likewise.
1400         (do_decl_instantiation): Likewise.
1401         (do_type_instantiation): Likewise.
1402         * parser.c (cp_parser_primary_expression): Likewise.
1403         (cp_parser_postfix_expression): Likewise.
1404         (cp_parser_unary_expression): Likewise.
1405         (cp_parser_question_colon_clause): Likewise.
1406         (cp_parser_lambda_introducer): Likewise.
1407         (cp_parser_lambda_declarator_opt): Likewise.
1408         (cp_parser_compound_statement): Likewise.
1409         (cp_parser_jump_statement): Likewise.
1410         (cp_parser_declaration_seq_opt): Likewise.
1411         (cp_parser_enum_specifier): Likewise.
1412         (cp_parser_enumerator_list): Likewise.
1413         (cp_parser_initializer_list): Likewise.
1414         (cp_parser_member_declaration): Likewise.
1415         * call.c (build_conditional_expr_1): Likewise.
1416         * friend.c (make_friend_class): Likewise.
1417         * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
1419 2012-04-21  Jan Hubicka  <jh@suse.cz>
1421         * method.c (make_alias_for): Do not set TREE_SYMBOL_REFERENCED.
1422         * decl2.c (mark_needed): Likewise.
1423         (decl_needed_p): Do not test TREE_SYMBOL_REFERENCED.
1425         * decl2.c (cxx_callgraph_analyze_expr): Remove.
1426         * cp-objcp-common.h (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Remove.
1427         * cp-tree.h (cxx_callgraph_analyze_expr): Remove.
1429 2012-04-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1431         PR 35441
1432         * typeck.c (cp_build_function_call_vec): Do not pretty-print
1433         expressions when caret is enabled.
1435 2012-04-20  Jan Hubicka  <jh@suse.cz>
1437         PR target/53042
1438         * decl2.c (maybe_emit_vtables): Do not initialize same_comdat_group
1439         list when target has no support for it.
1441 2012-04-20  Michael Matz  <matz@suse.de>
1443         * error.c (pedwarn_cxx98): Move va_end call after user
1444         of the va_list.
1446 2012-04-18  Paolo Carlini  <paolo.carlini@oracle.com>
1448         PR c++/52422
1449         * cp-tree.h (build_addr_func, decay_conversion,
1450         get_member_function_from_ptrfunc,
1451         build_m_component_ref, convert_member_func_to_ptr):
1452         Add tsubst_flags_t parameter.
1453         * typeck.c (cp_default_conversion): Add.
1454         (decay_conversion, default_conversion,
1455         get_member_function_from_ptrfunc, convert_member_func_to_ptr):
1456         Add tsubst_flags_t parameter and use it throughout.
1457         (cp_build_indirect_ref, cp_build_array_ref,
1458         cp_build_function_call_vec, convert_arguments, build_x_binary_op,
1459         cp_build_binary_op, cp_build_unary_op, build_reinterpret_cast_1,
1460         build_const_cast_1, expand_ptrmemfunc_cst,
1461         convert_for_initialization): Adjust.
1462         * init.c (build_vec_init): Adjust.
1463         * decl.c (grok_reference_init, get_atexit_node): Likewise.
1464         * rtti.c (build_dynamic_cast_1, tinfo_base_init): Likewise.
1465         * except.c (build_throw): Likewise.
1466         * typeck2.c (build_x_arrow): Likewise.
1467         (build_m_component_ref): Add tsubst_flags_t parameter and
1468         use it throughout.
1469         * pt.c (convert_nontype_argument): Adjust.
1470         * semantics.c (finish_asm_stmt, maybe_add_lambda_conv_op): Likewise.
1471         * decl2.c (build_offset_ref_call_from_tree): Likewise.
1472         * call.c (build_addr_func): Add tsubst_flags_t parameter and
1473         use it throughout.
1474         (build_call_a, build_conditional_expr_1, build_new_op_1,
1475         convert_like_real, convert_arg_to_ellipsis, build_over_call,
1476         build_special_member_call): Adjust.
1477         * cvt.c (cp_convert_to_pointer, force_rvalue,
1478         build_expr_type_conversion): Likewise.
1480 2012-04-17  Tom de Vries  <tom@codesourcery.com>
1482         * cp-gimplify.c (begin_bc_block): Add location parameter and use as
1483         location argument to create_artificial_label.
1484         (finish_bc_block): Change return type to void.  Remove body_seq
1485         parameter, and add block parameter.  Append label to STMT_LIST and
1486         return in block.
1487         (gimplify_cp_loop, gimplify_for_stmt, gimplify_while_stmt)
1488         (gimplify_do_stmt, gimplify_switch_stmt): Remove function.
1489         (genericize_cp_loop, genericize_for_stmt, genericize_while_stmt)
1490         (genericize_do_stmt, genericize_switch_stmt, genericize_continue_stmt)
1491         (genericize_break_stmt, genericize_omp_for_stmt): New function.
1492         (cp_gimplify_omp_for): Remove bc_continue processing.
1493         (cp_gimplify_expr): Genericize VEC_INIT_EXPR.
1494         (cp_gimplify_expr): Mark FOR_STMT, WHILE_STMT, DO_STMT, SWITCH_STMT,
1495         CONTINUE_STMT, and BREAK_STMT as unreachable.
1496         (cp_genericize_r): Genericize FOR_STMT, WHILE_STMT, DO_STMT,
1497         SWITCH_STMT, CONTINUE_STMT, BREAK_STMT and OMP_FOR.
1498         (cp_genericize_tree): New function, factored out of ...
1499         (cp_genericize): ... this function.
1501 2012-04-17  Paolo Carlini  <paolo.carlini@oracle.com>
1503         PR c++/52599
1504         * semantics.c (build_constexpr_constructor_member_initializers):
1505         Check for function-try-block as function-body.
1507 2012-04-17  Paolo Carlini  <paolo.carlini@oracle.com>
1509         PR c++/53003
1510         * parser.c (cp_parser_member_declaration): Check that
1511         initializer_token_start is non null before dereferencing it.
1513 2012-04-16  Jason Merrill  <jason@redhat.com>
1515         PR c++/38543
1516         * pt.c (determine_specialization): Instead of comparing the number
1517         of parms, check that tsubst gives the right answer.
1519         PR c++/52008
1520         * pt.c (process_partial_specialization): Complain about a partial
1521         specialization with fewer args than primary template parms.
1523         PR c++/50830
1524         * pt.c (convert_template_argument): Handle template template
1525         argument packs.
1527         PR c++/50303
1528         * pt.c (tsubst_pack_expansion): Use tsubst_expr for template
1529         template parameters.
1531 2012-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
1533         PR c++/49152
1534         * call.c (op_error): Print types; when flag_diagnostics_show_caret
1535         is false print expressions too.
1536         (op_error_string): Add.
1538 2012-04-16  Jason Merrill  <jason@redhat.com>
1540         PR c++/51148
1541         * friend.c (make_friend_class): Call check_for_bare_parameter_packs.
1543 2012-04-16  Jan Hubicka  <jh@suse.cz>
1545         * decl2.c (collect_candidates_for_java_method_alias): Use FOR_EACH
1546         walkers to walk cgraph and varpool.
1548 2012-04-15  Jason Merrill  <jason@redhat.com>
1550         PR c++/47220
1551         * pt.c (coerce_template_parameter_pack): Check for error_mark_node.
1553         PR c++/52292
1554         PR c++/52380
1555         * pt.c (coerce_template_parms): Even if we aren't converting we
1556         want to expand argument packs.
1558         PR c++/52706
1559         * mangle.c (write_type): nullptr_t is a builtin type.
1561 2012-04-14  Jan Hubicka  <jh@suse.cz>
1563         * tree.c: Update field referenced for new cgraph/varpool layout.
1564         * decl2.c: Likewise.
1566 2012-04-13  Jason Merrill  <jason@redhat.com>
1568         PR c++/52824
1569         * pt.c (any_pack_expanson_args_p): New.
1570         (coerce_template_parms): Use it.
1572         PR c++/52905
1573         * call.c (joust): Handle comparing list and non-list ctors.
1575         PR c++/52915
1576         * decl2.c (finish_anon_union): Use cp_finish_decl.
1577         * error.c (dump_function_name): Avoid showing anonymous "name".
1579 2012-04-11  Fabien Chêne  <fabien@gcc.gnu.org>
1581         PR c++/52465
1582         * parser.c (cp_parser_class_name): Call strip_using_decl and
1583         return the target decl.
1584         * name-lookup.c (strip_using_decl): Returns NULL_TREE if the decl
1585         to be stripped is NULL_TREE.
1586         (qualify_lookup): Call strip_using_decl and perform some checks on
1587         the target decl.
1589 2012-04-11  Jason Merrill  <jason@redhat.com>
1591         PR debug/45088
1592         * decl.c (grokdeclarator): Strip the injected-class-name typedef
1593         if we are building a declaration or compound type.
1595         PR c++/52906
1596         * decl.c (check_tag_decl): Don't complain about attributes if we
1597         don't even have a type.
1599 2012-04-10  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1601         * cvt.c (convert_to_void): Update comment.
1603 2012-04-05  Jason Merrill  <jason@redhat.com>
1605         PR c++/52596
1606         * semantics.c (finish_non_static_data_member): In templates, pass
1607         the decl to build_qualified_name.
1608         * tree.c (lvalue_kind) [SCOPE_REF]: Handle FIELD_DECL.
1610 2012-04-04  Jason Merrill  <jason@redhat.com>
1612         PR c++/52845
1613         * decl.c (finish_function): Update fntype after deducing return type.
1615 2012-04-03  Jason Merrill  <jason@redhat.com>
1617         PR c++/52796
1618         * pt.c (tsubst_initializer_list): A pack expansion with no elements
1619         means value-initialization.
1621 2012-04-01  Paolo Carlini  <paolo.carlini@oracle.com>
1623         PR c++/50043
1624         * class.c (deduce_noexcept_on_destructor,
1625         deduce_noexcept_on_destructors): New.
1626         (check_bases_and_members): Call the latter.
1627         * decl.c (grokfndecl): Call the former.
1628         * method.c (implicitly_declare_fn): Not static.
1629         * cp-tree.h (deduce_noexcept_on_destructor, implicitly_declare_fn):
1630         Declare
1632 2012-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
1634         PR c++/52718
1635         * decl.c (check_default_argument): With -Wzero-as-null-pointer-constant
1636         warn for a zero as null pointer constant default argument.
1638 2012-03-29  Jason Merrill  <jason@redhat.com>
1640         PR c++/52685
1641         * tree.c (copy_binfo): Handle BINFO_DEPENDENT_BASE_P.
1643 2012-03-29  Jakub Jelinek  <jakub@redhat.com>
1645         PR c++/52759
1646         * decl.c (start_decl): Don't call maybe_apply_pragma_weak
1647         if processing_template_decl.
1649 2012-03-29  Jason Merrill  <jason@redhat.com>
1651         PR c++/52743
1652         * call.c (compare_ics): Handle ck_aggr like ck_list.
1654 2012-03-28  Jason Merrill  <jason@redhat.com>
1656         PR c++/52746
1657         * typeck.c (lookup_destructor): Clear BASELINK_QUALIFIED_P if
1658         we didn't get an explicit scope.
1659         * pt.c (tsubst_baselink): Likewise.
1661 2012-03-28  Richard Guenther  <rguenther@suse.de>
1663         * typeck2.c (process_init_constructor_array): Use the proper
1664         type for computing the array length.
1666 2012-03-27  Meador Inge  <meadori@codesourcery.com>
1668         PR c++/52672
1669         * semantics.c (cxx_fold_indirect_ref): Don't attempt to fold
1670         stripped child trees that are not pointer types.
1672 2012-03-21  Jason Merrill  <jason@redhat.com>
1674         Implement return type deduction for normal functions with -std=c++1y.
1675         * cp-tree.h (FNDECL_USED_AUTO): New macro.
1676         (LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P): Remove.
1677         (dependent_lambda_return_type_node): Remove.
1678         (CPTI_DEPENDENT_LAMBDA_RETURN_TYPE): Remove.
1679         (struct language_function): Add x_auto_return_pattern field.
1680         (current_function_auto_return_pattern): New.
1681         (enum tsubst_flags): Add tf_partial.
1682         * decl.c (decls_match): Handle auto return comparison.
1683         (duplicate_decls): Adjust error message for auto return.
1684         (cxx_init_decl_processing): Remove dependent_lambda_return_type_node.
1685         (cp_finish_decl): Don't do auto deduction for functions.
1686         (grokdeclarator): Allow auto return without trailing return type in
1687         C++1y mode.
1688         (check_function_type): Defer checking of deduced return type.
1689         (start_preparsed_function): Set current_function_auto_return_pattern.
1690         (finish_function): Set deduced return type to void if not previously
1691         deduced.
1692         * decl2.c (change_return_type): Handle error_mark_node.
1693         (mark_used): Always instantiate functions with deduced return type.
1694         Complain about use if deduction isn't done.
1695         * parser.c (cp_parser_lambda_declarator_opt): Use 'auto' for
1696         initial return type.
1697         (cp_parser_lambda_body): Don't deduce return type in a template.
1698         (cp_parser_conversion_type_id): Allow auto in C++1y.
1699         * pt.c (instantiate_class_template_1): Don't mess with
1700         LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P.
1701         (tsubst_copy_and_build): Likewise.
1702         (fn_type_unification, tsubst): Don't reduce the template parm level
1703         of 'auto' during deduction.
1704         (unify): Compare 'auto' specially.
1705         (get_bindings): Change test.
1706         (always_instantiate_p): Always instantiate functions with deduced
1707         return type.
1708         (do_auto_deduction): Handle error_mark_node and lambda context.
1709         Don't check for use in initializer.
1710         (contains_auto_r): Remove.
1711         * search.c (lookup_conversions_r): Handle auto conversion function.
1712         * semantics.c (lambda_return_type): Handle null return.  Don't mess
1713         with dependent_lambda_return_type_node.
1714         (apply_deduced_return_type): Rename from apply_lambda_return_type.
1715         * typeck.c (merge_types): Handle auto.
1716         (check_return_expr): Do auto deduction.
1717         * typeck2.c (add_exception_specifier): Fix complain check.
1719 2012-03-22  Paolo Carlini  <paolo.carlini@oracle.com>
1721         PR c++/52487
1722         * class.c (check_field_decls): Call literal_type_p only
1723         on complete types.
1725 2012-03-22  Jakub Jelinek  <jakub@redhat.com>
1727         PR c++/52671
1728         * decl.c (check_tag_decl): Only use CLASSTYPE_TEMPLATE_INSTANTIATION
1729         on CLASS_TYPE_P types.
1731 2012-03-20  Jason Merrill  <jason@redhat.com>
1733         * lex.c (init_reswords): Use >= for cxx_dialect test.
1734         * parser.c (cp_parser_exception_specification_opt): Likewise.
1736         * mangle.c (write_type): Handle 'auto'.
1737         * init.c (build_new): Don't do auto deduction where it might
1738         affect template mangling.
1740         PR c++/52510
1741         * decl.c (reshape_init_class): Handle repeated reshaping.
1742         * search.c (lookup_field_1): Add sanity check.
1744 2012-03-19  Paolo Carlini  <paolo.carlini@oracle.com>
1746         PR c++/14710
1747         * cp-tree.h (xvalue_p, maybe_warn_about_useless_cast): Declare.
1748         * tree.c (xvalue_p): Define.
1749         * typeck.c (maybe_warn_about_useless_cast): Define.
1750         (build_reinterpret_cast, build_const_cast,
1751         build_static_cast, cp_build_c_cast): Use maybe_warn_about_useless_cast.
1752         * rtti.c (build_dynamic_cast): Likewise.
1753         * pt.c (tsubst_copy_and_build, case CAST_EXPR): Increment/decrement
1754         c_inhibit_evaluation_warnings before/after the build_* calls.
1756 2012-03-15  Jason Merrill  <jason@redhat.com>
1758         PR c++/52582
1759         * method.c (implicitly_declare_fn): Set DECL_EXTERNAL.
1761 2012-03-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1763         PR c++/44783
1764         * error.c (print_instantiation_partial_context): Use
1765         template_backtrace_limit.
1767 2012-03-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1769         * Make-lang.in (doc/g++.1): Remove IRIX 6.5 reference.
1771 2012-03-14  Jakub Jelinek  <jakub@redhat.com>
1773         PR c++/52521
1774         * parser.c (lookup_literal_operator): Return fn only if
1775         processed all arguments from args vector and argtypes is
1776         void_list_node.
1778 2012-01-30  Dodji Seketeli  <dodji@redhat.com>
1780         PR c++/51641
1781         * cp-tree.h (template_type_parameter_p): Declare new function.
1782         (parameter_of_template_p): Remove.
1783         * pt.c (template_type_parameter_p): Define new function.
1784         (parameter_of_template_p): Remove.
1785         * name-lookup.c (binding_to_template_parms_of_scope_p): Don't rely
1786         on parameter_of_template_p anymore.  Compare the level of the
1787         template parameter to the depth of the template.
1789 2011-12-15  Dodji Seketeli  <dodji@redhat.com>
1791         * call.c (standard_conversion, build_integral_nontype_arg_conv)
1792         (build_new_op_1, convert_like_real, is_subseq)
1793         (maybe_handle_implicit_object, maybe_handle_ref_bind, compare_ics)
1794         (joust): Use next_conversion instead of accessing fields of struct
1795         conversion directly.
1797 2012-03-12  Paolo Carlini  <paolo.carlini@oracle.com>
1799         PR c++/52299
1800         * pt.c (tsubst_copy_and_build, case COND_EXPR): Avoid bogus
1801         division by zero warnings.
1803 2012-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
1805         * typeck.c (build_array_ref, cp_build_addr_expr_1, convert_ptrmem,
1806         build_ptrmemfunc): Consistently forward the tsubst_flags_t
1807         parameter.
1808         * call.c (resolve_args): Likewise.
1810 2012-03-07  Jason Merrill  <jason@redhat.com>
1812         PR c++/52521
1813         * mangle.c (write_literal_operator_name): The length comes after the
1814         operator prefix.
1816 2012-03-05  Jakub Jelinek  <jakub@redhat.com>
1818         * pt.c (local_specializations): Change from htab_t into
1819         struct pointer_map_t *.
1820         (retrieve_local_specializations, register_local_specialization,
1821         tsubst_pack_expansion, instantiate_decl): Adjust users.
1822         (eq_local_specializations, hash_local_specialization): Remove.
1824 2012-03-05  Jason Merrill  <jason@redhat.com>
1826         PR c++/51930
1827         * decl2.c (determine_visibility): Correct calculation of class
1828         args depth.
1829         * decl.c (check_tag_decl): Adjust warning.
1831         * method.c (synthesized_method_walk): Cleanups don't affect the EH
1832         spec either.
1834 2012-03-03  Jason Merrill  <jason@redhat.com>
1836         * init.c (perform_member_init): Cope with uninstantiated NSDMI.
1838         Core 1270
1839         * call.c (build_aggr_conv): Call reshape_init.
1840         (convert_like_real): Likewise.
1841         * typeck2.c (process_init_constructor): Clear TREE_CONSTANT if
1842         not all constant.
1844         * mangle.c (write_nested_name): Use decl_mangling_context.
1845         (write_prefix, write_template_prefix): Likewise.
1847         PR c++/36797
1848         * mangle.c (write_expression): Improve diagnostic for TRAIT_EXPR.
1850         * class.c (add_method): Always build an OVERLOAD for using-decls.
1851         * search.c (lookup_member): Handle getting an OVERLOAD for a
1852         single function.
1854 2012-03-02  Paolo Carlini  <paolo.carlini@oracle.com>
1856         PR c++/51989
1857         * typeck2.c (build_x_arrow): Take a tsubst_flags_t argument and
1858         propagate it.
1859         * cp-tree.h (build_x_arrow): Adjust prototype.
1860         * pt.c (tsubst_copy_and_build): Adjust call.
1861         * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
1863 2012-03-02  Paolo Carlini  <paolo.carlini@oracle.com>
1865         * name-lookup.c (binding_to_template_parms_of_scope_p): Clean up.
1867 2012-02-29  Jason Merrill  <jason@redhat.com>
1869         PR c++/51930
1870         * decl.c (check_tag_decl): Move warning for misplaced attributes here.
1871         (shadow_tag): From here.
1872         * parser.c (cp_parser_explicit_instantiation): Don't warn here.
1874 2012-02-21  Jakub Jelinek  <jakub@redhat.com>
1876         PR c++/52312
1877         * typeck.c (check_literal_operator_args): Initialize *long_double_p
1878         and *long_long_unsigned_p even if processing_template_decl.
1880 2012-02-16  Jason Merrill  <jason@redhat.com>
1882         PR c++/52248
1883         * decl.c (define_label): Use timevar_cond_start/stop.
1885 2012-02-16  Fabien Chêne  <fabien@gcc.gnu.org>
1887         PR c++/52126
1888         * decl.c (xref_basetypes): call dependent_scope_p instead of
1889         dependent_type_p.
1891 2012-02-16  Jason Merrill  <jason@redhat.com>
1893         PR c++/51415
1894         * error.c (dump_expr): Handle lambda closures specifically.
1896 2012-02-14  Jason Merrill  <jason@redhat.com>
1898         * parser.c (cp_parser_explicit_instantiation): Give a warning
1899         for ignored attributes on explicit class instantiation.
1901 2012-02-14  Jakub Jelinek  <jakub@redhat.com>
1903         PR c++/52247
1904         * pt.c (tsubst_copy_asm_operands): For LABEL_DECL values call
1905         lookup_label on label's name and set TREE_USED.
1907 2012-02-14  Jason Merrill  <jason@redhat.com>
1909         PR c++/39055
1910         * decl.c (local_variable_p_walkfn): Don't check DECL_ARTIFICIAL.
1912 2012-02-14  Jakub Jelinek  <jakub@redhat.com>
1914         PR c/52181
1915         * decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than
1916         newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits.
1918 2012-02-07  Jason Merrill  <jason@redhat.com>
1920         PR c++/51675
1921         * semantics.c (cx_check_missing_mem_inits): Handle unions.
1922         Fix constexpr default constructor logic.
1924         PR c++/52035
1925         * pt.c (tsubst): Strip uninstantiated typedef.
1927 2012-02-06  Jason Merrill  <jason@redhat.com>
1929         PR c++/52088
1930         * cvt.c (build_expr_type_conversion): Check for template conversion.
1932 2012-01-31  Jason Merrill  <jason@redhat.com>
1934         PR c++/52043
1935         * cp-tree.h (PACK_EXPANSION_LOCAL_P): New.
1936         * pt.c (make_pack_expansion, tsubst_initializer_list): Set it.
1937         (tsubst_pack_expansion): Check it.
1939 2012-01-29  Paolo Carlini  <paolo.carlini@oracle.com>
1941         PR c++/51327
1942         * class.c (explain_non_literal_class): Correctly handle implicitly
1943         deleted constructors.
1945 2012-01-27  Jakub Jelinek  <jakub@redhat.com>
1947         PR c++/51852
1948         * pt.c (tsubst_pack_expansion): Delete and restore
1949         local_specialization whenever need_local_specialization, not just
1950         when saved_local_specializations is non-NULL.
1952 2012-01-26  Paolo Carlini  <paolo.carlini@oracle.com>
1954         PR c++/51370
1955         * error.c (dump_decl, [TEMPLATE_ID_EXPR]): Handle error_mark_node
1956         as TREE_OPERAND (t, 1).
1958 2012-01-24  Jason Merrill  <jason@redhat.com>
1960         PR c++/51917
1961         * decl.c (xref_basetypes): Check VEC_length instead of VEC_space.
1963         PR c++/51973
1964         * tree.c (called_fns_equal): Check template args.
1965         (cp_tree_equal): Call it.
1967 2012-01-24  Aldy Hernandez  <aldyh@redhat.com>
1968             Patrick Marlier  <patrick.marlier@gmail.com>
1970         PR c++/51928
1971         * class.c (set_method_tm_attributes): Use TARGET_THUNK instead of
1972         thunk for set_one_vmethod_tm_attributes.
1974 2012-01-24  Paolo Carlini  <paolo.carlini@oracle.com>
1976         PR c++/51223
1977         * call.c (build_over_call): Check for error_mark_node as
1978         TREE_VALUE when default arguments are processed.
1980 2012-01-23  Jason Merrill  <jason@redhat.com>
1982         PR c++/51930
1983         * decl2.c (determine_visibility): Check for visibility attribute
1984         on template specialization.
1986 2012-01-23  Paolo Carlini  <paolo.carlini@oracle.com>
1988         PR c++/51398
1989         * pt.c (parameter_of_template_p): Skip error_mark_node parameters.
1991 2012-01-23  Jason Merrill  <jason@redhat.com>
1993         PR c++/51925
1994         * class.c (add_method): Set OVL_USED for using-decls.
1995         * tree.c (ovl_scope): New.
1996         * cp-tree.h: Declare it.
1997         * parser.c (cp_parser_template_name): Use it.
1998         * semantics.c (baselink_for_fns): Likewise.
1999         * name-lookup.c (set_inherited_value_binding_p): Likewise.
2001 2012-01-20  Paolo Carlini  <paolo.carlini@oracle.com>
2003         PR c++/51402
2004         * pt.c (lookup_template_class_1): Check context returned by
2005         tsubst for error_mark_node.
2007 2012-01-19  Kai Tietz  <ktietz@redhat.com>
2009         PR c++/51344
2010         * decl2.c (save_template_attributes): Use merge_attributes
2011         instead of chaining up via TREE_CHAIN.
2013 2012-01-19  Jason Merrill  <jason@redhat.com>
2015         PR c++/51889
2016         * class.c (finish_struct): Call add_method here for function usings.
2017         * semantics.c (finish_member_declaration): Not here.
2019 2012-01-18  Paolo Carlini  <paolo.carlini@oracle.com>
2021         PR c++/51225
2022         * typeck2.c (store_init_value): Within a template guard
2023         cxx_constant_value with require_potential_constant_expression.
2024         * pt.c (convert_nontype_argument): Likewise.
2026 2012-01-16  Jakub Jelinek  <jakub@redhat.com>
2028         PR c++/51854
2029         * mangle.c (write_template_arg_literal): Handle complex.
2031 2012-01-16  Jason Merrill  <jason@redhat.com>
2033         PR c++/51827
2034         * mangle.c (mangle_decl): Don't mangle uninstantiated templates.
2036         PR c++/51868
2037         * typeck.c (build_static_cast_1): Handle bit-fields properly.
2039 2012-01-13  Ian Lance Taylor  <iant@google.com>
2041         PR c++/50012
2042         * typeck.c (enum_cast_to_int): New static function.
2043         (cp_build_binary_op): When handling warn_sign_compare, don't test
2044         for TREE_NO_WARNING.  Do call enum_cast_to_int.
2045         * call.c (avoid_sign_compare_warnings): Remove static function.
2046         (build_new_op_1): Don't call avoid_sign_compare_warnings.
2048 2012-01-13  Steven Bosscher  <steven@gcc.gnu.org>
2050         * decl2.c: Do not include tree-mudflap.h
2051         * semantics.c: Likewise.
2053 2012-01-13  Jason Merrill  <jason@redhat.com>
2055         PR c++/20681
2056         * semantics.c (finish_break_stmt): Avoid adding an unreachable
2057         BREAK_STMT.
2059         PR c++/51813
2060         * decl2.c (constrain_visibility): Clear DECL_VISIBILITY_SPECIFIED
2061         when reducing the visibility.
2063         PR c++/51620
2064         * class.c (build_vtbl_initializer): Use __cxa_deleted_virtual.
2066 2012-01-12  Jason Merrill  <jason@redhat.com>
2068         PR c++/51714
2069         * pt.c (value_dependent_expression_p): Treat STMT_EXPR as
2070         value-dependent.
2072 2012-01-13  Dodji Seketeli  <dodji@redhat.com>
2074         PR c++/51633
2075         * semantics.c (cp_parser_ctor_initializer_opt_and_function_body):
2076         Set the pointer to the last block of the constructor to the
2077         current statement.
2078         (build_constexpr_constructor_member_initializers): Get
2079         build_data_member_initialization a chance to deal with more
2080         statements before we choke.
2082 2012-01-12  Jason Merrill  <jason@redhat.com>
2084         PR c++/48051
2085         * mangle.c (write_expression): Mangle BASELINK scope if
2086         BASELINK_QUALIFIED_P.
2087         * search.c (adjust_result_of_qualified_name_lookup): Set
2088         BASELINK_QUALIFIED_P.
2089         * tree.c (cp_tree_equal) [BASELINK]: Compare BASELINK_QUALIFIED_P.
2090         * parser.c (cp_parser_postfix_dot_deref_expression): Don't call
2091         adjust_result_of_qualified_name_lookup for non-qualified names.
2093         PR c++/51403
2094         * pt.c (unify): Handle error_mark_node.
2096 2012-01-11  Jason Merrill  <jason@redhat.com>
2098         PR c++/51565
2099         * call.c (standard_conversion): For ptrmemfuncs, compare the
2100         static_fn_types.
2102         PR c++/51818
2103         * mangle.c (find_substitution): A type is only a substitution
2104         match if we're looking for a type.
2105         (write_nested_name): Use decl_mangling_context.
2107         * decl.c (decls_match): Assert that the arguments are decls.
2109         PR c++/51613
2110         * pt.c (resolve_overloaded_unification): Compare types with
2111         same_type_p, not decls_match.
2113 2012-01-10  Jason Merrill  <jason@redhat.com>
2115         PR c++/51614
2116         * class.c (build_base_path): Diagnose ambiguous base.
2118         PR c++/51433
2119         * semantics.c (cxx_eval_call_expression): Always retry previously
2120         non-constant expressions.
2122 2012-01-06  Jason Merrill  <jason@redhat.com>
2124         DR 686
2125         PR c++/47450
2126         * parser.c (cp_parser_new_expression): Set
2127         type_definition_forbidden_message.
2129         PR c++/6057
2130         PR c++/48051
2131         PR c++/50855
2132         PR c++/51322
2133         * mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR,
2134         THROW_EXPR, CONSTRUCTOR, OVERLOAD.  Fix PREINCREMENT_EXPR and
2135         PREDECREMENT_EXPR.
2136         (write_template_arg): Fix mangling of class-scope functions and
2137         argument packs.
2138         (mangle_decl): Update suggested -fabi-version argument.
2139         * operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR,
2140         DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR.
2141         * tree.c (dependent_name): No longer static.
2142         * cp-tree.h: Declare it.
2143         * pt.c (unify): Defer handling of unconverted functions.
2145         * mangle.c (mangle_decl): Don't generate mangling aliases
2146         for maybe-in-charge [cd]tors.
2148         * error.c (dump_expr): Print type of CONSTRUCTOR.
2150 2012-01-05  Dodji Seketeli  <dodji@redhat.com>
2152         PR c++/51541
2153         * parser.c (cp_parser_alias_declaration): Get out early upon
2154         errors in the identifier or the attributes.
2156 2012-01-04  Paolo Carlini  <paolo.carlini@oracle.com>
2158         PR c++/51064
2159         * pt.c (tsubst_copy_and_build): Maybe set TREE_NO_WARNING on
2160         the tree returned by build_x_binary_op.
2162 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
2164         PR c++/51738
2165         * parser.c (cp_parser_postfix_open_square_expression): Handle
2166         postfix-expression [ braced-init-list ].
2168 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
2170         PR c++/29273
2171         * rtti.c (build_dynamic_cast_1): In case of T a pointer type,
2172         call decay_conversion on v.
2174 2012-01-03  Paolo Carlini  <paolo.carlini@oracle.com>
2176         PR c++/15867
2177         * decl.c (duplicate_decls): With -Wredundant-decls don't warn for
2178         declaration followed by specialization.
2180 2012-01-03  Jakub Jelinek  <jakub@redhat.com>
2182         PR c++/51669
2183         * semantics.c (finish_omp_clauses): Call fold_build_cleanup_point_expr
2184         on OMP_CLAUSE_{IF,FINAL,NUM_THREADS,SCHEDULE_CHUNK}_EXPR.
2186 2012-01-02  Jason Merrill  <jason@redhat.com>
2188         DR 1359
2189         PR c++/51675
2190         * method.c (walk_field_subobs): Don't check for uninitialized
2191         fields in a union.
2192         (synthesized_method_walk): Check here.
2194         DR 325
2195         PR c++/51666
2196         * parser.c (cp_parser_cache_defarg): Split out...
2197         (cp_parser_parameter_declaration): ...from here.
2198         (cp_parser_save_nsdmi): Use it.
2199         (cp_parser_cache_group): Remove CPP_COMMA support.
2201 2012-01-02  Dodji Seketeli  <dodji@redhat.com>
2203         PR c++/51462
2204         * semantics.c (cx_check_missing_mem_inits): Don't assert in case
2205         of error.
2207 2012-01-02  Paolo Carlini  <paolo.carlini@oracle.com>
2209         PR c++/20140
2210         * typeck2.c (digest_init_r): Use copy_init when initializing
2211         an array of chars.
2213 2012-01-01  Paolo Carlini  <paolo.carlini@oracle.com>
2215         PR c++/16603
2216         * decl.c (build_enumerator): Don't call perform_integral_promotions
2217         on the value.
2219 2012-01-01  Paolo Carlini  <paolo.carlini@oracle.com>
2221         PR c++/51379
2222         * typeck.c (build_reinterpret_cast_1): Implement resolution of
2223         DR 799.
2225 2012-01-01  Fabien Chêne  <fabien@gcc.gnu.org>
2227         * parser.c (cp_parser_using_declaration): Add a warning about
2228         deprecated access declarations when no errors were encountered
2229         while parsing the access declaration. Save the first token in
2230         order to emit the warning at the right place.
2232 Copyright (C) 2012 Free Software Foundation, Inc.
2234 Copying and distribution of this file, with or without modification,
2235 are permitted in any medium without royalty provided the copyright
2236 notice and this notice are preserved.