1 2012-09-04 Jason Merrill <jason@redhat.com>
4 * decl.c (reshape_init_class): Handle invalid initializer for
7 * error.c (dump_type_suffix): Correct handling of 0-length arrays.
10 * cp-tree.h (LAMBDANAME_P): Remove.
11 (LAMBDA_TYPE_P): Check CLASSTYPE_LAMBDA_EXPR instead.
12 * cp-lang.c (cxx_dwarf_name): Likewise.
13 * error.c (dump_aggr_type): Likewise.
14 * semantics.c (begin_lambda_type): Set CLASSTYPE_LAMBDA_EXPR sooner.
17 * decl.c (check_default_argument): Set cp_unevaluated_operand
18 around call to perform_implicit_conversion_flags.
22 * pt.c (fn_type_unification): Call coerce_template_parms before
23 entering substitution context.
25 2012-08-31 Paolo Carlini <paolo.carlini@oracle.com>
26 Jason Merrill <jason@redhat.com>
29 * pt.c (check_template_variable): New.
30 (num_template_headers_for_class): Split out...
31 * decl.c (grokdeclarator): ...from here.
32 (start_decl): Remove redundant diagnostic.
33 * cp-tree.h: Declare them
34 * parser.c (cp_parser_single_declaration): Call check_template_variable.
36 2012-08-31 Ollie Wild <aaw@google.com>
39 * call.c (extend_ref_init_temps_1): Handle COMPOUND_EXPR trees.
41 2012-08-30 Jason Merrill <jason@redhat.com>
45 * pt.c (instantiation_dependent_r): New.
46 (instantiation_dependent_expression_p): New.
47 (value_dependent_expression_p): Use it. SCOPE_REF is always dependent.
48 * semantics.c (finish_decltype_type): Use it.
49 * cp-tree.h: Declare it.
51 * semantics.c (finish_qualified_id_expr): Handle building up a
52 non-dependent SCOPE_REF here.
53 (finish_id_expression): Not here.
54 * error.c (dump_decl) [SCOPE_REF]: Only pass TFF_UNQUALIFIED_NAME.
56 * friend.c (make_friend_class): Handle template template parameters.
57 * parser.c (cp_parser_template_declaration_after_export): Likewise.
58 * pt.c (tsubst_friend_class): Likewise.
59 (instantiate_class_template_1): Likewise
60 * decl.c (check_elaborated_type_specifier): Likewise.
61 (lookup_and_check_tag): Likewise.
63 * pt.c (get_class_bindings): Call coerce_template_parms. Add
65 (more_specialized_class): Add main_tmpl parameter.
66 (most_specialized_class): Adjust calls.
68 * decl.c (cp_finish_decl): Check for invalid multiple initializers
69 even if the initializer is dependent.
71 * pt.c (instantiate_template_1): Keep processing_template_decl set
72 if there are dependent args.
74 2012-08-25 Paolo Carlini <paolo.carlini@oracle.com>
77 * decl2.c (mark_used): Consistently return false after errors
78 about uses before deduction of auto.
79 * semantics.c (finish_id_expression): Check mark_used return
80 value and return error_mark_node in case of failure.
82 2012-08-24 Jason Merrill <jason@redhat.com>
85 * pt.c (deduction_tsubst_fntype): Remove.
86 (fn_type_unification): Check deduction depth and call
87 instantiate_template here. Handle default argument access checks.
88 (determine_specialization): Suppress access control.
89 (tsubst_decl): Check for excessive deduction depth.
90 (recheck_decl_substitution): Make sure access control is on.
91 (type_unification_real): Don't mess with access deferring here.
92 (get_bindings): Adjust for fn_type_unification return type.
93 * call.c (enum rejection_reason_code): Drop rr_template_instantiation.
94 (template_instantiation_rejection): Remove.
95 (struct rejection_reason): Change targs to num_targs.
96 (template_unification_rejection, print_z_candidate): Adjust.
97 (add_template_candidate_real): Adjust for fn_type_unification change.
98 * class.c (resolve_address_of_overloaded_function): Likewise.
99 * cp-tree.h: Adjust declaration.
101 * pt.c (tsubst_default_argument): Indicate where the default
102 argument is being instantiated for.
103 (tsubst_expr): Restore previous location.
104 (tsubst_copy_and_build): Set and restore location.
105 * call.c (build_new_method_call_1): Remember location of call.
106 * semantics.c (finish_call_expr): Here too.
107 * parser.c (cp_parser_omp_for_loop): Remember the location of the
108 increment expression.
110 * pt.c (resolve_overloaded_unification): Use coerce_template_parms
111 instead of get_bindings.
112 (resolve_nondeduced_context): Likewise.
114 * pt.c (register_specialization): Correct argument to
115 check_specialization_namespace.
116 (determine_specialization): Don't consider members of
119 2012-08-23 Jason Merrill <jason@redhat.com>
121 * decl.c (compute_array_index_type): Use type_dependent_expression_p.
123 2012-08-23 Paolo Carlini <paolo.carlini@oracle.com>
126 * name-lookup.c (supplement_binding_1): Handle specially enums
127 only in class templates.
128 (validate_nonmember_using_decl): Enforce 7.3.3/10 about duplicate
129 using declarations at function scope.
131 2012-08-21 Richard Guenther <rguenther@suse.de>
133 * cp-tree.h (TREE_INDIRECT_USING): Use TREE_LANG_FLAG_0 accessor.
134 (ATTR_IS_DEPENDENT): Likewise.
135 (ARGUMENT_PACK_INCOMPLETE_P): Use TREE_ADDRESSABLE instead of
136 TREE_LANG_FLAG_0 on TREE_VECs.
138 2012-08-20 Paolo Carlini <paolo.carlini@oracle.com>
141 * decl.c (poplevel): Check TYPE_HAS_NONTRIVIAL_DESTRUCTOR for
142 Wunused_variable too.
144 2012-08-20 Diego Novillo <dnovillo@google.com>
146 * decl.c (poplevel): Start TV_NAME_LOOKUP conditionally.
148 2012-08-20 Richard Guenther <rguenther@suse.de>
150 * name-lookup.c (store_binding_p): New predicate, split out from ...
151 (store_binding): ... here. Always store binding and require
152 target vector with enough space.
153 (store_bindings): Collect to store bindings and reserve space
154 for them, then store them.
155 (store_class_bindings): Likewise.
157 2012-08-19 Mikael Morin <mikael@gcc.gnu.org>
159 * Make-lang.in: Fix typo.
161 2012-08-17 Jakub Jelinek <jakub@redhat.com>
163 * cp-tree.def (SIZEOF_EXPR): Move to c-common.def.
165 2012-08-14 Diego Novillo <dnovillo@google.com>
167 Merge from cxx-conversion branch. Re-write VEC in C++.
169 * call.c (add_function_candidate): Remove const qualifier
170 from call to VEC_index.
172 2012-08-10 Richard Guenther <rguenther@suse.de>
174 * error.c (dump_expr): Handle anonymous SSA names.
176 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
178 * error.c (print_instantiation_context): Pretty-print a newline before
179 diagnostic_flush_buffer.
180 * cxx-pretty-print.c (pp_cxx_function_definition): Use
181 pp_newline_and_flush instead of separate pp_newline and pp_flush.
183 2012-08-06 Dodji Seketeli <dodji@redhat.com>
185 Avoid crashing on erroneous static_assert usage
186 * semantics.c (finish_static_assert): Don't crash on erroneous
187 message or condition.
189 2012-08-06 Marc Glisse <marc.glisse@inria.fr>
190 Paolo Carlini <paolo.carlini@oracle.com>
193 * typeck.c (build_static_cast_1): Move the conversion to void case
194 before the perform_direct_initialization_if_possible call.
196 2012-08-03 Marc Glisse <marc.glisse@inria.fr>
198 * pt.c (tsubst_copy_and_build): Handle VECTOR_TYPE like scalars.
199 * cp-tree.h (scalarish_type_p): Declare.
200 * tree.c (scalarish_type_p): Make non-static.
202 2012-08-02 Jason Merrill <jason@redhat.com>
203 Paolo Carlini <paolo.carlini@oracle.com>
206 * pt.c (type_unification_real): Call push_deferring_access_checks /
207 pop_deferring_access_checks around the substitution of default
209 (instantiate_template_1): When the specialization returned by
210 retrieve_specialization has FNDECL_HAS_ACCESS_ERRORS set and we
211 are in a SFINAE context, simply return error_mark_node.
212 * cp-tree.h (FNDECL_RECHECK_ACCESS_P): Rename FNDECL_HAS_ACCESS_ERRORS.
214 2012-07-31 Paolo Carlini <paolo.carlini@oracle.com>
216 * pt.c (check_default_tmpl_args): Change is_primary and is_partial
217 parameters to bool type, adjust.
218 (push_template_decl_real): Tidy.
219 * parser.c (cp_parser_init_declarator): Adjust.
220 * decl.c (redeclaration_error_message): Likewise.
221 * cp-tree.h (check_default_tmpl_args): Update prototype.
223 2012-07-31 Paolo Carlini <paolo.carlini@oracle.com>
226 * pt.c (check_default_tmpl_args): Don't check local types.
228 2012-07-25 Sandra Loosemore <sandra@codesourcery.com>
229 Paul Brook <paul@codesourcery.com>
232 * decl.c (finish_function): Check targetm.warn_func_return.
234 2012-07-25 Jason Merrill <jason@redhat.com>
237 * decl.c (grokdeclarator): Allow const and constexpr together.
240 * semantics.c (potential_constant_expression_1) [COND_EXPR]: Call
241 maybe_constant_value.
243 * cp-tree.h (tsubst_flags): Remove tf_no_access_control.
244 * call.c (standard_conversion): Don't set it.
245 * class.c (resolve_address_of_overloaded_function): Don't check it.
246 * decl.c (check_default_argument): Call
247 perform_implicit_conversion_flags.
249 * pt.c (print_candidates_1): Use inform instead of error.
251 2012-07-24 Paolo Carlini <paolo.carlini@oracle.com>
253 * pt.c (convert_template_argument, tsubst): Simplify fourth argument
254 to make_typename_type (complain & tf_error -> complain).
256 2012-07-24 Steven Bosscher <steven@gcc.gnu.org>
258 * class.c (n_vtables, n_vtable_entries, n_vtable_searches,
259 n_vtable_elems, n_convert_harshness, n_compute_conversion_costs,
260 n_inner_fields_searched): Always define.
261 (build_primary_vtable): Convert #ifdef GATHER_STATISTICS to if-code.
262 (print_class_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
263 * tree.c (depth_reached): Always define global.
264 (cxx_print_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
265 * pt.c (depth_reached): Always define.
266 (push_tinst_level): Convert #ifdef GATHER_STATISTICS to if-code.
267 * search.c (n_fields_searched, n_calls_lookup_field,
268 n_calls_lookup_field_1, n_calls_lookup_fnfields,
269 n_calls_lookup_fnfields_1, n_calls_get_base_type,
270 n_outer_fields_searched, n_contexts_saved): Always define.
271 (lookup_field_1): Convert #ifdef GATHER_STATISTICS to if-code.
272 (lookup_member): Likewise.
273 (lookup_fnfields_idx_nolazy): Likewise.
274 (print_search_statistics): Likewise.
275 (reinit_search_statistics): Unconditionally re-set counters.
276 * lex.c (retrofit_lang_decl): Convert #ifdef GATHER_STATISTICS
278 (cxx_dup_lang_specific_decl): Likewise.
279 (copy_lang_type): Likewise.
280 (cxx_make_type): Likewise.
282 2012-07-20 Jason Merrill <jason@redhat.com>
285 * tree.c (build_cplus_array_type): Use build_cplus_array_type to build
286 canonical array type rather than mess with its TYPE_*_VARIANT.
288 2012-07-19 Jason Merrill <jason@redhat.com>
291 * typeck.c (cp_apply_type_quals_to_decl): Check COMPLETE_TYPE_P.
294 * call.c (build_cxx_call): Set optimize when folding
295 __builtin_constant_p in a constexpr function.
297 2012-07-18 Jason Merrill <jason@redhat.com>
299 * pt.c (instantiate_decl): Don't recheck substitutions.
301 2012-07-18 Paolo Carlini <paolo.carlini@oracle.com>
302 Jason Merrill <jason@redhat.com>
306 * semantics.c (perform_access_checks): Add complain parm, return bool.
307 (perform_deferred_access_checks): Likewise.
308 (perform_or_defer_access_check): Likewise.
309 (speculative_access_check): Remove.
310 * call.c (enforce_access): Add complain parm, return bool.
311 * decl.c, friend.c, class.c, init.c, parser.c: Adjust callers.
312 * search.c: Adjust callers.
313 * cp-tree.h (TINFO_RECHECK_ACCESS_P): New macro.
314 (FNDECL_RECHECK_ACCESS_P): New macro.
315 * method.c (synthesized_method_walk): Stop deferring access checks.
316 * pt.c (recheck_decl_substitution): New.
317 (instantiate_template_1): Set and check FNDECL_RECHECK_ACCESS_P.
319 2012-07-18 Jason Merrill <jason@redhat.com>
321 * method.c (process_subob_fn): Make sure no_implicit_p is non-null
322 before trying to store through it.
324 2012-07-17 Jason Merrill <jason@redhat.com>
327 * decl.c (finish_enum_value_list): Only call
328 insert_late_enum_def_into_classtype_sorted_fields in class scope.
331 * tree.c (build_cplus_array_type): Also add TYPE_CANONICAL
332 to the list of variants.
334 * decl.c (xref_basetypes): Complain about incomplete template base.
335 * class.c (finish_struct): Adjust variants in templates, too.
338 * parser.c (cp_parser_class_head): Call xref_basetypes here.
339 (cp_parser_class_specifier_1): Not here.
340 * pt.c (tsubst_decl) [USING_DECL]: Check uses_template_parms
341 as well as DECL_DEPENDENT_P.
343 2012-07-16 Jason Merrill <jason@redhat.com>
345 * cp-tree.h (struct deferred_access_check): Add location.
346 * semantics.c (perform_access_checks): Use it.
347 (perform_or_defer_access_check): Store it.
349 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
351 * dump.c (dump_stmt): Moved here from c-dump.c.
352 * optimize.c: Include dumpfile.h instead of tree-dump.h.
355 * Make-lang.in: Fix dependencies.
357 2012-07-13 Jason Merrill <jason@redhat.com>
360 * method.c (synthesized_method_walk): Initialize no_implicit_p sooner.
362 2012-07-12 Jason Merrill <jason@redhat.com>
364 * pt.c (instantiate_decl): Check typedefs access here.
365 (instantiate_template_1): Not here.
367 * pt.c (deduction_tsubst_fntype): Just suppress access checking.
368 (instantiate_template_1): Set DECL_TI_TEMPLATE before access checking.
369 (push_deduction_access_scope, pop_deduction_access_scope): Remove.
371 2012-07-11 Jason Merrill <jason@redhat.com>
374 * method.c (synthesized_method_walk): Replace uses of msg with diag.
375 Correct handling of virtual bases with move operations.
376 (process_subob_fn, walk_field_subobs): Replace uses of msg with diag.
378 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
380 * method.c: Do not include tree-pass.h.
382 2012-07-10 Jason Merrill <jason@redhat.com>
386 * cp-tree.h (FNDECL_SUPPRESS_IMPLICIT_DECL): New.
387 (struct lang_decl_fn): Add suppress_implicit_decl field.
388 * method.c (implicitly_declare_fn): Check it.
389 (process_subob_fn): Add no_implicit_p parm.
390 (walk_field_subobs, synthesized_method_walk): Likewise.
391 (maybe_explain_implicit_delete): Adjust.
392 (explain_implicit_non_constexpr): Adjust.
394 * method.c (synthesized_method_walk): Avoid changing
395 EH spec based on cleanups in other places, too.
397 2012-07-09 Sterling Augustine <saugustine@google.com>
399 * error.c (lang_decl_name): Use TFF_UNQUALIFIED_NAME flag.
401 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
403 * decl.c (cp_finish_decl): Add FIXME at add_local_decl call site.
405 2012-07-06 Jason Merrill <jason@redhat.com>
408 * pt.c (tsubst_arg_types): Add "end" parameter.
409 (check_undeduced_parms): Use it.
411 * cp-tree.h (DECL_DECLARES_TYPE_P): Check DECL_TYPE_TEMPLATE_P.
414 * name-lookup.c (ambiguous_decl): Use DECL_TYPE_TEMPLATE_P.
416 2012-07-05 Jason Merrill <jason@redhat.com>
419 * pt.c (arg_from_parm_pack_p): Go back to using same_type_p or
422 * cp-tree.h (TEMPLATE_PARM_NUM_SIBLINGS): Remove.
423 (struct template_parm_index_s): Remove num_siblings.
424 * pt.c (fixup_template_parms, fixup_template_parm_index): Remove.
425 (fixup_template_type_parm_type): Remove.
426 (build_template_parm_index): Remove num_siblings parm.
427 (process_template_parm): Likewise.
428 * parser.c (cp_parser_template_parameter_list): Adjust.
429 * tree.c (cp_tree_equal): Don't compare num_siblings.
430 * typeck.c (comp_template_parms_position): Likewise.
434 * tree.c (strip_typedefs_expr): New.
435 * cp-tree.h: Declare it.
436 * pt.c (convert_template_argument, unify): Use it.
437 * parser.c (cp_parser_template_declaration_after_export): Don't call
438 fixup_template_parms.
440 2012-07-04 Jason Merrill <jason@redhat.com>
444 * decl.c (build_enumerator): Don't use build_lang_decl_loc.
446 2012-07-03 Jakub Jelinek <jakub@redhat.com>
449 * semantics.c (finish_goto_stmt): Surround computed goto argument
450 with CLEANUP_POINT_EXPR if needed.
452 2012-07-02 Jason Merrill <jason@redhat.com>
455 * pt.c (in_template_function): New.
456 * cp-tree.h: Declare it.
457 * class.c (build_base_path, resolves_to_fixed_type_p): Use it.
460 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Use tsubst
461 for LAMBDA_EXPR_EXTRA_SCOPE.
464 * pt.c (build_non_dependent_expr): Don't wrap a dummy object.
467 * class.c (resolves_to_fixed_type_p): Check uses_template_parms
468 (current_function_decl) instead of processing_template_decl.
471 * semantics.c (maybe_add_lambda_conv_op): Don't set
472 DECL_INTERFACE_KNOWN.
475 * call.c (build_conditional_expr_1): Don't warn about comparison of
476 two enumerators before their enumeration is complete.
477 (build_new_op_1): Call decay_conversion before warn_logical_operator.
478 * decl.c (build_enumerator): Set DECL_CONTEXT of an enumerator to
480 * decl2.c (mark_used): Call used_types_insert for enums.
481 * semantics.c (finish_id_expression): Don't decay CONST_DECL.
482 (finish_member_declaration): Don't change DECL_CONTEXT of enumerators.
483 * class.c (check_field_decls): Don't change DECL_CONTEXT of enums.
484 * typeck.c (convert_for_assignment): Don't decay CONST_DECL.
485 (build_class_member_access_expr): Look through unscoped enums.
486 * search.c (context_for_name_lookup): Look through unscoped enums.
487 * pt.c (tsubst_copy_and_build): Don't decay CONST_DECL.
488 (tsubst_copy): Use DECL_CONTEXT to find the enumeration.
489 * tree.c (decl_linkage): Likewise.
490 * cvt.c (ocp_convert): Check decayed expr for enum range warning.
492 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
494 * Make-lang.in: Remove tree-mudflap.o from CXX_AND_OBJCXX_OBJS.
496 2012-06-27 Jason Merrill <jason@redhat.com>
498 * parser.c (cp_parser_check_for_invalid_template_id): tag_type parm.
499 (cp_parser_simple_type_specifier, cp_parser_class_head): Adjust.
500 (cp_parser_elaborated_type_specifier): Adjust.
501 * decl.c (duplicate_decls): Return error_mark_node on template
505 * parser.c (cp_parser_template_id): Add tag_type parm.
506 (cp_parser_template_name): Likewise.
507 (cp_parser_id_expression, cp_parser_unqualified_id): Adjust.
508 (cp_parser_pseudo_destructor_name, cp_parser_type_name): Adjust.
509 (cp_parser_simple_type_specifier, cp_parser_class_name): Adjust.
510 (cp_parser_elaborated_type_specifier, cp_parser_class_head): Adjust.
512 2012-06-27 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
515 * semantics.c (constexpr_call): Fix typo in comment.
516 (cxx_eval_vec_perm_expr): New.
517 (cxx_eval_constant_expression): Fold VEC_PERM_EXPRs.
519 2012-06-26 Richard Guenther <rguenther@suse.de>
522 * mangle.c (write_array_type): Truncate the number-of-elements
525 2012-06-25 Jason Merrill <jason@redhat.com>
529 * pt.c (tsubst_decl) [PARM_DECL]: Don't recurse into DECL_CHAIN
530 if cp_unevaluated_operand is set.
531 (tsubst_copy) [PARM_DECL]: Don't copy before tsubsting.
534 * typeck.c (decay_conversion): Don't discard side-effects from
535 expressions of nullptr_t.
537 2012-06-25 Florian Weimer <fweimer@redhat.com>
539 * init.c (build_new_1): Warn about (T[N]) for variable N, and
542 * parser.c (cp_parser_direct_new_declarator): Accept non-constant
543 expressions. Handled now in build_new_1.
545 2012-06-25 Jason Merrill <jason@redhat.com>
548 * semantics.c (build_data_member_initialization): Always keep
549 initializer for empty base.
550 (cxx_eval_bare_aggregate): Discard it here.
553 * pt.c (tsubst_omp_for_iterator): Simplify DECL_EXPR handling.
554 (tsubst_expr) [OMP_FOR]: Here, too.
556 2012-06-25 Jakub Jelinek <jakub@redhat.com>
559 * class.c (check_bases_and_members): Avoid -Wuninitialized
560 diagnostics for non-static const members or references if they
563 2012-06-16 Ville Voutilainen <ville.voutilainen@gmail.com>
565 * parser.c (cp_parser_direct_declarator): Move virt-specifier
566 parsing after late-specified return type parsing.
568 2012-06-14 Jason Merrill <jason@redhat.com>
571 * name-lookup.c (constructor_name_p): Don't try to look at the
572 name of a DECLTYPE_TYPE.
574 2012-06-18 Lawrence Crowl <crowl@google.com>
576 * decl2.c (cp_write_global_declarations): Rename use of TV_PHASE_CGRAPH
579 2012-06-18 Steven Bosscher <steven@gcc.gnu.org>
581 * decl.c (finish_function): Remove code conditional on VMS_TARGET.
583 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
586 * semantics.c (literal_type_p): Handle VECTOR_TYPE.
587 (potential_constant_expression_1): Handle VEC_PERM_EXPR.
588 * parser.c (cp_parser_postfix_expression): Handle RID_BUILTIN_SHUFFLE.
590 2012-06-09 Jason Merrill <jason@redhat.com>
592 * pt.c (tsubst_expr) [TAG_DEFN]: Instantiate local class.
593 * class.c (finish_struct): Don't add a TAG_DEFN for a lambda.
594 * decl2.c (finish_static_data_member_decl): Avoid redundant error.
597 * name-lookup.c (pushtag_1): Add a DECL_EXPR for a local class.
598 * semantics.c (finish_cond): Build a COMPOUND_EXPR.
599 * pt.c (tsubst_expr) [COMPOUND_EXPR]: Handle.
600 [DECL_EXPR]: Don't call cp_finish_decl for an implicit typedef.
601 Don't return the decl.
603 2012-06-11 Richard Guenther <rguenther@suse.de>
606 * mangle.c (write_array_type): Use double-ints for array domain
609 2012-06-07 Fabien ChĂȘne <fabien@gcc.gnu.org>
612 * cp-tree.h (insert_late_enum_def_into_classtype_sorted_fields):
614 * class.c (insert_into_classtype_sorted_fields): New.
615 (add_enum_fields_to_record_type): New.
616 (count_fields): Adjust the comment.
617 (add_fields_to_record_type): Likewise.
618 (finish_struct_1): Move the code that inserts the fields for the
619 sorted case, into insert_into_classtype_sorted_fields, and call
621 (insert_late_enum_def_into_classtype_sorted_fields): Define.
622 * decl.c (finish_enum_value_list): Call
623 insert_late_enum_def_into_classtype_sorted_fields if a late enum
624 definition is encountered.
626 2012-06-06 Paolo Carlini <paolo.carlini@oracle.com>
629 * typeck.c (cp_perform_integral_promotions): New, like
630 perform_integral_promotions but also takes a tsubst_flags_t parameter.
631 (pointer_diff): Add tsubst_flags_t parameter.
632 (decay_conversion, cp_default_conversion, cp_build_array_ref,
633 cp_build_binary_op, cp_build_unary_op, build_static_cast_1,
634 build_reinterpret_cast_1, cp_build_modify_expr,
635 convert_for_assignment): Adjust.
636 * optimize.c (build_delete_destructor_body): Adjust.
637 * init.c (expand_virtual_init, expand_default_init, build_new_1,
638 build_new, build_vec_delete_1, build_vec_init, build_delete): Adjust.
639 (construct_virtual_base): Adjust LOOKUP_COMPLAIN -> 0.
640 * class.c (build_base_path): Adjust.
641 * decl.c (compute_array_index_type, finish_destructor_body): Likewise.
642 * method.c (synthesized_method_walk): Adjust flag and complain.
643 * rtti.c (ifnonnull): Add tsubst_flags_t parameter.
644 (build_typeid, build_dynamic_cast_1): Adjust.
645 * except.c (initialize_handler_parm): Likewise.
646 * typeck2.c (process_init_constructor_record): Likewise.
647 * pt.c (tsubst_friend_class): Don't change flags.
648 * semantics.c (finish_goto_stmt, handle_omp_for_class_iterator,
649 finish_static_assert): Likewise.
650 * parser.c (cp_parser_lookup_name): Just pass 0 as flags to
652 * call.c (build_op_delete_call): Add tsubst_flags_t parameter.
653 (convert_like_real, convert_arg_to_ellipsis, convert_for_arg_passing):
655 (standard_conversion): Adjust LOOKUP_COMPLAIN -> 0.
656 (implicit_conversion): Mask out tf_error with a FIXME.
657 (build_user_type_conversion_1, build_new_op_1, build_over_call): Use
658 complain & tf_error instead of flags & LOOKUP_COMPLAIN.
659 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
660 build_up_reference, convert_to_reference, cp_convert,
661 cp_convert_and_check, ocp_convert, convert_force): Add tsubst_flags_t
663 (convert_to_reference, ocp_convert): Use complain & tf_error instead
664 of flags & LOOKUP_COMPLAIN.
665 (convert_force): Adjust LOOKUP_COMPLAIN -> 0.
666 * name-lookup.c (identifier_type_value_1, lookup_qualified_name,
667 lookup_name_real, lookup_function_nonclass, lookup_name,
668 lookup_name_prefer_type): Adjust LOOKUP_COMPLAIN -> 0.
669 * cp-tree.h: Adjust prototypes; remove LOOKUP_COMPLAIN.
671 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
673 * decl.c: Do not include output.h.
674 (start_decl): Remove code for flag_conserve_space.
676 2012-06-06 Fabien ChĂȘne <fabien@gcc.gnu.org>
679 * parser.c (cp_parser_alias_declaration): Return earlier
682 2012-06-04 Paolo Carlini <paolo.carlini@oracle.com>
685 * call.c (build_conditional_expr_1): Use OPT_Wenum_compare
686 to control enumeral mismatch in conditional expression too.
688 2012-06-04 Sterling Augustine <saugustine@google.com>
690 * cp-tree.h: Declare decl_as_dwarf_string, lang_decl_dwarf_name.
691 * cp-lang.c (cxx_dwarf_name): Call them.
693 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
695 * semantics.c: Do not include output.h.
697 * friend.c: Likewise.
698 * typeck.c: Likewise.
699 * typeck2.c: Likewise.
700 * Make-lang.in: Fix dependencies.
702 2012-06-01 Jason Merrill <jason@redhat.com>
705 * parser.c (cp_parser_class_head): Apply attributes here.
706 * semantics.c (begin_class_definition): Not here.
710 * parser.c (cp_parser_binary_expression): Bail early if we're parsing
711 tentatively and the LHS has a parse error.
714 * pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
715 (instantiate_decl): Don't push_to_top_level for local class methods.
716 (instantiate_class_template_1): Or for local classes.
719 * pt.c (do_auto_deduction): Don't try to deduce from a
720 type-dependent initializer.
722 2012-06-01 Paolo Carlini <paolo.carlini@oracle.com>
725 * name-lookup.c (push_namespace): When error recovery is
726 impossible just error out in duplicate_decls.
728 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
730 * call.c: Do not include output.h.
732 * except.c: Likewise.
733 * friend.c: Likewise.
736 * method.c: Likewise.
737 * parser.c: Likewise.
740 * search.c: Likewise.
742 2012-05-30 Jason Merrill <jason@redhat.com>
745 * tree.c (stabilize_init): Handle stabilizing a TARGET_EXPR
746 representing a bitwise copy of a glvalue.
748 * tree.c (stabilize_expr): Tweak logic.
751 * tree.c (stabilize_init): Side effects make the init unstable.
753 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
756 * semantics.c (potential_constant_expression_1): Handle LTGT_EXPR.
758 2012-05-26 Paolo Carlini <paolo.carlini@oracle.com>
761 * tree.c (stabilize_expr): Handle exp of void type.
763 2012-05-26 Jason Merrill <jason@redhat.com>
766 * call.c (convert_like_real) [ck_list]: Take array address directly.
767 * typeck.c (decay_conversion): Reject decay of an array compound
770 2012-05-25 Paolo Carlini <paolo.carlini@oracle.com>
773 * parser.c (cp_parser_member_declaration): A storage class is not
774 allowed in a declaration of an anonymous aggregate in a class scope.
776 2012-05-24 Uros Bizjak <ubizjak@gmail.com>
779 * decl.c (grokdeclarator): Check that current_class_type is non-NULL
780 before calling constructor_name_p.
782 2012-05-24 Paolo Carlini <paolo.carlini@oracle.com>
785 * parser.c (cp_parser_ctor_initializer_opt_and_function_body,
786 cp_parser_function_body): Add a bool parameter, true when parsing
787 a function-try-block.
788 (cp_parser_function_try_block): Pass true to the above.
789 (cp_parser_function_definition_after_declarator,
790 cp_parser_function_transaction): Adjust.
792 2012-05-23 Paolo Carlini <paolo.carlini@oracle.com>
795 * decl2.c (delete_sanity): Extend 'deleting array' warning to
798 2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
801 * decl.c (grokdeclarator): Diagnose functions returning abstract
802 class types as TYPENAME.
803 * cp-tree.h (ABSTRACT_CLASS_TYPE_P): Add.
804 * except.c (is_admissible_throw_operand_or_catch_parameter): Use it.
805 * pt.c (tsubst): Likewise.
806 * semantics.c (trait_expr_value): Likewise.
808 2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
811 * parser.c (cp_parser_attributes_opt): Enforce error checking of
812 unbalanced parentheses in the presence of tentative parsing.
814 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
817 * parser.c (cp_parser_new_type_id): Early return error_mark_node
818 if the cp_parser_type_specifier_seq call has type_specifier_seq.type
819 error_mark_node; tidy.
820 (cp_parser_new_expression): Always initialize nelts to NULL_TREE to
821 avoid uninitialized warnings.
822 (cp_parser_init_declarator, cp_parser_late_parse_one_default_arg):
823 Call cp_parser_skip_to_end_of_statement if cp_parser_initializer
824 returns error_mark_node.
826 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
829 * except.c (is_admissible_throw_operand): Rename to
830 is_admissible_throw_operand_or_catch_parameter and handle
832 (expand_start_catch_block): Use it.
833 (build_throw): Adjust.
835 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
838 * typeck.c (build_x_array_ref, build_x_conditional_expr,
839 build_x_compound_expr, build_x_modify_expr): Add location_t parameter.
840 (finish_class_member_access_expr, build_x_indirect_ref,
841 build_x_binary_op, build_x_compound_expr_from_list,
842 build_x_compound_expr_from_vec): Adjust callers.
843 * tree.c (build_min_nt_loc): New.
844 (build_min_nt): Remove.
845 * typeck2.c (build_x_arrow): Adjust callers.
846 * pt.c (tsubst_qualified_id, tsubst_omp_for_iterator,
847 tsubst_copy_and_build): Likewise.
848 * semantics.c (finish_mem_initializers, handle_omp_for_class_iterator,
849 finish_omp_atomic): Likewise.
850 * decl2.c (grok_array_decl, build_anon_union_vars): Adjust.
851 * parser.c (cp_parser_question_colon_clause,
852 cp_parser_assignment_expression, cp_parser_expression,
853 cp_parser_template_id, cp_parser_omp_for_loop): Likewise.
856 2012-05-16 Dodji Seketeli <dodji@redhat.com>
859 * cp-tree.h (enum cp_decl_spec): Add new enumerators to cover all
860 the possible declarator specifiers so far.
861 (struct cp_decl_specifier_seq::locations): Declare new member.
862 (cp_decl_specifier_seq::{specs, type_location}): Remove.
863 (decl_spec_seq_has_spec_p): Declare new function.
864 * parser.c (cp_parser_check_decl_spec): Remove.
865 (set_and_check_decl_spec_loc): Define new static function.
866 (decl_spec_seq_has_spec_p): Define new public function.
867 (cp_parser_decl_specifier_seq, cp_parser_function_specifier_opt)
868 (cp_parser_type_specifier, cp_parser_simple_type_specifier)
869 (cp_parser_set_storage_class, cp_parser_set_decl_spec_type)
870 (cp_parser_alias_declaration): Set the locations for each
871 declspec, using set_and_check_decl_spec_loc.
872 (cp_parser_explicit_instantiation, cp_parser_init_declarator)
873 (cp_parser_member_declaration, cp_parser_init_declarator): Use the
874 new declspec location for specifiers. Use the new
875 decl_spec_seq_has_spec_p.
876 (cp_parser_type_specifier_seq): Use the new
877 set_and_check_decl_spec_loc. Stop using
878 cp_parser_check_decl_spec. Use the new decl_spec_seq_has_spec_p.
879 (, cp_parser_init_declarator): Use the new
880 set_and_check_decl_spec_loc.
881 (cp_parser_single_declaration, cp_parser_friend_p)
882 (cp_parser_objc_class_ivars, cp_parser_objc_struct_declaration):
883 Use the new decl_spec_seq_has_spec_p.
884 * decl.c (check_tag_decl): Use new decl_spec_seq_has_spec_p. Use
885 the more precise ds_redefined_builtin_type_spec location for
886 diagnostics about re-declaring C++ built-in types.
887 (start_decl, grokvardecl, grokdeclarator): Use the new
888 decl_spec_seq_has_spec_p.
890 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
893 * pt.c (tsubst_copy_and_build): Increase / decrease
894 c_inhibit_evaluation_warnings around build_x_binary_op call.
896 2012-05-12 Paolo Carlini <paolo.carlini@oracle.com>
898 * cp-tree.h (TYPE_PTRMEM_P): Rename to TYPE_PTRDATAMEM_P.
899 (TYPE_PTR_TO_MEMBER_P): Rename to TYPE_PTRMEM_P.
900 (TYPE_PTR_OR_PTRMEM_P): Add.
901 * typeck.c (composite_pointer_type_r, composite_pointer_type,
902 common_pointer_type, cp_build_indirect_ref, cp_build_binary_op,
903 cp_truthvalue_conversion, convert_ptrmem, build_static_cast_1,
904 build_reinterpret_cast_1, build_const_cast_1, comp_ptr_ttypes_real,
905 casts_away_constness_r, casts_away_constness): Adjust.
906 * init.c (build_zero_init_1): Adjust.
907 * class.c (check_field_decls): Likewise.
908 * decl.c (check_default_argument): Likewise.
909 * rtti.c (target_incomplete_p): Likewise.
910 * tree.c (zero_init_p): Likewise.
911 * cxx-pretty-print.c (pp_cxx_ptr_operator,
912 pp_cxx_abstract_declarator): Likewise.
913 * typeck2.c (build_m_component_ref): Likewise.
914 * pt.c (convert_nontype_argument, invalid_nontype_parm_type_p,
915 dependent_type_p_r): Likewise.
916 * call.c (null_member_pointer_value_p, standard_conversion,
917 add_builtin_candidate, build_conditional_expr_1, compare_ics):
919 * cp-objcp-common.c (cp_var_mod_type_p): Likewise.
920 * cvt.c (cp_convert_to_pointer, ocp_convert,
921 perform_qualification_conversions): Likewise.
922 * mangle.c (write_type): Likewise.
923 * name-lookup.c (arg_assoc_type): Likewise.
925 2012-05-12 Paolo Carlini <paolo.carlini@oracle.com>
927 * parser.c (struct cp_parser_expression_stack_entry): Add location_t
929 (cp_parser_binary_expression): Rework to always update at the same
930 time tree_type and loc.
931 * call.c (print_z_candidate): Add location_t parameter.
932 (print_z_candidates, convert_like_real, joust): Adjust.
934 2012-05-11 Alexandre Oliva <aoliva@redhat.com>
937 * pt.c (tsubst_decl): Bail out if argvec is error_mark_node.
939 2012-05-11 Paolo Carlini <paolo.carlini@oracle.com>
942 * pt.c (tsubst_copy: case PARM_DECL): Return error_mark_node if
943 tsubst_decl returns NULL_TREE.
944 * cxx-pretty-print.c (pp_cxx_simple_type_specifier): Handle
945 BOUND_TEMPLATE_TEMPLATE_PARM.
947 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
950 * cvt.c (ocp_convert): Error out early for void -> bool conversions.
951 * typeck.c (decay_conversion): Use error_at.
952 * call.c (build_integral_nontype_arg_conv, convert_like_real,
953 convert_arg_to_ellipsis, perform_implicit_conversion_flags,
954 initialize_reference): Likewise.
955 * cvt.c (warn_ref_binding): Add location_t parameter.
956 (cp_convert_to_pointer, convert_to_reference, ocp_convert,
957 convert_to_void, ): Use error_at and warning_at.
959 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
962 * decl.c (check_default_argument): Fix typo (POINTER_TYPE_P
963 instead of TYPE_PTR_P) in zero-as-null-pointer-constant warning.
965 2012-05-06 Paolo Carlini <paolo.carlini@oracle.com>
968 * call.c (op_error, build_new_op_1, build_new_op): Add location_t
970 (build_conditional_expr_1): Adjust.
971 * typeck.c (build_x_indirect_ref, build_x_binary_op,
972 build_x_unary_op): Add location_t parameter.
973 (rationalize_conditional_expr, build_x_array_ref,
974 build_x_compound_expr, cp_build_modify_expr, build_x_modify_expr):
976 * typeck2.c (build_x_arrow): Add location_t parameter.
977 * semantics.c (finish_unary_op_expr): Likewise.
978 (finish_increment_expr, handle_omp_for_class_iterator): Adjust.
979 * decl2.c (grok_array_decl): Add location_t parameter.
980 * parser.c (cp_parser_postfix_open_square_expression,
981 cp_parser_postfix_dot_deref_expression, cp_parser_unary_expression,
982 cp_parser_binary_expression, cp_parser_builtin_offsetof,
983 do_range_for_auto_deduction, cp_convert_range_for,
984 cp_parser_template_argument, cp_parser_omp_for_cond): Pass the
986 * pt.c (tsubst_copy_and_build): Adjust.
987 * tree.c (maybe_dummy_object): Likewise.
988 * cp-tree.h: Update declarations.
990 2012-05-04 Paolo Carlini <paolo.carlini@oracle.com>
992 * semantics.c (cxx_eval_constant_expression, case CONVERT_EXPR): Tidy.
994 2012-05-04 Paolo Carlini <paolo.carlini@oracle.com>
997 * pt.c (instantiate_class_template_1): Increase / decrease
998 c_inhibit_evaluation_warnings around the tsubst_expr call
999 for STATIC_ASSERT_CONDITION.
1000 (tsubst_expr, case STATIC_ASSERT): Likewise.
1001 * typeck.c (cp_build_binary_op, case EQ_EXPR/NE_EXPR): Check
1002 c_inhibit_evaluation_warnings in the OPT_Waddress warnings.
1004 2012-05-03 Paolo Carlini <paolo.carlini@oracle.com>
1007 * call.c (build_over_call): Handle final member functions
1009 (build_new_method_call_1): Do not handle here.
1011 2012-05-02 Richard Guenther <rguenther@suse.de>
1013 * decl.c (grokdeclarator): Properly check for sizes that
1014 cover more than half of the address-space.
1016 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
1019 * typeck.c (cp_build_array_ref): Handle VECTOR_TYPE.
1020 * decl2.c (grok_array_decl): Likewise.
1023 * parser.c (cp_parser_sizeof_operand): Require parentheses for
1026 2012-04-30 Dodji Seketeli <dodji@redhat.com>
1028 Fix location for static class members
1029 * decl.c (grokdeclarator): Use the location carried by the
1030 declarator for the DECL of the static class member.
1032 Fix va_arg type location
1033 * cp-tree.h (build_x_va_arg): Take an additional location
1035 * call.c (build_x_va_arg): Take a loc parameter for the location
1036 of the type of the va_arg expression.
1037 * parser.c (cp_parser_primary_expression): Pass the type of the
1038 type in the va_arg expression to build_x_va_arg.
1039 * pt.c (tsubst_copy): Adjust calls to build_x_va_arg.
1041 Make conversion warnings work on NULL with -ftrack-macro-expansion
1042 * call.c (conversion_null_warnings): Use the new
1043 expansion_point_location_if_in_system_header.
1044 * cvt.c (build_expr_type_conversion): Likewise.
1045 * typeck.c (cp_build_binary_op): Likewise.
1047 2012-04-30 Manuel López-Ibåñez <manu@gcc.gnu.org>
1049 * typeck.c (convert_for_assignment): Replace
1050 Wmissing-format-attribute with Wsuggest-attribute=format.
1051 * call.c (convert_for_arg_passing): Likewise.
1053 2012-04-26 Paolo Carlini <paolo.carlini@oracle.com>
1056 * class.c (check_bases_and_members): Implement core/1333, do not
1057 disallow defaulted in the class body non-const ref special members.
1059 2012-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1062 * call.c (tourney, perform_overload_resolution,
1063 build_operator_new_call, build_user_type_conversion_1,
1064 build_user_type_conversion, perform_overload_resolution,
1065 add_template_candidate, add_template_candidate_real,
1066 add_template_conv_candidate, add_builtin_candidates,
1067 add_builtin_candidate, build_builtin_candidate,
1068 add_conv_candidate, add_function_candidate, implicit_conversion,
1069 reference_binding, build_list_conv, conditional_conversion,
1070 add_candidates, can_convert_array, build_aggr_conv,
1071 build_array_conv, build_complex_conv, conditional_conversion):
1072 Add tsubst_flags_t parameter.
1073 (joust): Likewise, use it to handle SFINAE as if pedantic.
1074 (add_list_candidates, build_integral_nontype_arg_conv,
1075 perform_overload_resolution, build_new_function_call,
1076 build_operator_new_call, build_op_call_1,
1077 build_conditional_expr_1, build_new_op_1, convert_like_real,
1078 convert_arg_to_ellipsis, convert_default_arg,
1079 convert_for_arg_passing, build_over_call,
1080 build_new_method_call_1, can_convert_arg, can_convert_arg_bad,
1081 perform_implicit_conversion_flags,
1082 perform_direct_initialization_if_possible,
1083 initialize_reference): Adjust.
1084 * typeck.c (casts_away_constness, casts_away_constness_r):
1085 Add tsubst_flags_t parameter.
1086 (convert_arguments, check_for_casting_away_constness,
1087 build_static_cast_1, build_ptrmemfunc, convert_for_assignment):
1089 * decl.c (reshape_init_r, check_default_argument): Likewise.
1090 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1091 * pt.c (convert_nontype_argument, check_non_deducible_conversion):
1093 * init.c (build_new_1): Likewise.
1094 * cvt.c (convert_to_reference, ocp_convert, build_type_conversion,
1095 build_expr_type_conversion, ): Likewise.
1096 * search.c (check_final_overrider): Likewise.
1097 * cp-tree.h (build_user_type_conversion,
1098 build_operator_new_call, can_convert, can_convert_arg,
1099 can_convert_arg_bad, convert_default_arg,
1100 convert_arg_to_ellipsis, convert_for_arg_passing):
1103 2012-04-22 Jan Hubicka <jh@suse.cz>
1105 * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they
1108 2012-04-22 Manuel López-Ibåñez <manu@gcc.gnu.org>
1111 * typeck.c (composite_pointer_type): Likewise.
1112 (cxx_sizeof_or_alignof_type): Likewise.
1113 (cp_build_array_ref): Likewise.
1114 (cp_build_function_call_vec): Likewise.
1115 (cp_build_addr_expr_1): Likewise.
1116 (convert_member_func_to_ptr): Likewise.
1117 * decl.c (check_tag_decl): Likewise.
1118 (check_static_variable_definition): Likewise.
1119 (compute_array_index_type): Likewise.
1120 (create_array_type_for_decl): Likewise.
1121 (grokdeclarator): Likewise.
1122 (grok_op_properties): Likewise.
1123 * error.c (maybe_warn_cpp0x): Likewise.
1124 * pt.c (maybe_process_partial_specialization): Likewise.
1125 (convert_template_argument): Likewise.
1126 (do_decl_instantiation): Likewise.
1127 (do_type_instantiation): Likewise.
1128 * parser.c (cp_parser_primary_expression): Likewise.
1129 (cp_parser_postfix_expression): Likewise.
1130 (cp_parser_unary_expression): Likewise.
1131 (cp_parser_question_colon_clause): Likewise.
1132 (cp_parser_lambda_introducer): Likewise.
1133 (cp_parser_lambda_declarator_opt): Likewise.
1134 (cp_parser_compound_statement): Likewise.
1135 (cp_parser_jump_statement): Likewise.
1136 (cp_parser_declaration_seq_opt): Likewise.
1137 (cp_parser_enum_specifier): Likewise.
1138 (cp_parser_enumerator_list): Likewise.
1139 (cp_parser_initializer_list): Likewise.
1140 (cp_parser_member_declaration): Likewise.
1141 * call.c (build_conditional_expr_1): Likewise.
1142 * friend.c (make_friend_class): Likewise.
1143 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
1145 2012-04-21 Jan Hubicka <jh@suse.cz>
1147 * method.c (make_alias_for): Do not set TREE_SYMBOL_REFERENCED.
1148 * decl2.c (mark_needed): Likewise.
1149 (decl_needed_p): Do not test TREE_SYMBOL_REFERENCED.
1151 * decl2.c (cxx_callgraph_analyze_expr): Remove.
1152 * cp-objcp-common.h (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Remove.
1153 * cp-tree.h (cxx_callgraph_analyze_expr): Remove.
1155 2012-04-21 Manuel López-Ibåñez <manu@gcc.gnu.org>
1158 * typeck.c (cp_build_function_call_vec): Do not pretty-print
1159 expressions when caret is enabled.
1161 2012-04-20 Jan Hubicka <jh@suse.cz>
1164 * decl2.c (maybe_emit_vtables): Do not initialize same_comdat_group
1165 list when target has no support for it.
1167 2012-04-20 Michael Matz <matz@suse.de>
1169 * error.c (pedwarn_cxx98): Move va_end call after user
1172 2012-04-18 Paolo Carlini <paolo.carlini@oracle.com>
1175 * cp-tree.h (build_addr_func, decay_conversion,
1176 get_member_function_from_ptrfunc,
1177 build_m_component_ref, convert_member_func_to_ptr):
1178 Add tsubst_flags_t parameter.
1179 * typeck.c (cp_default_conversion): Add.
1180 (decay_conversion, default_conversion,
1181 get_member_function_from_ptrfunc, convert_member_func_to_ptr):
1182 Add tsubst_flags_t parameter and use it throughout.
1183 (cp_build_indirect_ref, cp_build_array_ref,
1184 cp_build_function_call_vec, convert_arguments, build_x_binary_op,
1185 cp_build_binary_op, cp_build_unary_op, build_reinterpret_cast_1,
1186 build_const_cast_1, expand_ptrmemfunc_cst,
1187 convert_for_initialization): Adjust.
1188 * init.c (build_vec_init): Adjust.
1189 * decl.c (grok_reference_init, get_atexit_node): Likewise.
1190 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Likewise.
1191 * except.c (build_throw): Likewise.
1192 * typeck2.c (build_x_arrow): Likewise.
1193 (build_m_component_ref): Add tsubst_flags_t parameter and
1195 * pt.c (convert_nontype_argument): Adjust.
1196 * semantics.c (finish_asm_stmt, maybe_add_lambda_conv_op): Likewise.
1197 * decl2.c (build_offset_ref_call_from_tree): Likewise.
1198 * call.c (build_addr_func): Add tsubst_flags_t parameter and
1200 (build_call_a, build_conditional_expr_1, build_new_op_1,
1201 convert_like_real, convert_arg_to_ellipsis, build_over_call,
1202 build_special_member_call): Adjust.
1203 * cvt.c (cp_convert_to_pointer, force_rvalue,
1204 build_expr_type_conversion): Likewise.
1206 2012-04-17 Tom de Vries <tom@codesourcery.com>
1208 * cp-gimplify.c (begin_bc_block): Add location parameter and use as
1209 location argument to create_artificial_label.
1210 (finish_bc_block): Change return type to void. Remove body_seq
1211 parameter, and add block parameter. Append label to STMT_LIST and
1213 (gimplify_cp_loop, gimplify_for_stmt, gimplify_while_stmt)
1214 (gimplify_do_stmt, gimplify_switch_stmt): Remove function.
1215 (genericize_cp_loop, genericize_for_stmt, genericize_while_stmt)
1216 (genericize_do_stmt, genericize_switch_stmt, genericize_continue_stmt)
1217 (genericize_break_stmt, genericize_omp_for_stmt): New function.
1218 (cp_gimplify_omp_for): Remove bc_continue processing.
1219 (cp_gimplify_expr): Genericize VEC_INIT_EXPR.
1220 (cp_gimplify_expr): Mark FOR_STMT, WHILE_STMT, DO_STMT, SWITCH_STMT,
1221 CONTINUE_STMT, and BREAK_STMT as unreachable.
1222 (cp_genericize_r): Genericize FOR_STMT, WHILE_STMT, DO_STMT,
1223 SWITCH_STMT, CONTINUE_STMT, BREAK_STMT and OMP_FOR.
1224 (cp_genericize_tree): New function, factored out of ...
1225 (cp_genericize): ... this function.
1227 2012-04-17 Paolo Carlini <paolo.carlini@oracle.com>
1230 * semantics.c (build_constexpr_constructor_member_initializers):
1231 Check for function-try-block as function-body.
1233 2012-04-17 Paolo Carlini <paolo.carlini@oracle.com>
1236 * parser.c (cp_parser_member_declaration): Check that
1237 initializer_token_start is non null before dereferencing it.
1239 2012-04-16 Jason Merrill <jason@redhat.com>
1242 * pt.c (determine_specialization): Instead of comparing the number
1243 of parms, check that tsubst gives the right answer.
1246 * pt.c (process_partial_specialization): Complain about a partial
1247 specialization with fewer args than primary template parms.
1250 * pt.c (convert_template_argument): Handle template template
1254 * pt.c (tsubst_pack_expansion): Use tsubst_expr for template
1255 template parameters.
1257 2012-04-16 Paolo Carlini <paolo.carlini@oracle.com>
1260 * call.c (op_error): Print types; when flag_diagnostics_show_caret
1261 is false print expressions too.
1262 (op_error_string): Add.
1264 2012-04-16 Jason Merrill <jason@redhat.com>
1267 * friend.c (make_friend_class): Call check_for_bare_parameter_packs.
1269 2012-04-16 Jan Hubicka <jh@suse.cz>
1271 * decl2.c (collect_candidates_for_java_method_alias): Use FOR_EACH
1272 walkers to walk cgraph and varpool.
1274 2012-04-15 Jason Merrill <jason@redhat.com>
1277 * pt.c (coerce_template_parameter_pack): Check for error_mark_node.
1281 * pt.c (coerce_template_parms): Even if we aren't converting we
1282 want to expand argument packs.
1285 * mangle.c (write_type): nullptr_t is a builtin type.
1287 2012-04-14 Jan Hubicka <jh@suse.cz>
1289 * tree.c: Update field referenced for new cgraph/varpool layout.
1290 * decl2.c: Likewise.
1292 2012-04-13 Jason Merrill <jason@redhat.com>
1295 * pt.c (any_pack_expanson_args_p): New.
1296 (coerce_template_parms): Use it.
1299 * call.c (joust): Handle comparing list and non-list ctors.
1302 * decl2.c (finish_anon_union): Use cp_finish_decl.
1303 * error.c (dump_function_name): Avoid showing anonymous "name".
1305 2012-04-11 Fabien ChĂȘne <fabien@gcc.gnu.org>
1308 * parser.c (cp_parser_class_name): Call strip_using_decl and
1309 return the target decl.
1310 * name-lookup.c (strip_using_decl): Returns NULL_TREE if the decl
1311 to be stripped is NULL_TREE.
1312 (qualify_lookup): Call strip_using_decl and perform some checks on
1315 2012-04-11 Jason Merrill <jason@redhat.com>
1318 * decl.c (grokdeclarator): Strip the injected-class-name typedef
1319 if we are building a declaration or compound type.
1322 * decl.c (check_tag_decl): Don't complain about attributes if we
1323 don't even have a type.
1325 2012-04-10 Manuel López-Ibåñez <manu@gcc.gnu.org>
1327 * cvt.c (convert_to_void): Update comment.
1329 2012-04-05 Jason Merrill <jason@redhat.com>
1332 * semantics.c (finish_non_static_data_member): In templates, pass
1333 the decl to build_qualified_name.
1334 * tree.c (lvalue_kind) [SCOPE_REF]: Handle FIELD_DECL.
1336 2012-04-04 Jason Merrill <jason@redhat.com>
1339 * decl.c (finish_function): Update fntype after deducing return type.
1341 2012-04-03 Jason Merrill <jason@redhat.com>
1344 * pt.c (tsubst_initializer_list): A pack expansion with no elements
1345 means value-initialization.
1347 2012-04-01 Paolo Carlini <paolo.carlini@oracle.com>
1350 * class.c (deduce_noexcept_on_destructor,
1351 deduce_noexcept_on_destructors): New.
1352 (check_bases_and_members): Call the latter.
1353 * decl.c (grokfndecl): Call the former.
1354 * method.c (implicitly_declare_fn): Not static.
1355 * cp-tree.h (deduce_noexcept_on_destructor, implicitly_declare_fn):
1358 2012-03-29 Paolo Carlini <paolo.carlini@oracle.com>
1361 * decl.c (check_default_argument): With -Wzero-as-null-pointer-constant
1362 warn for a zero as null pointer constant default argument.
1364 2012-03-29 Jason Merrill <jason@redhat.com>
1367 * tree.c (copy_binfo): Handle BINFO_DEPENDENT_BASE_P.
1369 2012-03-29 Jakub Jelinek <jakub@redhat.com>
1372 * decl.c (start_decl): Don't call maybe_apply_pragma_weak
1373 if processing_template_decl.
1375 2012-03-29 Jason Merrill <jason@redhat.com>
1378 * call.c (compare_ics): Handle ck_aggr like ck_list.
1380 2012-03-28 Jason Merrill <jason@redhat.com>
1383 * typeck.c (lookup_destructor): Clear BASELINK_QUALIFIED_P if
1384 we didn't get an explicit scope.
1385 * pt.c (tsubst_baselink): Likewise.
1387 2012-03-28 Richard Guenther <rguenther@suse.de>
1389 * typeck2.c (process_init_constructor_array): Use the proper
1390 type for computing the array length.
1392 2012-03-27 Meador Inge <meadori@codesourcery.com>
1395 * semantics.c (cxx_fold_indirect_ref): Don't attempt to fold
1396 stripped child trees that are not pointer types.
1398 2012-03-21 Jason Merrill <jason@redhat.com>
1400 Implement return type deduction for normal functions with -std=c++1y.
1401 * cp-tree.h (FNDECL_USED_AUTO): New macro.
1402 (LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P): Remove.
1403 (dependent_lambda_return_type_node): Remove.
1404 (CPTI_DEPENDENT_LAMBDA_RETURN_TYPE): Remove.
1405 (struct language_function): Add x_auto_return_pattern field.
1406 (current_function_auto_return_pattern): New.
1407 (enum tsubst_flags): Add tf_partial.
1408 * decl.c (decls_match): Handle auto return comparison.
1409 (duplicate_decls): Adjust error message for auto return.
1410 (cxx_init_decl_processing): Remove dependent_lambda_return_type_node.
1411 (cp_finish_decl): Don't do auto deduction for functions.
1412 (grokdeclarator): Allow auto return without trailing return type in
1414 (check_function_type): Defer checking of deduced return type.
1415 (start_preparsed_function): Set current_function_auto_return_pattern.
1416 (finish_function): Set deduced return type to void if not previously
1418 * decl2.c (change_return_type): Handle error_mark_node.
1419 (mark_used): Always instantiate functions with deduced return type.
1420 Complain about use if deduction isn't done.
1421 * parser.c (cp_parser_lambda_declarator_opt): Use 'auto' for
1422 initial return type.
1423 (cp_parser_lambda_body): Don't deduce return type in a template.
1424 (cp_parser_conversion_type_id): Allow auto in C++1y.
1425 * pt.c (instantiate_class_template_1): Don't mess with
1426 LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P.
1427 (tsubst_copy_and_build): Likewise.
1428 (fn_type_unification, tsubst): Don't reduce the template parm level
1429 of 'auto' during deduction.
1430 (unify): Compare 'auto' specially.
1431 (get_bindings): Change test.
1432 (always_instantiate_p): Always instantiate functions with deduced
1434 (do_auto_deduction): Handle error_mark_node and lambda context.
1435 Don't check for use in initializer.
1436 (contains_auto_r): Remove.
1437 * search.c (lookup_conversions_r): Handle auto conversion function.
1438 * semantics.c (lambda_return_type): Handle null return. Don't mess
1439 with dependent_lambda_return_type_node.
1440 (apply_deduced_return_type): Rename from apply_lambda_return_type.
1441 * typeck.c (merge_types): Handle auto.
1442 (check_return_expr): Do auto deduction.
1443 * typeck2.c (add_exception_specifier): Fix complain check.
1445 2012-03-22 Paolo Carlini <paolo.carlini@oracle.com>
1448 * class.c (check_field_decls): Call literal_type_p only
1451 2012-03-22 Jakub Jelinek <jakub@redhat.com>
1454 * decl.c (check_tag_decl): Only use CLASSTYPE_TEMPLATE_INSTANTIATION
1455 on CLASS_TYPE_P types.
1457 2012-03-20 Jason Merrill <jason@redhat.com>
1459 * lex.c (init_reswords): Use >= for cxx_dialect test.
1460 * parser.c (cp_parser_exception_specification_opt): Likewise.
1462 * mangle.c (write_type): Handle 'auto'.
1463 * init.c (build_new): Don't do auto deduction where it might
1464 affect template mangling.
1467 * decl.c (reshape_init_class): Handle repeated reshaping.
1468 * search.c (lookup_field_1): Add sanity check.
1470 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
1473 * cp-tree.h (xvalue_p, maybe_warn_about_useless_cast): Declare.
1474 * tree.c (xvalue_p): Define.
1475 * typeck.c (maybe_warn_about_useless_cast): Define.
1476 (build_reinterpret_cast, build_const_cast,
1477 build_static_cast, cp_build_c_cast): Use maybe_warn_about_useless_cast.
1478 * rtti.c (build_dynamic_cast): Likewise.
1479 * pt.c (tsubst_copy_and_build, case CAST_EXPR): Increment/decrement
1480 c_inhibit_evaluation_warnings before/after the build_* calls.
1482 2012-03-15 Jason Merrill <jason@redhat.com>
1485 * method.c (implicitly_declare_fn): Set DECL_EXTERNAL.
1487 2012-03-15 Manuel López-Ibåñez <manu@gcc.gnu.org>
1490 * error.c (print_instantiation_partial_context): Use
1491 template_backtrace_limit.
1493 2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1495 * Make-lang.in (doc/g++.1): Remove IRIX 6.5 reference.
1497 2012-03-14 Jakub Jelinek <jakub@redhat.com>
1500 * parser.c (lookup_literal_operator): Return fn only if
1501 processed all arguments from args vector and argtypes is
1504 2012-01-30 Dodji Seketeli <dodji@redhat.com>
1507 * cp-tree.h (template_type_parameter_p): Declare new function.
1508 (parameter_of_template_p): Remove.
1509 * pt.c (template_type_parameter_p): Define new function.
1510 (parameter_of_template_p): Remove.
1511 * name-lookup.c (binding_to_template_parms_of_scope_p): Don't rely
1512 on parameter_of_template_p anymore. Compare the level of the
1513 template parameter to the depth of the template.
1515 2011-12-15 Dodji Seketeli <dodji@redhat.com>
1517 * call.c (standard_conversion, build_integral_nontype_arg_conv)
1518 (build_new_op_1, convert_like_real, is_subseq)
1519 (maybe_handle_implicit_object, maybe_handle_ref_bind, compare_ics)
1520 (joust): Use next_conversion instead of accessing fields of struct
1521 conversion directly.
1523 2012-03-12 Paolo Carlini <paolo.carlini@oracle.com>
1526 * pt.c (tsubst_copy_and_build, case COND_EXPR): Avoid bogus
1527 division by zero warnings.
1529 2012-03-08 Paolo Carlini <paolo.carlini@oracle.com>
1531 * typeck.c (build_array_ref, cp_build_addr_expr_1, convert_ptrmem,
1532 build_ptrmemfunc): Consistently forward the tsubst_flags_t
1534 * call.c (resolve_args): Likewise.
1536 2012-03-07 Jason Merrill <jason@redhat.com>
1539 * mangle.c (write_literal_operator_name): The length comes after the
1542 2012-03-05 Jakub Jelinek <jakub@redhat.com>
1544 * pt.c (local_specializations): Change from htab_t into
1545 struct pointer_map_t *.
1546 (retrieve_local_specializations, register_local_specialization,
1547 tsubst_pack_expansion, instantiate_decl): Adjust users.
1548 (eq_local_specializations, hash_local_specialization): Remove.
1550 2012-03-05 Jason Merrill <jason@redhat.com>
1553 * decl2.c (determine_visibility): Correct calculation of class
1555 * decl.c (check_tag_decl): Adjust warning.
1557 * method.c (synthesized_method_walk): Cleanups don't affect the EH
1560 2012-03-03 Jason Merrill <jason@redhat.com>
1562 * init.c (perform_member_init): Cope with uninstantiated NSDMI.
1565 * call.c (build_aggr_conv): Call reshape_init.
1566 (convert_like_real): Likewise.
1567 * typeck2.c (process_init_constructor): Clear TREE_CONSTANT if
1570 * mangle.c (write_nested_name): Use decl_mangling_context.
1571 (write_prefix, write_template_prefix): Likewise.
1574 * mangle.c (write_expression): Improve diagnostic for TRAIT_EXPR.
1576 * class.c (add_method): Always build an OVERLOAD for using-decls.
1577 * search.c (lookup_member): Handle getting an OVERLOAD for a
1580 2012-03-02 Paolo Carlini <paolo.carlini@oracle.com>
1583 * typeck2.c (build_x_arrow): Take a tsubst_flags_t argument and
1585 * cp-tree.h (build_x_arrow): Adjust prototype.
1586 * pt.c (tsubst_copy_and_build): Adjust call.
1587 * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
1589 2012-03-02 Paolo Carlini <paolo.carlini@oracle.com>
1591 * name-lookup.c (binding_to_template_parms_of_scope_p): Clean up.
1593 2012-02-29 Jason Merrill <jason@redhat.com>
1596 * decl.c (check_tag_decl): Move warning for misplaced attributes here.
1597 (shadow_tag): From here.
1598 * parser.c (cp_parser_explicit_instantiation): Don't warn here.
1600 2012-02-21 Jakub Jelinek <jakub@redhat.com>
1603 * typeck.c (check_literal_operator_args): Initialize *long_double_p
1604 and *long_long_unsigned_p even if processing_template_decl.
1606 2012-02-16 Jason Merrill <jason@redhat.com>
1609 * decl.c (define_label): Use timevar_cond_start/stop.
1611 2012-02-16 Fabien ChĂȘne <fabien@gcc.gnu.org>
1614 * decl.c (xref_basetypes): call dependent_scope_p instead of
1617 2012-02-16 Jason Merrill <jason@redhat.com>
1620 * error.c (dump_expr): Handle lambda closures specifically.
1622 2012-02-14 Jason Merrill <jason@redhat.com>
1624 * parser.c (cp_parser_explicit_instantiation): Give a warning
1625 for ignored attributes on explicit class instantiation.
1627 2012-02-14 Jakub Jelinek <jakub@redhat.com>
1630 * pt.c (tsubst_copy_asm_operands): For LABEL_DECL values call
1631 lookup_label on label's name and set TREE_USED.
1633 2012-02-14 Jason Merrill <jason@redhat.com>
1636 * decl.c (local_variable_p_walkfn): Don't check DECL_ARTIFICIAL.
1638 2012-02-14 Jakub Jelinek <jakub@redhat.com>
1641 * decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than
1642 newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits.
1644 2012-02-07 Jason Merrill <jason@redhat.com>
1647 * semantics.c (cx_check_missing_mem_inits): Handle unions.
1648 Fix constexpr default constructor logic.
1651 * pt.c (tsubst): Strip uninstantiated typedef.
1653 2012-02-06 Jason Merrill <jason@redhat.com>
1656 * cvt.c (build_expr_type_conversion): Check for template conversion.
1658 2012-01-31 Jason Merrill <jason@redhat.com>
1661 * cp-tree.h (PACK_EXPANSION_LOCAL_P): New.
1662 * pt.c (make_pack_expansion, tsubst_initializer_list): Set it.
1663 (tsubst_pack_expansion): Check it.
1665 2012-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1668 * class.c (explain_non_literal_class): Correctly handle implicitly
1669 deleted constructors.
1671 2012-01-27 Jakub Jelinek <jakub@redhat.com>
1674 * pt.c (tsubst_pack_expansion): Delete and restore
1675 local_specialization whenever need_local_specialization, not just
1676 when saved_local_specializations is non-NULL.
1678 2012-01-26 Paolo Carlini <paolo.carlini@oracle.com>
1681 * error.c (dump_decl, [TEMPLATE_ID_EXPR]): Handle error_mark_node
1682 as TREE_OPERAND (t, 1).
1684 2012-01-24 Jason Merrill <jason@redhat.com>
1687 * decl.c (xref_basetypes): Check VEC_length instead of VEC_space.
1690 * tree.c (called_fns_equal): Check template args.
1691 (cp_tree_equal): Call it.
1693 2012-01-24 Aldy Hernandez <aldyh@redhat.com>
1694 Patrick Marlier <patrick.marlier@gmail.com>
1697 * class.c (set_method_tm_attributes): Use TARGET_THUNK instead of
1698 thunk for set_one_vmethod_tm_attributes.
1700 2012-01-24 Paolo Carlini <paolo.carlini@oracle.com>
1703 * call.c (build_over_call): Check for error_mark_node as
1704 TREE_VALUE when default arguments are processed.
1706 2012-01-23 Jason Merrill <jason@redhat.com>
1709 * decl2.c (determine_visibility): Check for visibility attribute
1710 on template specialization.
1712 2012-01-23 Paolo Carlini <paolo.carlini@oracle.com>
1715 * pt.c (parameter_of_template_p): Skip error_mark_node parameters.
1717 2012-01-23 Jason Merrill <jason@redhat.com>
1720 * class.c (add_method): Set OVL_USED for using-decls.
1721 * tree.c (ovl_scope): New.
1722 * cp-tree.h: Declare it.
1723 * parser.c (cp_parser_template_name): Use it.
1724 * semantics.c (baselink_for_fns): Likewise.
1725 * name-lookup.c (set_inherited_value_binding_p): Likewise.
1727 2012-01-20 Paolo Carlini <paolo.carlini@oracle.com>
1730 * pt.c (lookup_template_class_1): Check context returned by
1731 tsubst for error_mark_node.
1733 2012-01-19 Kai Tietz <ktietz@redhat.com>
1736 * decl2.c (save_template_attributes): Use merge_attributes
1737 instead of chaining up via TREE_CHAIN.
1739 2012-01-19 Jason Merrill <jason@redhat.com>
1742 * class.c (finish_struct): Call add_method here for function usings.
1743 * semantics.c (finish_member_declaration): Not here.
1745 2012-01-18 Paolo Carlini <paolo.carlini@oracle.com>
1748 * typeck2.c (store_init_value): Within a template guard
1749 cxx_constant_value with require_potential_constant_expression.
1750 * pt.c (convert_nontype_argument): Likewise.
1752 2012-01-16 Jakub Jelinek <jakub@redhat.com>
1755 * mangle.c (write_template_arg_literal): Handle complex.
1757 2012-01-16 Jason Merrill <jason@redhat.com>
1760 * mangle.c (mangle_decl): Don't mangle uninstantiated templates.
1763 * typeck.c (build_static_cast_1): Handle bit-fields properly.
1765 2012-01-13 Ian Lance Taylor <iant@google.com>
1768 * typeck.c (enum_cast_to_int): New static function.
1769 (cp_build_binary_op): When handling warn_sign_compare, don't test
1770 for TREE_NO_WARNING. Do call enum_cast_to_int.
1771 * call.c (avoid_sign_compare_warnings): Remove static function.
1772 (build_new_op_1): Don't call avoid_sign_compare_warnings.
1774 2012-01-13 Steven Bosscher <steven@gcc.gnu.org>
1776 * decl2.c: Do not include tree-mudflap.h
1777 * semantics.c: Likewise.
1779 2012-01-13 Jason Merrill <jason@redhat.com>
1782 * semantics.c (finish_break_stmt): Avoid adding an unreachable
1786 * decl2.c (constrain_visibility): Clear DECL_VISIBILITY_SPECIFIED
1787 when reducing the visibility.
1790 * class.c (build_vtbl_initializer): Use __cxa_deleted_virtual.
1792 2012-01-12 Jason Merrill <jason@redhat.com>
1795 * pt.c (value_dependent_expression_p): Treat STMT_EXPR as
1798 2012-01-13 Dodji Seketeli <dodji@redhat.com>
1801 * semantics.c (cp_parser_ctor_initializer_opt_and_function_body):
1802 Set the pointer to the last block of the constructor to the
1804 (build_constexpr_constructor_member_initializers): Get
1805 build_data_member_initialization a chance to deal with more
1806 statements before we choke.
1808 2012-01-12 Jason Merrill <jason@redhat.com>
1811 * mangle.c (write_expression): Mangle BASELINK scope if
1812 BASELINK_QUALIFIED_P.
1813 * search.c (adjust_result_of_qualified_name_lookup): Set
1814 BASELINK_QUALIFIED_P.
1815 * tree.c (cp_tree_equal) [BASELINK]: Compare BASELINK_QUALIFIED_P.
1816 * parser.c (cp_parser_postfix_dot_deref_expression): Don't call
1817 adjust_result_of_qualified_name_lookup for non-qualified names.
1820 * pt.c (unify): Handle error_mark_node.
1822 2012-01-11 Jason Merrill <jason@redhat.com>
1825 * call.c (standard_conversion): For ptrmemfuncs, compare the
1829 * mangle.c (find_substitution): A type is only a substitution
1830 match if we're looking for a type.
1831 (write_nested_name): Use decl_mangling_context.
1833 * decl.c (decls_match): Assert that the arguments are decls.
1836 * pt.c (resolve_overloaded_unification): Compare types with
1837 same_type_p, not decls_match.
1839 2012-01-10 Jason Merrill <jason@redhat.com>
1842 * class.c (build_base_path): Diagnose ambiguous base.
1845 * semantics.c (cxx_eval_call_expression): Always retry previously
1846 non-constant expressions.
1848 2012-01-06 Jason Merrill <jason@redhat.com>
1852 * parser.c (cp_parser_new_expression): Set
1853 type_definition_forbidden_message.
1859 * mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR,
1860 THROW_EXPR, CONSTRUCTOR, OVERLOAD. Fix PREINCREMENT_EXPR and
1862 (write_template_arg): Fix mangling of class-scope functions and
1864 (mangle_decl): Update suggested -fabi-version argument.
1865 * operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR,
1866 DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR.
1867 * tree.c (dependent_name): No longer static.
1868 * cp-tree.h: Declare it.
1869 * pt.c (unify): Defer handling of unconverted functions.
1871 * mangle.c (mangle_decl): Don't generate mangling aliases
1872 for maybe-in-charge [cd]tors.
1874 * error.c (dump_expr): Print type of CONSTRUCTOR.
1876 2012-01-05 Dodji Seketeli <dodji@redhat.com>
1879 * parser.c (cp_parser_alias_declaration): Get out early upon
1880 errors in the identifier or the attributes.
1882 2012-01-04 Paolo Carlini <paolo.carlini@oracle.com>
1885 * pt.c (tsubst_copy_and_build): Maybe set TREE_NO_WARNING on
1886 the tree returned by build_x_binary_op.
1888 2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
1891 * parser.c (cp_parser_postfix_open_square_expression): Handle
1892 postfix-expression [ braced-init-list ].
1894 2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
1897 * rtti.c (build_dynamic_cast_1): In case of T a pointer type,
1898 call decay_conversion on v.
1900 2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
1903 * decl.c (duplicate_decls): With -Wredundant-decls don't warn for
1904 declaration followed by specialization.
1906 2012-01-03 Jakub Jelinek <jakub@redhat.com>
1909 * semantics.c (finish_omp_clauses): Call fold_build_cleanup_point_expr
1910 on OMP_CLAUSE_{IF,FINAL,NUM_THREADS,SCHEDULE_CHUNK}_EXPR.
1912 2012-01-02 Jason Merrill <jason@redhat.com>
1916 * method.c (walk_field_subobs): Don't check for uninitialized
1918 (synthesized_method_walk): Check here.
1922 * parser.c (cp_parser_cache_defarg): Split out...
1923 (cp_parser_parameter_declaration): ...from here.
1924 (cp_parser_save_nsdmi): Use it.
1925 (cp_parser_cache_group): Remove CPP_COMMA support.
1927 2012-01-02 Dodji Seketeli <dodji@redhat.com>
1930 * semantics.c (cx_check_missing_mem_inits): Don't assert in case
1933 2012-01-02 Paolo Carlini <paolo.carlini@oracle.com>
1936 * typeck2.c (digest_init_r): Use copy_init when initializing
1939 2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
1942 * decl.c (build_enumerator): Don't call perform_integral_promotions
1945 2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
1948 * typeck.c (build_reinterpret_cast_1): Implement resolution of
1951 2012-01-01 Fabien ChĂȘne <fabien@gcc.gnu.org>
1953 * parser.c (cp_parser_using_declaration): Add a warning about
1954 deprecated access declarations when no errors were encountered
1955 while parsing the access declaration. Save the first token in
1956 order to emit the warning at the right place.
1958 Copyright (C) 2012 Free Software Foundation, Inc.
1960 Copying and distribution of this file, with or without modification,
1961 are permitted in any medium without royalty provided the copyright
1962 notice and this notice are preserved.