1 2010-10-27 Gabriel Dos Reis <gdr@cse.tamu.edu>
2 Jason Merrill <jason@redhat.com>
4 * decl.c (finish_case_label): Use decl_constant_value.
6 * method.c (synthesized_method_walk): Track constexprness too.
7 (process_subob_fn, walk_field_subobs): Likewise.
8 (implicitly_declare_fn): Set DECL_DECLARED_CONSTEXPR_P.
9 (defaulted_late_check): Handle DECL_DECLARED_CONSTEXPR_P.
10 * class.c (add_implicitly_declared_members): Handle
11 constexpr default ctor.
13 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
14 Make sure a constexpr ctor has an empty body.
15 * class.c (type_has_constexpr_default_constructor): New.
16 * cp-tree.h: Declare it.
17 * init.c (perform_member_init): Complain about uninitialized
18 member in constexpr ctor.
19 (emit_mem_initializers): And uninitialized base.
20 * decl.c (check_tag_decl): Fix typo.
22 * semantics.c (valid_type_in_constexpr_fundecl_p): New fn.
23 (is_valid_constexpr_fn): New fn.
24 (validate_constexpr_fundecl): Use it.
25 * decl.c (validate_constexpr_redeclaration): New.
26 (duplicate_decls): Use it.
27 (cp_finish_decl): Call validate_constexpr_fundecl and
28 ensure_literal_type_for_constexpr_object here.
29 (start_decl): Not here. Don't ICE on constexpr reference.
30 (check_for_uninitialized_const_var): Don't handle constexpr specially.
31 (grokfndecl): Set DECL_DECLARED_CONSTEXPR_P.
32 (check_static_variable_definition): Give friendly message about
34 (grokdeclarator): Complain about typedef and volatile with constexpr.
35 Reorganize. Give sorry about non-static data members in C++0x mode.
36 (start_preparsed_function): Check validate_constexpr_fundecl here.
37 (check_function_type): Not here.
38 * decl2.c (finish_static_data_member_decl): Don't complain about
40 * parser.c (CP_PARSER_FLAGS_ONLY_TYPE_OR_CONSTEXPR): New.
41 (cp_parser_condition): Pass it to cp_parser_decl_specifier_seq.
42 (cp_parser_decl_specifier_seq): Handle it.
43 (cp_parser_explicit_instantiation): Diagnose inline and constexpr.
45 * class.c (check_bases): Propagate non-literality.
46 (check_field_decls): Likewise.
47 (finalize_literal_type_property): New.
48 (check_bases_and_members): Call it.
49 * cp-tree.h (TYPE_HAS_CONSTEXPR_CTOR): New.
50 (lang_type_class): Add has_constexpr_ctor field.
51 (DECL_DECLARED_CONSTEXPR_P): Strip template.
52 * decl.c (grok_special_member_properties): Set
53 TYPE_HAS_CONSTEXPR_CTOR.
55 2010-10-27 Jason Merrill <jason@redhat.com>
57 * call.c (build_integral_nontype_arg_conv): New.
58 * cp-tree.h: Declare it.
59 * pt.c (convert_nontype_argument): Use it.
61 * error.c (dump_simple_decl): Print constexpr.
63 * cvt.c (build_up_reference): Use target_type for the temporary var.
65 * except.c (build_throw): Set EXPR_LOCATION.
67 * tree.c (build_cplus_new): Handle CONSTRUCTOR.
69 * semantics.c (finish_compound_stmt): Avoid creating an
70 unnecessary BIND_EXPR.
72 * call.c (convert_like_real): Don't check narrowing if the element
73 is also an initializer-list.
75 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
77 * parser.c (cp_parser_objc_at_property_declaration): Recognize
78 RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC.
79 Do not use objc_set_property_attr, but use local variables
80 instead. Detect repeated usage of setter, getter and ivar
81 attributes. Improved error processing when a setter name does not
82 end in ':'. Do not check for CPP_CLOSE_PAREN after we determined
83 that the token is a keyword. Updated call to
84 objc_add_property_declaration.
86 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
88 * parser.c (cp_parser_objc_property_decl): Renamed to
89 cp_parser_objc_struct_declaration. Return the parsed trees
90 instead of calling objc_add_property_variable directly. Detect
91 missing or invalid declspecs. Implemented attributes. Do not eat
92 the ';' at the end. Exit loop whenever a non-comma is parsed, not
94 (cp_parser_objc_at_property): Renamed to
95 cp_parser_objc_at_property_declaration. Updated calls to
96 objc_add_property_variable, now objc_add_property_declaration, and
97 to cp_parser_objc_property_decl, now
98 cp_parser_objc_struct_declaration. Rewritten all code to be more
99 robust in dealing with syntax errors, and almost identical to the
100 one in c_parser_objc_at_property_declaration.
101 (cp_parser_objc_property_attrlist): Removed.
102 (cp_parser_objc_method_prototype_list): Updated call to
103 cp_parser_objc_at_property.
104 (cp_parser_objc_method_definition_list): Same change.
105 (cp_parser_objc_class_ivars): Detect a number of invalid
106 declarations of instance variables and produce errors when they
109 2010-10-26 Jason Merrill <jason@redhat.com>
111 * tree.c (build_vec_init_expr): Split out from...
112 (build_array_copy): ...here.
113 * init.c (perform_member_init): Use it.
114 * cp-tree.h: Declare it.
115 * cp-gimplify.c (cp_gimplify_init_expr): Don't gimplify the slot for
116 VEC_INIT_EXPR and AGGR_INIT_EXPR here. Drop pre/post parameters.
117 (cp_gimplify_expr): Handle array default-initialization via
120 * tree.c (stabilize_expr): Handle xvalues properly.
122 * call.c (build_over_call): Use argarray[0] for 'this' argument.
124 * decl.c (finish_function): Don't look at function_depth.
126 2010-10-25 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
128 Implement opaque-enum-specifiers for C++0x.
129 * cp-tree.h (SET_OPAQUE_ENUM_P): New.
130 (OPAQUE_ENUM_P): New.
131 (ENUM_FIXED_UNDERLYING_TYPE_P): New.
132 (start_enum): Update prototype.
133 (finish_enum_value_list): New prototype.
134 * parser.c (cp_parser_elaborated_type_specifier): Issue a pedwarn if
135 "enum class" is used in an elaborated-type-specifier.
136 (cp_parser_enum_specifier): Rewrite to parse opaque-enum-specifiers.
137 * decl.c (copy_type_enum): New.
138 (finish_enum_value_list): New, with code from finish_enum.
139 (finish_enum): A lot of code removed. Added a gcc_assert.
140 (start_enum): Add parameters enumtype and is_new.
141 Rewrite to work with opaque-enum-specifiers.
142 * pt.c (maybe_process_partial_specialization): Allow for template
143 specialization of enumerations, with a pedwarn.
144 (lookup_template_class): Update call to start_enum. Call to
146 (tsubst_enum): Call to begin_scope, finish_scope and
147 finish_enum_value_list.
149 2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
151 Removed Objective-C++ specific replacement of cxx_printable_name.
152 * cp-objcp-common.h: Added LANG_HOOKS_DECL_PRINTABLE_NAME, set
153 to cxx_printable_name for both C++ and Objective-C++.
154 * cp-lang.h: Removed LANG_HOOKS_DECL_PRINTABLE_NAME.
156 * error.c (dump_decl): For Objective-C++, call
157 objc_maybe_printable_name here ...
158 * tree.c (cxx_printable_name_internal): ... instead of here.
160 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
162 * tree.c (cxx_printable_name_internal): In Objective-C++, call
163 objc_maybe_printable_name.
165 2010-10-22 Jason Merrill <jason@redhat.com>
168 * pt.c (instantiate_class_template): Don't instantiate default
172 * init.c (build_vec_init): Handle memberwise move.
174 2010-10-21 Paolo Carlini <paolo.carlini@oracle.com>
177 * call.c (add_function_candidate): Don't use TREE_VALUE on null
180 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
182 * parser.c (cp_parser_objc_method_type): Mark inline. Return a
183 bool instead of calling objc_set_method_type.
184 (cp_parser_objc_method_signature): Updated calls to
185 cp_parser_objc_method_type and to objc_build_method_signature.
186 (cp_parser_objc_method_prototype_list): Updated calls to
187 objc_add_method_declaration. Use token->type to determine if it
188 is a class method or not.
189 (cp_parser_objc_method_definition_list): Same change.
191 2010-10-20 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
194 * parser.c (cp_convert_range_for): Call cp_finish_decl
195 instead of finish_expr_stmt.
197 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
199 * cp-lang.c (finish_file): Removed.
200 * decl2.c (cp_write_global_declarations): Call
201 objc_write_global_declarations when compiling Objective-C++.
203 2010-10-19 Paolo Carlini <paolo.carlini@oracle.com>
206 * pt.c (add_to_template_args): Check extra_args for error_mark_node.
207 (coerce_template_parms): Likewise for args.
209 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
211 Implemented parsing @synthesize and @dynamic for Objective-C++.
212 * parser.c (cp_parser_objc_method_definition_list): Recognize
213 RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
214 (cp_parser_objc_at_dynamic_declaration): New.
215 (cp_parser_objc_at_synthesize_declaration): New.
217 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
219 * parser.c (cp_parser_objc_identifier_list): Check the return
220 value of cp_parser_identifier and react if it is error_mark_node.
222 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
224 Merge from apple/trunk branch on FSF servers.
226 2005-03-01 Fariborz Jahanian <fjahanian@apple.com>
229 * call.c (standard_conversion, implicit_conversion): Ignore
230 'volatile' attribute of artificially volatized type in objc when
231 evaluating various conversion weights.
233 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
236 * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the
237 artiificially 'volatized' type before doing pointer comparison.
239 2010-10-18 Jakub Jelinek <jakub@redhat.com>
242 * semantics.c (finish_goto_stmt): Call mark_rvalue_use on computed
245 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
247 Merge from apple/trunk branch on FSF servers.
249 2006-04-19 Fariborz Jahanian <fjahanian@apple.com>
252 * parser.c (cp_parser_simple_type_specifier): Don't lookup for
253 objc object types if type is scope qualified.
255 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
257 Merge from apple/trunk branch on FSF servers.
259 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
262 * lex.c (unqualified_name_lookup_error): Issue diagnostic
263 for private 'ivar' access.
265 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
267 * parser.c (cp_parser_objc_visibility_spec): Update to use visibility
268 enum, and handle @package.
270 2010-10-15 Jason Merrill <jason@redhat.com>
273 * tree.c (cp_build_qualified_type_real): Don't reuse a variant
274 with a different typedef variant of the element type.
276 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
278 merge from FSF apple 'trunk' branch.
279 2006 Fariborz Jahanian <fjahanian@apple.com>
281 Radars 4436866, 4505126, 4506903, 4517826
282 * typeck.c (finish_class_member_access_expr): Handle CLASS.property
284 (cp_build_modify_expr): Likewise.
285 * parser.c (cp_parser_objc_method_prototype_list): Handle @property.
286 (cp_parser_objc_method_definition_list): Likewise.
287 (cp_parser_objc_property_decl): New.
288 (cp_parser_objc_property_attrlist): New.
289 (cp_parser_objc_at_property): New.
291 2010-10-14 Richard Guenther <rguenther@suse.de>
294 * cp-tree.h (NULLPTR_TYPE_P): Adjust.
295 * decl.c (cxx_init_decl_processing): Build a NULLPTR_TYPE node,
297 * error.c (dump_type): Handle NULLPTR_TYPE.
298 (dump_type_prefix): Likewise.
299 (dump_type_suffix): Likewise.
300 * mangle.c (write_type): Likewise.
301 * name-lookup.c (arg_assoc_type): Likewise.
302 * rtti.c (typeinfo_in_lib_p): Likewise.
303 * pt.c (tsubst): Likewise.
305 2010-10-13 Jason Merrill <jason@redhat.com>
308 * class.c (fixup_attribute_variants): New fn.
309 * cp-tree.h: Declare it.
310 * pt.c (instantiate_class_template): Call it.
311 * semantics.c (begin_class_definition): Call it.
313 2010-10-13 Richard Henderson <rth@redhat.com>
315 * cp-lang.c (cp_eh_personality): Update call to
316 build_personality_function.
317 * except.c (choose_personality_routine): Update function comment.
319 2010-10-13 Richard Guenther <rguenther@suse.de>
321 * tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and
322 clear DECL_CHAIN of NAMESPACE_DECLs.
324 2010-10-11 Martin Jambor <mjambor@suse.cz>
327 * cp-tree.h (current_class_ref): Check that cp_function_chain is
329 * call.c (build_cxx_call): Likewise.
331 2010-10-10 Jason Merrill <jason@redhat.com>
333 * pt.c (tsubst_default_argument): Handle DEFAULT_ARG.
334 (tsubst_default_arguments): Only do this once for cloned fns.
335 (tsubst): Use typedef_variant_p. Handle LANG_TYPE. Don't
337 (tsubst_expr): Avoid calling tsubst_expr for non-expressions.
338 (tsubst_copy_and_build): Likewise.
339 (tsubst_initializer_list): Likewise.
340 (tsubst_copy): Change default to gcc_unreachable. Handle
341 OVERLOAD and PTRMEM_CST.
343 2010-10-10 Jason Merrill <jason@redhat.com>
347 * pt.c (tsubst_copy) [INTEGER_CST]: Instantiate the type.
349 2010-10-07 Andi Kleen <ak@linux.intel.com>
351 * Make-lang.in (c++_OBJS): Remove dummy-checksum.o.
352 (cc1plus-dummy): Remove.
353 (cc1plus-checksum): Change to run checksum over object files
356 2010-10-08 Joseph Myers <joseph@codesourcery.com>
358 * cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
360 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
362 * cp-tree.def: Changed type of AT_ENCODE_EXPR from tcc_unary to
364 * cxx-pretty-print.c (pp_cxx_unary_expression): Added case for
366 * error.c (dump_expr): Added case for AT_ENCODE_EXPR.
367 * pt.c (tsubst_copy): Added case for AT_ENCODE_EXPR.
368 (value_dependent_expression_p): Added case for AT_ENCODE_EXPR.
369 (type_dependent_expression_p): Added case for AT_ENCODE_EXPR.
370 * parser.c (cp_parser_objc_encode_expression): Updated comment.
372 2010-10-07 Nicola Pero <nicola@nicola.brainstorm.co.uk>
374 Merge from apple/trunk branch on FSF servers.
376 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
379 * parser.c (cp_parser_objc_interstitial_code): Recognize
380 and parse RID_NAMESPACE keyword.
382 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
384 * parser.c (cp_parser_objc_method_tail_params_opt): Peek new token after
385 finding ellipsis, before checking for attributes.
387 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
389 Merge from apple/trunk branch on FSF servers.
390 * cp-tree.def: Added AT_ENCODE_EXPR here instead of to the no
391 longer existing gcc/c-common.def.
393 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
396 * pt.c (tsubst_copy_and_build): Instantiate @endcode(T).
397 * parser.c (cp_parser_objc_encode_expression): Build a templatized
398 parse tree for @encode(T).
400 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
403 * c-common.def: Add new expression code AT_ENCODE_EXPR.
405 2010-10-06 Eric Botcazou <ebotcazou@adacore.com>
408 * typeck.c (cp_build_addr_expr_1): Add check for incomplete types in
409 code folding offsetof-like computations.
411 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
414 * parser.c (cp_parser_objc_class_interface): If no identifier
415 follows an @interface token, stop parsing the interface after
417 (cp_parser_objc_class_implementation): If no identifier follows an
418 @implementation token, stop parsing the implementation after
421 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
424 * parser.c (cp_parser_objc_method_keyword_params): If the required
425 colon is not found while parsing parameters, stop parsing them.
427 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
430 * parser.c (cp_parser_objc_class_ivars): Do not eat the EOF or
431 @end after detecting it. Print an error if @end is found without
433 (cp_parser_objc_method_prototype_list): Do not eat the EOF after
434 detecting it. Fixed reading the next token when continuing
435 because of an error in a method signature. Print an error if EOF
436 is found without an '@end'.
437 (cp_parser_objc_method_definition_list): Same change.
439 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
441 Merge from apple/trunk branch on FSF servers:
443 2005-10-17 Fariborz Jahanian <fjahanian@apple.com>
446 * parser.c (cp_parser_objc_method_keyword_params): Check for valid
447 method parameters and issue error.
448 (cp_parser_objc_method_definition_list): Check for invalid tokens
449 which cannot start a function definition.
451 2005-10-14 Fariborz Jahanian <fjahanian@apple.com>
454 * parser.c (cp_parser_objc_message_args): Check for missing message
455 arguments and syntax error.
457 2005-10-13 Fariborz Jahanian <fjahanian@apple.com>
460 * parser.c (cp_parser_objc_class_ivars): Check for @end/eof while
463 2005-08-15 Ziemowit Laski <zlaski@apple.com>
466 * parser.c (cp_parser_objc_interstitial_code): Catch stray
467 '{' and '}' tokens and issue appropriate errors.
469 2005-08-02 Ziemowit Laski <zlaski@apple.com>
472 (cp_parser_statement_seq_opt): In addition to '}' and
473 end-of-file, a statement sequence may also be terminated
476 2010-10-05 Joseph Myers <joseph@codesourcery.com>
478 * cp-tree.h (cxx_print_error_function,
479 cxx_initialize_diagnostics): Declare using diagnostic_context
482 2010-10-04 Andi Kleen <ak@linux.intel.com>
484 * Make-lang.in (g++, cc1plus): Add + to build rule.
486 2010-10-04 Jason Merrill <jason@redhat.com>
488 * tree.c (decl_storage_duration): New.
489 * cp-tree.h: Declare it.
490 (duration_kind): Return values.
492 2010-10-03 Jason Merrill <jason@redhat.com>
494 * typeck.c (require_complete_type_sfinae): Add complain parm to...
495 (require_complete_type): ...this function.
496 (cp_build_array_ref, convert_arguments): Use it.
497 (convert_for_initialization, cp_build_modify_expr): Likewise.
498 * cp-tree.h: Declare it.
499 * call.c (build_over_call): Use it.
501 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
503 merge from FSF 'apple/trunk' branch.
504 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
507 * cp/parser.c (cp_parser_objc_interstitial_code): For
508 @optional/@required set the optional/required flag.
510 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
512 * parser.c (cp_lexer_get_preprocessor_token): Tidied up comments
513 and indentation when finding an Objective-C++ CPP_AT_NAME token.
515 2010-09-29 Richard Guenther <rguenther@suse.de>
517 * cp-tree.h (CP_DECL_CONTEXT): Check DECL_FILE_SCOPE_P.
518 (CP_TYPE_CONTEXT): Similar.
519 (FROB_CONTEXT): Frob global_namespace to the global
520 TRANSLATION_UNIT_DECL.
521 * decl.c (cxx_init_decl_processing): Build a TRANSLATION_UNIT_DECL,
522 set DECL_CONTEXT of global_namespace to it.
523 (start_decl): Use CP_DECL_CONTEXT and test TYPE_P
524 instead of zeroing context.
525 (cp_finish_decl): Use DECL_FILE_SCOPE_P.
526 (grokfndecl): Likewise.
527 (start_preparsed_function): Likewise.
528 * name-lookup.c (maybe_push_decl): Use DECL_NAMESPACE_SCOPE_P.
529 (namespace_binding): Use SCOPE_FILE_SCOPE_P.
530 * pt.c (template_class_depth): Use CP_TYPE_CONTEXT.
531 (is_specialization_of_friend): Use CP_DECL_CONTEXT.
532 (push_template_decl_real): Likewise.
533 (tsubst_friend_class): Likewise. Adjust context comparisons.
534 (instantiate_class_template): Use CP_TYPE_CONTEXT.
535 (tsubst): Do not substitute into TRANSLATION_UNIT_DECL.
536 * cxx-pretty-print.c (pp_cxx_nested_name_specifier): Use
539 2010-09-29 Yao Qi <yao@codesourcery.com>
541 * decl.c (get_atexit_node): Fix typo.
543 2010-09-28 Jason Merrill <jason@redhat.com>
545 * tree.c (lvalue_kind): Rename from lvalue_p_1, make nonstatic.
546 (real_lvalue_p): Take const_tree.
548 * typeck.c (lvalue_or_else): Make temporary arg a permerror.
549 (cp_build_addr_expr_1): Likewise.
551 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
553 Partially merged from apple/trunk branch on FSF servers:
554 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
555 Radar 3803157 (method attributes)
557 * parser.c (cp_parser_objc_method_keyword_params): Handle attributes.
558 (cp_parser_objc_method_tail_params_opt): Likewise.
559 (cp_parser_objc_method_signature): Likewise.
560 (cp_parser_objc_method_maybe_bad_prefix_attributes): New.
561 (cp_parser_objc_method_prototype_list): Handle attributes.
562 (cp_parser_objc_method_definition_list): Likewise.
564 2010-09-28 Richard Henderson <rth@redhat.com>
566 * cp-lang.c: Include "target.h".
567 (cp_eh_personality): Use targetm.except_unwind_info.
568 * Make-lang.in (cp-lang.o): Update deps.
570 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
572 * parser.c (cp_parser_objc_valid_prefix_attributes): New.
573 (cp_parser_declaration): Parse prefix attributes for ObjC++.
574 (cp_parser_objc_protocol_declaration): Handle attributes.
575 (cp_parser_objc_class_interface): Likewise.
576 (cp_parser_objc_declaration): Likewise.
578 2010-09-27 Jason Merrill <jason@redhat.com>
580 Require lvalues as specified by the standard.
581 * typeck.c (lvalue_or_else): Use real_lvalue_p.
582 (cp_build_addr_expr_1): Split out of cp_build_unary_op.
583 (cp_build_addr_expr, cp_build_addr_expr_strict): Interfaces.
584 (decay_conversion, get_member_function_from_ptrfunc): Adjust.
585 (build_x_unary_op, build_reinterpret_cast_1): Adjust.
586 (build_const_cast_1): Adjust.
587 * cp-tree.h: Declare new fns.
588 * call.c (build_this, convert_like_real, build_over_call): Adjust.
589 (initialize_reference): Adjust.
590 * class.c (build_base_path, convert_to_base_statically): Adjust.
591 (build_vfn_ref, resolve_address_of_overloaded_function): Adjust.
592 * cvt.c (build_up_reference, convert_to_reference): Adjust.
593 * decl.c (register_dtor_fn): Adjust.
594 * decl2.c (build_offset_ref_call_from_tree): Adjust.
595 * except.c (initialize_handler_parm): Adjust.
596 * init.c (build_offset_ref, build_delete, build_vec_delete): Adjust.
597 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Adjust.
598 * tree.c (stabilize_expr): Adjust.
600 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
602 Merge from apple/trunk branch on FSF servers:
604 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
607 * typeck.c (composite_pointer_type): Call objc_have_common_type
608 when comparing two objective-c pointer types.
610 2005-07-18 Ziemowit Laski <zlaski@apple.com>
613 * call.c (standard_conversion): Do not issue warnings when
614 comparing ObjC pointer types.
616 2005-06-22 Ziemowit Laski <zlaski@apple.com>
619 * call.c (standard_conversion): Allow for a pointer conversion
620 between any two ObjC pointer types.
621 * typeck.c (composite_pointer_type): Determine common type
622 for two ObjC pointer types.
624 2010-09-24 Jan Hubicka <jh@suse.cz>
626 * decl.c (finish_function): Use decl_replaceable_p
627 * method.c (make_alias_for_thunk): Update call of
628 cgraph_same_body_alias.
630 2010-09-24 Jason Merrill <jason@redhat.com>
632 * decl.c (compute_array_index_type): Remember type dependence of
634 * pt.c (dependent_type_p_r): Don't recompute it here.
636 * error.c (dump_expr) [CASE_CONVERT]: Print conversion between
637 reference and pointer to the same type as "*" or "&".
639 2010-09-24 Nicola Pero <nicola.pero@meta-innovation.com>
641 * typeck.c (warn_args_num): Use warning 'too many arguments to
642 method [methodname]' for an Objective-C method instead of the less
643 satisfactory 'too many arguments to function' (with no method
646 2010-09-21 Jason Merrill <jason@redhat.com>
648 * mangle.c (write_expression) [SCOPE_REF]: Only do -fabi-version=1
649 special handling if we know the member.
651 2010-09-18 Jason Merrill <jason@redhat.com>
653 * call.c (compare_ics): Do lvalue/rvalue reference binding
654 comparison for ck_list, too.
656 2010-09-15 Jason Merrill <jason@redhat.com>
658 * semantics.c (finish_id_expression): Diagnose use of function
659 parms in evaluated context outside function body.
661 * decl2.c (grokbitfield): Diagnose non-integral width.
663 * call.c (convert_like_real): Use the underlying type of the
664 reference for the temporary.
666 2010-09-15 Jakub Jelinek <jakub@redhat.com>
669 * class.c (build_vtbl_initializer): Use fn instead of init's operand
670 as first argument to FDESC_EXPR.
672 2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
675 * decl.c (grokdeclarator): Check build_memfn_type return value
678 2010-09-13 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
680 * semantics.c (finish_for_stmt): Always test flag_new_for_scope.
681 (begin_range_for_stmt): Likewise.
683 2010-09-11 Rodrigo Rivas <rodrigorivascosta@gmail.com>
685 Implement range-based for-statements.
686 * cp-tree.def (RANGE_FOR_STMT): New.
687 * cp-tree.h (RANGE_FOR_DECL, RANGE_FOR_EXPR, RANGE_FOR_BODY): New.
688 (cp_convert_range_for): Declare.
689 * pt.c (tsubst_expr): Add RANGE_FOR_STMT.
690 (tsubst_copy_and_build): perform_koenig_lookup takes extra argument.
691 * semantics.c (begin_range_for_stmt): New.
692 (finish_range_for_decl): New.
693 (finish_for_stmt): Accept also RANGE_FOR_STMT.
694 (perform_koenig_lookup): Add extra argument include_std.
695 * parser.c (cp_parser_c_for): New with code from
696 cp_parser_iteration_statement().
697 (cp_parser_range_for): New.
698 (cp_convert_range_for): New.
699 (cp_parser_iteration_statement): Add range-for support.
700 (cp_parser_condition): Adjust comment.
701 (cp_parser_postfix_expression): perform_koenig_lookup takes extra
703 * dump.c (cp_dump_tree): Add RANGE_FOR_STMT.
704 * cxx-pretty-print.c: Likewise.
705 * lex.c (cxx_init): Likewise.
706 * name-lookup.c (lookup_function_nonclass): Add extra argument
708 (lookup_arg_dependent): Likewise.
709 * name-lookup.h: Likewise.
711 2010-09-10 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
714 * error.c (maybe_warn_cpp0x): Add new warning
715 CPP0X_INLINE_NAMESPACES.
716 * parser.c (cp_parser_namespace_definition): Likewise.
717 * cp-tree.h (cpp0x_warn_str): Likewise.
719 2010-09-10 Richard Guenther <rguenther@suse.de>
721 * decl.c (reshape_init_vector): For VECTOR_TYPEs, use
722 TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE.
724 2010-09-10 Jan Hubicka <jh@suse.cz>
726 PR tree-optimization/45605
727 * cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in
730 2010-09-08 Jakub Jelinek <jakub@redhat.com>
733 * pt.c (tsubst) <case INTEGER_TYPE>: Call mark_rvalue_use
734 before calling fold_decl_constant_value.
736 2010-09-07 Arnaud Charlet <charlet@adacore.com>
738 * cp-tree.h (build_enumerator): Add new location_t parameter.
739 (build_lang_decl_loc): New function.
740 * decl.c (build_enumerator): New parameter loc. Use it when calling
741 build_decl. Replace build_lang_decl with build_lang_decl_loc.
742 * pt.c (tsubst_enum): Adjust call to build_enumerator.
743 * parser.c (cp_parser_enumerator_definition): Ditto.
744 * lex.c (build_lang_decl_loc): New function.
746 2010-09-06 Dodji Seketeli <dodji@redhat.com>
751 * tree.c (strip_typedefs): Strip typedefs from the context of
754 2010-09-06 Mark Mitchell <mark@codesourcery.com>
756 * typeck.c (cp_build_binary_op): Call do_warn_double_promotion.
757 * call.c (build_conditional_expr): Likewise.
758 (convert_arg_to_ellipsis): Likewise.
760 2010-09-06 Arnaud Charlet <charlet@adacore.com>
762 * parser.c (make_pointer_declarator, make_reference_declarator,
763 make_call_declarator, make_array_declarator): Set declarator->id_loc.
764 (cp_parser_init_declarator): Adjust location of decl if appropriate.
766 2010-09-06 Jason Merrill <jason@redhat.com>
768 * call.c (implicit_conversion): Fix value-init of enums.
769 (convert_like_real): Likewise.
771 * decl.c (cp_finish_decl): Don't change init for auto deduction.
773 * pt.c (fold_non_dependent_expr_sfinae): Split out from...
774 (fold_non_dependent_expr): ...here.
775 (convert_nontype_argument): Use it. Take complain parm.
776 Use perform_implicit_conversion instead of ocp_convert.
777 Allow cv-qual changes.
778 (convert_template_argument): Pass complain down.
779 (tsubst_template_arg): Suppress constant expression warnings.
782 * method.c (synthesized_method_walk): In constructors, also check
783 subobject destructors.
785 * semantics.c (finish_compound_literal): Always build a
788 2010-08-30 Paolo Carlini <paolo.carlini@oracle.com>
791 * decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs.
793 2010-08-30 Jakub Jelinek <jakub@redhat.com>
796 * parser.c (cp_parser_omp_atomic): Handle boolean
797 {PRE,POST}_INCREMENT.
799 2010-08-29 Jason Merrill <jason@redhat.com>
802 * parser.c (cp_parser_parameter_declaration): Pop parameter decls
803 after tentative parsing.
805 2010-08-22 Joseph Myers <joseph@codesourcery.com>
807 * Make-lang.in (g++spec.o): Update dependencies.
808 * g++spec.c: Include opts.h
809 (MATH_LIBRARY, LIBSTDCXX): Remove initial "-l".
810 (lang_specific_driver): Use cl_decoded_option structures.
812 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
814 * call.c: Use FOR_EACH_VEC_ELT.
819 * except.c: Likewise.
820 * mangle.c: Likewise.
821 * method.c: Likewise.
822 * name-lookup.c: Likewise.
823 * parser.c: Likewise.
826 * semantics.c: Likewise.
827 * typeck2.c: Likewise.
829 2010-08-19 Jason Merrill <jason@redhat.com>
831 * call.c (reference_related_p): Check for error_mark_node.
832 (add_function_candidate): Check it instead of
833 same_type_ignoring_top_level_qualifiers_p.
836 * init.c (build_new_1): Don't use build_value_init in a template.
837 (build_value_init): Make sure we don't.
840 * cp-gimplify.c (cp_gimplify_expr): Also remove assignment
841 of empty class CONSTRUCTOR.
843 * except.c (pending_noexcept, pending_noexcept_checks): New.
844 (perform_deferred_noexcept_checks): New.
845 (maybe_noexcept_warning): Split from...
846 (finish_noexcept_expr): ...here. Adjust.
847 * decl2.c (cp_write_global_declarations): Call
848 perform_deferred_noexcept_checks.
849 * cp-tree.h: And declare it.
851 2010-08-18 Nathan Froyd <froydnj@codesourcery.com>
854 * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to
857 2010-08-17 Kai Tietz <kai.tietz@onevision.com>
859 * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
860 or if -fms-extensions is enabled check, check permissive.
862 2010-08-09 Jason Merrill <jason@redhat.com>
865 * pt.c (lookup_template_class): Don't re-coerce outer parms.
867 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
869 * call.c (add_builtin_candidates): Use VECs for local variable
870 `types'. Adjust remainder of function accordingly.
872 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
874 * name-lookup.c (is_associated_namespace): Convert local variables
875 to be VECs instead of TREE_LISTs.
877 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
879 * tree.c (varargs_function_p): Use stdarg_p.
881 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
883 * parser.c (cp_default_arg_entry): Declare. Declare a VEC of it.
884 (cp_unparsed_functions_entry): Declare. Declare a VEC of it.
885 (cp_parser) [unparsed_functions_queues]: Rename to unparsed_queues.
886 Change type to a VEC.
887 (unparsed_funs_with_default_args): Define.
888 (unparsed_funs_with_definitions): Define.
889 (push_unparsed_function_queues): New function.
890 (cp_parser_new): Call it.
891 (pop_unparsed_function_queues): New function.
892 (cp_parser_class_specifier): Adjust processing of unparsed functions.
893 (cp_parser_template_declaration_after_export): Use VEC_safe_push.
894 (cp_parser_save_member_function_body): Likewise.
895 (cp_parser_late_parsing_for_member): Call push_unparsed_function_queues
896 and pop_unparsed_function_queues.
897 (cp_parser_late_parsing_default_args): Likewise.
898 (cp_parser_save_default_args): Use VEC_safe_push.
900 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
902 * name-lookup.h (cp_label_binding): Declare. Declare a VEC type
904 (cp_binding_level): Convert shadowed_labels and dead_vars_from_for
906 * decl.c (poplevel): Adjust for type changes.
907 (declare_local_label): Likewise.
909 2010-08-06 Jason Merrill <jason@redhat.com>
911 * typeck.c (complete_type_or_maybe_complain): Split out from...
912 (complete_type_or_else): Here.
913 (build_class_member_access_expr): Call it.
914 (finish_class_member_access_expr): Likewise.
915 * call.c (build_special_member_call): Likewise.
916 * cvt.c (build_expr_type_conversion): Likewise.
917 * init.c (build_new): Likewise.
918 * typeck2.c (build_functional_cast): Likewise.
919 * cp-tree.h: Declare it.
921 * init.c (build_value_init): Add complain parm.
922 (build_value_init_noctor): Likewise.
923 (perform_member_init): Pass it.
924 (expand_aggr_init_1): Likewise.
925 (build_new_1): Likewise.
926 (build_vec_init): Likewise.
927 * pt.c (tsubst_expr): Likewise.
928 * typeck2.c (build_functional_cast): Likewise.
930 * tree.c (build_target_expr_with_type): Handle error_mark_node.
932 * typeck.c (decay_conversion): Any expression with type nullptr_t
935 2010-07-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
938 * decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED.
940 2010-07-27 Jason Merrill <jason@redhat.com>
942 * pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR
943 from build_value_init.
944 * init.c (build_value_init_noctor): Give error for unknown array
947 2010-07-27 Joseph Myers <joseph@codesourcery.com>
949 * cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
951 2010-07-27 Joseph Myers <joseph@codesourcery.com>
953 * cp-objcp-common.c (cxx_initialize_diagnostics): First call
954 c_common_initialize_diagnostics.
955 * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK,
956 LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
958 2010-07-21 Jason Merrill <jason@redhat.com>
960 * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
962 * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
965 2010-07-20 Jeffrey Yasskin <jyasskin@google.com>
968 * pt.c (instantiate_class_template): Propagate the template's
969 location to its instance.
971 2010-07-20 Jason Merrill <jason@redhat.com>
974 * pt.c (tsubst_copy_and_build): Rework last change.
977 * pt.c (tsubst_copy_and_build): Handle partial substitution of
980 2010-07-19 Jason Merrill <jason@redhat.com>
983 * semantics.c (finish_decltype_type): Correct decltype
984 of parenthesized rvalue reference variable.
987 * tree.c (cp_tree_equal): Compare type of *CAST_EXPR.
988 * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR.
990 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com>
993 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t
995 * cp-tree.h: Adjust declaration.
996 * init.c (perform_member_init): Adjust caller.
997 * decl.c (grok_reference_init, cp_finish_decl): Likewise.
998 * typeck2.c (store_init_value): Likewise.
999 (build_functional_cast): Pass complain argument to
1000 build_x_compound_expr_from_list.
1002 2010-07-16 Jason Merrill <jason@redhat.com>
1005 * pt.c (process_partial_specialization): Diagnose partial
1006 specialization after instantiation.
1007 (most_specialized_class): Add complain parm.
1009 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.
1011 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1013 * init.c (build_new_1): Use cp_build_function_call_nary instead of
1014 cp_build_function_call.
1016 2010-07-15 Jason Merrill <jason@redhat.com>
1019 * call.c (add_function_candidate): If we're working on an implicit
1020 declaration, don't consider candidates that won't match.
1021 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
1022 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
1025 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1026 (TYPE_HAS_USER_OPEQ): New.
1027 * decl.c (grok_special_member_properties): Set it.
1028 * class.c (add_implicitly_declared_members): Don't lazily declare
1029 constructors/operator= if a base or member has a user-declared one.
1030 (check_bases_and_members, check_bases): Adjust.
1031 (check_field_decls, check_field_decl): Adjust.
1033 2010-07-15 Anatoly Sokolov <aesok@post.ru>
1035 * decl.c (integer_three_node): Remove.
1036 (cxx_init_decl_processing): Do not initialize the integer_three_node.
1037 * cp-tree.h (integer_three_node): Remove.
1039 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1041 * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
1043 * class.c: Likewise.
1044 * cp-gimplify.c: Likewise.
1046 * decl2.c: Likewise.
1048 * mangle.c: Likewise.
1049 * name-lookup.c: Likewise.
1050 * optimize.c: Likewise.
1051 * parser.c: Likewise.
1054 * search.c: Likewise.
1055 * semantics.c: Likewise.
1056 * typeck.c: Likewise.
1057 * typeck2.c: Likewise.
1059 2010-07-14 Jason Merrill <jason@redhat.com>
1061 * init.c (sort_mem_initializers): Rename "field_type" to "ctx".
1062 (build_field_list): Cache field type.
1064 Implement C++0x unrestricted unions (N2544)
1065 * class.c (check_field_decl): Loosen union handling in C++0x.
1066 * method.c (walk_field_subobs): Split out from...
1067 (synthesized_method_walk): ...here. Set msg before loops.
1068 (process_subob_fn): Check for triviality in union members.
1069 * init.c (sort_mem_initializers): Splice out uninitialized
1070 anonymous unions and union members.
1071 (push_base_cleanups): Don't automatically destroy anonymous unions
1074 2010-07-13 Jason Merrill <jason@redhat.com>
1077 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1078 (TYPE_HAS_USER_OPEQ): New.
1079 * decl.c (grok_special_member_properties): Set it.
1080 * class.c (add_implicitly_declared_members): Don't lazily declare
1081 constructors/operator= if a base or member has a user-declared one.
1082 (check_bases_and_members, check_bases): Adjust.
1083 (check_field_decls, check_field_decl): Adjust.
1084 * method.c (synthesized_method_walk): Initialize check_vdtor.
1087 * mangle.c (write_type): Canonicalize.
1088 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
1089 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
1091 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
1094 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
1096 * typeck.c (get_delta_difference): Update prototype, add a
1097 tsubst_flags_t parameter; update get_delta_difference_1 calls and
1098 add checks for error_mark_node.
1099 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
1100 parameter; update lookup_base call.
1101 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
1102 parameter; update get_delta_difference call and add check for
1104 (convert_ptrmem): Update prototype, add a tsubst_flags_t
1105 parameter; update get_delta_difference call and add check for
1106 error_mark_node; update build_ptrmemfunc call.
1107 (build_static_cast_1): Adjust convert_ptrmem call.
1108 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
1109 (cp_build_unary_op): Adjust build_ptrmemfunc call.
1110 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
1111 and build_ptrmemfunc calls.
1112 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
1114 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
1117 * call.c (build_temp): Add tsubst_flags_t complain parameter;
1118 adjust build_special_member_call call, pass complain.
1119 (convert_like_real): Adjust build_temp call, pass complain.
1121 2010-07-09 Jason Merrill <jason@redhat.com>
1124 * cp-tree.h (BV_LOST_PRIMARY): New macro.
1125 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
1126 Set BV_LOST_PRIMARY.
1127 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
1129 2010-07-08 Jason Merrill <jason@redhat.com>
1132 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
1133 virtual bases for covariant thunks.
1135 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
1137 * cp-tree.h: Do not include toplev.h.
1139 2010-07-06 Jason Merrill <jason@redhat.com>
1142 * call.c (is_std_init_list): Look through typedefs.
1145 * init.c (build_offset_ref): If scope isn't dependent,
1146 don't exit early. Look at TYPE_MAIN_VARIANT.
1147 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
1149 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
1151 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
1153 * cp-tree.h (impl_conv_void): New type.
1154 (convert_to_void): Adjust prototype.
1155 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
1156 diagnostic for easy translation. Change caller.
1157 * typeck.c: Update call to convert_to_void.
1158 * semantics.c: Likewise.
1161 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
1163 * decl.c (cp_finish_decl): Call add_local_decl.
1164 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
1166 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
1168 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
1171 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
1174 * parser.c (cp_parser_primary_expression): Error if local template is
1177 2010-07-02 Le-Chun Wu <lcwu@google.com>
1180 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
1181 (variable or type) shadows another type.
1183 2010-07-02 Jakub Jelinek <jakub@redhat.com>
1186 * typeck.c (convert_for_assignment): When converting a convertible
1187 vector type or objc++ types, call mark_rvalue_use.
1188 * typeck2.c (build_m_component_ref): Use return values from
1189 mark_rvalue_use or mark_lvalue_use.
1190 * class.c (build_base_path): Likewise.
1191 * call.c (build_conditional_expr): Likewise.
1193 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1196 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
1199 2010-07-01 Richard Guenther <rguenther@suse.de>
1201 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
1202 predicate we are looking for, allow non-gimplified
1205 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1208 * typeck.c (cp_build_unary_op): Early return error_mark_node when
1209 arg is NULL_TREE too.
1210 * call.c (convert_class_to_reference): Return error_mark_node when
1213 2010-06-30 Michael Matz <matz@suse.de>
1215 * repo.c (finish_repo): Fix typo.
1217 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1219 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
1221 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1223 * repo.c (pending_repo): Change type to a VEC.
1224 (finish_repo): Adjust for new type of pending_repo.
1225 (repo_emit_p): Likewise.
1227 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
1229 * tree.c: Include gimple.h. Do not include tree-flow.h
1230 * decl.c: Do not include tree-flow.h
1231 * Make-lang.in: Adjust dependencies.
1233 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1235 * decl.c (incomplete_var): Declare. Declare VECs containing them.
1236 (incomplete_vars): Adjust comment. Change type to a VEC.
1237 (maybe_register_incomplete_var): Adjust for new type.
1238 (complete_vars): Adjust iteration over incomplete_vars.
1240 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1242 * decl.c (struct named_label_entry): Change type of bad_decls field
1244 (poplevel_named_label_1): Adjust for new type of bad_decls.
1245 (check_goto): Likewise.
1247 2010-06-29 Jason Merrill <jason@redhat.com>
1249 Enable implicitly declared move constructor/operator= (N3053).
1250 * class.c (add_implicitly_declared_members): A class with no
1251 explicitly declared copy or move constructor gets both declared
1252 implicitly, and similarly for operator=.
1253 (check_bases): A type with no copy ctor does not inhibit
1254 a const copy ctor in a derived class. It does mean the derived
1256 (check_field_decl): Likewise.
1257 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
1258 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
1259 (trivially_copyable_p): Likewise.
1260 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
1261 * class.c (finish_struct_bits): Likewise.
1262 * tree.c (build_target_expr_with_type): Likewise.
1263 * typeck2.c (store_init_value): Likewise.
1265 Enable implicitly deleted functions (N2346)
1266 * class.c (check_bases_and_members): Adjust lambda flags.
1267 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
1269 * decl2.c (mark_used): Adjust error for use of deleted function.
1271 Machinery to support implicit delete/move.
1272 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
1273 has_complex_move_ctor, has_complex_move_assign bitfields.
1274 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
1275 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
1276 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
1277 (enum special_function_kind): Add sfk_move_assignment.
1278 (LOOKUP_SPECULATIVE): New.
1279 * call.c (build_over_call): Return early if it's set.
1280 (build_over_call): Use trivial_fn_p.
1281 * class.c (check_bases): If the base has no default constructor,
1282 the derived one is non-trivial. Handle move ctor/op=.
1283 (check_field_decl): Likewise.
1284 (check_bases_and_members): Handle move ctor/op=.
1285 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
1286 (type_has_move_constructor, type_has_move_assign): New.
1287 * decl.c (grok_special_member_properties): Handle move ctor/op=.
1288 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
1289 (trivial_fn_p): New.
1290 (do_build_copy_constructor): Use it.
1291 (do_build_assign_ref): Likewise. Handle move assignment.
1292 (build_stub_type, build_stub_object, locate_fn_flags): New.
1293 (locate_ctor): Use locate_fn_flags.
1294 (locate_copy, locate_dtor): Remove.
1295 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
1296 (process_subob_fn, synthesized_method_walk): New.
1297 (maybe_explain_implicit_delete): New.
1298 (implicitly_declare_fn): Use synthesized_method_walk,
1299 type_has_trivial_fn, and type_set_nontrivial_flag.
1300 (defaulted_late_check): Set DECL_DELETED_FN.
1301 (defaultable_fn_check): Handle sfk_move_assignment.
1302 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
1303 implicitly deleted move ctor/op=.
1304 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
1305 (lookup_fnfields_slot): New.
1306 * semantics.c (omp_clause_info_fndecl): Remove.
1307 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
1308 get_copy_assign, trivial_fn_p.
1309 (trait_expr_value): Adjust call to locate_ctor.
1310 * tree.c (special_function_p): Handle sfk_move_assignment.
1312 * class.c (type_has_virtual_destructor): New.
1313 * cp-tree.h: Declare it.
1314 * semantics.c (trait_expr_value): Use it.
1316 * call.c (build_over_call): Only give warnings with tf_warning.
1318 * name-lookup.c (pop_scope): Handle NULL_TREE.
1320 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
1321 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
1322 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
1323 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
1324 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
1325 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
1326 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
1327 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
1328 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
1329 (sfk_assignment_operator): Rename to sfk_copy_assignment.
1330 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
1331 * search.c, semantics.c, tree.c: Adjust.
1333 * pt.c (dependent_scope_ref_p): Remove.
1334 (value_dependent_expression_p): Don't call it.
1335 (type_dependent_expression_p): Here either.
1336 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
1337 if the scope isn't dependent.
1339 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
1343 * pt.c (has_value_dependent_address): New.
1344 (value_dependent_expression_p): Check it.
1345 (convert_nontype_argument): Likewise. Call decay_conversion before
1346 folding if we want a pointer.
1347 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
1348 scope is the current instantiation.
1350 2010-06-28 Jakub Jelinek <jakub@redhat.com>
1353 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
1356 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
1358 * init.c: Do not include except.h.
1361 * cp-lang.c: Likewise.
1363 * semantics.c: Likewise.
1364 * decl2.c: Likewise.
1365 * except.c: Likewise.
1366 (init_exception_processing): Do not set the removed
1367 lang_protect_cleanup_actions here.
1368 (cp_protect_cleanup_actions): Make non-static and remove prototype.
1369 (doing_eh): New, moved from except.c but removed the do_warning flag.
1370 (expand_start_catch_block): Update doing_eh call.
1371 (expand_end_catch_block): Likewise.
1372 (build_throw): Likewise.
1373 * cp-tree.h: Prototype cp_protect_cleanup_actions.
1374 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
1375 cp_protect_cleanup_actions.
1376 * Make-lang.in: Update dependencies.
1378 2010-06-26 Jason Merrill <jason@redhat.com>
1380 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
1381 constructor called with a single argument that takes a reference
1382 to the constructor's class.
1383 (BAD_CONVERSION_RANK): New.
1384 (compare_ics): Use it to compare bad ICSes.
1386 2010-06-25 Joseph Myers <joseph@codesourcery.com>
1388 * lang-specs.h: Remove +e handling.
1390 2010-06-24 Andi Kleen <ak@linux.intel.com>
1392 * parser.c: (cp_parser_question_colon_clause):
1393 Switch to use cp_lexer_peek_token.
1394 Call warn_for_omitted_condop. Call pedwarn for omitted
1397 2010-06-22 Jakub Jelinek <jakub@redhat.com>
1400 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
1401 datum and mark_rvalue_use on component.
1404 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
1405 the CALL_EXPR has no arguments.
1407 2010-06-21 Jason Merrill <jason@redhat.com>
1409 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
1411 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
1414 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
1416 * name-lookup.c (struct arg_lookup): Convert namespaces and
1417 classes fields to VEC.
1418 (arg_assoc_namespace): Adjust for new type of namespaces.
1419 (arg_assoc_class): Adjust for new type of classes.
1420 (lookup_arg_dependent): Use make_tree_vector and
1421 release_tree_vector.
1422 * typeck2.c (build_x_arrow): Use vec_member.
1424 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
1427 * error.c (dump_decl): Better wording for anonymous namespace.
1429 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
1431 * class.c (build_vtbl_initializer): Adjust computation of new_position
1432 and which entry to add padding for.
1434 2010-06-16 Jason Merrill <jason@redhat.com>
1436 * except.c (check_noexcept_r): Return the problematic function.
1437 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
1438 * pt.c (tsubst_copy_and_build): Pass it.
1439 * parser.c (cp_parser_unary_expression): Likewise.
1440 * cp-tree.h: Adjust prototype.
1442 * method.c (defaulted_late_check): Give the defaulted method
1443 the same exception specification as the implicit declaration.
1445 2010-06-15 Jason Merrill <jason@redhat.com>
1447 * class.c (add_implicitly_declared_members): Implicit assignment
1448 operators can also be virtual overriders.
1449 * method.c (lazily_declare_fn): Likewise.
1451 * call.c (convert_like_real): Give "initializing argument of"
1452 information for ambiguous conversion. Give source position
1455 * call.c (print_z_candidates): Do print viable deleted candidates.
1456 (joust): Don't choose a deleted function just because its worst
1457 conversion is better than another candidate's worst.
1459 * call.c (convert_like_real): Don't complain about
1460 list-value-initialization from an explicit constructor.
1462 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
1463 DECL_SOURCE_LOCATION directly.
1465 * class.c (type_has_user_provided_default_constructor): Use
1468 * call.c (is_subseq): Handle ck_aggr, ck_list.
1469 (compare_ics): Treat an aggregate or ambiguous conversion to the
1470 same type as involving the same function.
1472 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
1474 * typeck.c (convert_for_assignment): Fix comment. Change message
1475 format from %d to %qP.
1476 (convert_for_initialization): Fix comment.
1478 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
1480 * cp-tree.h (expr_list_kind): New type.
1481 (impl_conv_rhs): New type.
1482 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
1484 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
1485 diagnostics for easy translation. Change caller.
1486 (convert_for_initialization): Use impl_conv_rhs and change caller.
1487 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
1488 diagnostics for easy translation. Change caller.
1489 * decl.c (bad_spec_place): New enum.
1490 (bad_specifiers): Use it and emit the diagnostics for easy
1491 translation. Change caller.
1492 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
1494 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1496 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
1498 * decl2.c (cp_write_global_declarations): Adjust for new type of
1499 decl_namespace_list.
1500 * name-lookup.c (current_decl_namespace): Likewise.
1501 (push_decl_namespace): Likewise.
1502 (pop_decl_namespace): Likewise.
1504 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1506 * call.c (build_java_interface_fn_ref): Call build_function_type_list
1507 instead of build_function_type.
1508 * decl.c (cxx_init_decl_processing): Likewise.
1509 (declare_global_var): Likewise.
1510 (get_atexit_node): Likewise.
1511 (expand_static_init): Likewise.
1512 * decl2.c (start_objects): Likewise.
1513 (start_static_storage_duration_function): Likewise.
1514 * except.c (init_exception_processing): Likewise.
1515 (build_exc_ptr): Likewise.
1516 (build_throw): Likewise.
1517 * rtti.c (throw_bad_cast): Likewise.
1518 (throw_bad_typeid): Likewise.
1519 (build_dynamic_cast_1): Likewise.
1521 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1523 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
1524 (build_op_delete_call): Likewise.
1525 (build_over_call): Likewise.
1526 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1527 * pt.c (process_partial_specialization): Likewise.
1528 (tsubst_template_args): Likewise.
1529 * semantics.c (finish_asm_stmt): Likewise.
1531 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
1533 * decl.c (record_key_method_defined): New, broken out of ...
1534 (finish_function): ... here. Call it.
1535 (start_decl): Treat aliases as definitions.
1537 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1539 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
1541 * pt.c (maybe_process_partial_specialization): Likewise.
1542 (register_specialization): Likewise.
1543 (add_pending_template): Likewise.
1544 (lookup_template_class): Likewise.
1545 (push_tinst_level): Likewise.
1547 * parser.c (cp_lexer_new_main): Likewise.
1548 (cp_lexer_new_from_tokens): Likewise.
1549 (cp_token_cache_new): Likewise.
1550 (cp_parser_context_new): Likewise.
1551 (cp_parser_new): Likewise.
1552 (cp_parser_nested_name_specifier_opt): Likewise.
1553 (cp_parser_template_id): Likewise.
1555 * name-lookup.c (binding_entry_make): Likewise.
1556 (binding_table_construct): Likewise.
1557 (binding_table_new): Likewise.
1558 (cxx_binding_make): Likewise.
1559 (pushdecl_maybe_friend): Likewise.
1560 (begin_scope): Likewise.
1561 (push_to_top_level): Likewise.
1563 * lex.c (init_reswords): Likewise.
1564 (retrofit_lang_decl): Likewise.
1565 (cxx_dup_lang_specific_decl): Likewise.
1566 (copy_lang_type): Likewise.
1567 (cxx_make_type): Likewise.
1569 * decl.c (make_label_decl): Likewise.
1570 (check_goto): Likewise.
1571 (start_preparsed_function): Likewise.
1572 (save_function_data): Likewise.
1574 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
1576 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
1578 * class.c (finish_struct_1): Likewise.
1580 * cp-tree.h (struct lang_type): Add variable_size GTY option.
1581 (struct lang_decl): Likewise.
1583 * parser.c (cp_parser_new): Update comment to not reference
1586 2010-06-07 Jason Merrill <jason@redhat.com>
1589 * error.c (dump_parameters): Mask out TFF_SCOPE.
1590 (dump_simple_decl): Don't print the scope of a PARM_DECL.
1591 (dump_scope): Remove no-op mask.
1594 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
1596 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
1597 * init.c (build_offset_ref): Use it.
1598 * pt.c (maybe_process_partial_specialization): Use it.
1599 (instantiate_class_template): Use it.
1600 * search.c (lookup_base): Use it.
1602 2010-06-07 Jakub Jelinek <jakub@redhat.com>
1605 * expr.c (mark_exp_read): Handle INDIRECT_REF.
1606 * cvt.c (convert_to_void): Handle INDIRECT_REF like
1607 handled_component_p.
1610 * decl.c (initialize_local_var): If TREE_USED is set on the type,
1611 set also DECL_READ_P on the decl.
1613 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1616 * cp-tree.h (typedef_variant_p): Move this declaration to
1618 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1619 * decl.c (grokdeclarator): Do not rename debug info of an
1620 anonymous tagged type named by a typedef.
1622 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
1625 * class.c (check_field_decls): Move the call to
1626 check_bitfield_decl before trying to set the
1627 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
1629 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
1631 * typeck.c: Update include path for moved files.
1634 * cp-gimplify.c: Likewise.
1635 * cp-lang.c: Likewise.
1637 * semantics.c: Likewise.
1638 * cxx-pretty-print.h: Likewise.
1639 * decl2.c: Likewise.
1640 * parser.c: Likewise.
1641 * cp-objcp-common.c: Likewise.
1642 * cp-tree.h: Likewise.
1643 * name-lookup.c: Likewise.
1645 * name-lookup.h: Likewise.
1646 * config-lang.in: Update paths in gtfiles for files in c-family/.
1647 * Make-lang.in: Likewise.
1649 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
1651 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
1652 * typeck.c (build_ptrmemfunc): Likewise.
1654 2010-06-04 Jason Merrill <jason@redhat.com>
1656 * typeck2.c (merge_exception_specifiers): Adjust merging of
1657 throw() and noexcept(true).
1659 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
1660 using an uninitialized variable.
1662 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
1663 (pp_cxx_expression): Likewise.
1665 Implement noexcept-specification (15.4)
1666 * parser.c (cp_parser_exception_specification_opt): Parse it.
1667 Give -Wdeprecated warning about throw() specs.
1668 * pt.c (tsubst_exception_specification): Handle it.
1669 * error.c (dump_exception_spec): Handle it.
1670 (dump_expr): Handle NOEXCEPT_EXPR.
1671 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
1672 * typeck.c (comp_except_specs): Handle compatibility rules.
1673 Change exact parm to take an enum.
1674 * typeck2.c (merge_exception_specifiers): Handle noexcept.
1675 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
1676 (type_throw_all_p, build_noexcept_spec): New fns.
1677 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
1678 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
1679 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
1680 (noexcept_true_spec, noexcept_false_spec): New macros.
1681 * name-lookup.c (pushdecl_maybe_friend): Adjust.
1682 * search.c (check_final_overrider): Adjust.
1683 * decl.c (check_redeclaration_exception_specification): Adjust.
1684 (use_eh_spec_block): Use type_throw_all_p.
1685 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
1686 Give operator new a noexcept-specification in C++0x mode.
1687 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
1688 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
1690 Implement noexcept operator (5.3.7)
1691 * cp-tree.def (NOEXCEPT_EXPR): New.
1692 * except.c (check_noexcept_r, finish_noexcept_expr): New.
1693 * cp-tree.h: Declare finish_noexcept_expr.
1694 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
1695 * pt.c (tsubst_copy_and_build): And tsubst it.
1696 (type_dependent_expression_p): Handle it.
1697 (value_dependent_expression_p): Handle it.
1699 * call.c (build_conditional_expr): Never fold in unevaluated context.
1700 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
1701 * semantics.c (simplify_aggr_init_expr): Likewise.
1702 * typeck.c (merge_types): Call merge_exception_specifiers.
1703 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
1704 DECL_ANTICIPATED for preferring new type.
1706 2010-06-04 Joseph Myers <joseph@codesourcery.com>
1708 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
1711 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1714 * typeck.c (build_class_member_access_expr): Call mark_exp_read
1715 on object for static data members.
1717 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1718 Jason Merrill <jason@redhat.com>
1721 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
1722 with the same type, call mark_lvalue_use on both.
1724 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
1726 * class.c (struct vtbl_init_data_s): Remove last_init field.
1727 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
1729 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
1731 (build_vtt): Likewise.
1732 (initialize_vtable): Take a VEC instead of a tree.
1733 (build_vtt_inits): Change return type to void. Take a VEC **
1734 instead of a tree *; accumulate results into said VEC.
1735 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
1736 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
1737 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
1739 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
1740 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
1742 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
1743 rather than tree_cons.
1744 (build_vbase_offset_vtbl_entries): Likewise.
1745 (add_vcall_offset): Likewise.
1746 (build_rtti_vtbl_entries): Likewise.
1747 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
1748 * decl.c (initialize_artificial_var): Use build_constructor instead
1749 of build_constructor_from_list.
1751 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
1754 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
1757 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
1759 * parser.c (cp_parser_mem_initializer_list): Change error text.
1761 2010-06-02 Jakub Jelinek <jakub@redhat.com>
1763 * cp-objcp-common.c (shadowed_var_for_decl): Change into
1764 tree_decl_map hashtab from tree_map.
1765 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
1766 (init_shadowed_var_for_decl): Adjust initialization.
1769 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
1770 instead of calling mark_exp_read only when not an assignment.
1773 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
1774 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
1775 Set DECL_VALUE_EXPR on var.
1777 2010-06-02 Jason Merrill <jason@redhat.com>
1779 * error.c (dump_type): Improve typedef handling.
1784 * name-lookup.c (same_entity_p): New.
1785 (ambiguous_decl): Multiple declarations of the same entity
1788 2010-06-01 Jason Merrill <jason@redhat.com>
1791 * call.c (add_list_candidates): Prefer the default constructor.
1792 (build_aggr_conv): Treat missing initializers like { }.
1793 * typeck2.c (process_init_constructor_record): Likewise.
1794 * init.c (expand_default_init): Use digest_init for
1795 direct aggregate initialization, too.
1797 * call.c (add_list_candidates): Split out...
1798 (build_user_type_conversion_1): ...from here.
1799 (build_new_method_call): And here.
1800 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
1803 * call.c (build_list_conv): Set list-initialization flags properly.
1805 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
1807 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
1809 2010-06-01 Arnaud Charlet <charlet@adacore.com>
1810 Matthew Gingell <gingell@adacore.com>
1812 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
1813 * decl2.c: Include langhooks.h and c-ada-spec.h.
1814 (cpp_check, collect_source_refs, collect_ada_namespace,
1815 collect_all_refs): New functions.
1816 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
1817 * lang-specs.h: Ditto.
1819 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1821 * cp-tree.h (cp_build_function_call_nary): Declare.
1822 * typeck.c (cp_build_function_call_nary): Define.
1823 * decl.c (register_dtor_fn): Use it instead of
1824 cp_build_function_call.
1825 (cxx_maybe_build_cleanup): Likewise.
1826 * decl2.c (generate_ctor_or_dtor_function): Likewise.
1827 * except.c (do_get_exception_ptr): Likewise.
1828 (do_begin_catch): Likewise.
1829 (do_allocate_exception): Likewise.
1830 (do_free_exception): Likewise.
1831 (build_throw): Likewise. Use cp_build_function_call_vec instead
1832 of cp_build_function_call.
1833 (do_end_catch): Likewise.
1835 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1837 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
1838 (struct cp_declarator): Move id_loc field up.
1840 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1842 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
1843 this file is included before c-common.h. Define GCC_DIAG_STYLE
1844 before including diagnostic-core.h and toplev.h.
1845 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
1846 * pt.c: Include cp-tree.h before c-common.h.
1848 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1850 * tree.c (c_register_addr_space): Add stub.
1852 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1854 * g++spec.c (lang_specific_driver): Use fatal_error instead of
1857 2010-05-28 Dodji Seketeli <dodji@redhat.com>
1859 Revert fix of PR c++/44188
1860 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
1862 * tree.c (typedef_variant_p): Revert moving this definition to
1864 * decl.c (grokdeclarator): Revert naming typedef handling.
1866 2010-05-27 Joseph Myers <joseph@codesourcery.com>
1868 * call.c: Include diagnostic-core.h instead of diagnostic.h.
1869 * cp-lang.c: Don't include diagnostic.h
1870 * name-lookup.c: Include diagnostic-core.h instead of
1872 (cp_emit_debug_info_for_using): Use seen_error.
1873 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
1874 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
1875 * pt.c (iterative_hash_template_arg): Use seen_error.
1876 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
1877 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
1878 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
1879 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
1882 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1885 * cp-tree.h (typedef_variant_p): Move this declaration to
1887 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1888 * decl.c (grokdeclarator): Do not rename debug info of an
1889 anonymous tagged type named by a typedef.
1891 2010-05-27 Jason Merrill <jason@redhat.com>
1894 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
1897 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
1900 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
1901 * class.c (layout_class_type): Likewise.
1902 * decl.c (finish_enum): Likewise.
1903 * mangle.c (write_builitin_type): Likewise.
1905 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
1907 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
1909 * decl.c (grokdeclarator): Handle __int128.
1910 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
1911 (cp_parser_simple_type_specifier): Likewise.
1912 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
1913 * typeck.c (cp_common_type): Handle __int128.
1914 * mangle.c (integer_type_codes): Add itk_int128 and
1915 itk_unsigned_int128.
1917 2010-05-26 Jason Merrill <jason@redhat.com>
1920 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
1923 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1925 * cp-lang.c: Do not include expr.h.
1927 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1929 * decl.c: Do not include rtl.h
1930 * semantics.c: Likewise.
1932 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
1934 * cp-tree.h: Do not include splay-tree.h.
1935 (struct prtmem_cst): Remove unused field and false comment.
1936 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
1937 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
1938 * init.c: Do not include rtl.h and expr.h.
1939 * class.c: Do not include rtl.h. Include splay-tree.h.
1940 (build_clone): Use plain NULL instead of NULL_RTX.
1941 * decl.c: Do not include expr.h. Explain why rtl.h has to be
1942 included. Include splay-tree.h.
1943 * method.c: Do not include rtl.h and expr.h.
1944 (use_thunk): Use plain NULL instead of NULL_RTX.
1945 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
1946 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
1947 and target.h. Include splay-tree.h.
1948 * expr.c: Do not include rtl.h and expr.h.
1949 * pt.c: Do not include obstack.h and rtl.h.
1950 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
1951 (tsubst_decl): Likewise.
1952 (instantiate_decl): Likewise.
1953 * semantics.c: Do not include exprt.h and debug.h. Explain why
1954 rtl.h has to be included.
1955 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
1956 * call.c: Do not include rtl.h and expr.h.
1957 * search.c: Do not include obstack.h and rtl.h.
1958 * friend.c: Do not include rtl.h and expr.h.
1959 * Make-lang.in: Update dependencies.
1961 2010-05-25 Jakub Jelinek <jakub@redhat.com>
1964 * parser.c (non_integral_constant): Add NIC_NONE.
1965 (required_token): Add RT_NONE.
1966 (cp_parser_unary_expression): Initialize non_constant_p
1968 (cp_parser_asm_definition): Initialize missing to RT_NONE.
1969 (cp_parser_primary_expression, cp_parser_postfix_expression,
1970 cp_parser_cast_expression, cp_parser_binary_expression,
1971 cp_parser_functional_cast): Fix formatting.
1973 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
1976 * parser.c: Remove inclusion of dyn-string.h.
1977 (non_integral_constant): New enum.
1978 (name_lookup_error): New enum.
1979 (required_token): New enum.
1980 (cp_parser_required_error): New function.
1981 (cp_parser_require): Change the type of variable token_desc to
1982 required_token and use cp_parser_required_error.
1983 (cp_parser_require_keyword): Likewise.
1984 (cp_parser_error): Use gmsgid as parameter.
1985 (cp_parser_name_lookup_error): Change the type of variable desired to
1986 name_lookup_error and put the diagnostic in the full sentences. Change
1988 (cp_parser_non_integral_constant_expression): Change the type of the
1989 variable thing to non_integral_constant and put the diagnostics in
1990 full sentences. Change caller.
1992 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
1995 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
1997 2010-05-24 Joseph Myers <joseph@codesourcery.com>
1999 * error.c (cp_diagnostic_starter): Update call to
2000 diagnostic_build_prefix.
2001 (cp_print_error_function,
2002 print_instantiation_partial_context_line): Check show_column flag
2005 2010-05-24 Jason Merrill <jason@redhat.com>
2008 * decl.c (check_initializer): Don't wrap an init-list in a
2010 * init.c (build_aggr_init): Don't assume copy-initialization if
2011 init has CONSTRUCTOR_IS_DIRECT_INIT.
2012 * call.c (build_new_method_call): Sanity check.
2014 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
2016 * rtti.c (tinfo_base_init): Use build_constructor instead of
2017 build_constructor_from_list. Don't cons a tree node for
2019 (generic_initializer): Use build_constructor_single instead of
2020 build_constructor_from_list.
2021 (ptr_initializer): Use build_constructor instead of
2022 build_constructor_from_list
2023 (ptm_initializer): Likewise.
2024 (class_initializer): Likewise. Take varargs instead of TRAIL.
2025 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
2026 build_constructor instead of build_constructor_from_list.
2028 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
2030 * semantics.c: Include bitmap.h.
2031 * Make-lang.in: Update dependencies.
2033 2010-05-22 Jan Hubicka <jh@suse.cz>
2035 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
2037 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
2039 2010-05-21 Joseph Myers <joseph@codesourcery.com>
2041 * cxx-pretty-print.c: Correct merge error.
2043 2010-05-21 Joseph Myers <joseph@codesourcery.com>
2045 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
2046 (cp_print_error_function): Use diagnostic_abstract_origin macro.
2047 (cp_printer): Handle %K here using percent_K_format.
2048 * cxx-pretty-print.c: Include tree-pretty-print.h.
2049 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
2052 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
2054 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
2055 Clean up redundant includes.
2057 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2060 * decl.c (xref_basetypes): Return false in case of ill-formed
2063 2010-05-19 Jason Merrill <jason@redhat.com>
2065 * call.c (reference_binding): Use cp_build_qualified_type_real
2066 and cp_type_quals consistently.
2067 (add_function_candidate): Likewise.
2068 (build_conditional_expr): Likewise.
2069 (convert_like_real): Likewise.
2070 (type_passed_as): Likewise.
2071 * class.c (add_method): Likewise.
2072 (same_signature_p): Likewise.
2073 (layout_class_type): Likewise.
2074 * decl.c (cxx_init_decl_processing): Likewise.
2075 (cp_fname_init): Likewise.
2076 (grokdeclarator): Likewise.
2077 * decl2.c (cp_reconstruct_complex_type): Likewise.
2078 * init.c (build_new_1): Likewise.
2079 * method.c (do_build_copy_constructor): Likewise.
2080 (implicitly_declare_fn): Likewise.
2081 * pt.c (tsubst_aggr_type): Likewise.
2083 * rtti.c (init_rtti_processing): Likewise.
2084 (build_headof): Likewise.
2085 (build_dynamic_cast_1): Likewise.
2086 (tinfo_base_init): Likewise.
2087 (emit_support_tinfos): Likewise.
2088 * semantics.c (capture_decltype): Likewise.
2089 * tree.c (cv_unqualified): Likewise.
2090 * typeck.c (composite_pointer_type): Likewise.
2091 (string_conv_p): Likewise.
2093 * mangle.c (write_CV_qualifiers_for_type): Tweak.
2095 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
2096 * decl.c (start_decl): Likewise.
2097 * semantics.c (finish_compound_literal): Likewise.
2098 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
2099 (cp_type_readonly): Remove.
2100 * cp-tree.h: Remove declaration.
2102 * typeck.c (merge_types): Preserve memfn quals.
2104 * decl.c (grokdeclarator): Don't check quals on fn type.
2105 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
2106 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
2109 * typeck.c (type_memfn_quals): New fn.
2110 (apply_memfn_quals): New fn.
2111 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
2112 (cp_type_readonly): Use cp_type_quals.
2113 * cp-tree.h: Add declarations.
2114 * tree.c (cp_build_qualified_type_real): Don't set, but do
2115 preserve, quals on FUNCTION_TYPE.
2116 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
2117 * decl.c (build_ptrmem_type): Likewise.
2118 (grokdeclarator): Likewise.
2119 (static_fn_type): Likewise.
2120 * decl2.c (change_return_type): Likewise.
2121 (cp_reconstruct_complex_type): Likewise.
2122 * pt.c (tsubst_function_type): Likewise.
2124 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
2126 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
2128 * tree.c (build_min_non_dep_call_vec): Update comment.
2130 2010-05-17 Jason Merrill <jason@redhat.com>
2132 * call.c (struct z_candidate): Add explicit_targs field.
2133 (add_template_candidate_real): Set it.
2134 (build_over_call): Use it to control init-list warning.
2137 * call.c (build_over_call): Limit init-list deduction warning to
2138 cases where the argument is actually an init-list.
2141 * call.c (build_over_call): Don't do bitwise copy for move ctor.
2143 2010-05-17 Dodji Seketeli <dodji@redhat.com>
2144 Jason Merrill <jason@redhat.com>
2147 * decl.c (compute_array_index_type): Call mark_rvalue_use.
2149 2010-05-15 Jason Merrill <jason@redhat.com>
2151 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
2152 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
2154 (finish_eh_spec_block): Adjust.
2156 2010-05-15 Jakub Jelinek <jakub@redhat.com>
2159 * pt.c (tsubst): Unshare template argument.
2161 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
2163 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
2164 * Make-lang.in: Fix dependencies accordingly.
2166 2010-05-14 Jason Merrill <jason@redhat.com>
2169 * except.c (build_throw): Simplify, adjust for DR 475.
2172 * except.c (dtor_nothrow): Return nonzero for type with
2176 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
2177 gimple_build_eh_must_not_throw.
2179 2010-05-14 Martin Jambor <mjambor@suse.cz>
2181 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
2184 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
2186 * call.c (build_new_method_call): Change warning text.
2187 * typeck2.c (build_functional_cast): Change error text.
2189 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
2192 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
2193 shadowing the outer parameter or variables by the declaration of
2194 nested function in nested structure or class. Warn the shadowing by
2195 the declaration of nested lambda expression.
2197 2010-05-13 Jason Merrill <jason@redhat.com>
2199 * typeck.c (cp_build_array_ref): Factor out from...
2200 (build_array_ref): ...here. Drop complain parm.
2201 (build_new_op): Adjust.
2202 * class.c (build_vtbl_ref_1): Adjust.
2203 * decl2.c (grok_array_decl): Adjust.
2204 * cp-tree.h: Adjust prototypes.
2206 2010-05-13 Jan Hubicka <jh@suse.cz>
2208 * decl.c (cp_finish_decl): Do not worry about used attribute.
2210 2010-05-12 Jason Merrill <jason@redhat.com>
2212 * typeck.c (build_array_ref): Take complain parm.
2213 * cp-tree.h: Add it to prototype.
2214 * call.c (build_new_op): Pass it.
2215 * class.c (build_vtbl_ref): Pass it.
2216 * decl2.c (grok_array_decl): Pass it.
2220 * cp-tree.def (NULLPTR_TYPE): Remove.
2221 * cp-tree.h (NULLPTR_TYPE_P): New.
2222 (SCALAR_TYPE_P): Use it.
2223 (nullptr_type_node): New.
2224 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
2225 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
2227 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
2228 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2229 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
2230 * mangle.c (write_type): Likewise.
2231 * name-lookup.c (arg_assoc_type): Likewise.
2232 * typeck.c (build_reinterpret_cast_1): Likewise.
2233 * rtti.c (typeinfo_in_lib_p): Likewise.
2234 (emit_support_tinfos): Remove local nullptr_type_node.
2236 * cp-tree.h (UNKNOWN_TYPE): Remove.
2237 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
2238 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
2239 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
2240 * class.c (instantiate_type): Check unknown_type_node rather than
2242 * name-lookup.c (maybe_push_decl): Likewise.
2243 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2244 (get_typeid): Likewise.
2245 * semantics.c (finish_offsetof): Likewise.
2248 * call.c (add_template_candidate_real): If deduction fails, still
2249 add the template as a non-viable candidate.
2250 (equal_functions): Handle template candidates.
2251 (print_z_candidate): Likewise.
2252 (print_z_candidates): Likewise.
2253 (build_new_function_call): Likewise.
2255 * cp-tree.h (LOOKUP_LIST_ONLY): New.
2256 * call.c (add_candidates): Enforce it.
2257 (build_new_method_call): Try non-list ctor if no viable list ctor.
2258 (build_user_type_conversion_1): Likewise.
2260 * call.c (add_candidates): Distinguish between type(x) and
2262 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
2263 (build_new_method_call): Give better error for conversion op.
2265 * call.c (add_candidates): Add first_arg and return_type parms.
2266 Add special constructor/conversion op handling.
2267 (convert_class_to_reference): Use it.
2268 (build_user_type_conversion_1): Likewise.
2269 (build_op_call): Likewise.
2270 (build_new_method_call): Likewise.
2271 (build_new_op): Adjust.
2272 (perform_overload_resolution): Adjust.
2274 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
2279 * pt.c (process_partial_specialization): Return error_mark_node
2280 in case of unused template parameters in partial specialization.
2282 2010-05-11 Jakub Jelinek <jakub@redhat.com>
2285 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
2286 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
2287 look at its second operand.
2289 2010-05-10 Jason Merrill <jason@redhat.com>
2292 * semantics.c (baselink_for_fns): Revert earlier change.
2295 * typeck.c (cp_build_modify_expr): Complain about assignment to
2296 array from init list.
2298 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
2301 * decl.c (check_initializer): strip array type before checking for
2302 uninitialized const or ref members.
2304 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
2307 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
2308 error count. Emit errors only if compain is true.
2309 (build_new_1): Do not return error_mark_node if
2310 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
2311 errors. Delay the check for user-provided constructor.
2312 (perform_member_init): Adjust.
2313 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
2316 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
2317 Jason Merrill <jason@redhat.com>
2319 Add support for C++0x nullptr.
2320 * cp-tree.def: Add NULLPTR_TYPE.
2321 * cp-tree.h: Add nullptr_node.
2322 (cp_tree_index): Add CPTI_NULLPTR.
2323 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
2324 * call.c (null_ptr_cst_p): Handle nullptr.
2325 (standard_conversion): Likewise.
2326 (convert_arg_to_ellipsis): Likewise.
2327 * mangle.c (write_type): Likewise.
2328 * name-lookup.c (arg_assoc_type): Likewise.
2329 * parser.c (cp_parser_primary_expression): Likewise.
2330 * typeck.c (cp_build_binary_op): Likewise.
2331 (build_reinterpret_cast_1): Likewise.
2332 * error.c (dump_type): Likewise.
2333 (dump_type_prefix, dump_type_suffix): Likewise.
2334 * decl.c (cxx_init_decl_processing): Likewise.
2335 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2336 * cvt.c (ocp_convert): Likewise.
2337 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
2338 nullptr_t tinfo in libsupc++.
2340 2010-05-06 Jason Merrill <jason@redhat.com>
2342 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
2344 2010-04-22 Jakub Jelinek <jakub@redhat.com>
2345 Dodji Seketeli <dodji@redhat.com>
2348 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
2350 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
2351 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
2352 (decay_conversion, perform_integral_promotions): Call rvalue_use.
2353 (cp_build_unary_op): Call lvalue_use.
2354 * decl.c (unused_but_set_errorcount): New variable.
2355 (poplevel): Issue -Wunused-but-set-variable diagnostics.
2356 (duplicate_decls): Merge DECL_READ_P flags.
2357 (start_cleanup_fn): Set DECL_READ_P flag.
2358 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
2359 * tree.c (rvalue): Call rvalue_use.
2360 * pt.c (convert_nontype_argument): Likewise.
2361 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
2362 finish_decltype_type): Likewise.
2363 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
2364 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
2365 or rvalue_use depending on the expr.
2366 * init.c (build_new, build_delete): Likewise.
2367 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
2369 2010-05-05 Jason Merrill <jason@redhat.com>
2372 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
2373 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
2375 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2378 * pt.c (unify): Check each elt for error_mark_node.
2380 2010-05-04 Jason Merrill <jason@redhat.com>
2383 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
2385 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2388 * call.c (build_new_method_call): Return error_mark_node if fns is
2391 2010-05-03 Dodji Seketeli <dodji@redhat.com>
2394 * pt.c (most_specialized_class): Pretend we are processing
2395 a template decl during the call to coerce_template_parms.
2397 2010-05-03 Jason Merrill <jason@redhat.com>
2401 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
2402 from the selected underlying type unless -fstrict-enums. Set
2403 ENUM_UNDERLYING_TYPE to have the restricted range.
2404 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
2405 * class.c (check_bitfield_decl): Likewise.
2407 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
2410 * init.c (build_new_1): Revert the accidental checkin in
2413 2010-04-30 Jason Merrill <jason@redhat.com>
2416 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
2417 (pp_cxx_type_specifier_seq): ...here.
2419 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
2421 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
2422 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
2424 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
2427 * typeck.c (warn_args_num): New function.
2428 (convert_arguments): Use warn_args_num to print the diagnostic
2431 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
2434 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
2435 user-provided constructor while recursing.
2437 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
2440 * error.c (print_instantiation_partial_context_line): Handle
2441 recursive instantiation.
2442 (print_instantiation_partial_context): Likewise.
2444 2010-04-27 Jason Merrill <jason@redhat.com>
2446 * init.c (perform_member_init): Check CLASS_TYPE_P.
2448 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2451 * init.c (perform_member_init): check for uninitialized const or
2452 reference members, including array types.
2454 2010-04-24 Jason Merrill <jason@redhat.com>
2456 * tree.c (get_fns): Split out from get_first_fn.
2457 * cp-tree.h: Declare it.
2458 * search.c (shared_member_p): Use it.
2459 * semantics.c (finish_qualified_id_expr): Simplify.
2460 (finish_id_expression): Simplify.
2462 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
2463 whenever object is NULL_TREE. Don't do 'this' capture here.
2464 (finish_qualified_id_expr): Pass NULL_TREE.
2465 (finish_id_expression): Likewise.
2466 (lambda_expr_this_capture): Likewise.
2468 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
2469 rather than checking current_class_ref directly.
2470 (finish_call_expr): Likewise.
2473 * name-lookup.c (qualify_lookup): Disqualify lambda op().
2474 * class.c (current_nonlambda_class_type): New fn.
2475 * semantics.c (nonlambda_method_basetype): New.
2476 * cp-tree.h: Declare them.
2477 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
2479 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
2482 * semantics.c (lambda_return_type): Complain about
2486 * tree.c (cv_unqualified): Handle error_mark_node.
2489 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
2490 if we don't want errors.
2493 * class.c (convert_to_base): Add complain parameter. Pass
2494 ba_quiet to lookup_base if we don't want errors.
2495 (build_vfield_ref): Pass complain to convert_to_base.
2496 * call.c (convert_like_real): Likewise.
2497 (initialize_reference): Likewise.
2498 (perform_direct_initialization_if_possible): Pass complain to
2500 * cp-tree.h: Adjust.
2502 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2503 Jason Merrill <jason@redhat.com>
2506 * decl.c (check_for_uninitialized_const_var): Handle classes that need
2508 (check_initializer): Call it for classes that need constructing, too.
2509 * class.c (in_class_defaulted_default_constructor): New.
2510 * cp-tree.h: Declare it.
2512 2010-04-20 Jason Merrill <jason@redhat.com>
2515 * init.c (constant_value_1): Treat error_mark_node as a constant
2516 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
2517 * cvt.c (ocp_convert): Handle getting error_mark_node from
2518 integral_constant_value.
2519 * decl.c (compute_array_index_type): Likewise.
2521 2010-04-20 Dodji Seketeli <dodji@redhat.com>
2525 * typeck.c (incompatible_dependent_types_p): If one of the
2526 compared types if not a typedef then honour their main variant
2529 2010-04-20 Jakub Jelinek <jakub@redhat.com>
2531 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
2533 2010-04-19 Dodji Seketeli <dodji@redhat.com>
2536 * typeck.c (structural_comptypes): Test dependent typedefs
2537 incompatibility before testing for their main variant based
2540 2010-04-19 Jakub Jelinek <jakub@redhat.com>
2542 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
2543 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
2545 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2547 * decl.c (cxx_init_decl_processing): Remove second argument in call to
2548 build_common_tree_nodes.
2550 2010-04-14 Jason Merrill <jason@redhat.com>
2553 * parser.c (cp_parser_parenthesized_expression_list): Change
2554 is_attribute_list parm to int to indicate whether or not to
2555 handle initial identifier specially.
2556 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
2558 2010-04-13 Jason Merrill <jason@redhat.com>
2560 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
2562 * parser.c (cp_parser_lambda_expression): Complain about lambda in
2563 unevaluated context.
2564 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
2566 2010-04-12 Jason Merrill <jason@redhat.com>
2569 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
2570 return value directly.
2572 * call.c (type_decays_to): Call cv_unqualified for non-class type.
2574 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
2577 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
2578 * init.c (build_new_1): Check for uninitialized const members and
2579 uninitialized reference members, when using new without
2580 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
2581 (diagnose_uninitialized_cst_or_ref_member): Define, call
2582 diagnose_uninitialized_cst_or_ref_member_1.
2583 (diagnose_uninitialized_cst_or_ref_member_1): New function.
2585 2010-04-12 Richard Guenther <rguenther@suse.de>
2588 * semantics.c (expand_or_defer_fn_1): Do not keep extern
2589 template inline functions.
2591 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
2594 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
2597 2010-04-07 Jason Merrill <jason@redhat.com>
2600 * decl.c (start_preparsed_function): Do defer nested functions.
2602 PR c++/11094, DR 408
2603 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
2604 * decl2.c (finish_static_data_member_decl): Set it.
2605 * decl.c (duplicate_decls): Propagate it.
2606 * pt.c (tsubst_decl): Don't substitute the domain of an array
2607 VAR_DECL if it's set.
2608 (regenerate_decl_from_template): Substitute it here.
2609 (type_dependent_expression_p): Return true if it's set.
2610 * semantics.c (finish_decltype_type): Instantiate such a variable.
2611 * typeck.c (cxx_sizeof_expr): Likewise.
2612 (strip_array_domain): New.
2615 * name-lookup.c (current_decl_namespace): Non-static.
2616 (pop_nested_namespace): Sanity check.
2617 * cp-tree.h: Declare current_decl_namespace.
2618 * decl.c (grokvardecl): Use it instead of current_namespace.
2619 (grokfndecl): Likewise.
2622 * pt.c (tsubst_friend_function): Instatiate a friend that has already
2625 * pt.c (print_template_statistics): New.
2626 * cp-tree.h: Declare it.
2627 * tree.c (cxx_print_statistics): Call it.
2630 * decl.c (grokvardecl): Tweak warning message.
2631 (grokfndecl): Likewise.
2633 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2636 *pt.c (tsubst_decl): Get the arguments of a specialization from
2637 the specialization template, not from the most general template.
2639 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2642 * typeck2.c (process_init_constructor_record):
2643 value-initialize members that are are not explicitely
2646 2010-04-07 Jie Zhang <jie@codesourcery.com>
2649 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
2650 when all of its elements are non-constant and have been split out.
2652 2010-04-06 Taras Glek <taras@mozilla.com>
2653 Jason Merrill <jason@redhat.com>
2655 * parser.c (cp_parser_class_specifier): Set class location to that
2656 of IDENTIFIER_NODE instead of '{' when possible.
2657 * semantics.c (begin_class_definition): Do not overide locations
2658 with less precise ones.
2660 2010-04-06 Jason Merrill <jason@redhat.com>
2663 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
2666 * pt.c (maybe_update_decl_type): Check the return value from
2669 2010-04-01 Jason Merrill <jason@redhat.com>
2671 * decl.c (next_initializable_field): No longer static.
2672 * cp-tree.h: Declare it.
2673 * call.c (build_aggr_conv): Fail if there are more initializers
2674 than initializable fields.
2676 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
2677 instead of void_zero_node.
2679 2010-03-31 Dodji Seketeli <dodji@redhat.com>
2682 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
2683 * pt.c (end_template_parm_list): Store sibling template parms of
2684 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2685 (push_template_decl_real): Don't store the containing template decl
2686 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
2687 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
2688 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2691 2010-03-30 Jason Merrill <jason@redhat.com>
2694 * pt.c (push_template_decl_real): Deal better with running out of
2695 scopes before running out of template parms.
2699 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
2700 function parameter context. Don't print an error if parsing
2704 * pt.c (more_specialized_fn): Don't control cv-qualifier check
2707 2010-03-26 Jason Merrill <jason@redhat.com>
2710 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
2711 c++0x mode, but not other type-names.
2713 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2716 * pt.c (add_to_template_args): Support NULL ARGS;
2717 (most_specialized_class): call coerce_template_parms on
2718 template arguments passed to get_class_bindings. Use
2719 add_to_template_args.
2720 (unify): Handle VAR_DECLs.
2722 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2724 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
2726 * pt.c (get_template_parms_at_level): Adjust.
2728 2010-03-25 Dodji Seketeli <dodji@redhat.com>
2731 * cp-tree.h (get_template_parms_at_level): Declare ...
2732 * pt.c (get_template_parms_at_level): ... new function.
2733 * typeck.c (get_template_parms_of_dependent_type): If a template
2734 type parm's DECL_CONTEXT isn't yet set, get its siblings from
2735 current_template_parms. Use get_template_parms_at_level. Remove
2737 (incompatible_dependent_types_p): If we get empty parms from just one
2738 of the template type parms we are comparing then the template parms are
2741 2010-03-24 Jason Merrill <jason@redhat.com>
2744 * parser.c (make_declarator): Initialize id_loc.
2745 (cp_parser_lambda_declarator_opt): And set it.
2747 2010-03-23 Jason Merrill <jason@redhat.com>
2749 Make lambda conversion op and op() non-static.
2750 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
2751 Also add the thunk function returned by the conversion op.
2752 Mark the conversion deleted if the op() is variadic.
2753 * decl2.c (mark_used): Give helpful message about deleted conversion.
2754 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
2755 * semantics.c (finish_this_expr): Adjust.
2756 * mangle.c (write_closure_type_name): Adjust.
2757 * decl.c (grok_op_properties): Don't allow it.
2758 * call.c (build_user_type_conversion_1): No static conversion ops.
2759 (build_op_call): Or op().
2761 * decl2.c (change_return_type): Fix 'this' quals.
2763 2010-03-22 Jason Merrill <jason@redhat.com>
2766 * tree.c (pod_type_p): Use old meaning in C++98 mode.
2769 * pt.c (contains_auto_r): New fn.
2770 (do_auto_deduction): Use it.
2771 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
2773 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
2776 * decl2.c (grokfield): Handle invalid initializers for member
2779 2010-03-20 Dodji Seketeli <dodji@redhat.com>
2782 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
2784 * decl2.c (vague_linkage_p): Likewise.
2786 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
2789 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
2790 false, in the cp_parser_expression_statement call.
2792 2010-03-05 Jason Merrill <jason@redhat.com>
2794 * mangle.c (mangle_decl): Give name collision error even without
2797 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
2799 * pt.c (process_partial_specialization): Use error_n instead of
2802 2010-03-03 Jason Merrill <jason@redhat.com>
2805 * mangle.c (mangle_decl): Handle VAR_DECL, too.
2807 2010-03-03 Jason Merrill <jason@redhat.com>
2810 * mangle.c: Include cgraph.h.
2811 (mangle_decl): If the mangled name will change in a later
2812 ABI version, make the later mangled name an alias.
2813 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
2814 * Make-lang.in (mangle.o): Depend on cgraph.h.
2815 * method.c (make_alias_for): Handle VAR_DECL, too.
2816 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
2817 * tree.c (no_linkage_check): Adjust.
2818 * decl.c (maybe_commonize_var): Adjust.
2819 * cp-tree.h: Adjust.
2821 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
2823 * pt.c (redeclare_class_template): Use error_n and inform_n.
2825 2010-02-27 Mark Mitchell <mark@codesourcery.com>
2828 * cp-tree.h (push_tinst_level): Declare.
2829 (pop_tinst_level): Likewise.
2830 * pt.c (push_tinst_level): Give it external linkage.
2831 (pop_tinst_level): Likewise.
2832 * mangle.c (mangle_decl_string): Set the source location to that
2833 of the decl while mangling.
2835 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
2838 * pt.c (redeclare_class_template): Return false if there are erroneous
2839 template parameters.
2841 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
2843 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
2846 2010-02-24 Jason Merrill <jason@redhat.com>
2849 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
2851 * class.c (layout_class_type): Don't give -Wabi warning for a bug
2852 in a previous ABI version.
2854 2010-02-23 Jason Merrill <jason@redhat.com>
2857 * typeck2.c (digest_init_r): Accept value init of array.
2859 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
2862 * typeck.c (convert_arguments): Update error message.
2864 2010-02-22 Mike Stump <mikestump@comcast.net>
2867 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
2869 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
2872 * error.c (print_instantiation_partial_context_line): New.
2873 (print_instantiation_partial_context): Print at most 12 contexts,
2874 skip the rest with a message.
2876 2010-02-21 Dodji Seketeli <dodji@redhat.com>
2879 * pt.c (lookup_template_class): Better support of specialization
2880 of member of class template implicit instantiation.
2882 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
2885 * call.c (conversion_null_warnings): Replace -Wconversion with
2887 * cvt.c (build_expr_type_conversion): Likewise.
2889 2010-02-18 Jason Merrill <jason@redhat.com>
2892 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
2895 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
2897 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
2898 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
2901 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
2905 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
2906 (maybe_update_decl_type): New fn.
2907 * parser.c (cp_parser_init_declarator): Use it.
2910 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
2912 2010-02-17 Jason Merrill <jason@redhat.com>
2915 * call.c (build_over_call): Don't create zero-sized assignments.
2916 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
2917 * cp-objcp-common.c (cp_expr_size): Remove.
2918 * cp-tree.h: Remove prototype.
2921 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
2922 decl we looked up doesn't match.
2925 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
2926 have an INIT_EXPR anymore.
2929 * pt.c (convert_nontype_argument): Change assert to test.
2931 2010-02-16 Jason Merrill <jason@redhat.com>
2933 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
2936 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
2937 VIEW_CONVERT_EXPR for conversions between structural equality types
2938 that the back end can't tell are the same.
2941 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
2942 cv-quals from element here.
2943 (cp_build_qualified_type_real): Not here. Preserve typedef name.
2945 2010-02-14 Jason Merrill <jason@redhat.com>
2948 * semantics.c (finish_compound_literal): Use
2949 cp_apply_type_quals_to_decl when creating a static variable.
2951 2010-02-12 Jason Merrill <jason@redhat.com>
2954 * name-lookup.h (current_binding_level): Check for null
2957 2010-02-12 Jason Merrill <jason@redhat.com>
2960 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
2962 2010-02-12 Jakub Jelinek <jakub@redhat.com>
2965 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
2968 2010-02-10 Jason Merrill <jason@redhat.com>
2971 * semantics.c (outer_lambda_capture_p): Revert.
2972 (add_capture): Only finish_member_declaration if
2973 we're in the lambda class.
2974 (register_capture_members): New.
2975 * cp-tree.h: Declare it.
2976 * parser.c (cp_parser_lambda_expression): Call it.
2978 2010-02-10 Jason Merrill <jason@redhat.com>
2981 * semantics.c (outer_lambda_capture_p): Use current_function_decl
2982 instead of current_class_type.
2984 2010-02-10 Jason Merrill <jason@redhat.com>
2986 PR c++/42983, core issue 906
2987 * method.c (defaultable_fn_check): Check virtualness.
2989 2010-02-10 Jason Merrill <jason@redhat.com>
2992 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
2994 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
2996 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
2997 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
2999 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
3000 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
3001 (cp_parser_parameter_declaration)
3002 (cp_parser_exception_specification_opt)
3003 (cp_parser_exception_declaration): Likewise.
3004 * pt.c (check_default_tmpl_args): Likewise.
3005 * search.c (lookup_field_r): Likewise.
3007 2010-02-09 Jason Merrill <jason@redhat.com>
3010 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
3012 2010-02-09 Jason Merrill <jason@redhat.com>
3015 * decl2.c (change_return_type): New fn.
3016 * semantics.c (apply_lambda_return_type): Use it.
3017 * cp-tree.h: Declare it.
3019 2010-02-05 Richard Guenther <rguenther@suse.de>
3021 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
3022 * cp-lang.c: Include gt-cp-cp-lang.h.
3023 * config-lang.in (gtfiles): Add cp/cp-lang.c.
3025 2010-02-05 Dodji Seketeli <dodji@redhat.com>
3028 * typeck.c (get_template_parms_of_dependent_type): Try getting
3029 the template parameters fromt the type itself first.
3031 2010-02-03 Jason Merrill <jason@redhat.com>
3035 * mangle.c (write_unqualified_id): Split out from write_expression.
3036 (write_unqualified_name): Call it.
3037 (write_member_name): Likewise.
3038 (write_expression): Support TEMPLATE_ID_EXPR.
3039 Disambiguate operator names.
3042 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
3045 2010-02-02 Jason Merrill <jason@redhat.com>
3048 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
3049 * optimize.c (clone_body): Remap their initializers when making base
3051 (maybe_clone_body): Complain if multiple clones aren't safe.
3053 2010-01-29 Dodji Seketeli <dodji@redhat.com>
3060 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3061 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3062 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
3063 * pt.c (coerce_template_parms, type_unification_real,
3064 expand_template_argument_pack, coerce_template_parameter_pack):
3065 Set the non default template args count.
3066 (current_template_args): Always set non defaulted
3067 template args count when compiled with --enable-checking
3068 (tsubst_template_args, type_unification_real): Propagate the non
3069 defaulted template args count.
3070 * error.c (get_non_default_template_args_count): Renamed
3071 count_non_default_template_args into this. Don't calculate the
3072 non default template argument count anymore. Use the new
3073 accessor macros above to get it.
3074 (dump_template_argument_list, dump_type, dump_decl,
3075 dump_template_parms): Adjust.
3076 * parser.c (cp_parser_template_argument_list): Always set defaulted
3077 template args count when compiled with --enable-checking.
3079 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
3081 * decl.c (redeclaration_error_message): Wrap the return messages into
3082 G_() for easy translation.
3084 2010-01-28 Jason Merrill <jason@redhat.com>
3087 * semantics.c (begin_class_definition): Don't use type_as_string.
3089 2010-01-28 Dodji Seketeli <dodji@redhat.com>
3093 * typeck.c (get_template_parms_of_dependent_type): Factorized
3094 this out of incompatible_template_type_parms_p
3095 (incompatible_dependent_types_p): Renamed
3096 incompatible_template_type_parms_p into this. Make it detect
3097 two incompatible dependent typedefs too.
3098 (structural_comptypes): Use incompatible_dependent_types_p.
3099 * pt.c (get_template_info):
3100 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
3102 2010-01-20 Janis Johnson <janis187@us.ibm.com>
3103 Jason Merrill <jason@redhat.com>
3105 * mangle.c (write_type): Mangle transparent record as member type.
3106 * semantics.c (begin_class_definition): Recognize decimal classes
3107 and set TYPE_TRANSPARENT_AGGR.
3109 2010-01-20 Jason Merrill <jason@redhat.com>
3112 * mangle.c (write_expression): Handle tree codes that have extra
3113 arguments in the middle-end.
3115 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
3118 * except.c (expand_start_catch_block): Deal correctly with
3119 do_begin_catch returning error_mark_node.
3121 2010-01-20 Jason Merrill <jason@redhat.com>
3124 * class.c (layout_class_type): Set packed_maybe_necessary for packed
3128 * semantics.c (build_lambda_object): Call mark_used on captured
3132 * decl.c (grokdeclarator): Clear type_quals for a member function
3133 declared using a typedef. Don't complain about adding cv-quals
3134 to a function typedef in C++0x mode.
3136 2010-01-20 Jakub Jelinek <jakub@redhat.com>
3138 * decl.c (create_array_type_for_decl): Remove set but not used
3139 variable error_msg. Remove break stmts after return stmts.
3141 2010-01-19 Dodji Seketeli <dodji@redhat.com>
3143 * error.c (dump_template_parms, count_non_default_template_args):
3144 Revert fix of PR c++/42634.
3146 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3149 * error.c (dump_template_parms): Use innermost template
3150 arguments before calling count_non_default_template_args.
3151 (count_non_default_template_args): We are being called with
3152 template innermost arguments now. There is no need to ensure
3155 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3158 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
3160 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3163 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
3165 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3168 *pt.c (tsubst_decl): Get the arguments of a specialization from
3169 the specialization template, not from the most general template.
3171 2010-01-16 Jason Merrill <jason@redhat.com>
3174 * semantics.c (finish_decltype_type): Within a template, treat
3175 unresolved CALL_EXPR as dependent.
3177 2010-01-15 Dodji Seketeli <dodji@redhat.com>
3179 * error.c (dump_template_parms,count_non_default_template_args):
3180 Revert changes of PR c++/42634.
3182 2010-01-14 Jakub Jelinek <jakub@redhat.com>
3185 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
3186 functions with noreturn attribute.
3188 2010-01-14 Jason Merrill <jason@redhat.com>
3191 * call.c (build_new_method_call): Don't free the vec here.
3194 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
3196 2010-01-13 Dodji Seketeli <dodji@redhat.com>
3199 * error.c (dump_template_parms): Use innermost template
3200 arguments before calling count_non_default_template_args.
3201 (count_non_default_template_args): We are being called with
3202 template innermost arguments now. There is no need to ensure
3205 2010-01-07 Dodji Seketeli <dodji@redhat.com>
3208 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
3209 arguments that were previously deduced.
3211 2010-01-05 Jason Merrill <jason@redhat.com>
3213 * pt.c (unify_pack_expansion): Handle deduction from init-list.
3214 * call.c (build_over_call): Don't complain about it.
3216 2010-01-04 Jason Merrill <jason@redhat.com>
3219 * pt.c (tsubst_decl): Don't apply type attributes in place.
3222 * semantics.c (describable_type): Remove decltype comment and
3227 Copyright (C) 2010 Free Software Foundation, Inc.
3229 Copying and distribution of this file, with or without modification,
3230 are permitted in any medium without royalty provided the copyright
3231 notice and this notice are preserved.