1 2012-09-06 Jason Merrill <jason@redhat.com>
5 * semantics.c (sort_constexpr_mem_initializers): New.
6 (build_constexpr_constructor_member_initializers): Use it.
7 (cx_check_missing_mem_inits): Skip artificial fields.
8 * init.c (expand_aggr_init_1): Don't zero out a class
11 2012-09-05 Paolo Carlini <paolo.carlini@oracle.com>
14 * search.c (lookup_base): Add tsubst_flags_t parameter.
15 (adjust_result_of_qualified_name_lookup, check_final_overrider):
17 * name-lookup.c (do_class_using_decl): Adjust.
18 * typeck2.c (binfo_or_else, build_scoped_ref, build_m_component_ref):
20 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
21 build_up_reference): Likewise.
22 * rtti.c (build_dynamic_cast_1): Likewise.
23 * tree.c (maybe_dummy_object): Likewise.
24 * call.c (build_conditional_expr_1, build_over_call): Likewise.
25 * cp-tree.h (UNIQUELY_DERIVED_FROM_P, PUBLICLY_UNIQUELY_DERIVED_P):
27 (enum base_access_flags, ba_quiet): Remove.
28 (uniquely_derived_from_p, publicly_uniquely_derived_p): Declare.
29 * except.c (can_convert_eh): Adjust.
30 * decl.c (grokdeclarator): Likewise.
31 * typeck.c (comp_except_types, build_class_member_access_expr,
32 finish_class_member_access_expr, get_member_function_from_ptrfunc,
33 build_static_cast_1, get_delta_difference_1): Likewise.
34 * class.c (build_base_path, convert_to_base, build_vtbl_ref_1,
35 warn_about_ambiguous_bases): Likewise.
36 (uniquely_derived_from_p, publicly_uniquely_derived_p): Define.
38 2012-09-04 Jason Merrill <jason@redhat.com>
41 * decl.c (reshape_init_class): Handle invalid initializer for
42 0-length array member.
44 * error.c (dump_type_suffix): Correct handling of 0-length arrays.
47 * cp-tree.h (LAMBDANAME_P): Remove.
48 (LAMBDA_TYPE_P): Check CLASSTYPE_LAMBDA_EXPR instead.
49 * cp-lang.c (cxx_dwarf_name): Likewise.
50 * error.c (dump_aggr_type): Likewise.
51 * semantics.c (begin_lambda_type): Set CLASSTYPE_LAMBDA_EXPR sooner.
54 * decl.c (check_default_argument): Set cp_unevaluated_operand
55 around call to perform_implicit_conversion_flags.
59 * pt.c (fn_type_unification): Call coerce_template_parms before
60 entering substitution context.
62 2012-08-31 Paolo Carlini <paolo.carlini@oracle.com>
63 Jason Merrill <jason@redhat.com>
66 * pt.c (check_template_variable): New.
67 (num_template_headers_for_class): Split out...
68 * decl.c (grokdeclarator): ...from here.
69 (start_decl): Remove redundant diagnostic.
70 * cp-tree.h: Declare them
71 * parser.c (cp_parser_single_declaration): Call check_template_variable.
73 2012-08-31 Ollie Wild <aaw@google.com>
76 * call.c (extend_ref_init_temps_1): Handle COMPOUND_EXPR trees.
78 2012-08-30 Jason Merrill <jason@redhat.com>
82 * pt.c (instantiation_dependent_r): New.
83 (instantiation_dependent_expression_p): New.
84 (value_dependent_expression_p): Use it. SCOPE_REF is always dependent.
85 * semantics.c (finish_decltype_type): Use it.
86 * cp-tree.h: Declare it.
88 * semantics.c (finish_qualified_id_expr): Handle building up a
89 non-dependent SCOPE_REF here.
90 (finish_id_expression): Not here.
91 * error.c (dump_decl) [SCOPE_REF]: Only pass TFF_UNQUALIFIED_NAME.
93 * friend.c (make_friend_class): Handle template template parameters.
94 * parser.c (cp_parser_template_declaration_after_export): Likewise.
95 * pt.c (tsubst_friend_class): Likewise.
96 (instantiate_class_template_1): Likewise
97 * decl.c (check_elaborated_type_specifier): Likewise.
98 (lookup_and_check_tag): Likewise.
100 * pt.c (get_class_bindings): Call coerce_template_parms. Add
102 (more_specialized_class): Add main_tmpl parameter.
103 (most_specialized_class): Adjust calls.
105 * decl.c (cp_finish_decl): Check for invalid multiple initializers
106 even if the initializer is dependent.
108 * pt.c (instantiate_template_1): Keep processing_template_decl set
109 if there are dependent args.
111 2012-08-25 Paolo Carlini <paolo.carlini@oracle.com>
114 * decl2.c (mark_used): Consistently return false after errors
115 about uses before deduction of auto.
116 * semantics.c (finish_id_expression): Check mark_used return
117 value and return error_mark_node in case of failure.
119 2012-08-24 Jason Merrill <jason@redhat.com>
122 * pt.c (deduction_tsubst_fntype): Remove.
123 (fn_type_unification): Check deduction depth and call
124 instantiate_template here. Handle default argument access checks.
125 (determine_specialization): Suppress access control.
126 (tsubst_decl): Check for excessive deduction depth.
127 (recheck_decl_substitution): Make sure access control is on.
128 (type_unification_real): Don't mess with access deferring here.
129 (get_bindings): Adjust for fn_type_unification return type.
130 * call.c (enum rejection_reason_code): Drop rr_template_instantiation.
131 (template_instantiation_rejection): Remove.
132 (struct rejection_reason): Change targs to num_targs.
133 (template_unification_rejection, print_z_candidate): Adjust.
134 (add_template_candidate_real): Adjust for fn_type_unification change.
135 * class.c (resolve_address_of_overloaded_function): Likewise.
136 * cp-tree.h: Adjust declaration.
138 * pt.c (tsubst_default_argument): Indicate where the default
139 argument is being instantiated for.
140 (tsubst_expr): Restore previous location.
141 (tsubst_copy_and_build): Set and restore location.
142 * call.c (build_new_method_call_1): Remember location of call.
143 * semantics.c (finish_call_expr): Here too.
144 * parser.c (cp_parser_omp_for_loop): Remember the location of the
145 increment expression.
147 * pt.c (resolve_overloaded_unification): Use coerce_template_parms
148 instead of get_bindings.
149 (resolve_nondeduced_context): Likewise.
151 * pt.c (register_specialization): Correct argument to
152 check_specialization_namespace.
153 (determine_specialization): Don't consider members of
156 2012-08-23 Jason Merrill <jason@redhat.com>
158 * decl.c (compute_array_index_type): Use type_dependent_expression_p.
160 2012-08-23 Paolo Carlini <paolo.carlini@oracle.com>
163 * name-lookup.c (supplement_binding_1): Handle specially enums
164 only in class templates.
165 (validate_nonmember_using_decl): Enforce 7.3.3/10 about duplicate
166 using declarations at function scope.
168 2012-08-21 Richard Guenther <rguenther@suse.de>
170 * cp-tree.h (TREE_INDIRECT_USING): Use TREE_LANG_FLAG_0 accessor.
171 (ATTR_IS_DEPENDENT): Likewise.
172 (ARGUMENT_PACK_INCOMPLETE_P): Use TREE_ADDRESSABLE instead of
173 TREE_LANG_FLAG_0 on TREE_VECs.
175 2012-08-20 Paolo Carlini <paolo.carlini@oracle.com>
178 * decl.c (poplevel): Check TYPE_HAS_NONTRIVIAL_DESTRUCTOR for
179 Wunused_variable too.
181 2012-08-20 Diego Novillo <dnovillo@google.com>
183 * decl.c (poplevel): Start TV_NAME_LOOKUP conditionally.
185 2012-08-20 Richard Guenther <rguenther@suse.de>
187 * name-lookup.c (store_binding_p): New predicate, split out from ...
188 (store_binding): ... here. Always store binding and require
189 target vector with enough space.
190 (store_bindings): Collect to store bindings and reserve space
191 for them, then store them.
192 (store_class_bindings): Likewise.
194 2012-08-19 Mikael Morin <mikael@gcc.gnu.org>
196 * Make-lang.in: Fix typo.
198 2012-08-17 Jakub Jelinek <jakub@redhat.com>
200 * cp-tree.def (SIZEOF_EXPR): Move to c-common.def.
202 2012-08-14 Diego Novillo <dnovillo@google.com>
204 Merge from cxx-conversion branch. Re-write VEC in C++.
206 * call.c (add_function_candidate): Remove const qualifier
207 from call to VEC_index.
209 2012-08-10 Richard Guenther <rguenther@suse.de>
211 * error.c (dump_expr): Handle anonymous SSA names.
213 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
215 * error.c (print_instantiation_context): Pretty-print a newline before
216 diagnostic_flush_buffer.
217 * cxx-pretty-print.c (pp_cxx_function_definition): Use
218 pp_newline_and_flush instead of separate pp_newline and pp_flush.
220 2012-08-06 Dodji Seketeli <dodji@redhat.com>
222 Avoid crashing on erroneous static_assert usage
223 * semantics.c (finish_static_assert): Don't crash on erroneous
224 message or condition.
226 2012-08-06 Marc Glisse <marc.glisse@inria.fr>
227 Paolo Carlini <paolo.carlini@oracle.com>
230 * typeck.c (build_static_cast_1): Move the conversion to void case
231 before the perform_direct_initialization_if_possible call.
233 2012-08-03 Marc Glisse <marc.glisse@inria.fr>
235 * pt.c (tsubst_copy_and_build): Handle VECTOR_TYPE like scalars.
236 * cp-tree.h (scalarish_type_p): Declare.
237 * tree.c (scalarish_type_p): Make non-static.
239 2012-08-02 Jason Merrill <jason@redhat.com>
240 Paolo Carlini <paolo.carlini@oracle.com>
243 * pt.c (type_unification_real): Call push_deferring_access_checks /
244 pop_deferring_access_checks around the substitution of default
246 (instantiate_template_1): When the specialization returned by
247 retrieve_specialization has FNDECL_HAS_ACCESS_ERRORS set and we
248 are in a SFINAE context, simply return error_mark_node.
249 * cp-tree.h (FNDECL_RECHECK_ACCESS_P): Rename FNDECL_HAS_ACCESS_ERRORS.
251 2012-07-31 Paolo Carlini <paolo.carlini@oracle.com>
253 * pt.c (check_default_tmpl_args): Change is_primary and is_partial
254 parameters to bool type, adjust.
255 (push_template_decl_real): Tidy.
256 * parser.c (cp_parser_init_declarator): Adjust.
257 * decl.c (redeclaration_error_message): Likewise.
258 * cp-tree.h (check_default_tmpl_args): Update prototype.
260 2012-07-31 Paolo Carlini <paolo.carlini@oracle.com>
263 * pt.c (check_default_tmpl_args): Don't check local types.
265 2012-07-25 Sandra Loosemore <sandra@codesourcery.com>
266 Paul Brook <paul@codesourcery.com>
269 * decl.c (finish_function): Check targetm.warn_func_return.
271 2012-07-25 Jason Merrill <jason@redhat.com>
274 * decl.c (grokdeclarator): Allow const and constexpr together.
277 * semantics.c (potential_constant_expression_1) [COND_EXPR]: Call
278 maybe_constant_value.
280 * cp-tree.h (tsubst_flags): Remove tf_no_access_control.
281 * call.c (standard_conversion): Don't set it.
282 * class.c (resolve_address_of_overloaded_function): Don't check it.
283 * decl.c (check_default_argument): Call
284 perform_implicit_conversion_flags.
286 * pt.c (print_candidates_1): Use inform instead of error.
288 2012-07-24 Paolo Carlini <paolo.carlini@oracle.com>
290 * pt.c (convert_template_argument, tsubst): Simplify fourth argument
291 to make_typename_type (complain & tf_error -> complain).
293 2012-07-24 Steven Bosscher <steven@gcc.gnu.org>
295 * class.c (n_vtables, n_vtable_entries, n_vtable_searches,
296 n_vtable_elems, n_convert_harshness, n_compute_conversion_costs,
297 n_inner_fields_searched): Always define.
298 (build_primary_vtable): Convert #ifdef GATHER_STATISTICS to if-code.
299 (print_class_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
300 * tree.c (depth_reached): Always define global.
301 (cxx_print_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
302 * pt.c (depth_reached): Always define.
303 (push_tinst_level): Convert #ifdef GATHER_STATISTICS to if-code.
304 * search.c (n_fields_searched, n_calls_lookup_field,
305 n_calls_lookup_field_1, n_calls_lookup_fnfields,
306 n_calls_lookup_fnfields_1, n_calls_get_base_type,
307 n_outer_fields_searched, n_contexts_saved): Always define.
308 (lookup_field_1): Convert #ifdef GATHER_STATISTICS to if-code.
309 (lookup_member): Likewise.
310 (lookup_fnfields_idx_nolazy): Likewise.
311 (print_search_statistics): Likewise.
312 (reinit_search_statistics): Unconditionally re-set counters.
313 * lex.c (retrofit_lang_decl): Convert #ifdef GATHER_STATISTICS
315 (cxx_dup_lang_specific_decl): Likewise.
316 (copy_lang_type): Likewise.
317 (cxx_make_type): Likewise.
319 2012-07-20 Jason Merrill <jason@redhat.com>
322 * tree.c (build_cplus_array_type): Use build_cplus_array_type to build
323 canonical array type rather than mess with its TYPE_*_VARIANT.
325 2012-07-19 Jason Merrill <jason@redhat.com>
328 * typeck.c (cp_apply_type_quals_to_decl): Check COMPLETE_TYPE_P.
331 * call.c (build_cxx_call): Set optimize when folding
332 __builtin_constant_p in a constexpr function.
334 2012-07-18 Jason Merrill <jason@redhat.com>
336 * pt.c (instantiate_decl): Don't recheck substitutions.
338 2012-07-18 Paolo Carlini <paolo.carlini@oracle.com>
339 Jason Merrill <jason@redhat.com>
343 * semantics.c (perform_access_checks): Add complain parm, return bool.
344 (perform_deferred_access_checks): Likewise.
345 (perform_or_defer_access_check): Likewise.
346 (speculative_access_check): Remove.
347 * call.c (enforce_access): Add complain parm, return bool.
348 * decl.c, friend.c, class.c, init.c, parser.c: Adjust callers.
349 * search.c: Adjust callers.
350 * cp-tree.h (TINFO_RECHECK_ACCESS_P): New macro.
351 (FNDECL_RECHECK_ACCESS_P): New macro.
352 * method.c (synthesized_method_walk): Stop deferring access checks.
353 * pt.c (recheck_decl_substitution): New.
354 (instantiate_template_1): Set and check FNDECL_RECHECK_ACCESS_P.
356 2012-07-18 Jason Merrill <jason@redhat.com>
358 * method.c (process_subob_fn): Make sure no_implicit_p is non-null
359 before trying to store through it.
361 2012-07-17 Jason Merrill <jason@redhat.com>
364 * decl.c (finish_enum_value_list): Only call
365 insert_late_enum_def_into_classtype_sorted_fields in class scope.
368 * tree.c (build_cplus_array_type): Also add TYPE_CANONICAL
369 to the list of variants.
371 * decl.c (xref_basetypes): Complain about incomplete template base.
372 * class.c (finish_struct): Adjust variants in templates, too.
375 * parser.c (cp_parser_class_head): Call xref_basetypes here.
376 (cp_parser_class_specifier_1): Not here.
377 * pt.c (tsubst_decl) [USING_DECL]: Check uses_template_parms
378 as well as DECL_DEPENDENT_P.
380 2012-07-16 Jason Merrill <jason@redhat.com>
382 * cp-tree.h (struct deferred_access_check): Add location.
383 * semantics.c (perform_access_checks): Use it.
384 (perform_or_defer_access_check): Store it.
386 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
388 * dump.c (dump_stmt): Moved here from c-dump.c.
389 * optimize.c: Include dumpfile.h instead of tree-dump.h.
392 * Make-lang.in: Fix dependencies.
394 2012-07-13 Jason Merrill <jason@redhat.com>
397 * method.c (synthesized_method_walk): Initialize no_implicit_p sooner.
399 2012-07-12 Jason Merrill <jason@redhat.com>
401 * pt.c (instantiate_decl): Check typedefs access here.
402 (instantiate_template_1): Not here.
404 * pt.c (deduction_tsubst_fntype): Just suppress access checking.
405 (instantiate_template_1): Set DECL_TI_TEMPLATE before access checking.
406 (push_deduction_access_scope, pop_deduction_access_scope): Remove.
408 2012-07-11 Jason Merrill <jason@redhat.com>
411 * method.c (synthesized_method_walk): Replace uses of msg with diag.
412 Correct handling of virtual bases with move operations.
413 (process_subob_fn, walk_field_subobs): Replace uses of msg with diag.
415 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
417 * method.c: Do not include tree-pass.h.
419 2012-07-10 Jason Merrill <jason@redhat.com>
423 * cp-tree.h (FNDECL_SUPPRESS_IMPLICIT_DECL): New.
424 (struct lang_decl_fn): Add suppress_implicit_decl field.
425 * method.c (implicitly_declare_fn): Check it.
426 (process_subob_fn): Add no_implicit_p parm.
427 (walk_field_subobs, synthesized_method_walk): Likewise.
428 (maybe_explain_implicit_delete): Adjust.
429 (explain_implicit_non_constexpr): Adjust.
431 * method.c (synthesized_method_walk): Avoid changing
432 EH spec based on cleanups in other places, too.
434 2012-07-09 Sterling Augustine <saugustine@google.com>
436 * error.c (lang_decl_name): Use TFF_UNQUALIFIED_NAME flag.
438 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
440 * decl.c (cp_finish_decl): Add FIXME at add_local_decl call site.
442 2012-07-06 Jason Merrill <jason@redhat.com>
445 * pt.c (tsubst_arg_types): Add "end" parameter.
446 (check_undeduced_parms): Use it.
448 * cp-tree.h (DECL_DECLARES_TYPE_P): Check DECL_TYPE_TEMPLATE_P.
451 * name-lookup.c (ambiguous_decl): Use DECL_TYPE_TEMPLATE_P.
453 2012-07-05 Jason Merrill <jason@redhat.com>
456 * pt.c (arg_from_parm_pack_p): Go back to using same_type_p or
459 * cp-tree.h (TEMPLATE_PARM_NUM_SIBLINGS): Remove.
460 (struct template_parm_index_s): Remove num_siblings.
461 * pt.c (fixup_template_parms, fixup_template_parm_index): Remove.
462 (fixup_template_type_parm_type): Remove.
463 (build_template_parm_index): Remove num_siblings parm.
464 (process_template_parm): Likewise.
465 * parser.c (cp_parser_template_parameter_list): Adjust.
466 * tree.c (cp_tree_equal): Don't compare num_siblings.
467 * typeck.c (comp_template_parms_position): Likewise.
471 * tree.c (strip_typedefs_expr): New.
472 * cp-tree.h: Declare it.
473 * pt.c (convert_template_argument, unify): Use it.
474 * parser.c (cp_parser_template_declaration_after_export): Don't call
475 fixup_template_parms.
477 2012-07-04 Jason Merrill <jason@redhat.com>
481 * decl.c (build_enumerator): Don't use build_lang_decl_loc.
483 2012-07-03 Jakub Jelinek <jakub@redhat.com>
486 * semantics.c (finish_goto_stmt): Surround computed goto argument
487 with CLEANUP_POINT_EXPR if needed.
489 2012-07-02 Jason Merrill <jason@redhat.com>
492 * pt.c (in_template_function): New.
493 * cp-tree.h: Declare it.
494 * class.c (build_base_path, resolves_to_fixed_type_p): Use it.
497 * pt.c (tsubst_copy_and_build) [LAMBDA_EXPR]: Use tsubst
498 for LAMBDA_EXPR_EXTRA_SCOPE.
501 * pt.c (build_non_dependent_expr): Don't wrap a dummy object.
504 * class.c (resolves_to_fixed_type_p): Check uses_template_parms
505 (current_function_decl) instead of processing_template_decl.
508 * semantics.c (maybe_add_lambda_conv_op): Don't set
509 DECL_INTERFACE_KNOWN.
512 * call.c (build_conditional_expr_1): Don't warn about comparison of
513 two enumerators before their enumeration is complete.
514 (build_new_op_1): Call decay_conversion before warn_logical_operator.
515 * decl.c (build_enumerator): Set DECL_CONTEXT of an enumerator to
517 * decl2.c (mark_used): Call used_types_insert for enums.
518 * semantics.c (finish_id_expression): Don't decay CONST_DECL.
519 (finish_member_declaration): Don't change DECL_CONTEXT of enumerators.
520 * class.c (check_field_decls): Don't change DECL_CONTEXT of enums.
521 * typeck.c (convert_for_assignment): Don't decay CONST_DECL.
522 (build_class_member_access_expr): Look through unscoped enums.
523 * search.c (context_for_name_lookup): Look through unscoped enums.
524 * pt.c (tsubst_copy_and_build): Don't decay CONST_DECL.
525 (tsubst_copy): Use DECL_CONTEXT to find the enumeration.
526 * tree.c (decl_linkage): Likewise.
527 * cvt.c (ocp_convert): Check decayed expr for enum range warning.
529 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
531 * Make-lang.in: Remove tree-mudflap.o from CXX_AND_OBJCXX_OBJS.
533 2012-06-27 Jason Merrill <jason@redhat.com>
535 * parser.c (cp_parser_check_for_invalid_template_id): tag_type parm.
536 (cp_parser_simple_type_specifier, cp_parser_class_head): Adjust.
537 (cp_parser_elaborated_type_specifier): Adjust.
538 * decl.c (duplicate_decls): Return error_mark_node on template
542 * parser.c (cp_parser_template_id): Add tag_type parm.
543 (cp_parser_template_name): Likewise.
544 (cp_parser_id_expression, cp_parser_unqualified_id): Adjust.
545 (cp_parser_pseudo_destructor_name, cp_parser_type_name): Adjust.
546 (cp_parser_simple_type_specifier, cp_parser_class_name): Adjust.
547 (cp_parser_elaborated_type_specifier, cp_parser_class_head): Adjust.
549 2012-06-27 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
552 * semantics.c (constexpr_call): Fix typo in comment.
553 (cxx_eval_vec_perm_expr): New.
554 (cxx_eval_constant_expression): Fold VEC_PERM_EXPRs.
556 2012-06-26 Richard Guenther <rguenther@suse.de>
559 * mangle.c (write_array_type): Truncate the number-of-elements
562 2012-06-25 Jason Merrill <jason@redhat.com>
566 * pt.c (tsubst_decl) [PARM_DECL]: Don't recurse into DECL_CHAIN
567 if cp_unevaluated_operand is set.
568 (tsubst_copy) [PARM_DECL]: Don't copy before tsubsting.
571 * typeck.c (decay_conversion): Don't discard side-effects from
572 expressions of nullptr_t.
574 2012-06-25 Florian Weimer <fweimer@redhat.com>
576 * init.c (build_new_1): Warn about (T[N]) for variable N, and
579 * parser.c (cp_parser_direct_new_declarator): Accept non-constant
580 expressions. Handled now in build_new_1.
582 2012-06-25 Jason Merrill <jason@redhat.com>
585 * semantics.c (build_data_member_initialization): Always keep
586 initializer for empty base.
587 (cxx_eval_bare_aggregate): Discard it here.
590 * pt.c (tsubst_omp_for_iterator): Simplify DECL_EXPR handling.
591 (tsubst_expr) [OMP_FOR]: Here, too.
593 2012-06-25 Jakub Jelinek <jakub@redhat.com>
596 * class.c (check_bases_and_members): Avoid -Wuninitialized
597 diagnostics for non-static const members or references if they
600 2012-06-16 Ville Voutilainen <ville.voutilainen@gmail.com>
602 * parser.c (cp_parser_direct_declarator): Move virt-specifier
603 parsing after late-specified return type parsing.
605 2012-06-14 Jason Merrill <jason@redhat.com>
608 * name-lookup.c (constructor_name_p): Don't try to look at the
609 name of a DECLTYPE_TYPE.
611 2012-06-18 Lawrence Crowl <crowl@google.com>
613 * decl2.c (cp_write_global_declarations): Rename use of TV_PHASE_CGRAPH
616 2012-06-18 Steven Bosscher <steven@gcc.gnu.org>
618 * decl.c (finish_function): Remove code conditional on VMS_TARGET.
620 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
623 * semantics.c (literal_type_p): Handle VECTOR_TYPE.
624 (potential_constant_expression_1): Handle VEC_PERM_EXPR.
625 * parser.c (cp_parser_postfix_expression): Handle RID_BUILTIN_SHUFFLE.
627 2012-06-09 Jason Merrill <jason@redhat.com>
629 * pt.c (tsubst_expr) [TAG_DEFN]: Instantiate local class.
630 * class.c (finish_struct): Don't add a TAG_DEFN for a lambda.
631 * decl2.c (finish_static_data_member_decl): Avoid redundant error.
634 * name-lookup.c (pushtag_1): Add a DECL_EXPR for a local class.
635 * semantics.c (finish_cond): Build a COMPOUND_EXPR.
636 * pt.c (tsubst_expr) [COMPOUND_EXPR]: Handle.
637 [DECL_EXPR]: Don't call cp_finish_decl for an implicit typedef.
638 Don't return the decl.
640 2012-06-11 Richard Guenther <rguenther@suse.de>
643 * mangle.c (write_array_type): Use double-ints for array domain
646 2012-06-07 Fabien ChĂȘne <fabien@gcc.gnu.org>
649 * cp-tree.h (insert_late_enum_def_into_classtype_sorted_fields):
651 * class.c (insert_into_classtype_sorted_fields): New.
652 (add_enum_fields_to_record_type): New.
653 (count_fields): Adjust the comment.
654 (add_fields_to_record_type): Likewise.
655 (finish_struct_1): Move the code that inserts the fields for the
656 sorted case, into insert_into_classtype_sorted_fields, and call
658 (insert_late_enum_def_into_classtype_sorted_fields): Define.
659 * decl.c (finish_enum_value_list): Call
660 insert_late_enum_def_into_classtype_sorted_fields if a late enum
661 definition is encountered.
663 2012-06-06 Paolo Carlini <paolo.carlini@oracle.com>
666 * typeck.c (cp_perform_integral_promotions): New, like
667 perform_integral_promotions but also takes a tsubst_flags_t parameter.
668 (pointer_diff): Add tsubst_flags_t parameter.
669 (decay_conversion, cp_default_conversion, cp_build_array_ref,
670 cp_build_binary_op, cp_build_unary_op, build_static_cast_1,
671 build_reinterpret_cast_1, cp_build_modify_expr,
672 convert_for_assignment): Adjust.
673 * optimize.c (build_delete_destructor_body): Adjust.
674 * init.c (expand_virtual_init, expand_default_init, build_new_1,
675 build_new, build_vec_delete_1, build_vec_init, build_delete): Adjust.
676 (construct_virtual_base): Adjust LOOKUP_COMPLAIN -> 0.
677 * class.c (build_base_path): Adjust.
678 * decl.c (compute_array_index_type, finish_destructor_body): Likewise.
679 * method.c (synthesized_method_walk): Adjust flag and complain.
680 * rtti.c (ifnonnull): Add tsubst_flags_t parameter.
681 (build_typeid, build_dynamic_cast_1): Adjust.
682 * except.c (initialize_handler_parm): Likewise.
683 * typeck2.c (process_init_constructor_record): Likewise.
684 * pt.c (tsubst_friend_class): Don't change flags.
685 * semantics.c (finish_goto_stmt, handle_omp_for_class_iterator,
686 finish_static_assert): Likewise.
687 * parser.c (cp_parser_lookup_name): Just pass 0 as flags to
689 * call.c (build_op_delete_call): Add tsubst_flags_t parameter.
690 (convert_like_real, convert_arg_to_ellipsis, convert_for_arg_passing):
692 (standard_conversion): Adjust LOOKUP_COMPLAIN -> 0.
693 (implicit_conversion): Mask out tf_error with a FIXME.
694 (build_user_type_conversion_1, build_new_op_1, build_over_call): Use
695 complain & tf_error instead of flags & LOOKUP_COMPLAIN.
696 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
697 build_up_reference, convert_to_reference, cp_convert,
698 cp_convert_and_check, ocp_convert, convert_force): Add tsubst_flags_t
700 (convert_to_reference, ocp_convert): Use complain & tf_error instead
701 of flags & LOOKUP_COMPLAIN.
702 (convert_force): Adjust LOOKUP_COMPLAIN -> 0.
703 * name-lookup.c (identifier_type_value_1, lookup_qualified_name,
704 lookup_name_real, lookup_function_nonclass, lookup_name,
705 lookup_name_prefer_type): Adjust LOOKUP_COMPLAIN -> 0.
706 * cp-tree.h: Adjust prototypes; remove LOOKUP_COMPLAIN.
708 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
710 * decl.c: Do not include output.h.
711 (start_decl): Remove code for flag_conserve_space.
713 2012-06-06 Fabien ChĂȘne <fabien@gcc.gnu.org>
716 * parser.c (cp_parser_alias_declaration): Return earlier
719 2012-06-04 Paolo Carlini <paolo.carlini@oracle.com>
722 * call.c (build_conditional_expr_1): Use OPT_Wenum_compare
723 to control enumeral mismatch in conditional expression too.
725 2012-06-04 Sterling Augustine <saugustine@google.com>
727 * cp-tree.h: Declare decl_as_dwarf_string, lang_decl_dwarf_name.
728 * cp-lang.c (cxx_dwarf_name): Call them.
730 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
732 * semantics.c: Do not include output.h.
734 * friend.c: Likewise.
735 * typeck.c: Likewise.
736 * typeck2.c: Likewise.
737 * Make-lang.in: Fix dependencies.
739 2012-06-01 Jason Merrill <jason@redhat.com>
742 * parser.c (cp_parser_class_head): Apply attributes here.
743 * semantics.c (begin_class_definition): Not here.
747 * parser.c (cp_parser_binary_expression): Bail early if we're parsing
748 tentatively and the LHS has a parse error.
751 * pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
752 (instantiate_decl): Don't push_to_top_level for local class methods.
753 (instantiate_class_template_1): Or for local classes.
756 * pt.c (do_auto_deduction): Don't try to deduce from a
757 type-dependent initializer.
759 2012-06-01 Paolo Carlini <paolo.carlini@oracle.com>
762 * name-lookup.c (push_namespace): When error recovery is
763 impossible just error out in duplicate_decls.
765 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
767 * call.c: Do not include output.h.
769 * except.c: Likewise.
770 * friend.c: Likewise.
773 * method.c: Likewise.
774 * parser.c: Likewise.
777 * search.c: Likewise.
779 2012-05-30 Jason Merrill <jason@redhat.com>
782 * tree.c (stabilize_init): Handle stabilizing a TARGET_EXPR
783 representing a bitwise copy of a glvalue.
785 * tree.c (stabilize_expr): Tweak logic.
788 * tree.c (stabilize_init): Side effects make the init unstable.
790 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
793 * semantics.c (potential_constant_expression_1): Handle LTGT_EXPR.
795 2012-05-26 Paolo Carlini <paolo.carlini@oracle.com>
798 * tree.c (stabilize_expr): Handle exp of void type.
800 2012-05-26 Jason Merrill <jason@redhat.com>
803 * call.c (convert_like_real) [ck_list]: Take array address directly.
804 * typeck.c (decay_conversion): Reject decay of an array compound
807 2012-05-25 Paolo Carlini <paolo.carlini@oracle.com>
810 * parser.c (cp_parser_member_declaration): A storage class is not
811 allowed in a declaration of an anonymous aggregate in a class scope.
813 2012-05-24 Uros Bizjak <ubizjak@gmail.com>
816 * decl.c (grokdeclarator): Check that current_class_type is non-NULL
817 before calling constructor_name_p.
819 2012-05-24 Paolo Carlini <paolo.carlini@oracle.com>
822 * parser.c (cp_parser_ctor_initializer_opt_and_function_body,
823 cp_parser_function_body): Add a bool parameter, true when parsing
824 a function-try-block.
825 (cp_parser_function_try_block): Pass true to the above.
826 (cp_parser_function_definition_after_declarator,
827 cp_parser_function_transaction): Adjust.
829 2012-05-23 Paolo Carlini <paolo.carlini@oracle.com>
832 * decl2.c (delete_sanity): Extend 'deleting array' warning to
835 2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
838 * decl.c (grokdeclarator): Diagnose functions returning abstract
839 class types as TYPENAME.
840 * cp-tree.h (ABSTRACT_CLASS_TYPE_P): Add.
841 * except.c (is_admissible_throw_operand_or_catch_parameter): Use it.
842 * pt.c (tsubst): Likewise.
843 * semantics.c (trait_expr_value): Likewise.
845 2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
848 * parser.c (cp_parser_attributes_opt): Enforce error checking of
849 unbalanced parentheses in the presence of tentative parsing.
851 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
854 * parser.c (cp_parser_new_type_id): Early return error_mark_node
855 if the cp_parser_type_specifier_seq call has type_specifier_seq.type
856 error_mark_node; tidy.
857 (cp_parser_new_expression): Always initialize nelts to NULL_TREE to
858 avoid uninitialized warnings.
859 (cp_parser_init_declarator, cp_parser_late_parse_one_default_arg):
860 Call cp_parser_skip_to_end_of_statement if cp_parser_initializer
861 returns error_mark_node.
863 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
866 * except.c (is_admissible_throw_operand): Rename to
867 is_admissible_throw_operand_or_catch_parameter and handle
869 (expand_start_catch_block): Use it.
870 (build_throw): Adjust.
872 2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
875 * typeck.c (build_x_array_ref, build_x_conditional_expr,
876 build_x_compound_expr, build_x_modify_expr): Add location_t parameter.
877 (finish_class_member_access_expr, build_x_indirect_ref,
878 build_x_binary_op, build_x_compound_expr_from_list,
879 build_x_compound_expr_from_vec): Adjust callers.
880 * tree.c (build_min_nt_loc): New.
881 (build_min_nt): Remove.
882 * typeck2.c (build_x_arrow): Adjust callers.
883 * pt.c (tsubst_qualified_id, tsubst_omp_for_iterator,
884 tsubst_copy_and_build): Likewise.
885 * semantics.c (finish_mem_initializers, handle_omp_for_class_iterator,
886 finish_omp_atomic): Likewise.
887 * decl2.c (grok_array_decl, build_anon_union_vars): Adjust.
888 * parser.c (cp_parser_question_colon_clause,
889 cp_parser_assignment_expression, cp_parser_expression,
890 cp_parser_template_id, cp_parser_omp_for_loop): Likewise.
893 2012-05-16 Dodji Seketeli <dodji@redhat.com>
896 * cp-tree.h (enum cp_decl_spec): Add new enumerators to cover all
897 the possible declarator specifiers so far.
898 (struct cp_decl_specifier_seq::locations): Declare new member.
899 (cp_decl_specifier_seq::{specs, type_location}): Remove.
900 (decl_spec_seq_has_spec_p): Declare new function.
901 * parser.c (cp_parser_check_decl_spec): Remove.
902 (set_and_check_decl_spec_loc): Define new static function.
903 (decl_spec_seq_has_spec_p): Define new public function.
904 (cp_parser_decl_specifier_seq, cp_parser_function_specifier_opt)
905 (cp_parser_type_specifier, cp_parser_simple_type_specifier)
906 (cp_parser_set_storage_class, cp_parser_set_decl_spec_type)
907 (cp_parser_alias_declaration): Set the locations for each
908 declspec, using set_and_check_decl_spec_loc.
909 (cp_parser_explicit_instantiation, cp_parser_init_declarator)
910 (cp_parser_member_declaration, cp_parser_init_declarator): Use the
911 new declspec location for specifiers. Use the new
912 decl_spec_seq_has_spec_p.
913 (cp_parser_type_specifier_seq): Use the new
914 set_and_check_decl_spec_loc. Stop using
915 cp_parser_check_decl_spec. Use the new decl_spec_seq_has_spec_p.
916 (, cp_parser_init_declarator): Use the new
917 set_and_check_decl_spec_loc.
918 (cp_parser_single_declaration, cp_parser_friend_p)
919 (cp_parser_objc_class_ivars, cp_parser_objc_struct_declaration):
920 Use the new decl_spec_seq_has_spec_p.
921 * decl.c (check_tag_decl): Use new decl_spec_seq_has_spec_p. Use
922 the more precise ds_redefined_builtin_type_spec location for
923 diagnostics about re-declaring C++ built-in types.
924 (start_decl, grokvardecl, grokdeclarator): Use the new
925 decl_spec_seq_has_spec_p.
927 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
930 * pt.c (tsubst_copy_and_build): Increase / decrease
931 c_inhibit_evaluation_warnings around build_x_binary_op call.
933 2012-05-12 Paolo Carlini <paolo.carlini@oracle.com>
935 * cp-tree.h (TYPE_PTRMEM_P): Rename to TYPE_PTRDATAMEM_P.
936 (TYPE_PTR_TO_MEMBER_P): Rename to TYPE_PTRMEM_P.
937 (TYPE_PTR_OR_PTRMEM_P): Add.
938 * typeck.c (composite_pointer_type_r, composite_pointer_type,
939 common_pointer_type, cp_build_indirect_ref, cp_build_binary_op,
940 cp_truthvalue_conversion, convert_ptrmem, build_static_cast_1,
941 build_reinterpret_cast_1, build_const_cast_1, comp_ptr_ttypes_real,
942 casts_away_constness_r, casts_away_constness): Adjust.
943 * init.c (build_zero_init_1): Adjust.
944 * class.c (check_field_decls): Likewise.
945 * decl.c (check_default_argument): Likewise.
946 * rtti.c (target_incomplete_p): Likewise.
947 * tree.c (zero_init_p): Likewise.
948 * cxx-pretty-print.c (pp_cxx_ptr_operator,
949 pp_cxx_abstract_declarator): Likewise.
950 * typeck2.c (build_m_component_ref): Likewise.
951 * pt.c (convert_nontype_argument, invalid_nontype_parm_type_p,
952 dependent_type_p_r): Likewise.
953 * call.c (null_member_pointer_value_p, standard_conversion,
954 add_builtin_candidate, build_conditional_expr_1, compare_ics):
956 * cp-objcp-common.c (cp_var_mod_type_p): Likewise.
957 * cvt.c (cp_convert_to_pointer, ocp_convert,
958 perform_qualification_conversions): Likewise.
959 * mangle.c (write_type): Likewise.
960 * name-lookup.c (arg_assoc_type): Likewise.
962 2012-05-12 Paolo Carlini <paolo.carlini@oracle.com>
964 * parser.c (struct cp_parser_expression_stack_entry): Add location_t
966 (cp_parser_binary_expression): Rework to always update at the same
967 time tree_type and loc.
968 * call.c (print_z_candidate): Add location_t parameter.
969 (print_z_candidates, convert_like_real, joust): Adjust.
971 2012-05-11 Alexandre Oliva <aoliva@redhat.com>
974 * pt.c (tsubst_decl): Bail out if argvec is error_mark_node.
976 2012-05-11 Paolo Carlini <paolo.carlini@oracle.com>
979 * pt.c (tsubst_copy: case PARM_DECL): Return error_mark_node if
980 tsubst_decl returns NULL_TREE.
981 * cxx-pretty-print.c (pp_cxx_simple_type_specifier): Handle
982 BOUND_TEMPLATE_TEMPLATE_PARM.
984 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
987 * cvt.c (ocp_convert): Error out early for void -> bool conversions.
988 * typeck.c (decay_conversion): Use error_at.
989 * call.c (build_integral_nontype_arg_conv, convert_like_real,
990 convert_arg_to_ellipsis, perform_implicit_conversion_flags,
991 initialize_reference): Likewise.
992 * cvt.c (warn_ref_binding): Add location_t parameter.
993 (cp_convert_to_pointer, convert_to_reference, ocp_convert,
994 convert_to_void, ): Use error_at and warning_at.
996 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
999 * decl.c (check_default_argument): Fix typo (POINTER_TYPE_P
1000 instead of TYPE_PTR_P) in zero-as-null-pointer-constant warning.
1002 2012-05-06 Paolo Carlini <paolo.carlini@oracle.com>
1005 * call.c (op_error, build_new_op_1, build_new_op): Add location_t
1007 (build_conditional_expr_1): Adjust.
1008 * typeck.c (build_x_indirect_ref, build_x_binary_op,
1009 build_x_unary_op): Add location_t parameter.
1010 (rationalize_conditional_expr, build_x_array_ref,
1011 build_x_compound_expr, cp_build_modify_expr, build_x_modify_expr):
1013 * typeck2.c (build_x_arrow): Add location_t parameter.
1014 * semantics.c (finish_unary_op_expr): Likewise.
1015 (finish_increment_expr, handle_omp_for_class_iterator): Adjust.
1016 * decl2.c (grok_array_decl): Add location_t parameter.
1017 * parser.c (cp_parser_postfix_open_square_expression,
1018 cp_parser_postfix_dot_deref_expression, cp_parser_unary_expression,
1019 cp_parser_binary_expression, cp_parser_builtin_offsetof,
1020 do_range_for_auto_deduction, cp_convert_range_for,
1021 cp_parser_template_argument, cp_parser_omp_for_cond): Pass the
1023 * pt.c (tsubst_copy_and_build): Adjust.
1024 * tree.c (maybe_dummy_object): Likewise.
1025 * cp-tree.h: Update declarations.
1027 2012-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1029 * semantics.c (cxx_eval_constant_expression, case CONVERT_EXPR): Tidy.
1031 2012-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1034 * pt.c (instantiate_class_template_1): Increase / decrease
1035 c_inhibit_evaluation_warnings around the tsubst_expr call
1036 for STATIC_ASSERT_CONDITION.
1037 (tsubst_expr, case STATIC_ASSERT): Likewise.
1038 * typeck.c (cp_build_binary_op, case EQ_EXPR/NE_EXPR): Check
1039 c_inhibit_evaluation_warnings in the OPT_Waddress warnings.
1041 2012-05-03 Paolo Carlini <paolo.carlini@oracle.com>
1044 * call.c (build_over_call): Handle final member functions
1046 (build_new_method_call_1): Do not handle here.
1048 2012-05-02 Richard Guenther <rguenther@suse.de>
1050 * decl.c (grokdeclarator): Properly check for sizes that
1051 cover more than half of the address-space.
1053 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
1056 * typeck.c (cp_build_array_ref): Handle VECTOR_TYPE.
1057 * decl2.c (grok_array_decl): Likewise.
1060 * parser.c (cp_parser_sizeof_operand): Require parentheses for
1063 2012-04-30 Dodji Seketeli <dodji@redhat.com>
1065 Fix location for static class members
1066 * decl.c (grokdeclarator): Use the location carried by the
1067 declarator for the DECL of the static class member.
1069 Fix va_arg type location
1070 * cp-tree.h (build_x_va_arg): Take an additional location
1072 * call.c (build_x_va_arg): Take a loc parameter for the location
1073 of the type of the va_arg expression.
1074 * parser.c (cp_parser_primary_expression): Pass the type of the
1075 type in the va_arg expression to build_x_va_arg.
1076 * pt.c (tsubst_copy): Adjust calls to build_x_va_arg.
1078 Make conversion warnings work on NULL with -ftrack-macro-expansion
1079 * call.c (conversion_null_warnings): Use the new
1080 expansion_point_location_if_in_system_header.
1081 * cvt.c (build_expr_type_conversion): Likewise.
1082 * typeck.c (cp_build_binary_op): Likewise.
1084 2012-04-30 Manuel López-Ibåñez <manu@gcc.gnu.org>
1086 * typeck.c (convert_for_assignment): Replace
1087 Wmissing-format-attribute with Wsuggest-attribute=format.
1088 * call.c (convert_for_arg_passing): Likewise.
1090 2012-04-26 Paolo Carlini <paolo.carlini@oracle.com>
1093 * class.c (check_bases_and_members): Implement core/1333, do not
1094 disallow defaulted in the class body non-const ref special members.
1096 2012-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1099 * call.c (tourney, perform_overload_resolution,
1100 build_operator_new_call, build_user_type_conversion_1,
1101 build_user_type_conversion, perform_overload_resolution,
1102 add_template_candidate, add_template_candidate_real,
1103 add_template_conv_candidate, add_builtin_candidates,
1104 add_builtin_candidate, build_builtin_candidate,
1105 add_conv_candidate, add_function_candidate, implicit_conversion,
1106 reference_binding, build_list_conv, conditional_conversion,
1107 add_candidates, can_convert_array, build_aggr_conv,
1108 build_array_conv, build_complex_conv, conditional_conversion):
1109 Add tsubst_flags_t parameter.
1110 (joust): Likewise, use it to handle SFINAE as if pedantic.
1111 (add_list_candidates, build_integral_nontype_arg_conv,
1112 perform_overload_resolution, build_new_function_call,
1113 build_operator_new_call, build_op_call_1,
1114 build_conditional_expr_1, build_new_op_1, convert_like_real,
1115 convert_arg_to_ellipsis, convert_default_arg,
1116 convert_for_arg_passing, build_over_call,
1117 build_new_method_call_1, can_convert_arg, can_convert_arg_bad,
1118 perform_implicit_conversion_flags,
1119 perform_direct_initialization_if_possible,
1120 initialize_reference): Adjust.
1121 * typeck.c (casts_away_constness, casts_away_constness_r):
1122 Add tsubst_flags_t parameter.
1123 (convert_arguments, check_for_casting_away_constness,
1124 build_static_cast_1, build_ptrmemfunc, convert_for_assignment):
1126 * decl.c (reshape_init_r, check_default_argument): Likewise.
1127 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1128 * pt.c (convert_nontype_argument, check_non_deducible_conversion):
1130 * init.c (build_new_1): Likewise.
1131 * cvt.c (convert_to_reference, ocp_convert, build_type_conversion,
1132 build_expr_type_conversion, ): Likewise.
1133 * search.c (check_final_overrider): Likewise.
1134 * cp-tree.h (build_user_type_conversion,
1135 build_operator_new_call, can_convert, can_convert_arg,
1136 can_convert_arg_bad, convert_default_arg,
1137 convert_arg_to_ellipsis, convert_for_arg_passing):
1140 2012-04-22 Jan Hubicka <jh@suse.cz>
1142 * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they
1145 2012-04-22 Manuel López-Ibåñez <manu@gcc.gnu.org>
1148 * typeck.c (composite_pointer_type): Likewise.
1149 (cxx_sizeof_or_alignof_type): Likewise.
1150 (cp_build_array_ref): Likewise.
1151 (cp_build_function_call_vec): Likewise.
1152 (cp_build_addr_expr_1): Likewise.
1153 (convert_member_func_to_ptr): Likewise.
1154 * decl.c (check_tag_decl): Likewise.
1155 (check_static_variable_definition): Likewise.
1156 (compute_array_index_type): Likewise.
1157 (create_array_type_for_decl): Likewise.
1158 (grokdeclarator): Likewise.
1159 (grok_op_properties): Likewise.
1160 * error.c (maybe_warn_cpp0x): Likewise.
1161 * pt.c (maybe_process_partial_specialization): Likewise.
1162 (convert_template_argument): Likewise.
1163 (do_decl_instantiation): Likewise.
1164 (do_type_instantiation): Likewise.
1165 * parser.c (cp_parser_primary_expression): Likewise.
1166 (cp_parser_postfix_expression): Likewise.
1167 (cp_parser_unary_expression): Likewise.
1168 (cp_parser_question_colon_clause): Likewise.
1169 (cp_parser_lambda_introducer): Likewise.
1170 (cp_parser_lambda_declarator_opt): Likewise.
1171 (cp_parser_compound_statement): Likewise.
1172 (cp_parser_jump_statement): Likewise.
1173 (cp_parser_declaration_seq_opt): Likewise.
1174 (cp_parser_enum_specifier): Likewise.
1175 (cp_parser_enumerator_list): Likewise.
1176 (cp_parser_initializer_list): Likewise.
1177 (cp_parser_member_declaration): Likewise.
1178 * call.c (build_conditional_expr_1): Likewise.
1179 * friend.c (make_friend_class): Likewise.
1180 * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
1182 2012-04-21 Jan Hubicka <jh@suse.cz>
1184 * method.c (make_alias_for): Do not set TREE_SYMBOL_REFERENCED.
1185 * decl2.c (mark_needed): Likewise.
1186 (decl_needed_p): Do not test TREE_SYMBOL_REFERENCED.
1188 * decl2.c (cxx_callgraph_analyze_expr): Remove.
1189 * cp-objcp-common.h (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Remove.
1190 * cp-tree.h (cxx_callgraph_analyze_expr): Remove.
1192 2012-04-21 Manuel López-Ibåñez <manu@gcc.gnu.org>
1195 * typeck.c (cp_build_function_call_vec): Do not pretty-print
1196 expressions when caret is enabled.
1198 2012-04-20 Jan Hubicka <jh@suse.cz>
1201 * decl2.c (maybe_emit_vtables): Do not initialize same_comdat_group
1202 list when target has no support for it.
1204 2012-04-20 Michael Matz <matz@suse.de>
1206 * error.c (pedwarn_cxx98): Move va_end call after user
1209 2012-04-18 Paolo Carlini <paolo.carlini@oracle.com>
1212 * cp-tree.h (build_addr_func, decay_conversion,
1213 get_member_function_from_ptrfunc,
1214 build_m_component_ref, convert_member_func_to_ptr):
1215 Add tsubst_flags_t parameter.
1216 * typeck.c (cp_default_conversion): Add.
1217 (decay_conversion, default_conversion,
1218 get_member_function_from_ptrfunc, convert_member_func_to_ptr):
1219 Add tsubst_flags_t parameter and use it throughout.
1220 (cp_build_indirect_ref, cp_build_array_ref,
1221 cp_build_function_call_vec, convert_arguments, build_x_binary_op,
1222 cp_build_binary_op, cp_build_unary_op, build_reinterpret_cast_1,
1223 build_const_cast_1, expand_ptrmemfunc_cst,
1224 convert_for_initialization): Adjust.
1225 * init.c (build_vec_init): Adjust.
1226 * decl.c (grok_reference_init, get_atexit_node): Likewise.
1227 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Likewise.
1228 * except.c (build_throw): Likewise.
1229 * typeck2.c (build_x_arrow): Likewise.
1230 (build_m_component_ref): Add tsubst_flags_t parameter and
1232 * pt.c (convert_nontype_argument): Adjust.
1233 * semantics.c (finish_asm_stmt, maybe_add_lambda_conv_op): Likewise.
1234 * decl2.c (build_offset_ref_call_from_tree): Likewise.
1235 * call.c (build_addr_func): Add tsubst_flags_t parameter and
1237 (build_call_a, build_conditional_expr_1, build_new_op_1,
1238 convert_like_real, convert_arg_to_ellipsis, build_over_call,
1239 build_special_member_call): Adjust.
1240 * cvt.c (cp_convert_to_pointer, force_rvalue,
1241 build_expr_type_conversion): Likewise.
1243 2012-04-17 Tom de Vries <tom@codesourcery.com>
1245 * cp-gimplify.c (begin_bc_block): Add location parameter and use as
1246 location argument to create_artificial_label.
1247 (finish_bc_block): Change return type to void. Remove body_seq
1248 parameter, and add block parameter. Append label to STMT_LIST and
1250 (gimplify_cp_loop, gimplify_for_stmt, gimplify_while_stmt)
1251 (gimplify_do_stmt, gimplify_switch_stmt): Remove function.
1252 (genericize_cp_loop, genericize_for_stmt, genericize_while_stmt)
1253 (genericize_do_stmt, genericize_switch_stmt, genericize_continue_stmt)
1254 (genericize_break_stmt, genericize_omp_for_stmt): New function.
1255 (cp_gimplify_omp_for): Remove bc_continue processing.
1256 (cp_gimplify_expr): Genericize VEC_INIT_EXPR.
1257 (cp_gimplify_expr): Mark FOR_STMT, WHILE_STMT, DO_STMT, SWITCH_STMT,
1258 CONTINUE_STMT, and BREAK_STMT as unreachable.
1259 (cp_genericize_r): Genericize FOR_STMT, WHILE_STMT, DO_STMT,
1260 SWITCH_STMT, CONTINUE_STMT, BREAK_STMT and OMP_FOR.
1261 (cp_genericize_tree): New function, factored out of ...
1262 (cp_genericize): ... this function.
1264 2012-04-17 Paolo Carlini <paolo.carlini@oracle.com>
1267 * semantics.c (build_constexpr_constructor_member_initializers):
1268 Check for function-try-block as function-body.
1270 2012-04-17 Paolo Carlini <paolo.carlini@oracle.com>
1273 * parser.c (cp_parser_member_declaration): Check that
1274 initializer_token_start is non null before dereferencing it.
1276 2012-04-16 Jason Merrill <jason@redhat.com>
1279 * pt.c (determine_specialization): Instead of comparing the number
1280 of parms, check that tsubst gives the right answer.
1283 * pt.c (process_partial_specialization): Complain about a partial
1284 specialization with fewer args than primary template parms.
1287 * pt.c (convert_template_argument): Handle template template
1291 * pt.c (tsubst_pack_expansion): Use tsubst_expr for template
1292 template parameters.
1294 2012-04-16 Paolo Carlini <paolo.carlini@oracle.com>
1297 * call.c (op_error): Print types; when flag_diagnostics_show_caret
1298 is false print expressions too.
1299 (op_error_string): Add.
1301 2012-04-16 Jason Merrill <jason@redhat.com>
1304 * friend.c (make_friend_class): Call check_for_bare_parameter_packs.
1306 2012-04-16 Jan Hubicka <jh@suse.cz>
1308 * decl2.c (collect_candidates_for_java_method_alias): Use FOR_EACH
1309 walkers to walk cgraph and varpool.
1311 2012-04-15 Jason Merrill <jason@redhat.com>
1314 * pt.c (coerce_template_parameter_pack): Check for error_mark_node.
1318 * pt.c (coerce_template_parms): Even if we aren't converting we
1319 want to expand argument packs.
1322 * mangle.c (write_type): nullptr_t is a builtin type.
1324 2012-04-14 Jan Hubicka <jh@suse.cz>
1326 * tree.c: Update field referenced for new cgraph/varpool layout.
1327 * decl2.c: Likewise.
1329 2012-04-13 Jason Merrill <jason@redhat.com>
1332 * pt.c (any_pack_expanson_args_p): New.
1333 (coerce_template_parms): Use it.
1336 * call.c (joust): Handle comparing list and non-list ctors.
1339 * decl2.c (finish_anon_union): Use cp_finish_decl.
1340 * error.c (dump_function_name): Avoid showing anonymous "name".
1342 2012-04-11 Fabien ChĂȘne <fabien@gcc.gnu.org>
1345 * parser.c (cp_parser_class_name): Call strip_using_decl and
1346 return the target decl.
1347 * name-lookup.c (strip_using_decl): Returns NULL_TREE if the decl
1348 to be stripped is NULL_TREE.
1349 (qualify_lookup): Call strip_using_decl and perform some checks on
1352 2012-04-11 Jason Merrill <jason@redhat.com>
1355 * decl.c (grokdeclarator): Strip the injected-class-name typedef
1356 if we are building a declaration or compound type.
1359 * decl.c (check_tag_decl): Don't complain about attributes if we
1360 don't even have a type.
1362 2012-04-10 Manuel López-Ibåñez <manu@gcc.gnu.org>
1364 * cvt.c (convert_to_void): Update comment.
1366 2012-04-05 Jason Merrill <jason@redhat.com>
1369 * semantics.c (finish_non_static_data_member): In templates, pass
1370 the decl to build_qualified_name.
1371 * tree.c (lvalue_kind) [SCOPE_REF]: Handle FIELD_DECL.
1373 2012-04-04 Jason Merrill <jason@redhat.com>
1376 * decl.c (finish_function): Update fntype after deducing return type.
1378 2012-04-03 Jason Merrill <jason@redhat.com>
1381 * pt.c (tsubst_initializer_list): A pack expansion with no elements
1382 means value-initialization.
1384 2012-04-01 Paolo Carlini <paolo.carlini@oracle.com>
1387 * class.c (deduce_noexcept_on_destructor,
1388 deduce_noexcept_on_destructors): New.
1389 (check_bases_and_members): Call the latter.
1390 * decl.c (grokfndecl): Call the former.
1391 * method.c (implicitly_declare_fn): Not static.
1392 * cp-tree.h (deduce_noexcept_on_destructor, implicitly_declare_fn):
1395 2012-03-29 Paolo Carlini <paolo.carlini@oracle.com>
1398 * decl.c (check_default_argument): With -Wzero-as-null-pointer-constant
1399 warn for a zero as null pointer constant default argument.
1401 2012-03-29 Jason Merrill <jason@redhat.com>
1404 * tree.c (copy_binfo): Handle BINFO_DEPENDENT_BASE_P.
1406 2012-03-29 Jakub Jelinek <jakub@redhat.com>
1409 * decl.c (start_decl): Don't call maybe_apply_pragma_weak
1410 if processing_template_decl.
1412 2012-03-29 Jason Merrill <jason@redhat.com>
1415 * call.c (compare_ics): Handle ck_aggr like ck_list.
1417 2012-03-28 Jason Merrill <jason@redhat.com>
1420 * typeck.c (lookup_destructor): Clear BASELINK_QUALIFIED_P if
1421 we didn't get an explicit scope.
1422 * pt.c (tsubst_baselink): Likewise.
1424 2012-03-28 Richard Guenther <rguenther@suse.de>
1426 * typeck2.c (process_init_constructor_array): Use the proper
1427 type for computing the array length.
1429 2012-03-27 Meador Inge <meadori@codesourcery.com>
1432 * semantics.c (cxx_fold_indirect_ref): Don't attempt to fold
1433 stripped child trees that are not pointer types.
1435 2012-03-21 Jason Merrill <jason@redhat.com>
1437 Implement return type deduction for normal functions with -std=c++1y.
1438 * cp-tree.h (FNDECL_USED_AUTO): New macro.
1439 (LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P): Remove.
1440 (dependent_lambda_return_type_node): Remove.
1441 (CPTI_DEPENDENT_LAMBDA_RETURN_TYPE): Remove.
1442 (struct language_function): Add x_auto_return_pattern field.
1443 (current_function_auto_return_pattern): New.
1444 (enum tsubst_flags): Add tf_partial.
1445 * decl.c (decls_match): Handle auto return comparison.
1446 (duplicate_decls): Adjust error message for auto return.
1447 (cxx_init_decl_processing): Remove dependent_lambda_return_type_node.
1448 (cp_finish_decl): Don't do auto deduction for functions.
1449 (grokdeclarator): Allow auto return without trailing return type in
1451 (check_function_type): Defer checking of deduced return type.
1452 (start_preparsed_function): Set current_function_auto_return_pattern.
1453 (finish_function): Set deduced return type to void if not previously
1455 * decl2.c (change_return_type): Handle error_mark_node.
1456 (mark_used): Always instantiate functions with deduced return type.
1457 Complain about use if deduction isn't done.
1458 * parser.c (cp_parser_lambda_declarator_opt): Use 'auto' for
1459 initial return type.
1460 (cp_parser_lambda_body): Don't deduce return type in a template.
1461 (cp_parser_conversion_type_id): Allow auto in C++1y.
1462 * pt.c (instantiate_class_template_1): Don't mess with
1463 LAMBDA_EXPR_DEDUCE_RETURN_TYPE_P.
1464 (tsubst_copy_and_build): Likewise.
1465 (fn_type_unification, tsubst): Don't reduce the template parm level
1466 of 'auto' during deduction.
1467 (unify): Compare 'auto' specially.
1468 (get_bindings): Change test.
1469 (always_instantiate_p): Always instantiate functions with deduced
1471 (do_auto_deduction): Handle error_mark_node and lambda context.
1472 Don't check for use in initializer.
1473 (contains_auto_r): Remove.
1474 * search.c (lookup_conversions_r): Handle auto conversion function.
1475 * semantics.c (lambda_return_type): Handle null return. Don't mess
1476 with dependent_lambda_return_type_node.
1477 (apply_deduced_return_type): Rename from apply_lambda_return_type.
1478 * typeck.c (merge_types): Handle auto.
1479 (check_return_expr): Do auto deduction.
1480 * typeck2.c (add_exception_specifier): Fix complain check.
1482 2012-03-22 Paolo Carlini <paolo.carlini@oracle.com>
1485 * class.c (check_field_decls): Call literal_type_p only
1488 2012-03-22 Jakub Jelinek <jakub@redhat.com>
1491 * decl.c (check_tag_decl): Only use CLASSTYPE_TEMPLATE_INSTANTIATION
1492 on CLASS_TYPE_P types.
1494 2012-03-20 Jason Merrill <jason@redhat.com>
1496 * lex.c (init_reswords): Use >= for cxx_dialect test.
1497 * parser.c (cp_parser_exception_specification_opt): Likewise.
1499 * mangle.c (write_type): Handle 'auto'.
1500 * init.c (build_new): Don't do auto deduction where it might
1501 affect template mangling.
1504 * decl.c (reshape_init_class): Handle repeated reshaping.
1505 * search.c (lookup_field_1): Add sanity check.
1507 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
1510 * cp-tree.h (xvalue_p, maybe_warn_about_useless_cast): Declare.
1511 * tree.c (xvalue_p): Define.
1512 * typeck.c (maybe_warn_about_useless_cast): Define.
1513 (build_reinterpret_cast, build_const_cast,
1514 build_static_cast, cp_build_c_cast): Use maybe_warn_about_useless_cast.
1515 * rtti.c (build_dynamic_cast): Likewise.
1516 * pt.c (tsubst_copy_and_build, case CAST_EXPR): Increment/decrement
1517 c_inhibit_evaluation_warnings before/after the build_* calls.
1519 2012-03-15 Jason Merrill <jason@redhat.com>
1522 * method.c (implicitly_declare_fn): Set DECL_EXTERNAL.
1524 2012-03-15 Manuel López-Ibåñez <manu@gcc.gnu.org>
1527 * error.c (print_instantiation_partial_context): Use
1528 template_backtrace_limit.
1530 2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1532 * Make-lang.in (doc/g++.1): Remove IRIX 6.5 reference.
1534 2012-03-14 Jakub Jelinek <jakub@redhat.com>
1537 * parser.c (lookup_literal_operator): Return fn only if
1538 processed all arguments from args vector and argtypes is
1541 2012-01-30 Dodji Seketeli <dodji@redhat.com>
1544 * cp-tree.h (template_type_parameter_p): Declare new function.
1545 (parameter_of_template_p): Remove.
1546 * pt.c (template_type_parameter_p): Define new function.
1547 (parameter_of_template_p): Remove.
1548 * name-lookup.c (binding_to_template_parms_of_scope_p): Don't rely
1549 on parameter_of_template_p anymore. Compare the level of the
1550 template parameter to the depth of the template.
1552 2011-12-15 Dodji Seketeli <dodji@redhat.com>
1554 * call.c (standard_conversion, build_integral_nontype_arg_conv)
1555 (build_new_op_1, convert_like_real, is_subseq)
1556 (maybe_handle_implicit_object, maybe_handle_ref_bind, compare_ics)
1557 (joust): Use next_conversion instead of accessing fields of struct
1558 conversion directly.
1560 2012-03-12 Paolo Carlini <paolo.carlini@oracle.com>
1563 * pt.c (tsubst_copy_and_build, case COND_EXPR): Avoid bogus
1564 division by zero warnings.
1566 2012-03-08 Paolo Carlini <paolo.carlini@oracle.com>
1568 * typeck.c (build_array_ref, cp_build_addr_expr_1, convert_ptrmem,
1569 build_ptrmemfunc): Consistently forward the tsubst_flags_t
1571 * call.c (resolve_args): Likewise.
1573 2012-03-07 Jason Merrill <jason@redhat.com>
1576 * mangle.c (write_literal_operator_name): The length comes after the
1579 2012-03-05 Jakub Jelinek <jakub@redhat.com>
1581 * pt.c (local_specializations): Change from htab_t into
1582 struct pointer_map_t *.
1583 (retrieve_local_specializations, register_local_specialization,
1584 tsubst_pack_expansion, instantiate_decl): Adjust users.
1585 (eq_local_specializations, hash_local_specialization): Remove.
1587 2012-03-05 Jason Merrill <jason@redhat.com>
1590 * decl2.c (determine_visibility): Correct calculation of class
1592 * decl.c (check_tag_decl): Adjust warning.
1594 * method.c (synthesized_method_walk): Cleanups don't affect the EH
1597 2012-03-03 Jason Merrill <jason@redhat.com>
1599 * init.c (perform_member_init): Cope with uninstantiated NSDMI.
1602 * call.c (build_aggr_conv): Call reshape_init.
1603 (convert_like_real): Likewise.
1604 * typeck2.c (process_init_constructor): Clear TREE_CONSTANT if
1607 * mangle.c (write_nested_name): Use decl_mangling_context.
1608 (write_prefix, write_template_prefix): Likewise.
1611 * mangle.c (write_expression): Improve diagnostic for TRAIT_EXPR.
1613 * class.c (add_method): Always build an OVERLOAD for using-decls.
1614 * search.c (lookup_member): Handle getting an OVERLOAD for a
1617 2012-03-02 Paolo Carlini <paolo.carlini@oracle.com>
1620 * typeck2.c (build_x_arrow): Take a tsubst_flags_t argument and
1622 * cp-tree.h (build_x_arrow): Adjust prototype.
1623 * pt.c (tsubst_copy_and_build): Adjust call.
1624 * parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
1626 2012-03-02 Paolo Carlini <paolo.carlini@oracle.com>
1628 * name-lookup.c (binding_to_template_parms_of_scope_p): Clean up.
1630 2012-02-29 Jason Merrill <jason@redhat.com>
1633 * decl.c (check_tag_decl): Move warning for misplaced attributes here.
1634 (shadow_tag): From here.
1635 * parser.c (cp_parser_explicit_instantiation): Don't warn here.
1637 2012-02-21 Jakub Jelinek <jakub@redhat.com>
1640 * typeck.c (check_literal_operator_args): Initialize *long_double_p
1641 and *long_long_unsigned_p even if processing_template_decl.
1643 2012-02-16 Jason Merrill <jason@redhat.com>
1646 * decl.c (define_label): Use timevar_cond_start/stop.
1648 2012-02-16 Fabien ChĂȘne <fabien@gcc.gnu.org>
1651 * decl.c (xref_basetypes): call dependent_scope_p instead of
1654 2012-02-16 Jason Merrill <jason@redhat.com>
1657 * error.c (dump_expr): Handle lambda closures specifically.
1659 2012-02-14 Jason Merrill <jason@redhat.com>
1661 * parser.c (cp_parser_explicit_instantiation): Give a warning
1662 for ignored attributes on explicit class instantiation.
1664 2012-02-14 Jakub Jelinek <jakub@redhat.com>
1667 * pt.c (tsubst_copy_asm_operands): For LABEL_DECL values call
1668 lookup_label on label's name and set TREE_USED.
1670 2012-02-14 Jason Merrill <jason@redhat.com>
1673 * decl.c (local_variable_p_walkfn): Don't check DECL_ARTIFICIAL.
1675 2012-02-14 Jakub Jelinek <jakub@redhat.com>
1678 * decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than
1679 newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits.
1681 2012-02-07 Jason Merrill <jason@redhat.com>
1684 * semantics.c (cx_check_missing_mem_inits): Handle unions.
1685 Fix constexpr default constructor logic.
1688 * pt.c (tsubst): Strip uninstantiated typedef.
1690 2012-02-06 Jason Merrill <jason@redhat.com>
1693 * cvt.c (build_expr_type_conversion): Check for template conversion.
1695 2012-01-31 Jason Merrill <jason@redhat.com>
1698 * cp-tree.h (PACK_EXPANSION_LOCAL_P): New.
1699 * pt.c (make_pack_expansion, tsubst_initializer_list): Set it.
1700 (tsubst_pack_expansion): Check it.
1702 2012-01-29 Paolo Carlini <paolo.carlini@oracle.com>
1705 * class.c (explain_non_literal_class): Correctly handle implicitly
1706 deleted constructors.
1708 2012-01-27 Jakub Jelinek <jakub@redhat.com>
1711 * pt.c (tsubst_pack_expansion): Delete and restore
1712 local_specialization whenever need_local_specialization, not just
1713 when saved_local_specializations is non-NULL.
1715 2012-01-26 Paolo Carlini <paolo.carlini@oracle.com>
1718 * error.c (dump_decl, [TEMPLATE_ID_EXPR]): Handle error_mark_node
1719 as TREE_OPERAND (t, 1).
1721 2012-01-24 Jason Merrill <jason@redhat.com>
1724 * decl.c (xref_basetypes): Check VEC_length instead of VEC_space.
1727 * tree.c (called_fns_equal): Check template args.
1728 (cp_tree_equal): Call it.
1730 2012-01-24 Aldy Hernandez <aldyh@redhat.com>
1731 Patrick Marlier <patrick.marlier@gmail.com>
1734 * class.c (set_method_tm_attributes): Use TARGET_THUNK instead of
1735 thunk for set_one_vmethod_tm_attributes.
1737 2012-01-24 Paolo Carlini <paolo.carlini@oracle.com>
1740 * call.c (build_over_call): Check for error_mark_node as
1741 TREE_VALUE when default arguments are processed.
1743 2012-01-23 Jason Merrill <jason@redhat.com>
1746 * decl2.c (determine_visibility): Check for visibility attribute
1747 on template specialization.
1749 2012-01-23 Paolo Carlini <paolo.carlini@oracle.com>
1752 * pt.c (parameter_of_template_p): Skip error_mark_node parameters.
1754 2012-01-23 Jason Merrill <jason@redhat.com>
1757 * class.c (add_method): Set OVL_USED for using-decls.
1758 * tree.c (ovl_scope): New.
1759 * cp-tree.h: Declare it.
1760 * parser.c (cp_parser_template_name): Use it.
1761 * semantics.c (baselink_for_fns): Likewise.
1762 * name-lookup.c (set_inherited_value_binding_p): Likewise.
1764 2012-01-20 Paolo Carlini <paolo.carlini@oracle.com>
1767 * pt.c (lookup_template_class_1): Check context returned by
1768 tsubst for error_mark_node.
1770 2012-01-19 Kai Tietz <ktietz@redhat.com>
1773 * decl2.c (save_template_attributes): Use merge_attributes
1774 instead of chaining up via TREE_CHAIN.
1776 2012-01-19 Jason Merrill <jason@redhat.com>
1779 * class.c (finish_struct): Call add_method here for function usings.
1780 * semantics.c (finish_member_declaration): Not here.
1782 2012-01-18 Paolo Carlini <paolo.carlini@oracle.com>
1785 * typeck2.c (store_init_value): Within a template guard
1786 cxx_constant_value with require_potential_constant_expression.
1787 * pt.c (convert_nontype_argument): Likewise.
1789 2012-01-16 Jakub Jelinek <jakub@redhat.com>
1792 * mangle.c (write_template_arg_literal): Handle complex.
1794 2012-01-16 Jason Merrill <jason@redhat.com>
1797 * mangle.c (mangle_decl): Don't mangle uninstantiated templates.
1800 * typeck.c (build_static_cast_1): Handle bit-fields properly.
1802 2012-01-13 Ian Lance Taylor <iant@google.com>
1805 * typeck.c (enum_cast_to_int): New static function.
1806 (cp_build_binary_op): When handling warn_sign_compare, don't test
1807 for TREE_NO_WARNING. Do call enum_cast_to_int.
1808 * call.c (avoid_sign_compare_warnings): Remove static function.
1809 (build_new_op_1): Don't call avoid_sign_compare_warnings.
1811 2012-01-13 Steven Bosscher <steven@gcc.gnu.org>
1813 * decl2.c: Do not include tree-mudflap.h
1814 * semantics.c: Likewise.
1816 2012-01-13 Jason Merrill <jason@redhat.com>
1819 * semantics.c (finish_break_stmt): Avoid adding an unreachable
1823 * decl2.c (constrain_visibility): Clear DECL_VISIBILITY_SPECIFIED
1824 when reducing the visibility.
1827 * class.c (build_vtbl_initializer): Use __cxa_deleted_virtual.
1829 2012-01-12 Jason Merrill <jason@redhat.com>
1832 * pt.c (value_dependent_expression_p): Treat STMT_EXPR as
1835 2012-01-13 Dodji Seketeli <dodji@redhat.com>
1838 * semantics.c (cp_parser_ctor_initializer_opt_and_function_body):
1839 Set the pointer to the last block of the constructor to the
1841 (build_constexpr_constructor_member_initializers): Get
1842 build_data_member_initialization a chance to deal with more
1843 statements before we choke.
1845 2012-01-12 Jason Merrill <jason@redhat.com>
1848 * mangle.c (write_expression): Mangle BASELINK scope if
1849 BASELINK_QUALIFIED_P.
1850 * search.c (adjust_result_of_qualified_name_lookup): Set
1851 BASELINK_QUALIFIED_P.
1852 * tree.c (cp_tree_equal) [BASELINK]: Compare BASELINK_QUALIFIED_P.
1853 * parser.c (cp_parser_postfix_dot_deref_expression): Don't call
1854 adjust_result_of_qualified_name_lookup for non-qualified names.
1857 * pt.c (unify): Handle error_mark_node.
1859 2012-01-11 Jason Merrill <jason@redhat.com>
1862 * call.c (standard_conversion): For ptrmemfuncs, compare the
1866 * mangle.c (find_substitution): A type is only a substitution
1867 match if we're looking for a type.
1868 (write_nested_name): Use decl_mangling_context.
1870 * decl.c (decls_match): Assert that the arguments are decls.
1873 * pt.c (resolve_overloaded_unification): Compare types with
1874 same_type_p, not decls_match.
1876 2012-01-10 Jason Merrill <jason@redhat.com>
1879 * class.c (build_base_path): Diagnose ambiguous base.
1882 * semantics.c (cxx_eval_call_expression): Always retry previously
1883 non-constant expressions.
1885 2012-01-06 Jason Merrill <jason@redhat.com>
1889 * parser.c (cp_parser_new_expression): Set
1890 type_definition_forbidden_message.
1896 * mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR,
1897 THROW_EXPR, CONSTRUCTOR, OVERLOAD. Fix PREINCREMENT_EXPR and
1899 (write_template_arg): Fix mangling of class-scope functions and
1901 (mangle_decl): Update suggested -fabi-version argument.
1902 * operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR,
1903 DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR.
1904 * tree.c (dependent_name): No longer static.
1905 * cp-tree.h: Declare it.
1906 * pt.c (unify): Defer handling of unconverted functions.
1908 * mangle.c (mangle_decl): Don't generate mangling aliases
1909 for maybe-in-charge [cd]tors.
1911 * error.c (dump_expr): Print type of CONSTRUCTOR.
1913 2012-01-05 Dodji Seketeli <dodji@redhat.com>
1916 * parser.c (cp_parser_alias_declaration): Get out early upon
1917 errors in the identifier or the attributes.
1919 2012-01-04 Paolo Carlini <paolo.carlini@oracle.com>
1922 * pt.c (tsubst_copy_and_build): Maybe set TREE_NO_WARNING on
1923 the tree returned by build_x_binary_op.
1925 2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
1928 * parser.c (cp_parser_postfix_open_square_expression): Handle
1929 postfix-expression [ braced-init-list ].
1931 2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
1934 * rtti.c (build_dynamic_cast_1): In case of T a pointer type,
1935 call decay_conversion on v.
1937 2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
1940 * decl.c (duplicate_decls): With -Wredundant-decls don't warn for
1941 declaration followed by specialization.
1943 2012-01-03 Jakub Jelinek <jakub@redhat.com>
1946 * semantics.c (finish_omp_clauses): Call fold_build_cleanup_point_expr
1947 on OMP_CLAUSE_{IF,FINAL,NUM_THREADS,SCHEDULE_CHUNK}_EXPR.
1949 2012-01-02 Jason Merrill <jason@redhat.com>
1953 * method.c (walk_field_subobs): Don't check for uninitialized
1955 (synthesized_method_walk): Check here.
1959 * parser.c (cp_parser_cache_defarg): Split out...
1960 (cp_parser_parameter_declaration): ...from here.
1961 (cp_parser_save_nsdmi): Use it.
1962 (cp_parser_cache_group): Remove CPP_COMMA support.
1964 2012-01-02 Dodji Seketeli <dodji@redhat.com>
1967 * semantics.c (cx_check_missing_mem_inits): Don't assert in case
1970 2012-01-02 Paolo Carlini <paolo.carlini@oracle.com>
1973 * typeck2.c (digest_init_r): Use copy_init when initializing
1976 2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
1979 * decl.c (build_enumerator): Don't call perform_integral_promotions
1982 2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
1985 * typeck.c (build_reinterpret_cast_1): Implement resolution of
1988 2012-01-01 Fabien ChĂȘne <fabien@gcc.gnu.org>
1990 * parser.c (cp_parser_using_declaration): Add a warning about
1991 deprecated access declarations when no errors were encountered
1992 while parsing the access declaration. Save the first token in
1993 order to emit the warning at the right place.
1995 Copyright (C) 2012 Free Software Foundation, Inc.
1997 Copying and distribution of this file, with or without modification,
1998 are permitted in any medium without royalty provided the copyright
1999 notice and this notice are preserved.