1 2010-11-01 Gabriel Dos Reis <gdr@cse.tamu.edu>
2 Jason Merrill <jason@redhat.com>
4 * call.c (null_ptr_cst_p): Use maybe_constant_value.
5 (set_up_extended_ref_temp): Support constant initialization.
6 (initialize_reference): Adjust.
7 * class.c (check_bitfield_decl): Use cxx_constant_value.
8 * cvt.c (ocp_convert): Don't use integral_constant_value when
9 converting to class type.
10 * decl.c (finish_case_label): Use maybe_constant_value.
11 (build_init_list_var_init): Support constant initialization.
12 (check_initializer): Likewise. Reorganize.
13 (cp_finish_decl): Likewise.
14 (expand_static_init): Likewise.
15 (compute_array_index_type): Use maybe_constant_value.
17 (create_array_type_for_decl, grokdeclarator): Pass it.
18 (build_enumerator): Use cxx_constant_value.
19 * decl2.c (grokfield): Use maybe_constant_init.
20 * except.c (check_noexcept_r): Handle constexpr.
21 (build_noexcept_spec): Use maybe_constant_value.
22 * init.c (expand_default_init): Support constant initialization.
23 (build_vec_init): Likewise.
24 (constant_value_1): Adjust.
25 (build_new_1): Adjust.
26 * parser.c (cp_parser_constant_expression): Allow non-integral
28 (cp_parser_direct_declarator): Don't fold yet in C++0x mode.
29 (cp_parser_initializer_clause): Toss folded result if non-constant.
30 * pt.c (fold_decl_constant_value): Remove.
31 (convert_nontype_argument): Use maybe_constant_value. Give clearer
33 (tsubst): Move array bounds handling into compute_array_index_type.
34 (value_dependent_expression_p): Handle constant CALL_EXPR.
35 (tsubst_decl): Don't set
36 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P yet.
37 (tsubst_expr) [DECL_EXPR]: Pass it into cp_finish_decl.
38 (instantiate_decl): Here too.
39 * semantics.c (finish_static_assert): Use maybe_constant_value.
40 (ensure_literal_type_for_constexpr_object): Make sure type is complete.
41 (potential_constant_expression): Use maybe_constant_value.
42 * tree.c (cast_valid_in_integral_constant_expression_p): Any cast
43 is potentially valid in C++0x.
44 * typeck2.c (store_init_value): Handle constant init.
45 (check_narrowing): Use maybe_constant_value.
46 (build_functional_cast): Set TREE_CONSTANT on literal T().
47 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): Remove.
48 (LOOKUP_ALREADY_DIGESTED): New.
49 (compute_array_index_type): Adjust prototype.
51 * semantics.c (constexpr_call): New datatype.
52 (constexpr_call_table): New global table.
53 (constexpr_call_hash): New.
54 (constexpr_call_equal): Likewise.
55 (maybe_initialize_constexpr_call_table): Likewise.
56 (lookup_parameter_binding): Likewise.
57 (cxx_eval_builtin_function_call): Likewise.
58 (cxx_bind_parameters_in_call): Likewise.
59 (cxx_eval_call_expression): Likewise.
60 (cxx_eval_unary_expression): Likewise.
61 (cxx_eval_binary_expression): Likewise.
62 (cxx_eval_conditional_expression): Likewise.
63 (cxx_eval_array_reference): Likewise.
64 (cxx_eval_component_reference): Likewise.
65 (cxx_eval_logical_expression): Likewise.
66 (cxx_eval_object_construction): Likewise.
67 (cxx_eval_constant_expression): Likewise.
68 (cxx_eval_indirect_ref): Likewise.
69 (cxx_constant_value): Likewise.
70 (cxx_eval_bare_aggregate): Likewise.
71 (adjust_temp_type): New.
72 (reduced_constant_expression_p): New.
73 (verify_constant): New.
74 (cxx_eval_vec_init, cxx_eval_vec_init_1): New.
75 (cxx_eval_outermost_constant_expr): New.
76 (maybe_constant_value, maybe_constant_init): New.
77 (cxx_eval_constant_expression): Use them.
78 * pt.c (iterative_hash_template_arg): No longer static.
79 * cp-tree.h: Declare fns.
81 * cp-tree.h (register_constexpr_fundef): Declare.
82 * decl.c (maybe_save_function_definition): New.
83 (finish_function): Use it.
84 * semantics.c (constexpr_fundef): New datatype.
85 (constexpr_fundef_table): New global table.
86 (constexpr_fundef_equal): New.
87 (constexpr_fundef_hash): Likewise.
88 (retrieve_constexpr_fundef): Likewise.
89 (validate_constexpr_fundecl): Store in the table.
90 (build_data_member_initialization): New fn.
91 (build_constexpr_constructor_member_initializers): New.
92 (register_constexpr_fundef): Define.
93 (is_this_parameter): New.
94 (get_function_named_in_call): Likewise.
95 (get_nth_callarg): Likewise.
96 (check_automatic_or_tls): New.
97 (morally_constexpr_builtin_function_p): New.
98 (potential_constant_expression): New.
100 2010-11-01 Jason Merrill <jason@redhat.com>
102 * decl2.c (decl_constant_var_p): New fn.
103 (decl_maybe_constant_var_p): New fn.
104 (mark_used): Rework instantiation of things needed for constant
106 * cp-tree.h: Declare new fns.
107 * pt.c (instantiate_decl): Handle cp_unevaluated_operand.
108 (always_instantiate_p): Use decl_maybe_constant_var_p.
109 (instantiate_decl): Don't defer constexpr functions.
110 * repo.c (repo_emit_p): Use decl_maybe_constant_var_p.
111 * semantics.c (finish_id_expression): Use decl_constant_var_p.
112 Check for valid name in constant expr after mark_used.
114 2010-10-31 Jason Merrill <jason@redhat.com>
116 * class.c (is_really_empty_class): Work when type is not complete.
117 (synthesized_default_constructor_is_constexpr): New.
118 (add_implicitly_declared_members): Use it.
119 (type_has_constexpr_default_constructor): Likewise.
120 * cp-tree.h: Declare it.
121 * method.c (synthesized_method_walk): Use it.
123 * decl.c (pop_switch): Use EXPR_LOC_OR_HERE.
124 * typeck.c (convert_for_assignment): Likewise.
126 * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful
127 message about constexpr without -std=c++0x.
129 * decl.c (grokdeclarator): Don't ICE on constexpr non-static data
132 2010-10-30 Nathan Froyd <froydnj@codesourcery.com>
134 * class.c (layout_vtable_decl): Call build_array_of_n_type.
135 (build_vtt, build_ctor_vtabl_group): Likewise.
137 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
139 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
140 * parser.c (cp_parser_objc_at_property_declaration): Removed
141 parsing of RID_COPIES and RID_IVAR. Updated call to
142 objc_add_property_declaration.
143 * typecheck.c (finish_class_member_access_expr): Call
144 objc_maybe_build_component_ref instead of objc_build_setter_call.
145 (cp_build_modify_expr): Call objc_maybe_build_modify_expr instead
146 of objc_build_getter_call.
148 2010-10-27 Jason Merrill <jason@redhat.com>
150 * cp-tree.h (cp_trait_kind): Add CPTK_IS_LITERAL_TYPE.
151 * cxx-pretty-print.c (pp_cxx_trait_expression): Handle it.
152 * semantics.c (trait_expr_value, finish_trait_expr): Likewise.
153 * parser.c (cp_parser_primary_expression): Handle RID_IS_LITERAL_TYPE.
154 (cp_parser_trait_expr): Likewise.
156 2010-10-27 Gabriel Dos Reis <gdr@cse.tamu.edu>
157 Jason Merrill <jason@redhat.com>
159 * decl.c (finish_case_label): Use decl_constant_value.
161 * method.c (synthesized_method_walk): Track constexprness too.
162 (process_subob_fn, walk_field_subobs): Likewise.
163 (implicitly_declare_fn): Set DECL_DECLARED_CONSTEXPR_P.
164 (defaulted_late_check): Handle DECL_DECLARED_CONSTEXPR_P.
165 * class.c (add_implicitly_declared_members): Handle
166 constexpr default ctor.
168 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
169 Make sure a constexpr ctor has an empty body.
170 * class.c (type_has_constexpr_default_constructor): New.
171 * cp-tree.h: Declare it.
172 * init.c (perform_member_init): Complain about uninitialized
173 member in constexpr ctor.
174 (emit_mem_initializers): And uninitialized base.
175 * decl.c (check_tag_decl): Fix typo.
177 * semantics.c (valid_type_in_constexpr_fundecl_p): New fn.
178 (is_valid_constexpr_fn): New fn.
179 (validate_constexpr_fundecl): Use it.
180 * decl.c (validate_constexpr_redeclaration): New.
181 (duplicate_decls): Use it.
182 (cp_finish_decl): Call validate_constexpr_fundecl and
183 ensure_literal_type_for_constexpr_object here.
184 (start_decl): Not here. Don't ICE on constexpr reference.
185 (check_for_uninitialized_const_var): Don't handle constexpr specially.
186 (grokfndecl): Set DECL_DECLARED_CONSTEXPR_P.
187 (check_static_variable_definition): Give friendly message about
189 (grokdeclarator): Complain about typedef and volatile with constexpr.
190 Reorganize. Give sorry about non-static data members in C++0x mode.
191 (start_preparsed_function): Check validate_constexpr_fundecl here.
192 (check_function_type): Not here.
193 * decl2.c (finish_static_data_member_decl): Don't complain about
195 * parser.c (CP_PARSER_FLAGS_ONLY_TYPE_OR_CONSTEXPR): New.
196 (cp_parser_condition): Pass it to cp_parser_decl_specifier_seq.
197 (cp_parser_decl_specifier_seq): Handle it.
198 (cp_parser_explicit_instantiation): Diagnose inline and constexpr.
200 * class.c (check_bases): Propagate non-literality.
201 (check_field_decls): Likewise.
202 (finalize_literal_type_property): New.
203 (check_bases_and_members): Call it.
204 * cp-tree.h (TYPE_HAS_CONSTEXPR_CTOR): New.
205 (lang_type_class): Add has_constexpr_ctor field.
206 (DECL_DECLARED_CONSTEXPR_P): Strip template.
207 * decl.c (grok_special_member_properties): Set
208 TYPE_HAS_CONSTEXPR_CTOR.
210 2010-10-27 Jason Merrill <jason@redhat.com>
212 * call.c (build_integral_nontype_arg_conv): New.
213 * cp-tree.h: Declare it.
214 * pt.c (convert_nontype_argument): Use it.
216 * error.c (dump_simple_decl): Print constexpr.
218 * cvt.c (build_up_reference): Use target_type for the temporary var.
220 * except.c (build_throw): Set EXPR_LOCATION.
222 * tree.c (build_cplus_new): Handle CONSTRUCTOR.
224 * semantics.c (finish_compound_stmt): Avoid creating an
225 unnecessary BIND_EXPR.
227 * call.c (convert_like_real): Don't check narrowing if the element
228 is also an initializer-list.
230 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
232 * parser.c (cp_parser_objc_at_property_declaration): Recognize
233 RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC.
234 Do not use objc_set_property_attr, but use local variables
235 instead. Detect repeated usage of setter, getter and ivar
236 attributes. Improved error processing when a setter name does not
237 end in ':'. Do not check for CPP_CLOSE_PAREN after we determined
238 that the token is a keyword. Updated call to
239 objc_add_property_declaration.
241 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
243 * parser.c (cp_parser_objc_property_decl): Renamed to
244 cp_parser_objc_struct_declaration. Return the parsed trees
245 instead of calling objc_add_property_variable directly. Detect
246 missing or invalid declspecs. Implemented attributes. Do not eat
247 the ';' at the end. Exit loop whenever a non-comma is parsed, not
249 (cp_parser_objc_at_property): Renamed to
250 cp_parser_objc_at_property_declaration. Updated calls to
251 objc_add_property_variable, now objc_add_property_declaration, and
252 to cp_parser_objc_property_decl, now
253 cp_parser_objc_struct_declaration. Rewritten all code to be more
254 robust in dealing with syntax errors, and almost identical to the
255 one in c_parser_objc_at_property_declaration.
256 (cp_parser_objc_property_attrlist): Removed.
257 (cp_parser_objc_method_prototype_list): Updated call to
258 cp_parser_objc_at_property.
259 (cp_parser_objc_method_definition_list): Same change.
260 (cp_parser_objc_class_ivars): Detect a number of invalid
261 declarations of instance variables and produce errors when they
264 2010-10-26 Jason Merrill <jason@redhat.com>
266 * tree.c (build_vec_init_expr): Split out from...
267 (build_array_copy): ...here.
268 * init.c (perform_member_init): Use it.
269 * cp-tree.h: Declare it.
270 * cp-gimplify.c (cp_gimplify_init_expr): Don't gimplify the slot for
271 VEC_INIT_EXPR and AGGR_INIT_EXPR here. Drop pre/post parameters.
272 (cp_gimplify_expr): Handle array default-initialization via
275 * tree.c (stabilize_expr): Handle xvalues properly.
277 * call.c (build_over_call): Use argarray[0] for 'this' argument.
279 * decl.c (finish_function): Don't look at function_depth.
281 2010-10-25 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
283 Implement opaque-enum-specifiers for C++0x.
284 * cp-tree.h (SET_OPAQUE_ENUM_P): New.
285 (OPAQUE_ENUM_P): New.
286 (ENUM_FIXED_UNDERLYING_TYPE_P): New.
287 (start_enum): Update prototype.
288 (finish_enum_value_list): New prototype.
289 * parser.c (cp_parser_elaborated_type_specifier): Issue a pedwarn if
290 "enum class" is used in an elaborated-type-specifier.
291 (cp_parser_enum_specifier): Rewrite to parse opaque-enum-specifiers.
292 * decl.c (copy_type_enum): New.
293 (finish_enum_value_list): New, with code from finish_enum.
294 (finish_enum): A lot of code removed. Added a gcc_assert.
295 (start_enum): Add parameters enumtype and is_new.
296 Rewrite to work with opaque-enum-specifiers.
297 * pt.c (maybe_process_partial_specialization): Allow for template
298 specialization of enumerations, with a pedwarn.
299 (lookup_template_class): Update call to start_enum. Call to
301 (tsubst_enum): Call to begin_scope, finish_scope and
302 finish_enum_value_list.
304 2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
306 Removed Objective-C++ specific replacement of cxx_printable_name.
307 * cp-objcp-common.h: Added LANG_HOOKS_DECL_PRINTABLE_NAME, set
308 to cxx_printable_name for both C++ and Objective-C++.
309 * cp-lang.h: Removed LANG_HOOKS_DECL_PRINTABLE_NAME.
311 * error.c (dump_decl): For Objective-C++, call
312 objc_maybe_printable_name here ...
313 * tree.c (cxx_printable_name_internal): ... instead of here.
315 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
317 * tree.c (cxx_printable_name_internal): In Objective-C++, call
318 objc_maybe_printable_name.
320 2010-10-22 Jason Merrill <jason@redhat.com>
323 * pt.c (instantiate_class_template): Don't instantiate default
327 * init.c (build_vec_init): Handle memberwise move.
329 2010-10-21 Paolo Carlini <paolo.carlini@oracle.com>
332 * call.c (add_function_candidate): Don't use TREE_VALUE on null
335 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
337 * parser.c (cp_parser_objc_method_type): Mark inline. Return a
338 bool instead of calling objc_set_method_type.
339 (cp_parser_objc_method_signature): Updated calls to
340 cp_parser_objc_method_type and to objc_build_method_signature.
341 (cp_parser_objc_method_prototype_list): Updated calls to
342 objc_add_method_declaration. Use token->type to determine if it
343 is a class method or not.
344 (cp_parser_objc_method_definition_list): Same change.
346 2010-10-20 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
349 * parser.c (cp_convert_range_for): Call cp_finish_decl
350 instead of finish_expr_stmt.
352 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
354 * cp-lang.c (finish_file): Removed.
355 * decl2.c (cp_write_global_declarations): Call
356 objc_write_global_declarations when compiling Objective-C++.
358 2010-10-19 Paolo Carlini <paolo.carlini@oracle.com>
361 * pt.c (add_to_template_args): Check extra_args for error_mark_node.
362 (coerce_template_parms): Likewise for args.
364 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
366 Implemented parsing @synthesize and @dynamic for Objective-C++.
367 * parser.c (cp_parser_objc_method_definition_list): Recognize
368 RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
369 (cp_parser_objc_at_dynamic_declaration): New.
370 (cp_parser_objc_at_synthesize_declaration): New.
372 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
374 * parser.c (cp_parser_objc_identifier_list): Check the return
375 value of cp_parser_identifier and react if it is error_mark_node.
377 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
379 Merge from apple/trunk branch on FSF servers.
381 2005-03-01 Fariborz Jahanian <fjahanian@apple.com>
384 * call.c (standard_conversion, implicit_conversion): Ignore
385 'volatile' attribute of artificially volatized type in objc when
386 evaluating various conversion weights.
388 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
391 * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the
392 artiificially 'volatized' type before doing pointer comparison.
394 2010-10-18 Jakub Jelinek <jakub@redhat.com>
397 * semantics.c (finish_goto_stmt): Call mark_rvalue_use on computed
400 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
402 Merge from apple/trunk branch on FSF servers.
404 2006-04-19 Fariborz Jahanian <fjahanian@apple.com>
407 * parser.c (cp_parser_simple_type_specifier): Don't lookup for
408 objc object types if type is scope qualified.
410 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
412 Merge from apple/trunk branch on FSF servers.
414 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
417 * lex.c (unqualified_name_lookup_error): Issue diagnostic
418 for private 'ivar' access.
420 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
422 * parser.c (cp_parser_objc_visibility_spec): Update to use visibility
423 enum, and handle @package.
425 2010-10-15 Jason Merrill <jason@redhat.com>
428 * tree.c (cp_build_qualified_type_real): Don't reuse a variant
429 with a different typedef variant of the element type.
431 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
433 merge from FSF apple 'trunk' branch.
434 2006 Fariborz Jahanian <fjahanian@apple.com>
436 Radars 4436866, 4505126, 4506903, 4517826
437 * typeck.c (finish_class_member_access_expr): Handle CLASS.property
439 (cp_build_modify_expr): Likewise.
440 * parser.c (cp_parser_objc_method_prototype_list): Handle @property.
441 (cp_parser_objc_method_definition_list): Likewise.
442 (cp_parser_objc_property_decl): New.
443 (cp_parser_objc_property_attrlist): New.
444 (cp_parser_objc_at_property): New.
446 2010-10-14 Richard Guenther <rguenther@suse.de>
449 * cp-tree.h (NULLPTR_TYPE_P): Adjust.
450 * decl.c (cxx_init_decl_processing): Build a NULLPTR_TYPE node,
452 * error.c (dump_type): Handle NULLPTR_TYPE.
453 (dump_type_prefix): Likewise.
454 (dump_type_suffix): Likewise.
455 * mangle.c (write_type): Likewise.
456 * name-lookup.c (arg_assoc_type): Likewise.
457 * rtti.c (typeinfo_in_lib_p): Likewise.
458 * pt.c (tsubst): Likewise.
460 2010-10-13 Jason Merrill <jason@redhat.com>
463 * class.c (fixup_attribute_variants): New fn.
464 * cp-tree.h: Declare it.
465 * pt.c (instantiate_class_template): Call it.
466 * semantics.c (begin_class_definition): Call it.
468 2010-10-13 Richard Henderson <rth@redhat.com>
470 * cp-lang.c (cp_eh_personality): Update call to
471 build_personality_function.
472 * except.c (choose_personality_routine): Update function comment.
474 2010-10-13 Richard Guenther <rguenther@suse.de>
476 * tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and
477 clear DECL_CHAIN of NAMESPACE_DECLs.
479 2010-10-11 Martin Jambor <mjambor@suse.cz>
482 * cp-tree.h (current_class_ref): Check that cp_function_chain is
484 * call.c (build_cxx_call): Likewise.
486 2010-10-10 Jason Merrill <jason@redhat.com>
488 * pt.c (tsubst_default_argument): Handle DEFAULT_ARG.
489 (tsubst_default_arguments): Only do this once for cloned fns.
490 (tsubst): Use typedef_variant_p. Handle LANG_TYPE. Don't
492 (tsubst_expr): Avoid calling tsubst_expr for non-expressions.
493 (tsubst_copy_and_build): Likewise.
494 (tsubst_initializer_list): Likewise.
495 (tsubst_copy): Change default to gcc_unreachable. Handle
496 OVERLOAD and PTRMEM_CST.
498 2010-10-10 Jason Merrill <jason@redhat.com>
502 * pt.c (tsubst_copy) [INTEGER_CST]: Instantiate the type.
504 2010-10-07 Andi Kleen <ak@linux.intel.com>
506 * Make-lang.in (c++_OBJS): Remove dummy-checksum.o.
507 (cc1plus-dummy): Remove.
508 (cc1plus-checksum): Change to run checksum over object files
511 2010-10-08 Joseph Myers <joseph@codesourcery.com>
513 * cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
515 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
517 * cp-tree.def: Changed type of AT_ENCODE_EXPR from tcc_unary to
519 * cxx-pretty-print.c (pp_cxx_unary_expression): Added case for
521 * error.c (dump_expr): Added case for AT_ENCODE_EXPR.
522 * pt.c (tsubst_copy): Added case for AT_ENCODE_EXPR.
523 (value_dependent_expression_p): Added case for AT_ENCODE_EXPR.
524 (type_dependent_expression_p): Added case for AT_ENCODE_EXPR.
525 * parser.c (cp_parser_objc_encode_expression): Updated comment.
527 2010-10-07 Nicola Pero <nicola@nicola.brainstorm.co.uk>
529 Merge from apple/trunk branch on FSF servers.
531 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
534 * parser.c (cp_parser_objc_interstitial_code): Recognize
535 and parse RID_NAMESPACE keyword.
537 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
539 * parser.c (cp_parser_objc_method_tail_params_opt): Peek new token after
540 finding ellipsis, before checking for attributes.
542 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
544 Merge from apple/trunk branch on FSF servers.
545 * cp-tree.def: Added AT_ENCODE_EXPR here instead of to the no
546 longer existing gcc/c-common.def.
548 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
551 * pt.c (tsubst_copy_and_build): Instantiate @endcode(T).
552 * parser.c (cp_parser_objc_encode_expression): Build a templatized
553 parse tree for @encode(T).
555 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
558 * c-common.def: Add new expression code AT_ENCODE_EXPR.
560 2010-10-06 Eric Botcazou <ebotcazou@adacore.com>
563 * typeck.c (cp_build_addr_expr_1): Add check for incomplete types in
564 code folding offsetof-like computations.
566 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
569 * parser.c (cp_parser_objc_class_interface): If no identifier
570 follows an @interface token, stop parsing the interface after
572 (cp_parser_objc_class_implementation): If no identifier follows an
573 @implementation token, stop parsing the implementation after
576 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
579 * parser.c (cp_parser_objc_method_keyword_params): If the required
580 colon is not found while parsing parameters, stop parsing them.
582 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
585 * parser.c (cp_parser_objc_class_ivars): Do not eat the EOF or
586 @end after detecting it. Print an error if @end is found without
588 (cp_parser_objc_method_prototype_list): Do not eat the EOF after
589 detecting it. Fixed reading the next token when continuing
590 because of an error in a method signature. Print an error if EOF
591 is found without an '@end'.
592 (cp_parser_objc_method_definition_list): Same change.
594 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
596 Merge from apple/trunk branch on FSF servers:
598 2005-10-17 Fariborz Jahanian <fjahanian@apple.com>
601 * parser.c (cp_parser_objc_method_keyword_params): Check for valid
602 method parameters and issue error.
603 (cp_parser_objc_method_definition_list): Check for invalid tokens
604 which cannot start a function definition.
606 2005-10-14 Fariborz Jahanian <fjahanian@apple.com>
609 * parser.c (cp_parser_objc_message_args): Check for missing message
610 arguments and syntax error.
612 2005-10-13 Fariborz Jahanian <fjahanian@apple.com>
615 * parser.c (cp_parser_objc_class_ivars): Check for @end/eof while
618 2005-08-15 Ziemowit Laski <zlaski@apple.com>
621 * parser.c (cp_parser_objc_interstitial_code): Catch stray
622 '{' and '}' tokens and issue appropriate errors.
624 2005-08-02 Ziemowit Laski <zlaski@apple.com>
627 (cp_parser_statement_seq_opt): In addition to '}' and
628 end-of-file, a statement sequence may also be terminated
631 2010-10-05 Joseph Myers <joseph@codesourcery.com>
633 * cp-tree.h (cxx_print_error_function,
634 cxx_initialize_diagnostics): Declare using diagnostic_context
637 2010-10-04 Andi Kleen <ak@linux.intel.com>
639 * Make-lang.in (g++, cc1plus): Add + to build rule.
641 2010-10-04 Jason Merrill <jason@redhat.com>
643 * tree.c (decl_storage_duration): New.
644 * cp-tree.h: Declare it.
645 (duration_kind): Return values.
647 2010-10-03 Jason Merrill <jason@redhat.com>
649 * typeck.c (require_complete_type_sfinae): Add complain parm to...
650 (require_complete_type): ...this function.
651 (cp_build_array_ref, convert_arguments): Use it.
652 (convert_for_initialization, cp_build_modify_expr): Likewise.
653 * cp-tree.h: Declare it.
654 * call.c (build_over_call): Use it.
656 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
658 merge from FSF 'apple/trunk' branch.
659 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
662 * cp/parser.c (cp_parser_objc_interstitial_code): For
663 @optional/@required set the optional/required flag.
665 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
667 * parser.c (cp_lexer_get_preprocessor_token): Tidied up comments
668 and indentation when finding an Objective-C++ CPP_AT_NAME token.
670 2010-09-29 Richard Guenther <rguenther@suse.de>
672 * cp-tree.h (CP_DECL_CONTEXT): Check DECL_FILE_SCOPE_P.
673 (CP_TYPE_CONTEXT): Similar.
674 (FROB_CONTEXT): Frob global_namespace to the global
675 TRANSLATION_UNIT_DECL.
676 * decl.c (cxx_init_decl_processing): Build a TRANSLATION_UNIT_DECL,
677 set DECL_CONTEXT of global_namespace to it.
678 (start_decl): Use CP_DECL_CONTEXT and test TYPE_P
679 instead of zeroing context.
680 (cp_finish_decl): Use DECL_FILE_SCOPE_P.
681 (grokfndecl): Likewise.
682 (start_preparsed_function): Likewise.
683 * name-lookup.c (maybe_push_decl): Use DECL_NAMESPACE_SCOPE_P.
684 (namespace_binding): Use SCOPE_FILE_SCOPE_P.
685 * pt.c (template_class_depth): Use CP_TYPE_CONTEXT.
686 (is_specialization_of_friend): Use CP_DECL_CONTEXT.
687 (push_template_decl_real): Likewise.
688 (tsubst_friend_class): Likewise. Adjust context comparisons.
689 (instantiate_class_template): Use CP_TYPE_CONTEXT.
690 (tsubst): Do not substitute into TRANSLATION_UNIT_DECL.
691 * cxx-pretty-print.c (pp_cxx_nested_name_specifier): Use
694 2010-09-29 Yao Qi <yao@codesourcery.com>
696 * decl.c (get_atexit_node): Fix typo.
698 2010-09-28 Jason Merrill <jason@redhat.com>
700 * tree.c (lvalue_kind): Rename from lvalue_p_1, make nonstatic.
701 (real_lvalue_p): Take const_tree.
703 * typeck.c (lvalue_or_else): Make temporary arg a permerror.
704 (cp_build_addr_expr_1): Likewise.
706 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
708 Partially merged from apple/trunk branch on FSF servers:
709 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
710 Radar 3803157 (method attributes)
712 * parser.c (cp_parser_objc_method_keyword_params): Handle attributes.
713 (cp_parser_objc_method_tail_params_opt): Likewise.
714 (cp_parser_objc_method_signature): Likewise.
715 (cp_parser_objc_method_maybe_bad_prefix_attributes): New.
716 (cp_parser_objc_method_prototype_list): Handle attributes.
717 (cp_parser_objc_method_definition_list): Likewise.
719 2010-09-28 Richard Henderson <rth@redhat.com>
721 * cp-lang.c: Include "target.h".
722 (cp_eh_personality): Use targetm.except_unwind_info.
723 * Make-lang.in (cp-lang.o): Update deps.
725 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
727 * parser.c (cp_parser_objc_valid_prefix_attributes): New.
728 (cp_parser_declaration): Parse prefix attributes for ObjC++.
729 (cp_parser_objc_protocol_declaration): Handle attributes.
730 (cp_parser_objc_class_interface): Likewise.
731 (cp_parser_objc_declaration): Likewise.
733 2010-09-27 Jason Merrill <jason@redhat.com>
735 Require lvalues as specified by the standard.
736 * typeck.c (lvalue_or_else): Use real_lvalue_p.
737 (cp_build_addr_expr_1): Split out of cp_build_unary_op.
738 (cp_build_addr_expr, cp_build_addr_expr_strict): Interfaces.
739 (decay_conversion, get_member_function_from_ptrfunc): Adjust.
740 (build_x_unary_op, build_reinterpret_cast_1): Adjust.
741 (build_const_cast_1): Adjust.
742 * cp-tree.h: Declare new fns.
743 * call.c (build_this, convert_like_real, build_over_call): Adjust.
744 (initialize_reference): Adjust.
745 * class.c (build_base_path, convert_to_base_statically): Adjust.
746 (build_vfn_ref, resolve_address_of_overloaded_function): Adjust.
747 * cvt.c (build_up_reference, convert_to_reference): Adjust.
748 * decl.c (register_dtor_fn): Adjust.
749 * decl2.c (build_offset_ref_call_from_tree): Adjust.
750 * except.c (initialize_handler_parm): Adjust.
751 * init.c (build_offset_ref, build_delete, build_vec_delete): Adjust.
752 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Adjust.
753 * tree.c (stabilize_expr): Adjust.
755 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
757 Merge from apple/trunk branch on FSF servers:
759 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
762 * typeck.c (composite_pointer_type): Call objc_have_common_type
763 when comparing two objective-c pointer types.
765 2005-07-18 Ziemowit Laski <zlaski@apple.com>
768 * call.c (standard_conversion): Do not issue warnings when
769 comparing ObjC pointer types.
771 2005-06-22 Ziemowit Laski <zlaski@apple.com>
774 * call.c (standard_conversion): Allow for a pointer conversion
775 between any two ObjC pointer types.
776 * typeck.c (composite_pointer_type): Determine common type
777 for two ObjC pointer types.
779 2010-09-24 Jan Hubicka <jh@suse.cz>
781 * decl.c (finish_function): Use decl_replaceable_p
782 * method.c (make_alias_for_thunk): Update call of
783 cgraph_same_body_alias.
785 2010-09-24 Jason Merrill <jason@redhat.com>
787 * decl.c (compute_array_index_type): Remember type dependence of
789 * pt.c (dependent_type_p_r): Don't recompute it here.
791 * error.c (dump_expr) [CASE_CONVERT]: Print conversion between
792 reference and pointer to the same type as "*" or "&".
794 2010-09-24 Nicola Pero <nicola.pero@meta-innovation.com>
796 * typeck.c (warn_args_num): Use warning 'too many arguments to
797 method [methodname]' for an Objective-C method instead of the less
798 satisfactory 'too many arguments to function' (with no method
801 2010-09-21 Jason Merrill <jason@redhat.com>
803 * mangle.c (write_expression) [SCOPE_REF]: Only do -fabi-version=1
804 special handling if we know the member.
806 2010-09-18 Jason Merrill <jason@redhat.com>
808 * call.c (compare_ics): Do lvalue/rvalue reference binding
809 comparison for ck_list, too.
811 2010-09-15 Jason Merrill <jason@redhat.com>
813 * semantics.c (finish_id_expression): Diagnose use of function
814 parms in evaluated context outside function body.
816 * decl2.c (grokbitfield): Diagnose non-integral width.
818 * call.c (convert_like_real): Use the underlying type of the
819 reference for the temporary.
821 2010-09-15 Jakub Jelinek <jakub@redhat.com>
824 * class.c (build_vtbl_initializer): Use fn instead of init's operand
825 as first argument to FDESC_EXPR.
827 2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
830 * decl.c (grokdeclarator): Check build_memfn_type return value
833 2010-09-13 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
835 * semantics.c (finish_for_stmt): Always test flag_new_for_scope.
836 (begin_range_for_stmt): Likewise.
838 2010-09-11 Rodrigo Rivas <rodrigorivascosta@gmail.com>
840 Implement range-based for-statements.
841 * cp-tree.def (RANGE_FOR_STMT): New.
842 * cp-tree.h (RANGE_FOR_DECL, RANGE_FOR_EXPR, RANGE_FOR_BODY): New.
843 (cp_convert_range_for): Declare.
844 * pt.c (tsubst_expr): Add RANGE_FOR_STMT.
845 (tsubst_copy_and_build): perform_koenig_lookup takes extra argument.
846 * semantics.c (begin_range_for_stmt): New.
847 (finish_range_for_decl): New.
848 (finish_for_stmt): Accept also RANGE_FOR_STMT.
849 (perform_koenig_lookup): Add extra argument include_std.
850 * parser.c (cp_parser_c_for): New with code from
851 cp_parser_iteration_statement().
852 (cp_parser_range_for): New.
853 (cp_convert_range_for): New.
854 (cp_parser_iteration_statement): Add range-for support.
855 (cp_parser_condition): Adjust comment.
856 (cp_parser_postfix_expression): perform_koenig_lookup takes extra
858 * dump.c (cp_dump_tree): Add RANGE_FOR_STMT.
859 * cxx-pretty-print.c: Likewise.
860 * lex.c (cxx_init): Likewise.
861 * name-lookup.c (lookup_function_nonclass): Add extra argument
863 (lookup_arg_dependent): Likewise.
864 * name-lookup.h: Likewise.
866 2010-09-10 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
869 * error.c (maybe_warn_cpp0x): Add new warning
870 CPP0X_INLINE_NAMESPACES.
871 * parser.c (cp_parser_namespace_definition): Likewise.
872 * cp-tree.h (cpp0x_warn_str): Likewise.
874 2010-09-10 Richard Guenther <rguenther@suse.de>
876 * decl.c (reshape_init_vector): For VECTOR_TYPEs, use
877 TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE.
879 2010-09-10 Jan Hubicka <jh@suse.cz>
881 PR tree-optimization/45605
882 * cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in
885 2010-09-08 Jakub Jelinek <jakub@redhat.com>
888 * pt.c (tsubst) <case INTEGER_TYPE>: Call mark_rvalue_use
889 before calling fold_decl_constant_value.
891 2010-09-07 Arnaud Charlet <charlet@adacore.com>
893 * cp-tree.h (build_enumerator): Add new location_t parameter.
894 (build_lang_decl_loc): New function.
895 * decl.c (build_enumerator): New parameter loc. Use it when calling
896 build_decl. Replace build_lang_decl with build_lang_decl_loc.
897 * pt.c (tsubst_enum): Adjust call to build_enumerator.
898 * parser.c (cp_parser_enumerator_definition): Ditto.
899 * lex.c (build_lang_decl_loc): New function.
901 2010-09-06 Dodji Seketeli <dodji@redhat.com>
906 * tree.c (strip_typedefs): Strip typedefs from the context of
909 2010-09-06 Mark Mitchell <mark@codesourcery.com>
911 * typeck.c (cp_build_binary_op): Call do_warn_double_promotion.
912 * call.c (build_conditional_expr): Likewise.
913 (convert_arg_to_ellipsis): Likewise.
915 2010-09-06 Arnaud Charlet <charlet@adacore.com>
917 * parser.c (make_pointer_declarator, make_reference_declarator,
918 make_call_declarator, make_array_declarator): Set declarator->id_loc.
919 (cp_parser_init_declarator): Adjust location of decl if appropriate.
921 2010-09-06 Jason Merrill <jason@redhat.com>
923 * call.c (implicit_conversion): Fix value-init of enums.
924 (convert_like_real): Likewise.
926 * decl.c (cp_finish_decl): Don't change init for auto deduction.
928 * pt.c (fold_non_dependent_expr_sfinae): Split out from...
929 (fold_non_dependent_expr): ...here.
930 (convert_nontype_argument): Use it. Take complain parm.
931 Use perform_implicit_conversion instead of ocp_convert.
932 Allow cv-qual changes.
933 (convert_template_argument): Pass complain down.
934 (tsubst_template_arg): Suppress constant expression warnings.
937 * method.c (synthesized_method_walk): In constructors, also check
938 subobject destructors.
940 * semantics.c (finish_compound_literal): Always build a
943 2010-08-30 Paolo Carlini <paolo.carlini@oracle.com>
946 * decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs.
948 2010-08-30 Jakub Jelinek <jakub@redhat.com>
951 * parser.c (cp_parser_omp_atomic): Handle boolean
952 {PRE,POST}_INCREMENT.
954 2010-08-29 Jason Merrill <jason@redhat.com>
957 * parser.c (cp_parser_parameter_declaration): Pop parameter decls
958 after tentative parsing.
960 2010-08-22 Joseph Myers <joseph@codesourcery.com>
962 * Make-lang.in (g++spec.o): Update dependencies.
963 * g++spec.c: Include opts.h
964 (MATH_LIBRARY, LIBSTDCXX): Remove initial "-l".
965 (lang_specific_driver): Use cl_decoded_option structures.
967 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
969 * call.c: Use FOR_EACH_VEC_ELT.
974 * except.c: Likewise.
975 * mangle.c: Likewise.
976 * method.c: Likewise.
977 * name-lookup.c: Likewise.
978 * parser.c: Likewise.
981 * semantics.c: Likewise.
982 * typeck2.c: Likewise.
984 2010-08-19 Jason Merrill <jason@redhat.com>
986 * call.c (reference_related_p): Check for error_mark_node.
987 (add_function_candidate): Check it instead of
988 same_type_ignoring_top_level_qualifiers_p.
991 * init.c (build_new_1): Don't use build_value_init in a template.
992 (build_value_init): Make sure we don't.
995 * cp-gimplify.c (cp_gimplify_expr): Also remove assignment
996 of empty class CONSTRUCTOR.
998 * except.c (pending_noexcept, pending_noexcept_checks): New.
999 (perform_deferred_noexcept_checks): New.
1000 (maybe_noexcept_warning): Split from...
1001 (finish_noexcept_expr): ...here. Adjust.
1002 * decl2.c (cp_write_global_declarations): Call
1003 perform_deferred_noexcept_checks.
1004 * cp-tree.h: And declare it.
1006 2010-08-18 Nathan Froyd <froydnj@codesourcery.com>
1009 * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to
1012 2010-08-17 Kai Tietz <kai.tietz@onevision.com>
1014 * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
1015 or if -fms-extensions is enabled check, check permissive.
1017 2010-08-09 Jason Merrill <jason@redhat.com>
1020 * pt.c (lookup_template_class): Don't re-coerce outer parms.
1022 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1024 * call.c (add_builtin_candidates): Use VECs for local variable
1025 `types'. Adjust remainder of function accordingly.
1027 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1029 * name-lookup.c (is_associated_namespace): Convert local variables
1030 to be VECs instead of TREE_LISTs.
1032 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
1034 * tree.c (varargs_function_p): Use stdarg_p.
1036 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1038 * parser.c (cp_default_arg_entry): Declare. Declare a VEC of it.
1039 (cp_unparsed_functions_entry): Declare. Declare a VEC of it.
1040 (cp_parser) [unparsed_functions_queues]: Rename to unparsed_queues.
1041 Change type to a VEC.
1042 (unparsed_funs_with_default_args): Define.
1043 (unparsed_funs_with_definitions): Define.
1044 (push_unparsed_function_queues): New function.
1045 (cp_parser_new): Call it.
1046 (pop_unparsed_function_queues): New function.
1047 (cp_parser_class_specifier): Adjust processing of unparsed functions.
1048 (cp_parser_template_declaration_after_export): Use VEC_safe_push.
1049 (cp_parser_save_member_function_body): Likewise.
1050 (cp_parser_late_parsing_for_member): Call push_unparsed_function_queues
1051 and pop_unparsed_function_queues.
1052 (cp_parser_late_parsing_default_args): Likewise.
1053 (cp_parser_save_default_args): Use VEC_safe_push.
1055 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1057 * name-lookup.h (cp_label_binding): Declare. Declare a VEC type
1059 (cp_binding_level): Convert shadowed_labels and dead_vars_from_for
1061 * decl.c (poplevel): Adjust for type changes.
1062 (declare_local_label): Likewise.
1064 2010-08-06 Jason Merrill <jason@redhat.com>
1066 * typeck.c (complete_type_or_maybe_complain): Split out from...
1067 (complete_type_or_else): Here.
1068 (build_class_member_access_expr): Call it.
1069 (finish_class_member_access_expr): Likewise.
1070 * call.c (build_special_member_call): Likewise.
1071 * cvt.c (build_expr_type_conversion): Likewise.
1072 * init.c (build_new): Likewise.
1073 * typeck2.c (build_functional_cast): Likewise.
1074 * cp-tree.h: Declare it.
1076 * init.c (build_value_init): Add complain parm.
1077 (build_value_init_noctor): Likewise.
1078 (perform_member_init): Pass it.
1079 (expand_aggr_init_1): Likewise.
1080 (build_new_1): Likewise.
1081 (build_vec_init): Likewise.
1082 * pt.c (tsubst_expr): Likewise.
1083 * typeck2.c (build_functional_cast): Likewise.
1084 * cp-tree.h: Adjust.
1085 * tree.c (build_target_expr_with_type): Handle error_mark_node.
1087 * typeck.c (decay_conversion): Any expression with type nullptr_t
1090 2010-07-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1093 * decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED.
1095 2010-07-27 Jason Merrill <jason@redhat.com>
1097 * pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR
1098 from build_value_init.
1099 * init.c (build_value_init_noctor): Give error for unknown array
1102 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1104 * cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
1106 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1108 * cp-objcp-common.c (cxx_initialize_diagnostics): First call
1109 c_common_initialize_diagnostics.
1110 * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK,
1111 LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
1113 2010-07-21 Jason Merrill <jason@redhat.com>
1115 * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
1117 * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
1120 2010-07-20 Jeffrey Yasskin <jyasskin@google.com>
1123 * pt.c (instantiate_class_template): Propagate the template's
1124 location to its instance.
1126 2010-07-20 Jason Merrill <jason@redhat.com>
1129 * pt.c (tsubst_copy_and_build): Rework last change.
1132 * pt.c (tsubst_copy_and_build): Handle partial substitution of
1135 2010-07-19 Jason Merrill <jason@redhat.com>
1138 * semantics.c (finish_decltype_type): Correct decltype
1139 of parenthesized rvalue reference variable.
1142 * tree.c (cp_tree_equal): Compare type of *CAST_EXPR.
1143 * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR.
1145 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com>
1148 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t
1150 * cp-tree.h: Adjust declaration.
1151 * init.c (perform_member_init): Adjust caller.
1152 * decl.c (grok_reference_init, cp_finish_decl): Likewise.
1153 * typeck2.c (store_init_value): Likewise.
1154 (build_functional_cast): Pass complain argument to
1155 build_x_compound_expr_from_list.
1157 2010-07-16 Jason Merrill <jason@redhat.com>
1160 * pt.c (process_partial_specialization): Diagnose partial
1161 specialization after instantiation.
1162 (most_specialized_class): Add complain parm.
1164 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.
1166 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1168 * init.c (build_new_1): Use cp_build_function_call_nary instead of
1169 cp_build_function_call.
1171 2010-07-15 Jason Merrill <jason@redhat.com>
1174 * call.c (add_function_candidate): If we're working on an implicit
1175 declaration, don't consider candidates that won't match.
1176 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
1177 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
1180 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1181 (TYPE_HAS_USER_OPEQ): New.
1182 * decl.c (grok_special_member_properties): Set it.
1183 * class.c (add_implicitly_declared_members): Don't lazily declare
1184 constructors/operator= if a base or member has a user-declared one.
1185 (check_bases_and_members, check_bases): Adjust.
1186 (check_field_decls, check_field_decl): Adjust.
1188 2010-07-15 Anatoly Sokolov <aesok@post.ru>
1190 * decl.c (integer_three_node): Remove.
1191 (cxx_init_decl_processing): Do not initialize the integer_three_node.
1192 * cp-tree.h (integer_three_node): Remove.
1194 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1196 * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
1198 * class.c: Likewise.
1199 * cp-gimplify.c: Likewise.
1201 * decl2.c: Likewise.
1203 * mangle.c: Likewise.
1204 * name-lookup.c: Likewise.
1205 * optimize.c: Likewise.
1206 * parser.c: Likewise.
1209 * search.c: Likewise.
1210 * semantics.c: Likewise.
1211 * typeck.c: Likewise.
1212 * typeck2.c: Likewise.
1214 2010-07-14 Jason Merrill <jason@redhat.com>
1216 * init.c (sort_mem_initializers): Rename "field_type" to "ctx".
1217 (build_field_list): Cache field type.
1219 Implement C++0x unrestricted unions (N2544)
1220 * class.c (check_field_decl): Loosen union handling in C++0x.
1221 * method.c (walk_field_subobs): Split out from...
1222 (synthesized_method_walk): ...here. Set msg before loops.
1223 (process_subob_fn): Check for triviality in union members.
1224 * init.c (sort_mem_initializers): Splice out uninitialized
1225 anonymous unions and union members.
1226 (push_base_cleanups): Don't automatically destroy anonymous unions
1229 2010-07-13 Jason Merrill <jason@redhat.com>
1232 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1233 (TYPE_HAS_USER_OPEQ): New.
1234 * decl.c (grok_special_member_properties): Set it.
1235 * class.c (add_implicitly_declared_members): Don't lazily declare
1236 constructors/operator= if a base or member has a user-declared one.
1237 (check_bases_and_members, check_bases): Adjust.
1238 (check_field_decls, check_field_decl): Adjust.
1239 * method.c (synthesized_method_walk): Initialize check_vdtor.
1242 * mangle.c (write_type): Canonicalize.
1243 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
1244 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
1246 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
1249 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
1251 * typeck.c (get_delta_difference): Update prototype, add a
1252 tsubst_flags_t parameter; update get_delta_difference_1 calls and
1253 add checks for error_mark_node.
1254 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
1255 parameter; update lookup_base call.
1256 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
1257 parameter; update get_delta_difference call and add check for
1259 (convert_ptrmem): Update prototype, add a tsubst_flags_t
1260 parameter; update get_delta_difference call and add check for
1261 error_mark_node; update build_ptrmemfunc call.
1262 (build_static_cast_1): Adjust convert_ptrmem call.
1263 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
1264 (cp_build_unary_op): Adjust build_ptrmemfunc call.
1265 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
1266 and build_ptrmemfunc calls.
1267 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
1269 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
1272 * call.c (build_temp): Add tsubst_flags_t complain parameter;
1273 adjust build_special_member_call call, pass complain.
1274 (convert_like_real): Adjust build_temp call, pass complain.
1276 2010-07-09 Jason Merrill <jason@redhat.com>
1279 * cp-tree.h (BV_LOST_PRIMARY): New macro.
1280 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
1281 Set BV_LOST_PRIMARY.
1282 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
1284 2010-07-08 Jason Merrill <jason@redhat.com>
1287 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
1288 virtual bases for covariant thunks.
1290 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
1292 * cp-tree.h: Do not include toplev.h.
1294 2010-07-06 Jason Merrill <jason@redhat.com>
1297 * call.c (is_std_init_list): Look through typedefs.
1300 * init.c (build_offset_ref): If scope isn't dependent,
1301 don't exit early. Look at TYPE_MAIN_VARIANT.
1302 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
1304 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
1306 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
1308 * cp-tree.h (impl_conv_void): New type.
1309 (convert_to_void): Adjust prototype.
1310 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
1311 diagnostic for easy translation. Change caller.
1312 * typeck.c: Update call to convert_to_void.
1313 * semantics.c: Likewise.
1316 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
1318 * decl.c (cp_finish_decl): Call add_local_decl.
1319 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
1321 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
1323 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
1326 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
1329 * parser.c (cp_parser_primary_expression): Error if local template is
1332 2010-07-02 Le-Chun Wu <lcwu@google.com>
1335 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
1336 (variable or type) shadows another type.
1338 2010-07-02 Jakub Jelinek <jakub@redhat.com>
1341 * typeck.c (convert_for_assignment): When converting a convertible
1342 vector type or objc++ types, call mark_rvalue_use.
1343 * typeck2.c (build_m_component_ref): Use return values from
1344 mark_rvalue_use or mark_lvalue_use.
1345 * class.c (build_base_path): Likewise.
1346 * call.c (build_conditional_expr): Likewise.
1348 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1351 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
1354 2010-07-01 Richard Guenther <rguenther@suse.de>
1356 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
1357 predicate we are looking for, allow non-gimplified
1360 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1363 * typeck.c (cp_build_unary_op): Early return error_mark_node when
1364 arg is NULL_TREE too.
1365 * call.c (convert_class_to_reference): Return error_mark_node when
1368 2010-06-30 Michael Matz <matz@suse.de>
1370 * repo.c (finish_repo): Fix typo.
1372 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1374 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
1376 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1378 * repo.c (pending_repo): Change type to a VEC.
1379 (finish_repo): Adjust for new type of pending_repo.
1380 (repo_emit_p): Likewise.
1382 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
1384 * tree.c: Include gimple.h. Do not include tree-flow.h
1385 * decl.c: Do not include tree-flow.h
1386 * Make-lang.in: Adjust dependencies.
1388 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1390 * decl.c (incomplete_var): Declare. Declare VECs containing them.
1391 (incomplete_vars): Adjust comment. Change type to a VEC.
1392 (maybe_register_incomplete_var): Adjust for new type.
1393 (complete_vars): Adjust iteration over incomplete_vars.
1395 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1397 * decl.c (struct named_label_entry): Change type of bad_decls field
1399 (poplevel_named_label_1): Adjust for new type of bad_decls.
1400 (check_goto): Likewise.
1402 2010-06-29 Jason Merrill <jason@redhat.com>
1404 Enable implicitly declared move constructor/operator= (N3053).
1405 * class.c (add_implicitly_declared_members): A class with no
1406 explicitly declared copy or move constructor gets both declared
1407 implicitly, and similarly for operator=.
1408 (check_bases): A type with no copy ctor does not inhibit
1409 a const copy ctor in a derived class. It does mean the derived
1411 (check_field_decl): Likewise.
1412 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
1413 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
1414 (trivially_copyable_p): Likewise.
1415 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
1416 * class.c (finish_struct_bits): Likewise.
1417 * tree.c (build_target_expr_with_type): Likewise.
1418 * typeck2.c (store_init_value): Likewise.
1420 Enable implicitly deleted functions (N2346)
1421 * class.c (check_bases_and_members): Adjust lambda flags.
1422 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
1424 * decl2.c (mark_used): Adjust error for use of deleted function.
1426 Machinery to support implicit delete/move.
1427 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
1428 has_complex_move_ctor, has_complex_move_assign bitfields.
1429 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
1430 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
1431 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
1432 (enum special_function_kind): Add sfk_move_assignment.
1433 (LOOKUP_SPECULATIVE): New.
1434 * call.c (build_over_call): Return early if it's set.
1435 (build_over_call): Use trivial_fn_p.
1436 * class.c (check_bases): If the base has no default constructor,
1437 the derived one is non-trivial. Handle move ctor/op=.
1438 (check_field_decl): Likewise.
1439 (check_bases_and_members): Handle move ctor/op=.
1440 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
1441 (type_has_move_constructor, type_has_move_assign): New.
1442 * decl.c (grok_special_member_properties): Handle move ctor/op=.
1443 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
1444 (trivial_fn_p): New.
1445 (do_build_copy_constructor): Use it.
1446 (do_build_assign_ref): Likewise. Handle move assignment.
1447 (build_stub_type, build_stub_object, locate_fn_flags): New.
1448 (locate_ctor): Use locate_fn_flags.
1449 (locate_copy, locate_dtor): Remove.
1450 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
1451 (process_subob_fn, synthesized_method_walk): New.
1452 (maybe_explain_implicit_delete): New.
1453 (implicitly_declare_fn): Use synthesized_method_walk,
1454 type_has_trivial_fn, and type_set_nontrivial_flag.
1455 (defaulted_late_check): Set DECL_DELETED_FN.
1456 (defaultable_fn_check): Handle sfk_move_assignment.
1457 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
1458 implicitly deleted move ctor/op=.
1459 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
1460 (lookup_fnfields_slot): New.
1461 * semantics.c (omp_clause_info_fndecl): Remove.
1462 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
1463 get_copy_assign, trivial_fn_p.
1464 (trait_expr_value): Adjust call to locate_ctor.
1465 * tree.c (special_function_p): Handle sfk_move_assignment.
1467 * class.c (type_has_virtual_destructor): New.
1468 * cp-tree.h: Declare it.
1469 * semantics.c (trait_expr_value): Use it.
1471 * call.c (build_over_call): Only give warnings with tf_warning.
1473 * name-lookup.c (pop_scope): Handle NULL_TREE.
1475 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
1476 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
1477 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
1478 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
1479 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
1480 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
1481 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
1482 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
1483 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
1484 (sfk_assignment_operator): Rename to sfk_copy_assignment.
1485 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
1486 * search.c, semantics.c, tree.c: Adjust.
1488 * pt.c (dependent_scope_ref_p): Remove.
1489 (value_dependent_expression_p): Don't call it.
1490 (type_dependent_expression_p): Here either.
1491 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
1492 if the scope isn't dependent.
1494 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
1498 * pt.c (has_value_dependent_address): New.
1499 (value_dependent_expression_p): Check it.
1500 (convert_nontype_argument): Likewise. Call decay_conversion before
1501 folding if we want a pointer.
1502 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
1503 scope is the current instantiation.
1505 2010-06-28 Jakub Jelinek <jakub@redhat.com>
1508 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
1511 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
1513 * init.c: Do not include except.h.
1516 * cp-lang.c: Likewise.
1518 * semantics.c: Likewise.
1519 * decl2.c: Likewise.
1520 * except.c: Likewise.
1521 (init_exception_processing): Do not set the removed
1522 lang_protect_cleanup_actions here.
1523 (cp_protect_cleanup_actions): Make non-static and remove prototype.
1524 (doing_eh): New, moved from except.c but removed the do_warning flag.
1525 (expand_start_catch_block): Update doing_eh call.
1526 (expand_end_catch_block): Likewise.
1527 (build_throw): Likewise.
1528 * cp-tree.h: Prototype cp_protect_cleanup_actions.
1529 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
1530 cp_protect_cleanup_actions.
1531 * Make-lang.in: Update dependencies.
1533 2010-06-26 Jason Merrill <jason@redhat.com>
1535 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
1536 constructor called with a single argument that takes a reference
1537 to the constructor's class.
1538 (BAD_CONVERSION_RANK): New.
1539 (compare_ics): Use it to compare bad ICSes.
1541 2010-06-25 Joseph Myers <joseph@codesourcery.com>
1543 * lang-specs.h: Remove +e handling.
1545 2010-06-24 Andi Kleen <ak@linux.intel.com>
1547 * parser.c: (cp_parser_question_colon_clause):
1548 Switch to use cp_lexer_peek_token.
1549 Call warn_for_omitted_condop. Call pedwarn for omitted
1552 2010-06-22 Jakub Jelinek <jakub@redhat.com>
1555 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
1556 datum and mark_rvalue_use on component.
1559 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
1560 the CALL_EXPR has no arguments.
1562 2010-06-21 Jason Merrill <jason@redhat.com>
1564 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
1566 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
1569 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
1571 * name-lookup.c (struct arg_lookup): Convert namespaces and
1572 classes fields to VEC.
1573 (arg_assoc_namespace): Adjust for new type of namespaces.
1574 (arg_assoc_class): Adjust for new type of classes.
1575 (lookup_arg_dependent): Use make_tree_vector and
1576 release_tree_vector.
1577 * typeck2.c (build_x_arrow): Use vec_member.
1579 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
1582 * error.c (dump_decl): Better wording for anonymous namespace.
1584 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
1586 * class.c (build_vtbl_initializer): Adjust computation of new_position
1587 and which entry to add padding for.
1589 2010-06-16 Jason Merrill <jason@redhat.com>
1591 * except.c (check_noexcept_r): Return the problematic function.
1592 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
1593 * pt.c (tsubst_copy_and_build): Pass it.
1594 * parser.c (cp_parser_unary_expression): Likewise.
1595 * cp-tree.h: Adjust prototype.
1597 * method.c (defaulted_late_check): Give the defaulted method
1598 the same exception specification as the implicit declaration.
1600 2010-06-15 Jason Merrill <jason@redhat.com>
1602 * class.c (add_implicitly_declared_members): Implicit assignment
1603 operators can also be virtual overriders.
1604 * method.c (lazily_declare_fn): Likewise.
1606 * call.c (convert_like_real): Give "initializing argument of"
1607 information for ambiguous conversion. Give source position
1610 * call.c (print_z_candidates): Do print viable deleted candidates.
1611 (joust): Don't choose a deleted function just because its worst
1612 conversion is better than another candidate's worst.
1614 * call.c (convert_like_real): Don't complain about
1615 list-value-initialization from an explicit constructor.
1617 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
1618 DECL_SOURCE_LOCATION directly.
1620 * class.c (type_has_user_provided_default_constructor): Use
1623 * call.c (is_subseq): Handle ck_aggr, ck_list.
1624 (compare_ics): Treat an aggregate or ambiguous conversion to the
1625 same type as involving the same function.
1627 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
1629 * typeck.c (convert_for_assignment): Fix comment. Change message
1630 format from %d to %qP.
1631 (convert_for_initialization): Fix comment.
1633 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
1635 * cp-tree.h (expr_list_kind): New type.
1636 (impl_conv_rhs): New type.
1637 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
1639 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
1640 diagnostics for easy translation. Change caller.
1641 (convert_for_initialization): Use impl_conv_rhs and change caller.
1642 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
1643 diagnostics for easy translation. Change caller.
1644 * decl.c (bad_spec_place): New enum.
1645 (bad_specifiers): Use it and emit the diagnostics for easy
1646 translation. Change caller.
1647 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
1649 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1651 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
1653 * decl2.c (cp_write_global_declarations): Adjust for new type of
1654 decl_namespace_list.
1655 * name-lookup.c (current_decl_namespace): Likewise.
1656 (push_decl_namespace): Likewise.
1657 (pop_decl_namespace): Likewise.
1659 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1661 * call.c (build_java_interface_fn_ref): Call build_function_type_list
1662 instead of build_function_type.
1663 * decl.c (cxx_init_decl_processing): Likewise.
1664 (declare_global_var): Likewise.
1665 (get_atexit_node): Likewise.
1666 (expand_static_init): Likewise.
1667 * decl2.c (start_objects): Likewise.
1668 (start_static_storage_duration_function): Likewise.
1669 * except.c (init_exception_processing): Likewise.
1670 (build_exc_ptr): Likewise.
1671 (build_throw): Likewise.
1672 * rtti.c (throw_bad_cast): Likewise.
1673 (throw_bad_typeid): Likewise.
1674 (build_dynamic_cast_1): Likewise.
1676 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1678 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
1679 (build_op_delete_call): Likewise.
1680 (build_over_call): Likewise.
1681 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1682 * pt.c (process_partial_specialization): Likewise.
1683 (tsubst_template_args): Likewise.
1684 * semantics.c (finish_asm_stmt): Likewise.
1686 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
1688 * decl.c (record_key_method_defined): New, broken out of ...
1689 (finish_function): ... here. Call it.
1690 (start_decl): Treat aliases as definitions.
1692 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1694 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
1696 * pt.c (maybe_process_partial_specialization): Likewise.
1697 (register_specialization): Likewise.
1698 (add_pending_template): Likewise.
1699 (lookup_template_class): Likewise.
1700 (push_tinst_level): Likewise.
1702 * parser.c (cp_lexer_new_main): Likewise.
1703 (cp_lexer_new_from_tokens): Likewise.
1704 (cp_token_cache_new): Likewise.
1705 (cp_parser_context_new): Likewise.
1706 (cp_parser_new): Likewise.
1707 (cp_parser_nested_name_specifier_opt): Likewise.
1708 (cp_parser_template_id): Likewise.
1710 * name-lookup.c (binding_entry_make): Likewise.
1711 (binding_table_construct): Likewise.
1712 (binding_table_new): Likewise.
1713 (cxx_binding_make): Likewise.
1714 (pushdecl_maybe_friend): Likewise.
1715 (begin_scope): Likewise.
1716 (push_to_top_level): Likewise.
1718 * lex.c (init_reswords): Likewise.
1719 (retrofit_lang_decl): Likewise.
1720 (cxx_dup_lang_specific_decl): Likewise.
1721 (copy_lang_type): Likewise.
1722 (cxx_make_type): Likewise.
1724 * decl.c (make_label_decl): Likewise.
1725 (check_goto): Likewise.
1726 (start_preparsed_function): Likewise.
1727 (save_function_data): Likewise.
1729 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
1731 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
1733 * class.c (finish_struct_1): Likewise.
1735 * cp-tree.h (struct lang_type): Add variable_size GTY option.
1736 (struct lang_decl): Likewise.
1738 * parser.c (cp_parser_new): Update comment to not reference
1741 2010-06-07 Jason Merrill <jason@redhat.com>
1744 * error.c (dump_parameters): Mask out TFF_SCOPE.
1745 (dump_simple_decl): Don't print the scope of a PARM_DECL.
1746 (dump_scope): Remove no-op mask.
1749 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
1751 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
1752 * init.c (build_offset_ref): Use it.
1753 * pt.c (maybe_process_partial_specialization): Use it.
1754 (instantiate_class_template): Use it.
1755 * search.c (lookup_base): Use it.
1757 2010-06-07 Jakub Jelinek <jakub@redhat.com>
1760 * expr.c (mark_exp_read): Handle INDIRECT_REF.
1761 * cvt.c (convert_to_void): Handle INDIRECT_REF like
1762 handled_component_p.
1765 * decl.c (initialize_local_var): If TREE_USED is set on the type,
1766 set also DECL_READ_P on the decl.
1768 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1771 * cp-tree.h (typedef_variant_p): Move this declaration to
1773 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1774 * decl.c (grokdeclarator): Do not rename debug info of an
1775 anonymous tagged type named by a typedef.
1777 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
1780 * class.c (check_field_decls): Move the call to
1781 check_bitfield_decl before trying to set the
1782 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
1784 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
1786 * typeck.c: Update include path for moved files.
1789 * cp-gimplify.c: Likewise.
1790 * cp-lang.c: Likewise.
1792 * semantics.c: Likewise.
1793 * cxx-pretty-print.h: Likewise.
1794 * decl2.c: Likewise.
1795 * parser.c: Likewise.
1796 * cp-objcp-common.c: Likewise.
1797 * cp-tree.h: Likewise.
1798 * name-lookup.c: Likewise.
1800 * name-lookup.h: Likewise.
1801 * config-lang.in: Update paths in gtfiles for files in c-family/.
1802 * Make-lang.in: Likewise.
1804 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
1806 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
1807 * typeck.c (build_ptrmemfunc): Likewise.
1809 2010-06-04 Jason Merrill <jason@redhat.com>
1811 * typeck2.c (merge_exception_specifiers): Adjust merging of
1812 throw() and noexcept(true).
1814 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
1815 using an uninitialized variable.
1817 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
1818 (pp_cxx_expression): Likewise.
1820 Implement noexcept-specification (15.4)
1821 * parser.c (cp_parser_exception_specification_opt): Parse it.
1822 Give -Wdeprecated warning about throw() specs.
1823 * pt.c (tsubst_exception_specification): Handle it.
1824 * error.c (dump_exception_spec): Handle it.
1825 (dump_expr): Handle NOEXCEPT_EXPR.
1826 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
1827 * typeck.c (comp_except_specs): Handle compatibility rules.
1828 Change exact parm to take an enum.
1829 * typeck2.c (merge_exception_specifiers): Handle noexcept.
1830 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
1831 (type_throw_all_p, build_noexcept_spec): New fns.
1832 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
1833 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
1834 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
1835 (noexcept_true_spec, noexcept_false_spec): New macros.
1836 * name-lookup.c (pushdecl_maybe_friend): Adjust.
1837 * search.c (check_final_overrider): Adjust.
1838 * decl.c (check_redeclaration_exception_specification): Adjust.
1839 (use_eh_spec_block): Use type_throw_all_p.
1840 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
1841 Give operator new a noexcept-specification in C++0x mode.
1842 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
1843 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
1845 Implement noexcept operator (5.3.7)
1846 * cp-tree.def (NOEXCEPT_EXPR): New.
1847 * except.c (check_noexcept_r, finish_noexcept_expr): New.
1848 * cp-tree.h: Declare finish_noexcept_expr.
1849 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
1850 * pt.c (tsubst_copy_and_build): And tsubst it.
1851 (type_dependent_expression_p): Handle it.
1852 (value_dependent_expression_p): Handle it.
1854 * call.c (build_conditional_expr): Never fold in unevaluated context.
1855 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
1856 * semantics.c (simplify_aggr_init_expr): Likewise.
1857 * typeck.c (merge_types): Call merge_exception_specifiers.
1858 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
1859 DECL_ANTICIPATED for preferring new type.
1861 2010-06-04 Joseph Myers <joseph@codesourcery.com>
1863 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
1866 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1869 * typeck.c (build_class_member_access_expr): Call mark_exp_read
1870 on object for static data members.
1872 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1873 Jason Merrill <jason@redhat.com>
1876 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
1877 with the same type, call mark_lvalue_use on both.
1879 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
1881 * class.c (struct vtbl_init_data_s): Remove last_init field.
1882 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
1884 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
1886 (build_vtt): Likewise.
1887 (initialize_vtable): Take a VEC instead of a tree.
1888 (build_vtt_inits): Change return type to void. Take a VEC **
1889 instead of a tree *; accumulate results into said VEC.
1890 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
1891 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
1892 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
1894 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
1895 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
1897 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
1898 rather than tree_cons.
1899 (build_vbase_offset_vtbl_entries): Likewise.
1900 (add_vcall_offset): Likewise.
1901 (build_rtti_vtbl_entries): Likewise.
1902 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
1903 * decl.c (initialize_artificial_var): Use build_constructor instead
1904 of build_constructor_from_list.
1906 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
1909 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
1912 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
1914 * parser.c (cp_parser_mem_initializer_list): Change error text.
1916 2010-06-02 Jakub Jelinek <jakub@redhat.com>
1918 * cp-objcp-common.c (shadowed_var_for_decl): Change into
1919 tree_decl_map hashtab from tree_map.
1920 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
1921 (init_shadowed_var_for_decl): Adjust initialization.
1924 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
1925 instead of calling mark_exp_read only when not an assignment.
1928 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
1929 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
1930 Set DECL_VALUE_EXPR on var.
1932 2010-06-02 Jason Merrill <jason@redhat.com>
1934 * error.c (dump_type): Improve typedef handling.
1939 * name-lookup.c (same_entity_p): New.
1940 (ambiguous_decl): Multiple declarations of the same entity
1943 2010-06-01 Jason Merrill <jason@redhat.com>
1946 * call.c (add_list_candidates): Prefer the default constructor.
1947 (build_aggr_conv): Treat missing initializers like { }.
1948 * typeck2.c (process_init_constructor_record): Likewise.
1949 * init.c (expand_default_init): Use digest_init for
1950 direct aggregate initialization, too.
1952 * call.c (add_list_candidates): Split out...
1953 (build_user_type_conversion_1): ...from here.
1954 (build_new_method_call): And here.
1955 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
1958 * call.c (build_list_conv): Set list-initialization flags properly.
1960 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
1962 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
1964 2010-06-01 Arnaud Charlet <charlet@adacore.com>
1965 Matthew Gingell <gingell@adacore.com>
1967 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
1968 * decl2.c: Include langhooks.h and c-ada-spec.h.
1969 (cpp_check, collect_source_refs, collect_ada_namespace,
1970 collect_all_refs): New functions.
1971 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
1972 * lang-specs.h: Ditto.
1974 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1976 * cp-tree.h (cp_build_function_call_nary): Declare.
1977 * typeck.c (cp_build_function_call_nary): Define.
1978 * decl.c (register_dtor_fn): Use it instead of
1979 cp_build_function_call.
1980 (cxx_maybe_build_cleanup): Likewise.
1981 * decl2.c (generate_ctor_or_dtor_function): Likewise.
1982 * except.c (do_get_exception_ptr): Likewise.
1983 (do_begin_catch): Likewise.
1984 (do_allocate_exception): Likewise.
1985 (do_free_exception): Likewise.
1986 (build_throw): Likewise. Use cp_build_function_call_vec instead
1987 of cp_build_function_call.
1988 (do_end_catch): Likewise.
1990 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1992 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
1993 (struct cp_declarator): Move id_loc field up.
1995 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1997 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
1998 this file is included before c-common.h. Define GCC_DIAG_STYLE
1999 before including diagnostic-core.h and toplev.h.
2000 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
2001 * pt.c: Include cp-tree.h before c-common.h.
2003 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
2005 * tree.c (c_register_addr_space): Add stub.
2007 2010-05-28 Joseph Myers <joseph@codesourcery.com>
2009 * g++spec.c (lang_specific_driver): Use fatal_error instead of
2012 2010-05-28 Dodji Seketeli <dodji@redhat.com>
2014 Revert fix of PR c++/44188
2015 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
2017 * tree.c (typedef_variant_p): Revert moving this definition to
2019 * decl.c (grokdeclarator): Revert naming typedef handling.
2021 2010-05-27 Joseph Myers <joseph@codesourcery.com>
2023 * call.c: Include diagnostic-core.h instead of diagnostic.h.
2024 * cp-lang.c: Don't include diagnostic.h
2025 * name-lookup.c: Include diagnostic-core.h instead of
2027 (cp_emit_debug_info_for_using): Use seen_error.
2028 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
2029 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
2030 * pt.c (iterative_hash_template_arg): Use seen_error.
2031 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
2032 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
2033 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
2034 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
2037 2010-05-25 Dodji Seketeli <dodji@redhat.com>
2040 * cp-tree.h (typedef_variant_p): Move this declaration to
2042 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
2043 * decl.c (grokdeclarator): Do not rename debug info of an
2044 anonymous tagged type named by a typedef.
2046 2010-05-27 Jason Merrill <jason@redhat.com>
2049 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
2052 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
2055 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
2056 * class.c (layout_class_type): Likewise.
2057 * decl.c (finish_enum): Likewise.
2058 * mangle.c (write_builitin_type): Likewise.
2060 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
2062 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
2064 * decl.c (grokdeclarator): Handle __int128.
2065 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
2066 (cp_parser_simple_type_specifier): Likewise.
2067 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
2068 * typeck.c (cp_common_type): Handle __int128.
2069 * mangle.c (integer_type_codes): Add itk_int128 and
2070 itk_unsigned_int128.
2072 2010-05-26 Jason Merrill <jason@redhat.com>
2075 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
2078 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2080 * cp-lang.c: Do not include expr.h.
2082 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2084 * decl.c: Do not include rtl.h
2085 * semantics.c: Likewise.
2087 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
2089 * cp-tree.h: Do not include splay-tree.h.
2090 (struct prtmem_cst): Remove unused field and false comment.
2091 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
2092 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
2093 * init.c: Do not include rtl.h and expr.h.
2094 * class.c: Do not include rtl.h. Include splay-tree.h.
2095 (build_clone): Use plain NULL instead of NULL_RTX.
2096 * decl.c: Do not include expr.h. Explain why rtl.h has to be
2097 included. Include splay-tree.h.
2098 * method.c: Do not include rtl.h and expr.h.
2099 (use_thunk): Use plain NULL instead of NULL_RTX.
2100 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
2101 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
2102 and target.h. Include splay-tree.h.
2103 * expr.c: Do not include rtl.h and expr.h.
2104 * pt.c: Do not include obstack.h and rtl.h.
2105 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
2106 (tsubst_decl): Likewise.
2107 (instantiate_decl): Likewise.
2108 * semantics.c: Do not include exprt.h and debug.h. Explain why
2109 rtl.h has to be included.
2110 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
2111 * call.c: Do not include rtl.h and expr.h.
2112 * search.c: Do not include obstack.h and rtl.h.
2113 * friend.c: Do not include rtl.h and expr.h.
2114 * Make-lang.in: Update dependencies.
2116 2010-05-25 Jakub Jelinek <jakub@redhat.com>
2119 * parser.c (non_integral_constant): Add NIC_NONE.
2120 (required_token): Add RT_NONE.
2121 (cp_parser_unary_expression): Initialize non_constant_p
2123 (cp_parser_asm_definition): Initialize missing to RT_NONE.
2124 (cp_parser_primary_expression, cp_parser_postfix_expression,
2125 cp_parser_cast_expression, cp_parser_binary_expression,
2126 cp_parser_functional_cast): Fix formatting.
2128 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
2131 * parser.c: Remove inclusion of dyn-string.h.
2132 (non_integral_constant): New enum.
2133 (name_lookup_error): New enum.
2134 (required_token): New enum.
2135 (cp_parser_required_error): New function.
2136 (cp_parser_require): Change the type of variable token_desc to
2137 required_token and use cp_parser_required_error.
2138 (cp_parser_require_keyword): Likewise.
2139 (cp_parser_error): Use gmsgid as parameter.
2140 (cp_parser_name_lookup_error): Change the type of variable desired to
2141 name_lookup_error and put the diagnostic in the full sentences. Change
2143 (cp_parser_non_integral_constant_expression): Change the type of the
2144 variable thing to non_integral_constant and put the diagnostics in
2145 full sentences. Change caller.
2147 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
2150 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
2152 2010-05-24 Joseph Myers <joseph@codesourcery.com>
2154 * error.c (cp_diagnostic_starter): Update call to
2155 diagnostic_build_prefix.
2156 (cp_print_error_function,
2157 print_instantiation_partial_context_line): Check show_column flag
2160 2010-05-24 Jason Merrill <jason@redhat.com>
2163 * decl.c (check_initializer): Don't wrap an init-list in a
2165 * init.c (build_aggr_init): Don't assume copy-initialization if
2166 init has CONSTRUCTOR_IS_DIRECT_INIT.
2167 * call.c (build_new_method_call): Sanity check.
2169 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
2171 * rtti.c (tinfo_base_init): Use build_constructor instead of
2172 build_constructor_from_list. Don't cons a tree node for
2174 (generic_initializer): Use build_constructor_single instead of
2175 build_constructor_from_list.
2176 (ptr_initializer): Use build_constructor instead of
2177 build_constructor_from_list
2178 (ptm_initializer): Likewise.
2179 (class_initializer): Likewise. Take varargs instead of TRAIL.
2180 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
2181 build_constructor instead of build_constructor_from_list.
2183 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
2185 * semantics.c: Include bitmap.h.
2186 * Make-lang.in: Update dependencies.
2188 2010-05-22 Jan Hubicka <jh@suse.cz>
2190 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
2192 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
2194 2010-05-21 Joseph Myers <joseph@codesourcery.com>
2196 * cxx-pretty-print.c: Correct merge error.
2198 2010-05-21 Joseph Myers <joseph@codesourcery.com>
2200 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
2201 (cp_print_error_function): Use diagnostic_abstract_origin macro.
2202 (cp_printer): Handle %K here using percent_K_format.
2203 * cxx-pretty-print.c: Include tree-pretty-print.h.
2204 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
2207 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
2209 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
2210 Clean up redundant includes.
2212 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2215 * decl.c (xref_basetypes): Return false in case of ill-formed
2218 2010-05-19 Jason Merrill <jason@redhat.com>
2220 * call.c (reference_binding): Use cp_build_qualified_type_real
2221 and cp_type_quals consistently.
2222 (add_function_candidate): Likewise.
2223 (build_conditional_expr): Likewise.
2224 (convert_like_real): Likewise.
2225 (type_passed_as): Likewise.
2226 * class.c (add_method): Likewise.
2227 (same_signature_p): Likewise.
2228 (layout_class_type): Likewise.
2229 * decl.c (cxx_init_decl_processing): Likewise.
2230 (cp_fname_init): Likewise.
2231 (grokdeclarator): Likewise.
2232 * decl2.c (cp_reconstruct_complex_type): Likewise.
2233 * init.c (build_new_1): Likewise.
2234 * method.c (do_build_copy_constructor): Likewise.
2235 (implicitly_declare_fn): Likewise.
2236 * pt.c (tsubst_aggr_type): Likewise.
2238 * rtti.c (init_rtti_processing): Likewise.
2239 (build_headof): Likewise.
2240 (build_dynamic_cast_1): Likewise.
2241 (tinfo_base_init): Likewise.
2242 (emit_support_tinfos): Likewise.
2243 * semantics.c (capture_decltype): Likewise.
2244 * tree.c (cv_unqualified): Likewise.
2245 * typeck.c (composite_pointer_type): Likewise.
2246 (string_conv_p): Likewise.
2248 * mangle.c (write_CV_qualifiers_for_type): Tweak.
2250 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
2251 * decl.c (start_decl): Likewise.
2252 * semantics.c (finish_compound_literal): Likewise.
2253 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
2254 (cp_type_readonly): Remove.
2255 * cp-tree.h: Remove declaration.
2257 * typeck.c (merge_types): Preserve memfn quals.
2259 * decl.c (grokdeclarator): Don't check quals on fn type.
2260 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
2261 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
2264 * typeck.c (type_memfn_quals): New fn.
2265 (apply_memfn_quals): New fn.
2266 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
2267 (cp_type_readonly): Use cp_type_quals.
2268 * cp-tree.h: Add declarations.
2269 * tree.c (cp_build_qualified_type_real): Don't set, but do
2270 preserve, quals on FUNCTION_TYPE.
2271 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
2272 * decl.c (build_ptrmem_type): Likewise.
2273 (grokdeclarator): Likewise.
2274 (static_fn_type): Likewise.
2275 * decl2.c (change_return_type): Likewise.
2276 (cp_reconstruct_complex_type): Likewise.
2277 * pt.c (tsubst_function_type): Likewise.
2279 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
2281 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
2283 * tree.c (build_min_non_dep_call_vec): Update comment.
2285 2010-05-17 Jason Merrill <jason@redhat.com>
2287 * call.c (struct z_candidate): Add explicit_targs field.
2288 (add_template_candidate_real): Set it.
2289 (build_over_call): Use it to control init-list warning.
2292 * call.c (build_over_call): Limit init-list deduction warning to
2293 cases where the argument is actually an init-list.
2296 * call.c (build_over_call): Don't do bitwise copy for move ctor.
2298 2010-05-17 Dodji Seketeli <dodji@redhat.com>
2299 Jason Merrill <jason@redhat.com>
2302 * decl.c (compute_array_index_type): Call mark_rvalue_use.
2304 2010-05-15 Jason Merrill <jason@redhat.com>
2306 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
2307 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
2309 (finish_eh_spec_block): Adjust.
2311 2010-05-15 Jakub Jelinek <jakub@redhat.com>
2314 * pt.c (tsubst): Unshare template argument.
2316 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
2318 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
2319 * Make-lang.in: Fix dependencies accordingly.
2321 2010-05-14 Jason Merrill <jason@redhat.com>
2324 * except.c (build_throw): Simplify, adjust for DR 475.
2327 * except.c (dtor_nothrow): Return nonzero for type with
2331 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
2332 gimple_build_eh_must_not_throw.
2334 2010-05-14 Martin Jambor <mjambor@suse.cz>
2336 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
2339 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
2341 * call.c (build_new_method_call): Change warning text.
2342 * typeck2.c (build_functional_cast): Change error text.
2344 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
2347 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
2348 shadowing the outer parameter or variables by the declaration of
2349 nested function in nested structure or class. Warn the shadowing by
2350 the declaration of nested lambda expression.
2352 2010-05-13 Jason Merrill <jason@redhat.com>
2354 * typeck.c (cp_build_array_ref): Factor out from...
2355 (build_array_ref): ...here. Drop complain parm.
2356 (build_new_op): Adjust.
2357 * class.c (build_vtbl_ref_1): Adjust.
2358 * decl2.c (grok_array_decl): Adjust.
2359 * cp-tree.h: Adjust prototypes.
2361 2010-05-13 Jan Hubicka <jh@suse.cz>
2363 * decl.c (cp_finish_decl): Do not worry about used attribute.
2365 2010-05-12 Jason Merrill <jason@redhat.com>
2367 * typeck.c (build_array_ref): Take complain parm.
2368 * cp-tree.h: Add it to prototype.
2369 * call.c (build_new_op): Pass it.
2370 * class.c (build_vtbl_ref): Pass it.
2371 * decl2.c (grok_array_decl): Pass it.
2375 * cp-tree.def (NULLPTR_TYPE): Remove.
2376 * cp-tree.h (NULLPTR_TYPE_P): New.
2377 (SCALAR_TYPE_P): Use it.
2378 (nullptr_type_node): New.
2379 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
2380 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
2382 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
2383 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2384 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
2385 * mangle.c (write_type): Likewise.
2386 * name-lookup.c (arg_assoc_type): Likewise.
2387 * typeck.c (build_reinterpret_cast_1): Likewise.
2388 * rtti.c (typeinfo_in_lib_p): Likewise.
2389 (emit_support_tinfos): Remove local nullptr_type_node.
2391 * cp-tree.h (UNKNOWN_TYPE): Remove.
2392 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
2393 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
2394 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
2395 * class.c (instantiate_type): Check unknown_type_node rather than
2397 * name-lookup.c (maybe_push_decl): Likewise.
2398 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2399 (get_typeid): Likewise.
2400 * semantics.c (finish_offsetof): Likewise.
2403 * call.c (add_template_candidate_real): If deduction fails, still
2404 add the template as a non-viable candidate.
2405 (equal_functions): Handle template candidates.
2406 (print_z_candidate): Likewise.
2407 (print_z_candidates): Likewise.
2408 (build_new_function_call): Likewise.
2410 * cp-tree.h (LOOKUP_LIST_ONLY): New.
2411 * call.c (add_candidates): Enforce it.
2412 (build_new_method_call): Try non-list ctor if no viable list ctor.
2413 (build_user_type_conversion_1): Likewise.
2415 * call.c (add_candidates): Distinguish between type(x) and
2417 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
2418 (build_new_method_call): Give better error for conversion op.
2420 * call.c (add_candidates): Add first_arg and return_type parms.
2421 Add special constructor/conversion op handling.
2422 (convert_class_to_reference): Use it.
2423 (build_user_type_conversion_1): Likewise.
2424 (build_op_call): Likewise.
2425 (build_new_method_call): Likewise.
2426 (build_new_op): Adjust.
2427 (perform_overload_resolution): Adjust.
2429 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
2434 * pt.c (process_partial_specialization): Return error_mark_node
2435 in case of unused template parameters in partial specialization.
2437 2010-05-11 Jakub Jelinek <jakub@redhat.com>
2440 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
2441 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
2442 look at its second operand.
2444 2010-05-10 Jason Merrill <jason@redhat.com>
2447 * semantics.c (baselink_for_fns): Revert earlier change.
2450 * typeck.c (cp_build_modify_expr): Complain about assignment to
2451 array from init list.
2453 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
2456 * decl.c (check_initializer): strip array type before checking for
2457 uninitialized const or ref members.
2459 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
2462 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
2463 error count. Emit errors only if compain is true.
2464 (build_new_1): Do not return error_mark_node if
2465 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
2466 errors. Delay the check for user-provided constructor.
2467 (perform_member_init): Adjust.
2468 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
2471 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
2472 Jason Merrill <jason@redhat.com>
2474 Add support for C++0x nullptr.
2475 * cp-tree.def: Add NULLPTR_TYPE.
2476 * cp-tree.h: Add nullptr_node.
2477 (cp_tree_index): Add CPTI_NULLPTR.
2478 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
2479 * call.c (null_ptr_cst_p): Handle nullptr.
2480 (standard_conversion): Likewise.
2481 (convert_arg_to_ellipsis): Likewise.
2482 * mangle.c (write_type): Likewise.
2483 * name-lookup.c (arg_assoc_type): Likewise.
2484 * parser.c (cp_parser_primary_expression): Likewise.
2485 * typeck.c (cp_build_binary_op): Likewise.
2486 (build_reinterpret_cast_1): Likewise.
2487 * error.c (dump_type): Likewise.
2488 (dump_type_prefix, dump_type_suffix): Likewise.
2489 * decl.c (cxx_init_decl_processing): Likewise.
2490 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2491 * cvt.c (ocp_convert): Likewise.
2492 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
2493 nullptr_t tinfo in libsupc++.
2495 2010-05-06 Jason Merrill <jason@redhat.com>
2497 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
2499 2010-04-22 Jakub Jelinek <jakub@redhat.com>
2500 Dodji Seketeli <dodji@redhat.com>
2503 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
2505 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
2506 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
2507 (decay_conversion, perform_integral_promotions): Call rvalue_use.
2508 (cp_build_unary_op): Call lvalue_use.
2509 * decl.c (unused_but_set_errorcount): New variable.
2510 (poplevel): Issue -Wunused-but-set-variable diagnostics.
2511 (duplicate_decls): Merge DECL_READ_P flags.
2512 (start_cleanup_fn): Set DECL_READ_P flag.
2513 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
2514 * tree.c (rvalue): Call rvalue_use.
2515 * pt.c (convert_nontype_argument): Likewise.
2516 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
2517 finish_decltype_type): Likewise.
2518 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
2519 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
2520 or rvalue_use depending on the expr.
2521 * init.c (build_new, build_delete): Likewise.
2522 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
2524 2010-05-05 Jason Merrill <jason@redhat.com>
2527 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
2528 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
2530 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2533 * pt.c (unify): Check each elt for error_mark_node.
2535 2010-05-04 Jason Merrill <jason@redhat.com>
2538 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
2540 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2543 * call.c (build_new_method_call): Return error_mark_node if fns is
2546 2010-05-03 Dodji Seketeli <dodji@redhat.com>
2549 * pt.c (most_specialized_class): Pretend we are processing
2550 a template decl during the call to coerce_template_parms.
2552 2010-05-03 Jason Merrill <jason@redhat.com>
2556 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
2557 from the selected underlying type unless -fstrict-enums. Set
2558 ENUM_UNDERLYING_TYPE to have the restricted range.
2559 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
2560 * class.c (check_bitfield_decl): Likewise.
2562 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
2565 * init.c (build_new_1): Revert the accidental checkin in
2568 2010-04-30 Jason Merrill <jason@redhat.com>
2571 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
2572 (pp_cxx_type_specifier_seq): ...here.
2574 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
2576 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
2577 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
2579 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
2582 * typeck.c (warn_args_num): New function.
2583 (convert_arguments): Use warn_args_num to print the diagnostic
2586 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
2589 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
2590 user-provided constructor while recursing.
2592 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
2595 * error.c (print_instantiation_partial_context_line): Handle
2596 recursive instantiation.
2597 (print_instantiation_partial_context): Likewise.
2599 2010-04-27 Jason Merrill <jason@redhat.com>
2601 * init.c (perform_member_init): Check CLASS_TYPE_P.
2603 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2606 * init.c (perform_member_init): check for uninitialized const or
2607 reference members, including array types.
2609 2010-04-24 Jason Merrill <jason@redhat.com>
2611 * tree.c (get_fns): Split out from get_first_fn.
2612 * cp-tree.h: Declare it.
2613 * search.c (shared_member_p): Use it.
2614 * semantics.c (finish_qualified_id_expr): Simplify.
2615 (finish_id_expression): Simplify.
2617 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
2618 whenever object is NULL_TREE. Don't do 'this' capture here.
2619 (finish_qualified_id_expr): Pass NULL_TREE.
2620 (finish_id_expression): Likewise.
2621 (lambda_expr_this_capture): Likewise.
2623 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
2624 rather than checking current_class_ref directly.
2625 (finish_call_expr): Likewise.
2628 * name-lookup.c (qualify_lookup): Disqualify lambda op().
2629 * class.c (current_nonlambda_class_type): New fn.
2630 * semantics.c (nonlambda_method_basetype): New.
2631 * cp-tree.h: Declare them.
2632 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
2634 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
2637 * semantics.c (lambda_return_type): Complain about
2641 * tree.c (cv_unqualified): Handle error_mark_node.
2644 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
2645 if we don't want errors.
2648 * class.c (convert_to_base): Add complain parameter. Pass
2649 ba_quiet to lookup_base if we don't want errors.
2650 (build_vfield_ref): Pass complain to convert_to_base.
2651 * call.c (convert_like_real): Likewise.
2652 (initialize_reference): Likewise.
2653 (perform_direct_initialization_if_possible): Pass complain to
2655 * cp-tree.h: Adjust.
2657 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2658 Jason Merrill <jason@redhat.com>
2661 * decl.c (check_for_uninitialized_const_var): Handle classes that need
2663 (check_initializer): Call it for classes that need constructing, too.
2664 * class.c (in_class_defaulted_default_constructor): New.
2665 * cp-tree.h: Declare it.
2667 2010-04-20 Jason Merrill <jason@redhat.com>
2670 * init.c (constant_value_1): Treat error_mark_node as a constant
2671 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
2672 * cvt.c (ocp_convert): Handle getting error_mark_node from
2673 integral_constant_value.
2674 * decl.c (compute_array_index_type): Likewise.
2676 2010-04-20 Dodji Seketeli <dodji@redhat.com>
2680 * typeck.c (incompatible_dependent_types_p): If one of the
2681 compared types if not a typedef then honour their main variant
2684 2010-04-20 Jakub Jelinek <jakub@redhat.com>
2686 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
2688 2010-04-19 Dodji Seketeli <dodji@redhat.com>
2691 * typeck.c (structural_comptypes): Test dependent typedefs
2692 incompatibility before testing for their main variant based
2695 2010-04-19 Jakub Jelinek <jakub@redhat.com>
2697 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
2698 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
2700 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2702 * decl.c (cxx_init_decl_processing): Remove second argument in call to
2703 build_common_tree_nodes.
2705 2010-04-14 Jason Merrill <jason@redhat.com>
2708 * parser.c (cp_parser_parenthesized_expression_list): Change
2709 is_attribute_list parm to int to indicate whether or not to
2710 handle initial identifier specially.
2711 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
2713 2010-04-13 Jason Merrill <jason@redhat.com>
2715 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
2717 * parser.c (cp_parser_lambda_expression): Complain about lambda in
2718 unevaluated context.
2719 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
2721 2010-04-12 Jason Merrill <jason@redhat.com>
2724 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
2725 return value directly.
2727 * call.c (type_decays_to): Call cv_unqualified for non-class type.
2729 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
2732 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
2733 * init.c (build_new_1): Check for uninitialized const members and
2734 uninitialized reference members, when using new without
2735 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
2736 (diagnose_uninitialized_cst_or_ref_member): Define, call
2737 diagnose_uninitialized_cst_or_ref_member_1.
2738 (diagnose_uninitialized_cst_or_ref_member_1): New function.
2740 2010-04-12 Richard Guenther <rguenther@suse.de>
2743 * semantics.c (expand_or_defer_fn_1): Do not keep extern
2744 template inline functions.
2746 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
2749 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
2752 2010-04-07 Jason Merrill <jason@redhat.com>
2755 * decl.c (start_preparsed_function): Do defer nested functions.
2757 PR c++/11094, DR 408
2758 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
2759 * decl2.c (finish_static_data_member_decl): Set it.
2760 * decl.c (duplicate_decls): Propagate it.
2761 * pt.c (tsubst_decl): Don't substitute the domain of an array
2762 VAR_DECL if it's set.
2763 (regenerate_decl_from_template): Substitute it here.
2764 (type_dependent_expression_p): Return true if it's set.
2765 * semantics.c (finish_decltype_type): Instantiate such a variable.
2766 * typeck.c (cxx_sizeof_expr): Likewise.
2767 (strip_array_domain): New.
2770 * name-lookup.c (current_decl_namespace): Non-static.
2771 (pop_nested_namespace): Sanity check.
2772 * cp-tree.h: Declare current_decl_namespace.
2773 * decl.c (grokvardecl): Use it instead of current_namespace.
2774 (grokfndecl): Likewise.
2777 * pt.c (tsubst_friend_function): Instatiate a friend that has already
2780 * pt.c (print_template_statistics): New.
2781 * cp-tree.h: Declare it.
2782 * tree.c (cxx_print_statistics): Call it.
2785 * decl.c (grokvardecl): Tweak warning message.
2786 (grokfndecl): Likewise.
2788 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2791 *pt.c (tsubst_decl): Get the arguments of a specialization from
2792 the specialization template, not from the most general template.
2794 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2797 * typeck2.c (process_init_constructor_record):
2798 value-initialize members that are are not explicitely
2801 2010-04-07 Jie Zhang <jie@codesourcery.com>
2804 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
2805 when all of its elements are non-constant and have been split out.
2807 2010-04-06 Taras Glek <taras@mozilla.com>
2808 Jason Merrill <jason@redhat.com>
2810 * parser.c (cp_parser_class_specifier): Set class location to that
2811 of IDENTIFIER_NODE instead of '{' when possible.
2812 * semantics.c (begin_class_definition): Do not overide locations
2813 with less precise ones.
2815 2010-04-06 Jason Merrill <jason@redhat.com>
2818 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
2821 * pt.c (maybe_update_decl_type): Check the return value from
2824 2010-04-01 Jason Merrill <jason@redhat.com>
2826 * decl.c (next_initializable_field): No longer static.
2827 * cp-tree.h: Declare it.
2828 * call.c (build_aggr_conv): Fail if there are more initializers
2829 than initializable fields.
2831 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
2832 instead of void_zero_node.
2834 2010-03-31 Dodji Seketeli <dodji@redhat.com>
2837 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
2838 * pt.c (end_template_parm_list): Store sibling template parms of
2839 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2840 (push_template_decl_real): Don't store the containing template decl
2841 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
2842 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
2843 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2846 2010-03-30 Jason Merrill <jason@redhat.com>
2849 * pt.c (push_template_decl_real): Deal better with running out of
2850 scopes before running out of template parms.
2854 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
2855 function parameter context. Don't print an error if parsing
2859 * pt.c (more_specialized_fn): Don't control cv-qualifier check
2862 2010-03-26 Jason Merrill <jason@redhat.com>
2865 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
2866 c++0x mode, but not other type-names.
2868 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2871 * pt.c (add_to_template_args): Support NULL ARGS;
2872 (most_specialized_class): call coerce_template_parms on
2873 template arguments passed to get_class_bindings. Use
2874 add_to_template_args.
2875 (unify): Handle VAR_DECLs.
2877 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2879 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
2881 * pt.c (get_template_parms_at_level): Adjust.
2883 2010-03-25 Dodji Seketeli <dodji@redhat.com>
2886 * cp-tree.h (get_template_parms_at_level): Declare ...
2887 * pt.c (get_template_parms_at_level): ... new function.
2888 * typeck.c (get_template_parms_of_dependent_type): If a template
2889 type parm's DECL_CONTEXT isn't yet set, get its siblings from
2890 current_template_parms. Use get_template_parms_at_level. Remove
2892 (incompatible_dependent_types_p): If we get empty parms from just one
2893 of the template type parms we are comparing then the template parms are
2896 2010-03-24 Jason Merrill <jason@redhat.com>
2899 * parser.c (make_declarator): Initialize id_loc.
2900 (cp_parser_lambda_declarator_opt): And set it.
2902 2010-03-23 Jason Merrill <jason@redhat.com>
2904 Make lambda conversion op and op() non-static.
2905 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
2906 Also add the thunk function returned by the conversion op.
2907 Mark the conversion deleted if the op() is variadic.
2908 * decl2.c (mark_used): Give helpful message about deleted conversion.
2909 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
2910 * semantics.c (finish_this_expr): Adjust.
2911 * mangle.c (write_closure_type_name): Adjust.
2912 * decl.c (grok_op_properties): Don't allow it.
2913 * call.c (build_user_type_conversion_1): No static conversion ops.
2914 (build_op_call): Or op().
2916 * decl2.c (change_return_type): Fix 'this' quals.
2918 2010-03-22 Jason Merrill <jason@redhat.com>
2921 * tree.c (pod_type_p): Use old meaning in C++98 mode.
2924 * pt.c (contains_auto_r): New fn.
2925 (do_auto_deduction): Use it.
2926 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
2928 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
2931 * decl2.c (grokfield): Handle invalid initializers for member
2934 2010-03-20 Dodji Seketeli <dodji@redhat.com>
2937 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
2939 * decl2.c (vague_linkage_p): Likewise.
2941 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
2944 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
2945 false, in the cp_parser_expression_statement call.
2947 2010-03-05 Jason Merrill <jason@redhat.com>
2949 * mangle.c (mangle_decl): Give name collision error even without
2952 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
2954 * pt.c (process_partial_specialization): Use error_n instead of
2957 2010-03-03 Jason Merrill <jason@redhat.com>
2960 * mangle.c (mangle_decl): Handle VAR_DECL, too.
2962 2010-03-03 Jason Merrill <jason@redhat.com>
2965 * mangle.c: Include cgraph.h.
2966 (mangle_decl): If the mangled name will change in a later
2967 ABI version, make the later mangled name an alias.
2968 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
2969 * Make-lang.in (mangle.o): Depend on cgraph.h.
2970 * method.c (make_alias_for): Handle VAR_DECL, too.
2971 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
2972 * tree.c (no_linkage_check): Adjust.
2973 * decl.c (maybe_commonize_var): Adjust.
2974 * cp-tree.h: Adjust.
2976 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
2978 * pt.c (redeclare_class_template): Use error_n and inform_n.
2980 2010-02-27 Mark Mitchell <mark@codesourcery.com>
2983 * cp-tree.h (push_tinst_level): Declare.
2984 (pop_tinst_level): Likewise.
2985 * pt.c (push_tinst_level): Give it external linkage.
2986 (pop_tinst_level): Likewise.
2987 * mangle.c (mangle_decl_string): Set the source location to that
2988 of the decl while mangling.
2990 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
2993 * pt.c (redeclare_class_template): Return false if there are erroneous
2994 template parameters.
2996 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
2998 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
3001 2010-02-24 Jason Merrill <jason@redhat.com>
3004 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
3006 * class.c (layout_class_type): Don't give -Wabi warning for a bug
3007 in a previous ABI version.
3009 2010-02-23 Jason Merrill <jason@redhat.com>
3012 * typeck2.c (digest_init_r): Accept value init of array.
3014 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3017 * typeck.c (convert_arguments): Update error message.
3019 2010-02-22 Mike Stump <mikestump@comcast.net>
3022 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
3024 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
3027 * error.c (print_instantiation_partial_context_line): New.
3028 (print_instantiation_partial_context): Print at most 12 contexts,
3029 skip the rest with a message.
3031 2010-02-21 Dodji Seketeli <dodji@redhat.com>
3034 * pt.c (lookup_template_class): Better support of specialization
3035 of member of class template implicit instantiation.
3037 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
3040 * call.c (conversion_null_warnings): Replace -Wconversion with
3042 * cvt.c (build_expr_type_conversion): Likewise.
3044 2010-02-18 Jason Merrill <jason@redhat.com>
3047 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
3050 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
3052 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
3053 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
3056 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
3060 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
3061 (maybe_update_decl_type): New fn.
3062 * parser.c (cp_parser_init_declarator): Use it.
3065 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
3067 2010-02-17 Jason Merrill <jason@redhat.com>
3070 * call.c (build_over_call): Don't create zero-sized assignments.
3071 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
3072 * cp-objcp-common.c (cp_expr_size): Remove.
3073 * cp-tree.h: Remove prototype.
3076 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
3077 decl we looked up doesn't match.
3080 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
3081 have an INIT_EXPR anymore.
3084 * pt.c (convert_nontype_argument): Change assert to test.
3086 2010-02-16 Jason Merrill <jason@redhat.com>
3088 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
3091 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
3092 VIEW_CONVERT_EXPR for conversions between structural equality types
3093 that the back end can't tell are the same.
3096 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
3097 cv-quals from element here.
3098 (cp_build_qualified_type_real): Not here. Preserve typedef name.
3100 2010-02-14 Jason Merrill <jason@redhat.com>
3103 * semantics.c (finish_compound_literal): Use
3104 cp_apply_type_quals_to_decl when creating a static variable.
3106 2010-02-12 Jason Merrill <jason@redhat.com>
3109 * name-lookup.h (current_binding_level): Check for null
3112 2010-02-12 Jason Merrill <jason@redhat.com>
3115 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
3117 2010-02-12 Jakub Jelinek <jakub@redhat.com>
3120 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
3123 2010-02-10 Jason Merrill <jason@redhat.com>
3126 * semantics.c (outer_lambda_capture_p): Revert.
3127 (add_capture): Only finish_member_declaration if
3128 we're in the lambda class.
3129 (register_capture_members): New.
3130 * cp-tree.h: Declare it.
3131 * parser.c (cp_parser_lambda_expression): Call it.
3133 2010-02-10 Jason Merrill <jason@redhat.com>
3136 * semantics.c (outer_lambda_capture_p): Use current_function_decl
3137 instead of current_class_type.
3139 2010-02-10 Jason Merrill <jason@redhat.com>
3141 PR c++/42983, core issue 906
3142 * method.c (defaultable_fn_check): Check virtualness.
3144 2010-02-10 Jason Merrill <jason@redhat.com>
3147 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
3149 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
3151 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
3152 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
3154 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
3155 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
3156 (cp_parser_parameter_declaration)
3157 (cp_parser_exception_specification_opt)
3158 (cp_parser_exception_declaration): Likewise.
3159 * pt.c (check_default_tmpl_args): Likewise.
3160 * search.c (lookup_field_r): Likewise.
3162 2010-02-09 Jason Merrill <jason@redhat.com>
3165 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
3167 2010-02-09 Jason Merrill <jason@redhat.com>
3170 * decl2.c (change_return_type): New fn.
3171 * semantics.c (apply_lambda_return_type): Use it.
3172 * cp-tree.h: Declare it.
3174 2010-02-05 Richard Guenther <rguenther@suse.de>
3176 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
3177 * cp-lang.c: Include gt-cp-cp-lang.h.
3178 * config-lang.in (gtfiles): Add cp/cp-lang.c.
3180 2010-02-05 Dodji Seketeli <dodji@redhat.com>
3183 * typeck.c (get_template_parms_of_dependent_type): Try getting
3184 the template parameters fromt the type itself first.
3186 2010-02-03 Jason Merrill <jason@redhat.com>
3190 * mangle.c (write_unqualified_id): Split out from write_expression.
3191 (write_unqualified_name): Call it.
3192 (write_member_name): Likewise.
3193 (write_expression): Support TEMPLATE_ID_EXPR.
3194 Disambiguate operator names.
3197 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
3200 2010-02-02 Jason Merrill <jason@redhat.com>
3203 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
3204 * optimize.c (clone_body): Remap their initializers when making base
3206 (maybe_clone_body): Complain if multiple clones aren't safe.
3208 2010-01-29 Dodji Seketeli <dodji@redhat.com>
3215 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3216 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3217 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
3218 * pt.c (coerce_template_parms, type_unification_real,
3219 expand_template_argument_pack, coerce_template_parameter_pack):
3220 Set the non default template args count.
3221 (current_template_args): Always set non defaulted
3222 template args count when compiled with --enable-checking
3223 (tsubst_template_args, type_unification_real): Propagate the non
3224 defaulted template args count.
3225 * error.c (get_non_default_template_args_count): Renamed
3226 count_non_default_template_args into this. Don't calculate the
3227 non default template argument count anymore. Use the new
3228 accessor macros above to get it.
3229 (dump_template_argument_list, dump_type, dump_decl,
3230 dump_template_parms): Adjust.
3231 * parser.c (cp_parser_template_argument_list): Always set defaulted
3232 template args count when compiled with --enable-checking.
3234 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
3236 * decl.c (redeclaration_error_message): Wrap the return messages into
3237 G_() for easy translation.
3239 2010-01-28 Jason Merrill <jason@redhat.com>
3242 * semantics.c (begin_class_definition): Don't use type_as_string.
3244 2010-01-28 Dodji Seketeli <dodji@redhat.com>
3248 * typeck.c (get_template_parms_of_dependent_type): Factorized
3249 this out of incompatible_template_type_parms_p
3250 (incompatible_dependent_types_p): Renamed
3251 incompatible_template_type_parms_p into this. Make it detect
3252 two incompatible dependent typedefs too.
3253 (structural_comptypes): Use incompatible_dependent_types_p.
3254 * pt.c (get_template_info):
3255 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
3257 2010-01-20 Janis Johnson <janis187@us.ibm.com>
3258 Jason Merrill <jason@redhat.com>
3260 * mangle.c (write_type): Mangle transparent record as member type.
3261 * semantics.c (begin_class_definition): Recognize decimal classes
3262 and set TYPE_TRANSPARENT_AGGR.
3264 2010-01-20 Jason Merrill <jason@redhat.com>
3267 * mangle.c (write_expression): Handle tree codes that have extra
3268 arguments in the middle-end.
3270 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
3273 * except.c (expand_start_catch_block): Deal correctly with
3274 do_begin_catch returning error_mark_node.
3276 2010-01-20 Jason Merrill <jason@redhat.com>
3279 * class.c (layout_class_type): Set packed_maybe_necessary for packed
3283 * semantics.c (build_lambda_object): Call mark_used on captured
3287 * decl.c (grokdeclarator): Clear type_quals for a member function
3288 declared using a typedef. Don't complain about adding cv-quals
3289 to a function typedef in C++0x mode.
3291 2010-01-20 Jakub Jelinek <jakub@redhat.com>
3293 * decl.c (create_array_type_for_decl): Remove set but not used
3294 variable error_msg. Remove break stmts after return stmts.
3296 2010-01-19 Dodji Seketeli <dodji@redhat.com>
3298 * error.c (dump_template_parms, count_non_default_template_args):
3299 Revert fix of PR c++/42634.
3301 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3304 * error.c (dump_template_parms): Use innermost template
3305 arguments before calling count_non_default_template_args.
3306 (count_non_default_template_args): We are being called with
3307 template innermost arguments now. There is no need to ensure
3310 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3313 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
3315 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3318 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
3320 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3323 *pt.c (tsubst_decl): Get the arguments of a specialization from
3324 the specialization template, not from the most general template.
3326 2010-01-16 Jason Merrill <jason@redhat.com>
3329 * semantics.c (finish_decltype_type): Within a template, treat
3330 unresolved CALL_EXPR as dependent.
3332 2010-01-15 Dodji Seketeli <dodji@redhat.com>
3334 * error.c (dump_template_parms,count_non_default_template_args):
3335 Revert changes of PR c++/42634.
3337 2010-01-14 Jakub Jelinek <jakub@redhat.com>
3340 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
3341 functions with noreturn attribute.
3343 2010-01-14 Jason Merrill <jason@redhat.com>
3346 * call.c (build_new_method_call): Don't free the vec here.
3349 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
3351 2010-01-13 Dodji Seketeli <dodji@redhat.com>
3354 * error.c (dump_template_parms): Use innermost template
3355 arguments before calling count_non_default_template_args.
3356 (count_non_default_template_args): We are being called with
3357 template innermost arguments now. There is no need to ensure
3360 2010-01-07 Dodji Seketeli <dodji@redhat.com>
3363 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
3364 arguments that were previously deduced.
3366 2010-01-05 Jason Merrill <jason@redhat.com>
3368 * pt.c (unify_pack_expansion): Handle deduction from init-list.
3369 * call.c (build_over_call): Don't complain about it.
3371 2010-01-04 Jason Merrill <jason@redhat.com>
3374 * pt.c (tsubst_decl): Don't apply type attributes in place.
3377 * semantics.c (describable_type): Remove decltype comment and
3382 Copyright (C) 2010 Free Software Foundation, Inc.
3384 Copying and distribution of this file, with or without modification,
3385 are permitted in any medium without royalty provided the copyright
3386 notice and this notice are preserved.