1 2010-10-27 Gabriel Dos Reis <gdr@cse.tamu.edu>
2 Jason Merrill <jason@redhat.com>
4 * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
5 Make sure a constexpr ctor has an empty body.
6 * class.c (type_has_constexpr_default_constructor): New.
7 * cp-tree.h: Declare it.
8 * init.c (perform_member_init): Complain about uninitialized
9 member in constexpr ctor.
10 (emit_mem_initializers): And uninitialized base.
11 * decl.c (check_tag_decl): Fix typo.
13 * semantics.c (valid_type_in_constexpr_fundecl_p): New fn.
14 (is_valid_constexpr_fn): New fn.
15 (validate_constexpr_fundecl): Use it.
16 * decl.c (validate_constexpr_redeclaration): New.
17 (duplicate_decls): Use it.
18 (cp_finish_decl): Call validate_constexpr_fundecl and
19 ensure_literal_type_for_constexpr_object here.
20 (start_decl): Not here. Don't ICE on constexpr reference.
21 (check_for_uninitialized_const_var): Don't handle constexpr specially.
22 (grokfndecl): Set DECL_DECLARED_CONSTEXPR_P.
23 (check_static_variable_definition): Give friendly message about
25 (grokdeclarator): Complain about typedef and volatile with constexpr.
26 Reorganize. Give sorry about non-static data members in C++0x mode.
27 (start_preparsed_function): Check validate_constexpr_fundecl here.
28 (check_function_type): Not here.
29 * decl2.c (finish_static_data_member_decl): Don't complain about
31 * parser.c (CP_PARSER_FLAGS_ONLY_TYPE_OR_CONSTEXPR): New.
32 (cp_parser_condition): Pass it to cp_parser_decl_specifier_seq.
33 (cp_parser_decl_specifier_seq): Handle it.
34 (cp_parser_explicit_instantiation): Diagnose inline and constexpr.
36 * class.c (check_bases): Propagate non-literality.
37 (check_field_decls): Likewise.
38 (finalize_literal_type_property): New.
39 (check_bases_and_members): Call it.
40 * cp-tree.h (TYPE_HAS_CONSTEXPR_CTOR): New.
41 (lang_type_class): Add has_constexpr_ctor field.
42 (DECL_DECLARED_CONSTEXPR_P): Strip template.
43 * decl.c (grok_special_member_properties): Set
44 TYPE_HAS_CONSTEXPR_CTOR.
46 2010-10-27 Jason Merrill <jason@redhat.com>
48 * call.c (build_integral_nontype_arg_conv): New.
49 * cp-tree.h: Declare it.
50 * pt.c (convert_nontype_argument): Use it.
52 * error.c (dump_simple_decl): Print constexpr.
54 * cvt.c (build_up_reference): Use target_type for the temporary var.
56 * except.c (build_throw): Set EXPR_LOCATION.
58 * tree.c (build_cplus_new): Handle CONSTRUCTOR.
60 * semantics.c (finish_compound_stmt): Avoid creating an
61 unnecessary BIND_EXPR.
63 * call.c (convert_like_real): Don't check narrowing if the element
64 is also an initializer-list.
66 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
68 * parser.c (cp_parser_objc_at_property_declaration): Recognize
69 RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC.
70 Do not use objc_set_property_attr, but use local variables
71 instead. Detect repeated usage of setter, getter and ivar
72 attributes. Improved error processing when a setter name does not
73 end in ':'. Do not check for CPP_CLOSE_PAREN after we determined
74 that the token is a keyword. Updated call to
75 objc_add_property_declaration.
77 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
79 * parser.c (cp_parser_objc_property_decl): Renamed to
80 cp_parser_objc_struct_declaration. Return the parsed trees
81 instead of calling objc_add_property_variable directly. Detect
82 missing or invalid declspecs. Implemented attributes. Do not eat
83 the ';' at the end. Exit loop whenever a non-comma is parsed, not
85 (cp_parser_objc_at_property): Renamed to
86 cp_parser_objc_at_property_declaration. Updated calls to
87 objc_add_property_variable, now objc_add_property_declaration, and
88 to cp_parser_objc_property_decl, now
89 cp_parser_objc_struct_declaration. Rewritten all code to be more
90 robust in dealing with syntax errors, and almost identical to the
91 one in c_parser_objc_at_property_declaration.
92 (cp_parser_objc_property_attrlist): Removed.
93 (cp_parser_objc_method_prototype_list): Updated call to
94 cp_parser_objc_at_property.
95 (cp_parser_objc_method_definition_list): Same change.
96 (cp_parser_objc_class_ivars): Detect a number of invalid
97 declarations of instance variables and produce errors when they
100 2010-10-26 Jason Merrill <jason@redhat.com>
102 * tree.c (build_vec_init_expr): Split out from...
103 (build_array_copy): ...here.
104 * init.c (perform_member_init): Use it.
105 * cp-tree.h: Declare it.
106 * cp-gimplify.c (cp_gimplify_init_expr): Don't gimplify the slot for
107 VEC_INIT_EXPR and AGGR_INIT_EXPR here. Drop pre/post parameters.
108 (cp_gimplify_expr): Handle array default-initialization via
111 * tree.c (stabilize_expr): Handle xvalues properly.
113 * call.c (build_over_call): Use argarray[0] for 'this' argument.
115 * decl.c (finish_function): Don't look at function_depth.
117 2010-10-25 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
119 Implement opaque-enum-specifiers for C++0x.
120 * cp-tree.h (SET_OPAQUE_ENUM_P): New.
121 (OPAQUE_ENUM_P): New.
122 (ENUM_FIXED_UNDERLYING_TYPE_P): New.
123 (start_enum): Update prototype.
124 (finish_enum_value_list): New prototype.
125 * parser.c (cp_parser_elaborated_type_specifier): Issue a pedwarn if
126 "enum class" is used in an elaborated-type-specifier.
127 (cp_parser_enum_specifier): Rewrite to parse opaque-enum-specifiers.
128 * decl.c (copy_type_enum): New.
129 (finish_enum_value_list): New, with code from finish_enum.
130 (finish_enum): A lot of code removed. Added a gcc_assert.
131 (start_enum): Add parameters enumtype and is_new.
132 Rewrite to work with opaque-enum-specifiers.
133 * pt.c (maybe_process_partial_specialization): Allow for template
134 specialization of enumerations, with a pedwarn.
135 (lookup_template_class): Update call to start_enum. Call to
137 (tsubst_enum): Call to begin_scope, finish_scope and
138 finish_enum_value_list.
140 2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
142 Removed Objective-C++ specific replacement of cxx_printable_name.
143 * cp-objcp-common.h: Added LANG_HOOKS_DECL_PRINTABLE_NAME, set
144 to cxx_printable_name for both C++ and Objective-C++.
145 * cp-lang.h: Removed LANG_HOOKS_DECL_PRINTABLE_NAME.
147 * error.c (dump_decl): For Objective-C++, call
148 objc_maybe_printable_name here ...
149 * tree.c (cxx_printable_name_internal): ... instead of here.
151 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
153 * tree.c (cxx_printable_name_internal): In Objective-C++, call
154 objc_maybe_printable_name.
156 2010-10-22 Jason Merrill <jason@redhat.com>
159 * pt.c (instantiate_class_template): Don't instantiate default
163 * init.c (build_vec_init): Handle memberwise move.
165 2010-10-21 Paolo Carlini <paolo.carlini@oracle.com>
168 * call.c (add_function_candidate): Don't use TREE_VALUE on null
171 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
173 * parser.c (cp_parser_objc_method_type): Mark inline. Return a
174 bool instead of calling objc_set_method_type.
175 (cp_parser_objc_method_signature): Updated calls to
176 cp_parser_objc_method_type and to objc_build_method_signature.
177 (cp_parser_objc_method_prototype_list): Updated calls to
178 objc_add_method_declaration. Use token->type to determine if it
179 is a class method or not.
180 (cp_parser_objc_method_definition_list): Same change.
182 2010-10-20 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
185 * parser.c (cp_convert_range_for): Call cp_finish_decl
186 instead of finish_expr_stmt.
188 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
190 * cp-lang.c (finish_file): Removed.
191 * decl2.c (cp_write_global_declarations): Call
192 objc_write_global_declarations when compiling Objective-C++.
194 2010-10-19 Paolo Carlini <paolo.carlini@oracle.com>
197 * pt.c (add_to_template_args): Check extra_args for error_mark_node.
198 (coerce_template_parms): Likewise for args.
200 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
202 Implemented parsing @synthesize and @dynamic for Objective-C++.
203 * parser.c (cp_parser_objc_method_definition_list): Recognize
204 RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
205 (cp_parser_objc_at_dynamic_declaration): New.
206 (cp_parser_objc_at_synthesize_declaration): New.
208 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
210 * parser.c (cp_parser_objc_identifier_list): Check the return
211 value of cp_parser_identifier and react if it is error_mark_node.
213 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
215 Merge from apple/trunk branch on FSF servers.
217 2005-03-01 Fariborz Jahanian <fjahanian@apple.com>
220 * call.c (standard_conversion, implicit_conversion): Ignore
221 'volatile' attribute of artificially volatized type in objc when
222 evaluating various conversion weights.
224 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
227 * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the
228 artiificially 'volatized' type before doing pointer comparison.
230 2010-10-18 Jakub Jelinek <jakub@redhat.com>
233 * semantics.c (finish_goto_stmt): Call mark_rvalue_use on computed
236 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
238 Merge from apple/trunk branch on FSF servers.
240 2006-04-19 Fariborz Jahanian <fjahanian@apple.com>
243 * parser.c (cp_parser_simple_type_specifier): Don't lookup for
244 objc object types if type is scope qualified.
246 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
248 Merge from apple/trunk branch on FSF servers.
250 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
253 * lex.c (unqualified_name_lookup_error): Issue diagnostic
254 for private 'ivar' access.
256 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
258 * parser.c (cp_parser_objc_visibility_spec): Update to use visibility
259 enum, and handle @package.
261 2010-10-15 Jason Merrill <jason@redhat.com>
264 * tree.c (cp_build_qualified_type_real): Don't reuse a variant
265 with a different typedef variant of the element type.
267 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
269 merge from FSF apple 'trunk' branch.
270 2006 Fariborz Jahanian <fjahanian@apple.com>
272 Radars 4436866, 4505126, 4506903, 4517826
273 * typeck.c (finish_class_member_access_expr): Handle CLASS.property
275 (cp_build_modify_expr): Likewise.
276 * parser.c (cp_parser_objc_method_prototype_list): Handle @property.
277 (cp_parser_objc_method_definition_list): Likewise.
278 (cp_parser_objc_property_decl): New.
279 (cp_parser_objc_property_attrlist): New.
280 (cp_parser_objc_at_property): New.
282 2010-10-14 Richard Guenther <rguenther@suse.de>
285 * cp-tree.h (NULLPTR_TYPE_P): Adjust.
286 * decl.c (cxx_init_decl_processing): Build a NULLPTR_TYPE node,
288 * error.c (dump_type): Handle NULLPTR_TYPE.
289 (dump_type_prefix): Likewise.
290 (dump_type_suffix): Likewise.
291 * mangle.c (write_type): Likewise.
292 * name-lookup.c (arg_assoc_type): Likewise.
293 * rtti.c (typeinfo_in_lib_p): Likewise.
294 * pt.c (tsubst): Likewise.
296 2010-10-13 Jason Merrill <jason@redhat.com>
299 * class.c (fixup_attribute_variants): New fn.
300 * cp-tree.h: Declare it.
301 * pt.c (instantiate_class_template): Call it.
302 * semantics.c (begin_class_definition): Call it.
304 2010-10-13 Richard Henderson <rth@redhat.com>
306 * cp-lang.c (cp_eh_personality): Update call to
307 build_personality_function.
308 * except.c (choose_personality_routine): Update function comment.
310 2010-10-13 Richard Guenther <rguenther@suse.de>
312 * tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and
313 clear DECL_CHAIN of NAMESPACE_DECLs.
315 2010-10-11 Martin Jambor <mjambor@suse.cz>
318 * cp-tree.h (current_class_ref): Check that cp_function_chain is
320 * call.c (build_cxx_call): Likewise.
322 2010-10-10 Jason Merrill <jason@redhat.com>
324 * pt.c (tsubst_default_argument): Handle DEFAULT_ARG.
325 (tsubst_default_arguments): Only do this once for cloned fns.
326 (tsubst): Use typedef_variant_p. Handle LANG_TYPE. Don't
328 (tsubst_expr): Avoid calling tsubst_expr for non-expressions.
329 (tsubst_copy_and_build): Likewise.
330 (tsubst_initializer_list): Likewise.
331 (tsubst_copy): Change default to gcc_unreachable. Handle
332 OVERLOAD and PTRMEM_CST.
334 2010-10-10 Jason Merrill <jason@redhat.com>
338 * pt.c (tsubst_copy) [INTEGER_CST]: Instantiate the type.
340 2010-10-07 Andi Kleen <ak@linux.intel.com>
342 * Make-lang.in (c++_OBJS): Remove dummy-checksum.o.
343 (cc1plus-dummy): Remove.
344 (cc1plus-checksum): Change to run checksum over object files
347 2010-10-08 Joseph Myers <joseph@codesourcery.com>
349 * cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
351 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
353 * cp-tree.def: Changed type of AT_ENCODE_EXPR from tcc_unary to
355 * cxx-pretty-print.c (pp_cxx_unary_expression): Added case for
357 * error.c (dump_expr): Added case for AT_ENCODE_EXPR.
358 * pt.c (tsubst_copy): Added case for AT_ENCODE_EXPR.
359 (value_dependent_expression_p): Added case for AT_ENCODE_EXPR.
360 (type_dependent_expression_p): Added case for AT_ENCODE_EXPR.
361 * parser.c (cp_parser_objc_encode_expression): Updated comment.
363 2010-10-07 Nicola Pero <nicola@nicola.brainstorm.co.uk>
365 Merge from apple/trunk branch on FSF servers.
367 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
370 * parser.c (cp_parser_objc_interstitial_code): Recognize
371 and parse RID_NAMESPACE keyword.
373 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
375 * parser.c (cp_parser_objc_method_tail_params_opt): Peek new token after
376 finding ellipsis, before checking for attributes.
378 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
380 Merge from apple/trunk branch on FSF servers.
381 * cp-tree.def: Added AT_ENCODE_EXPR here instead of to the no
382 longer existing gcc/c-common.def.
384 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
387 * pt.c (tsubst_copy_and_build): Instantiate @endcode(T).
388 * parser.c (cp_parser_objc_encode_expression): Build a templatized
389 parse tree for @encode(T).
391 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
394 * c-common.def: Add new expression code AT_ENCODE_EXPR.
396 2010-10-06 Eric Botcazou <ebotcazou@adacore.com>
399 * typeck.c (cp_build_addr_expr_1): Add check for incomplete types in
400 code folding offsetof-like computations.
402 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
405 * parser.c (cp_parser_objc_class_interface): If no identifier
406 follows an @interface token, stop parsing the interface after
408 (cp_parser_objc_class_implementation): If no identifier follows an
409 @implementation token, stop parsing the implementation after
412 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
415 * parser.c (cp_parser_objc_method_keyword_params): If the required
416 colon is not found while parsing parameters, stop parsing them.
418 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
421 * parser.c (cp_parser_objc_class_ivars): Do not eat the EOF or
422 @end after detecting it. Print an error if @end is found without
424 (cp_parser_objc_method_prototype_list): Do not eat the EOF after
425 detecting it. Fixed reading the next token when continuing
426 because of an error in a method signature. Print an error if EOF
427 is found without an '@end'.
428 (cp_parser_objc_method_definition_list): Same change.
430 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
432 Merge from apple/trunk branch on FSF servers:
434 2005-10-17 Fariborz Jahanian <fjahanian@apple.com>
437 * parser.c (cp_parser_objc_method_keyword_params): Check for valid
438 method parameters and issue error.
439 (cp_parser_objc_method_definition_list): Check for invalid tokens
440 which cannot start a function definition.
442 2005-10-14 Fariborz Jahanian <fjahanian@apple.com>
445 * parser.c (cp_parser_objc_message_args): Check for missing message
446 arguments and syntax error.
448 2005-10-13 Fariborz Jahanian <fjahanian@apple.com>
451 * parser.c (cp_parser_objc_class_ivars): Check for @end/eof while
454 2005-08-15 Ziemowit Laski <zlaski@apple.com>
457 * parser.c (cp_parser_objc_interstitial_code): Catch stray
458 '{' and '}' tokens and issue appropriate errors.
460 2005-08-02 Ziemowit Laski <zlaski@apple.com>
463 (cp_parser_statement_seq_opt): In addition to '}' and
464 end-of-file, a statement sequence may also be terminated
467 2010-10-05 Joseph Myers <joseph@codesourcery.com>
469 * cp-tree.h (cxx_print_error_function,
470 cxx_initialize_diagnostics): Declare using diagnostic_context
473 2010-10-04 Andi Kleen <ak@linux.intel.com>
475 * Make-lang.in (g++, cc1plus): Add + to build rule.
477 2010-10-04 Jason Merrill <jason@redhat.com>
479 * tree.c (decl_storage_duration): New.
480 * cp-tree.h: Declare it.
481 (duration_kind): Return values.
483 2010-10-03 Jason Merrill <jason@redhat.com>
485 * typeck.c (require_complete_type_sfinae): Add complain parm to...
486 (require_complete_type): ...this function.
487 (cp_build_array_ref, convert_arguments): Use it.
488 (convert_for_initialization, cp_build_modify_expr): Likewise.
489 * cp-tree.h: Declare it.
490 * call.c (build_over_call): Use it.
492 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
494 merge from FSF 'apple/trunk' branch.
495 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
498 * cp/parser.c (cp_parser_objc_interstitial_code): For
499 @optional/@required set the optional/required flag.
501 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
503 * parser.c (cp_lexer_get_preprocessor_token): Tidied up comments
504 and indentation when finding an Objective-C++ CPP_AT_NAME token.
506 2010-09-29 Richard Guenther <rguenther@suse.de>
508 * cp-tree.h (CP_DECL_CONTEXT): Check DECL_FILE_SCOPE_P.
509 (CP_TYPE_CONTEXT): Similar.
510 (FROB_CONTEXT): Frob global_namespace to the global
511 TRANSLATION_UNIT_DECL.
512 * decl.c (cxx_init_decl_processing): Build a TRANSLATION_UNIT_DECL,
513 set DECL_CONTEXT of global_namespace to it.
514 (start_decl): Use CP_DECL_CONTEXT and test TYPE_P
515 instead of zeroing context.
516 (cp_finish_decl): Use DECL_FILE_SCOPE_P.
517 (grokfndecl): Likewise.
518 (start_preparsed_function): Likewise.
519 * name-lookup.c (maybe_push_decl): Use DECL_NAMESPACE_SCOPE_P.
520 (namespace_binding): Use SCOPE_FILE_SCOPE_P.
521 * pt.c (template_class_depth): Use CP_TYPE_CONTEXT.
522 (is_specialization_of_friend): Use CP_DECL_CONTEXT.
523 (push_template_decl_real): Likewise.
524 (tsubst_friend_class): Likewise. Adjust context comparisons.
525 (instantiate_class_template): Use CP_TYPE_CONTEXT.
526 (tsubst): Do not substitute into TRANSLATION_UNIT_DECL.
527 * cxx-pretty-print.c (pp_cxx_nested_name_specifier): Use
530 2010-09-29 Yao Qi <yao@codesourcery.com>
532 * decl.c (get_atexit_node): Fix typo.
534 2010-09-28 Jason Merrill <jason@redhat.com>
536 * tree.c (lvalue_kind): Rename from lvalue_p_1, make nonstatic.
537 (real_lvalue_p): Take const_tree.
539 * typeck.c (lvalue_or_else): Make temporary arg a permerror.
540 (cp_build_addr_expr_1): Likewise.
542 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
544 Partially merged from apple/trunk branch on FSF servers:
545 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
546 Radar 3803157 (method attributes)
548 * parser.c (cp_parser_objc_method_keyword_params): Handle attributes.
549 (cp_parser_objc_method_tail_params_opt): Likewise.
550 (cp_parser_objc_method_signature): Likewise.
551 (cp_parser_objc_method_maybe_bad_prefix_attributes): New.
552 (cp_parser_objc_method_prototype_list): Handle attributes.
553 (cp_parser_objc_method_definition_list): Likewise.
555 2010-09-28 Richard Henderson <rth@redhat.com>
557 * cp-lang.c: Include "target.h".
558 (cp_eh_personality): Use targetm.except_unwind_info.
559 * Make-lang.in (cp-lang.o): Update deps.
561 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
563 * parser.c (cp_parser_objc_valid_prefix_attributes): New.
564 (cp_parser_declaration): Parse prefix attributes for ObjC++.
565 (cp_parser_objc_protocol_declaration): Handle attributes.
566 (cp_parser_objc_class_interface): Likewise.
567 (cp_parser_objc_declaration): Likewise.
569 2010-09-27 Jason Merrill <jason@redhat.com>
571 Require lvalues as specified by the standard.
572 * typeck.c (lvalue_or_else): Use real_lvalue_p.
573 (cp_build_addr_expr_1): Split out of cp_build_unary_op.
574 (cp_build_addr_expr, cp_build_addr_expr_strict): Interfaces.
575 (decay_conversion, get_member_function_from_ptrfunc): Adjust.
576 (build_x_unary_op, build_reinterpret_cast_1): Adjust.
577 (build_const_cast_1): Adjust.
578 * cp-tree.h: Declare new fns.
579 * call.c (build_this, convert_like_real, build_over_call): Adjust.
580 (initialize_reference): Adjust.
581 * class.c (build_base_path, convert_to_base_statically): Adjust.
582 (build_vfn_ref, resolve_address_of_overloaded_function): Adjust.
583 * cvt.c (build_up_reference, convert_to_reference): Adjust.
584 * decl.c (register_dtor_fn): Adjust.
585 * decl2.c (build_offset_ref_call_from_tree): Adjust.
586 * except.c (initialize_handler_parm): Adjust.
587 * init.c (build_offset_ref, build_delete, build_vec_delete): Adjust.
588 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Adjust.
589 * tree.c (stabilize_expr): Adjust.
591 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
593 Merge from apple/trunk branch on FSF servers:
595 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
598 * typeck.c (composite_pointer_type): Call objc_have_common_type
599 when comparing two objective-c pointer types.
601 2005-07-18 Ziemowit Laski <zlaski@apple.com>
604 * call.c (standard_conversion): Do not issue warnings when
605 comparing ObjC pointer types.
607 2005-06-22 Ziemowit Laski <zlaski@apple.com>
610 * call.c (standard_conversion): Allow for a pointer conversion
611 between any two ObjC pointer types.
612 * typeck.c (composite_pointer_type): Determine common type
613 for two ObjC pointer types.
615 2010-09-24 Jan Hubicka <jh@suse.cz>
617 * decl.c (finish_function): Use decl_replaceable_p
618 * method.c (make_alias_for_thunk): Update call of
619 cgraph_same_body_alias.
621 2010-09-24 Jason Merrill <jason@redhat.com>
623 * decl.c (compute_array_index_type): Remember type dependence of
625 * pt.c (dependent_type_p_r): Don't recompute it here.
627 * error.c (dump_expr) [CASE_CONVERT]: Print conversion between
628 reference and pointer to the same type as "*" or "&".
630 2010-09-24 Nicola Pero <nicola.pero@meta-innovation.com>
632 * typeck.c (warn_args_num): Use warning 'too many arguments to
633 method [methodname]' for an Objective-C method instead of the less
634 satisfactory 'too many arguments to function' (with no method
637 2010-09-21 Jason Merrill <jason@redhat.com>
639 * mangle.c (write_expression) [SCOPE_REF]: Only do -fabi-version=1
640 special handling if we know the member.
642 2010-09-18 Jason Merrill <jason@redhat.com>
644 * call.c (compare_ics): Do lvalue/rvalue reference binding
645 comparison for ck_list, too.
647 2010-09-15 Jason Merrill <jason@redhat.com>
649 * semantics.c (finish_id_expression): Diagnose use of function
650 parms in evaluated context outside function body.
652 * decl2.c (grokbitfield): Diagnose non-integral width.
654 * call.c (convert_like_real): Use the underlying type of the
655 reference for the temporary.
657 2010-09-15 Jakub Jelinek <jakub@redhat.com>
660 * class.c (build_vtbl_initializer): Use fn instead of init's operand
661 as first argument to FDESC_EXPR.
663 2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
666 * decl.c (grokdeclarator): Check build_memfn_type return value
669 2010-09-13 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
671 * semantics.c (finish_for_stmt): Always test flag_new_for_scope.
672 (begin_range_for_stmt): Likewise.
674 2010-09-11 Rodrigo Rivas <rodrigorivascosta@gmail.com>
676 Implement range-based for-statements.
677 * cp-tree.def (RANGE_FOR_STMT): New.
678 * cp-tree.h (RANGE_FOR_DECL, RANGE_FOR_EXPR, RANGE_FOR_BODY): New.
679 (cp_convert_range_for): Declare.
680 * pt.c (tsubst_expr): Add RANGE_FOR_STMT.
681 (tsubst_copy_and_build): perform_koenig_lookup takes extra argument.
682 * semantics.c (begin_range_for_stmt): New.
683 (finish_range_for_decl): New.
684 (finish_for_stmt): Accept also RANGE_FOR_STMT.
685 (perform_koenig_lookup): Add extra argument include_std.
686 * parser.c (cp_parser_c_for): New with code from
687 cp_parser_iteration_statement().
688 (cp_parser_range_for): New.
689 (cp_convert_range_for): New.
690 (cp_parser_iteration_statement): Add range-for support.
691 (cp_parser_condition): Adjust comment.
692 (cp_parser_postfix_expression): perform_koenig_lookup takes extra
694 * dump.c (cp_dump_tree): Add RANGE_FOR_STMT.
695 * cxx-pretty-print.c: Likewise.
696 * lex.c (cxx_init): Likewise.
697 * name-lookup.c (lookup_function_nonclass): Add extra argument
699 (lookup_arg_dependent): Likewise.
700 * name-lookup.h: Likewise.
702 2010-09-10 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
705 * error.c (maybe_warn_cpp0x): Add new warning
706 CPP0X_INLINE_NAMESPACES.
707 * parser.c (cp_parser_namespace_definition): Likewise.
708 * cp-tree.h (cpp0x_warn_str): Likewise.
710 2010-09-10 Richard Guenther <rguenther@suse.de>
712 * decl.c (reshape_init_vector): For VECTOR_TYPEs, use
713 TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE.
715 2010-09-10 Jan Hubicka <jh@suse.cz>
717 PR tree-optimization/45605
718 * cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in
721 2010-09-08 Jakub Jelinek <jakub@redhat.com>
724 * pt.c (tsubst) <case INTEGER_TYPE>: Call mark_rvalue_use
725 before calling fold_decl_constant_value.
727 2010-09-07 Arnaud Charlet <charlet@adacore.com>
729 * cp-tree.h (build_enumerator): Add new location_t parameter.
730 (build_lang_decl_loc): New function.
731 * decl.c (build_enumerator): New parameter loc. Use it when calling
732 build_decl. Replace build_lang_decl with build_lang_decl_loc.
733 * pt.c (tsubst_enum): Adjust call to build_enumerator.
734 * parser.c (cp_parser_enumerator_definition): Ditto.
735 * lex.c (build_lang_decl_loc): New function.
737 2010-09-06 Dodji Seketeli <dodji@redhat.com>
742 * tree.c (strip_typedefs): Strip typedefs from the context of
745 2010-09-06 Mark Mitchell <mark@codesourcery.com>
747 * typeck.c (cp_build_binary_op): Call do_warn_double_promotion.
748 * call.c (build_conditional_expr): Likewise.
749 (convert_arg_to_ellipsis): Likewise.
751 2010-09-06 Arnaud Charlet <charlet@adacore.com>
753 * parser.c (make_pointer_declarator, make_reference_declarator,
754 make_call_declarator, make_array_declarator): Set declarator->id_loc.
755 (cp_parser_init_declarator): Adjust location of decl if appropriate.
757 2010-09-06 Jason Merrill <jason@redhat.com>
759 * call.c (implicit_conversion): Fix value-init of enums.
760 (convert_like_real): Likewise.
762 * decl.c (cp_finish_decl): Don't change init for auto deduction.
764 * pt.c (fold_non_dependent_expr_sfinae): Split out from...
765 (fold_non_dependent_expr): ...here.
766 (convert_nontype_argument): Use it. Take complain parm.
767 Use perform_implicit_conversion instead of ocp_convert.
768 Allow cv-qual changes.
769 (convert_template_argument): Pass complain down.
770 (tsubst_template_arg): Suppress constant expression warnings.
773 * method.c (synthesized_method_walk): In constructors, also check
774 subobject destructors.
776 * semantics.c (finish_compound_literal): Always build a
779 2010-08-30 Paolo Carlini <paolo.carlini@oracle.com>
782 * decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs.
784 2010-08-30 Jakub Jelinek <jakub@redhat.com>
787 * parser.c (cp_parser_omp_atomic): Handle boolean
788 {PRE,POST}_INCREMENT.
790 2010-08-29 Jason Merrill <jason@redhat.com>
793 * parser.c (cp_parser_parameter_declaration): Pop parameter decls
794 after tentative parsing.
796 2010-08-22 Joseph Myers <joseph@codesourcery.com>
798 * Make-lang.in (g++spec.o): Update dependencies.
799 * g++spec.c: Include opts.h
800 (MATH_LIBRARY, LIBSTDCXX): Remove initial "-l".
801 (lang_specific_driver): Use cl_decoded_option structures.
803 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
805 * call.c: Use FOR_EACH_VEC_ELT.
810 * except.c: Likewise.
811 * mangle.c: Likewise.
812 * method.c: Likewise.
813 * name-lookup.c: Likewise.
814 * parser.c: Likewise.
817 * semantics.c: Likewise.
818 * typeck2.c: Likewise.
820 2010-08-19 Jason Merrill <jason@redhat.com>
822 * call.c (reference_related_p): Check for error_mark_node.
823 (add_function_candidate): Check it instead of
824 same_type_ignoring_top_level_qualifiers_p.
827 * init.c (build_new_1): Don't use build_value_init in a template.
828 (build_value_init): Make sure we don't.
831 * cp-gimplify.c (cp_gimplify_expr): Also remove assignment
832 of empty class CONSTRUCTOR.
834 * except.c (pending_noexcept, pending_noexcept_checks): New.
835 (perform_deferred_noexcept_checks): New.
836 (maybe_noexcept_warning): Split from...
837 (finish_noexcept_expr): ...here. Adjust.
838 * decl2.c (cp_write_global_declarations): Call
839 perform_deferred_noexcept_checks.
840 * cp-tree.h: And declare it.
842 2010-08-18 Nathan Froyd <froydnj@codesourcery.com>
845 * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to
848 2010-08-17 Kai Tietz <kai.tietz@onevision.com>
850 * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
851 or if -fms-extensions is enabled check, check permissive.
853 2010-08-09 Jason Merrill <jason@redhat.com>
856 * pt.c (lookup_template_class): Don't re-coerce outer parms.
858 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
860 * call.c (add_builtin_candidates): Use VECs for local variable
861 `types'. Adjust remainder of function accordingly.
863 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
865 * name-lookup.c (is_associated_namespace): Convert local variables
866 to be VECs instead of TREE_LISTs.
868 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
870 * tree.c (varargs_function_p): Use stdarg_p.
872 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
874 * parser.c (cp_default_arg_entry): Declare. Declare a VEC of it.
875 (cp_unparsed_functions_entry): Declare. Declare a VEC of it.
876 (cp_parser) [unparsed_functions_queues]: Rename to unparsed_queues.
877 Change type to a VEC.
878 (unparsed_funs_with_default_args): Define.
879 (unparsed_funs_with_definitions): Define.
880 (push_unparsed_function_queues): New function.
881 (cp_parser_new): Call it.
882 (pop_unparsed_function_queues): New function.
883 (cp_parser_class_specifier): Adjust processing of unparsed functions.
884 (cp_parser_template_declaration_after_export): Use VEC_safe_push.
885 (cp_parser_save_member_function_body): Likewise.
886 (cp_parser_late_parsing_for_member): Call push_unparsed_function_queues
887 and pop_unparsed_function_queues.
888 (cp_parser_late_parsing_default_args): Likewise.
889 (cp_parser_save_default_args): Use VEC_safe_push.
891 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
893 * name-lookup.h (cp_label_binding): Declare. Declare a VEC type
895 (cp_binding_level): Convert shadowed_labels and dead_vars_from_for
897 * decl.c (poplevel): Adjust for type changes.
898 (declare_local_label): Likewise.
900 2010-08-06 Jason Merrill <jason@redhat.com>
902 * typeck.c (complete_type_or_maybe_complain): Split out from...
903 (complete_type_or_else): Here.
904 (build_class_member_access_expr): Call it.
905 (finish_class_member_access_expr): Likewise.
906 * call.c (build_special_member_call): Likewise.
907 * cvt.c (build_expr_type_conversion): Likewise.
908 * init.c (build_new): Likewise.
909 * typeck2.c (build_functional_cast): Likewise.
910 * cp-tree.h: Declare it.
912 * init.c (build_value_init): Add complain parm.
913 (build_value_init_noctor): Likewise.
914 (perform_member_init): Pass it.
915 (expand_aggr_init_1): Likewise.
916 (build_new_1): Likewise.
917 (build_vec_init): Likewise.
918 * pt.c (tsubst_expr): Likewise.
919 * typeck2.c (build_functional_cast): Likewise.
921 * tree.c (build_target_expr_with_type): Handle error_mark_node.
923 * typeck.c (decay_conversion): Any expression with type nullptr_t
926 2010-07-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
929 * decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED.
931 2010-07-27 Jason Merrill <jason@redhat.com>
933 * pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR
934 from build_value_init.
935 * init.c (build_value_init_noctor): Give error for unknown array
938 2010-07-27 Joseph Myers <joseph@codesourcery.com>
940 * cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
942 2010-07-27 Joseph Myers <joseph@codesourcery.com>
944 * cp-objcp-common.c (cxx_initialize_diagnostics): First call
945 c_common_initialize_diagnostics.
946 * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK,
947 LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
949 2010-07-21 Jason Merrill <jason@redhat.com>
951 * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
953 * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
956 2010-07-20 Jeffrey Yasskin <jyasskin@google.com>
959 * pt.c (instantiate_class_template): Propagate the template's
960 location to its instance.
962 2010-07-20 Jason Merrill <jason@redhat.com>
965 * pt.c (tsubst_copy_and_build): Rework last change.
968 * pt.c (tsubst_copy_and_build): Handle partial substitution of
971 2010-07-19 Jason Merrill <jason@redhat.com>
974 * semantics.c (finish_decltype_type): Correct decltype
975 of parenthesized rvalue reference variable.
978 * tree.c (cp_tree_equal): Compare type of *CAST_EXPR.
979 * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR.
981 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com>
984 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t
986 * cp-tree.h: Adjust declaration.
987 * init.c (perform_member_init): Adjust caller.
988 * decl.c (grok_reference_init, cp_finish_decl): Likewise.
989 * typeck2.c (store_init_value): Likewise.
990 (build_functional_cast): Pass complain argument to
991 build_x_compound_expr_from_list.
993 2010-07-16 Jason Merrill <jason@redhat.com>
996 * pt.c (process_partial_specialization): Diagnose partial
997 specialization after instantiation.
998 (most_specialized_class): Add complain parm.
1000 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.
1002 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1004 * init.c (build_new_1): Use cp_build_function_call_nary instead of
1005 cp_build_function_call.
1007 2010-07-15 Jason Merrill <jason@redhat.com>
1010 * call.c (add_function_candidate): If we're working on an implicit
1011 declaration, don't consider candidates that won't match.
1012 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
1013 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
1016 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1017 (TYPE_HAS_USER_OPEQ): New.
1018 * decl.c (grok_special_member_properties): Set it.
1019 * class.c (add_implicitly_declared_members): Don't lazily declare
1020 constructors/operator= if a base or member has a user-declared one.
1021 (check_bases_and_members, check_bases): Adjust.
1022 (check_field_decls, check_field_decl): Adjust.
1024 2010-07-15 Anatoly Sokolov <aesok@post.ru>
1026 * decl.c (integer_three_node): Remove.
1027 (cxx_init_decl_processing): Do not initialize the integer_three_node.
1028 * cp-tree.h (integer_three_node): Remove.
1030 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1032 * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
1034 * class.c: Likewise.
1035 * cp-gimplify.c: Likewise.
1037 * decl2.c: Likewise.
1039 * mangle.c: Likewise.
1040 * name-lookup.c: Likewise.
1041 * optimize.c: Likewise.
1042 * parser.c: Likewise.
1045 * search.c: Likewise.
1046 * semantics.c: Likewise.
1047 * typeck.c: Likewise.
1048 * typeck2.c: Likewise.
1050 2010-07-14 Jason Merrill <jason@redhat.com>
1052 * init.c (sort_mem_initializers): Rename "field_type" to "ctx".
1053 (build_field_list): Cache field type.
1055 Implement C++0x unrestricted unions (N2544)
1056 * class.c (check_field_decl): Loosen union handling in C++0x.
1057 * method.c (walk_field_subobs): Split out from...
1058 (synthesized_method_walk): ...here. Set msg before loops.
1059 (process_subob_fn): Check for triviality in union members.
1060 * init.c (sort_mem_initializers): Splice out uninitialized
1061 anonymous unions and union members.
1062 (push_base_cleanups): Don't automatically destroy anonymous unions
1065 2010-07-13 Jason Merrill <jason@redhat.com>
1068 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1069 (TYPE_HAS_USER_OPEQ): New.
1070 * decl.c (grok_special_member_properties): Set it.
1071 * class.c (add_implicitly_declared_members): Don't lazily declare
1072 constructors/operator= if a base or member has a user-declared one.
1073 (check_bases_and_members, check_bases): Adjust.
1074 (check_field_decls, check_field_decl): Adjust.
1075 * method.c (synthesized_method_walk): Initialize check_vdtor.
1078 * mangle.c (write_type): Canonicalize.
1079 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
1080 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
1082 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
1085 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
1087 * typeck.c (get_delta_difference): Update prototype, add a
1088 tsubst_flags_t parameter; update get_delta_difference_1 calls and
1089 add checks for error_mark_node.
1090 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
1091 parameter; update lookup_base call.
1092 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
1093 parameter; update get_delta_difference call and add check for
1095 (convert_ptrmem): Update prototype, add a tsubst_flags_t
1096 parameter; update get_delta_difference call and add check for
1097 error_mark_node; update build_ptrmemfunc call.
1098 (build_static_cast_1): Adjust convert_ptrmem call.
1099 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
1100 (cp_build_unary_op): Adjust build_ptrmemfunc call.
1101 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
1102 and build_ptrmemfunc calls.
1103 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
1105 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
1108 * call.c (build_temp): Add tsubst_flags_t complain parameter;
1109 adjust build_special_member_call call, pass complain.
1110 (convert_like_real): Adjust build_temp call, pass complain.
1112 2010-07-09 Jason Merrill <jason@redhat.com>
1115 * cp-tree.h (BV_LOST_PRIMARY): New macro.
1116 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
1117 Set BV_LOST_PRIMARY.
1118 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
1120 2010-07-08 Jason Merrill <jason@redhat.com>
1123 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
1124 virtual bases for covariant thunks.
1126 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
1128 * cp-tree.h: Do not include toplev.h.
1130 2010-07-06 Jason Merrill <jason@redhat.com>
1133 * call.c (is_std_init_list): Look through typedefs.
1136 * init.c (build_offset_ref): If scope isn't dependent,
1137 don't exit early. Look at TYPE_MAIN_VARIANT.
1138 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
1140 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
1142 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
1144 * cp-tree.h (impl_conv_void): New type.
1145 (convert_to_void): Adjust prototype.
1146 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
1147 diagnostic for easy translation. Change caller.
1148 * typeck.c: Update call to convert_to_void.
1149 * semantics.c: Likewise.
1152 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
1154 * decl.c (cp_finish_decl): Call add_local_decl.
1155 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
1157 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
1159 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
1162 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
1165 * parser.c (cp_parser_primary_expression): Error if local template is
1168 2010-07-02 Le-Chun Wu <lcwu@google.com>
1171 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
1172 (variable or type) shadows another type.
1174 2010-07-02 Jakub Jelinek <jakub@redhat.com>
1177 * typeck.c (convert_for_assignment): When converting a convertible
1178 vector type or objc++ types, call mark_rvalue_use.
1179 * typeck2.c (build_m_component_ref): Use return values from
1180 mark_rvalue_use or mark_lvalue_use.
1181 * class.c (build_base_path): Likewise.
1182 * call.c (build_conditional_expr): Likewise.
1184 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1187 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
1190 2010-07-01 Richard Guenther <rguenther@suse.de>
1192 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
1193 predicate we are looking for, allow non-gimplified
1196 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1199 * typeck.c (cp_build_unary_op): Early return error_mark_node when
1200 arg is NULL_TREE too.
1201 * call.c (convert_class_to_reference): Return error_mark_node when
1204 2010-06-30 Michael Matz <matz@suse.de>
1206 * repo.c (finish_repo): Fix typo.
1208 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1210 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
1212 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1214 * repo.c (pending_repo): Change type to a VEC.
1215 (finish_repo): Adjust for new type of pending_repo.
1216 (repo_emit_p): Likewise.
1218 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
1220 * tree.c: Include gimple.h. Do not include tree-flow.h
1221 * decl.c: Do not include tree-flow.h
1222 * Make-lang.in: Adjust dependencies.
1224 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1226 * decl.c (incomplete_var): Declare. Declare VECs containing them.
1227 (incomplete_vars): Adjust comment. Change type to a VEC.
1228 (maybe_register_incomplete_var): Adjust for new type.
1229 (complete_vars): Adjust iteration over incomplete_vars.
1231 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1233 * decl.c (struct named_label_entry): Change type of bad_decls field
1235 (poplevel_named_label_1): Adjust for new type of bad_decls.
1236 (check_goto): Likewise.
1238 2010-06-29 Jason Merrill <jason@redhat.com>
1240 Enable implicitly declared move constructor/operator= (N3053).
1241 * class.c (add_implicitly_declared_members): A class with no
1242 explicitly declared copy or move constructor gets both declared
1243 implicitly, and similarly for operator=.
1244 (check_bases): A type with no copy ctor does not inhibit
1245 a const copy ctor in a derived class. It does mean the derived
1247 (check_field_decl): Likewise.
1248 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
1249 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
1250 (trivially_copyable_p): Likewise.
1251 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
1252 * class.c (finish_struct_bits): Likewise.
1253 * tree.c (build_target_expr_with_type): Likewise.
1254 * typeck2.c (store_init_value): Likewise.
1256 Enable implicitly deleted functions (N2346)
1257 * class.c (check_bases_and_members): Adjust lambda flags.
1258 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
1260 * decl2.c (mark_used): Adjust error for use of deleted function.
1262 Machinery to support implicit delete/move.
1263 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
1264 has_complex_move_ctor, has_complex_move_assign bitfields.
1265 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
1266 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
1267 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
1268 (enum special_function_kind): Add sfk_move_assignment.
1269 (LOOKUP_SPECULATIVE): New.
1270 * call.c (build_over_call): Return early if it's set.
1271 (build_over_call): Use trivial_fn_p.
1272 * class.c (check_bases): If the base has no default constructor,
1273 the derived one is non-trivial. Handle move ctor/op=.
1274 (check_field_decl): Likewise.
1275 (check_bases_and_members): Handle move ctor/op=.
1276 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
1277 (type_has_move_constructor, type_has_move_assign): New.
1278 * decl.c (grok_special_member_properties): Handle move ctor/op=.
1279 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
1280 (trivial_fn_p): New.
1281 (do_build_copy_constructor): Use it.
1282 (do_build_assign_ref): Likewise. Handle move assignment.
1283 (build_stub_type, build_stub_object, locate_fn_flags): New.
1284 (locate_ctor): Use locate_fn_flags.
1285 (locate_copy, locate_dtor): Remove.
1286 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
1287 (process_subob_fn, synthesized_method_walk): New.
1288 (maybe_explain_implicit_delete): New.
1289 (implicitly_declare_fn): Use synthesized_method_walk,
1290 type_has_trivial_fn, and type_set_nontrivial_flag.
1291 (defaulted_late_check): Set DECL_DELETED_FN.
1292 (defaultable_fn_check): Handle sfk_move_assignment.
1293 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
1294 implicitly deleted move ctor/op=.
1295 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
1296 (lookup_fnfields_slot): New.
1297 * semantics.c (omp_clause_info_fndecl): Remove.
1298 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
1299 get_copy_assign, trivial_fn_p.
1300 (trait_expr_value): Adjust call to locate_ctor.
1301 * tree.c (special_function_p): Handle sfk_move_assignment.
1303 * class.c (type_has_virtual_destructor): New.
1304 * cp-tree.h: Declare it.
1305 * semantics.c (trait_expr_value): Use it.
1307 * call.c (build_over_call): Only give warnings with tf_warning.
1309 * name-lookup.c (pop_scope): Handle NULL_TREE.
1311 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
1312 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
1313 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
1314 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
1315 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
1316 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
1317 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
1318 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
1319 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
1320 (sfk_assignment_operator): Rename to sfk_copy_assignment.
1321 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
1322 * search.c, semantics.c, tree.c: Adjust.
1324 * pt.c (dependent_scope_ref_p): Remove.
1325 (value_dependent_expression_p): Don't call it.
1326 (type_dependent_expression_p): Here either.
1327 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
1328 if the scope isn't dependent.
1330 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
1334 * pt.c (has_value_dependent_address): New.
1335 (value_dependent_expression_p): Check it.
1336 (convert_nontype_argument): Likewise. Call decay_conversion before
1337 folding if we want a pointer.
1338 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
1339 scope is the current instantiation.
1341 2010-06-28 Jakub Jelinek <jakub@redhat.com>
1344 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
1347 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
1349 * init.c: Do not include except.h.
1352 * cp-lang.c: Likewise.
1354 * semantics.c: Likewise.
1355 * decl2.c: Likewise.
1356 * except.c: Likewise.
1357 (init_exception_processing): Do not set the removed
1358 lang_protect_cleanup_actions here.
1359 (cp_protect_cleanup_actions): Make non-static and remove prototype.
1360 (doing_eh): New, moved from except.c but removed the do_warning flag.
1361 (expand_start_catch_block): Update doing_eh call.
1362 (expand_end_catch_block): Likewise.
1363 (build_throw): Likewise.
1364 * cp-tree.h: Prototype cp_protect_cleanup_actions.
1365 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
1366 cp_protect_cleanup_actions.
1367 * Make-lang.in: Update dependencies.
1369 2010-06-26 Jason Merrill <jason@redhat.com>
1371 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
1372 constructor called with a single argument that takes a reference
1373 to the constructor's class.
1374 (BAD_CONVERSION_RANK): New.
1375 (compare_ics): Use it to compare bad ICSes.
1377 2010-06-25 Joseph Myers <joseph@codesourcery.com>
1379 * lang-specs.h: Remove +e handling.
1381 2010-06-24 Andi Kleen <ak@linux.intel.com>
1383 * parser.c: (cp_parser_question_colon_clause):
1384 Switch to use cp_lexer_peek_token.
1385 Call warn_for_omitted_condop. Call pedwarn for omitted
1388 2010-06-22 Jakub Jelinek <jakub@redhat.com>
1391 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
1392 datum and mark_rvalue_use on component.
1395 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
1396 the CALL_EXPR has no arguments.
1398 2010-06-21 Jason Merrill <jason@redhat.com>
1400 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
1402 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
1405 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
1407 * name-lookup.c (struct arg_lookup): Convert namespaces and
1408 classes fields to VEC.
1409 (arg_assoc_namespace): Adjust for new type of namespaces.
1410 (arg_assoc_class): Adjust for new type of classes.
1411 (lookup_arg_dependent): Use make_tree_vector and
1412 release_tree_vector.
1413 * typeck2.c (build_x_arrow): Use vec_member.
1415 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
1418 * error.c (dump_decl): Better wording for anonymous namespace.
1420 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
1422 * class.c (build_vtbl_initializer): Adjust computation of new_position
1423 and which entry to add padding for.
1425 2010-06-16 Jason Merrill <jason@redhat.com>
1427 * except.c (check_noexcept_r): Return the problematic function.
1428 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
1429 * pt.c (tsubst_copy_and_build): Pass it.
1430 * parser.c (cp_parser_unary_expression): Likewise.
1431 * cp-tree.h: Adjust prototype.
1433 * method.c (defaulted_late_check): Give the defaulted method
1434 the same exception specification as the implicit declaration.
1436 2010-06-15 Jason Merrill <jason@redhat.com>
1438 * class.c (add_implicitly_declared_members): Implicit assignment
1439 operators can also be virtual overriders.
1440 * method.c (lazily_declare_fn): Likewise.
1442 * call.c (convert_like_real): Give "initializing argument of"
1443 information for ambiguous conversion. Give source position
1446 * call.c (print_z_candidates): Do print viable deleted candidates.
1447 (joust): Don't choose a deleted function just because its worst
1448 conversion is better than another candidate's worst.
1450 * call.c (convert_like_real): Don't complain about
1451 list-value-initialization from an explicit constructor.
1453 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
1454 DECL_SOURCE_LOCATION directly.
1456 * class.c (type_has_user_provided_default_constructor): Use
1459 * call.c (is_subseq): Handle ck_aggr, ck_list.
1460 (compare_ics): Treat an aggregate or ambiguous conversion to the
1461 same type as involving the same function.
1463 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
1465 * typeck.c (convert_for_assignment): Fix comment. Change message
1466 format from %d to %qP.
1467 (convert_for_initialization): Fix comment.
1469 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
1471 * cp-tree.h (expr_list_kind): New type.
1472 (impl_conv_rhs): New type.
1473 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
1475 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
1476 diagnostics for easy translation. Change caller.
1477 (convert_for_initialization): Use impl_conv_rhs and change caller.
1478 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
1479 diagnostics for easy translation. Change caller.
1480 * decl.c (bad_spec_place): New enum.
1481 (bad_specifiers): Use it and emit the diagnostics for easy
1482 translation. Change caller.
1483 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
1485 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1487 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
1489 * decl2.c (cp_write_global_declarations): Adjust for new type of
1490 decl_namespace_list.
1491 * name-lookup.c (current_decl_namespace): Likewise.
1492 (push_decl_namespace): Likewise.
1493 (pop_decl_namespace): Likewise.
1495 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1497 * call.c (build_java_interface_fn_ref): Call build_function_type_list
1498 instead of build_function_type.
1499 * decl.c (cxx_init_decl_processing): Likewise.
1500 (declare_global_var): Likewise.
1501 (get_atexit_node): Likewise.
1502 (expand_static_init): Likewise.
1503 * decl2.c (start_objects): Likewise.
1504 (start_static_storage_duration_function): Likewise.
1505 * except.c (init_exception_processing): Likewise.
1506 (build_exc_ptr): Likewise.
1507 (build_throw): Likewise.
1508 * rtti.c (throw_bad_cast): Likewise.
1509 (throw_bad_typeid): Likewise.
1510 (build_dynamic_cast_1): Likewise.
1512 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1514 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
1515 (build_op_delete_call): Likewise.
1516 (build_over_call): Likewise.
1517 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1518 * pt.c (process_partial_specialization): Likewise.
1519 (tsubst_template_args): Likewise.
1520 * semantics.c (finish_asm_stmt): Likewise.
1522 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
1524 * decl.c (record_key_method_defined): New, broken out of ...
1525 (finish_function): ... here. Call it.
1526 (start_decl): Treat aliases as definitions.
1528 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1530 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
1532 * pt.c (maybe_process_partial_specialization): Likewise.
1533 (register_specialization): Likewise.
1534 (add_pending_template): Likewise.
1535 (lookup_template_class): Likewise.
1536 (push_tinst_level): Likewise.
1538 * parser.c (cp_lexer_new_main): Likewise.
1539 (cp_lexer_new_from_tokens): Likewise.
1540 (cp_token_cache_new): Likewise.
1541 (cp_parser_context_new): Likewise.
1542 (cp_parser_new): Likewise.
1543 (cp_parser_nested_name_specifier_opt): Likewise.
1544 (cp_parser_template_id): Likewise.
1546 * name-lookup.c (binding_entry_make): Likewise.
1547 (binding_table_construct): Likewise.
1548 (binding_table_new): Likewise.
1549 (cxx_binding_make): Likewise.
1550 (pushdecl_maybe_friend): Likewise.
1551 (begin_scope): Likewise.
1552 (push_to_top_level): Likewise.
1554 * lex.c (init_reswords): Likewise.
1555 (retrofit_lang_decl): Likewise.
1556 (cxx_dup_lang_specific_decl): Likewise.
1557 (copy_lang_type): Likewise.
1558 (cxx_make_type): Likewise.
1560 * decl.c (make_label_decl): Likewise.
1561 (check_goto): Likewise.
1562 (start_preparsed_function): Likewise.
1563 (save_function_data): Likewise.
1565 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
1567 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
1569 * class.c (finish_struct_1): Likewise.
1571 * cp-tree.h (struct lang_type): Add variable_size GTY option.
1572 (struct lang_decl): Likewise.
1574 * parser.c (cp_parser_new): Update comment to not reference
1577 2010-06-07 Jason Merrill <jason@redhat.com>
1580 * error.c (dump_parameters): Mask out TFF_SCOPE.
1581 (dump_simple_decl): Don't print the scope of a PARM_DECL.
1582 (dump_scope): Remove no-op mask.
1585 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
1587 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
1588 * init.c (build_offset_ref): Use it.
1589 * pt.c (maybe_process_partial_specialization): Use it.
1590 (instantiate_class_template): Use it.
1591 * search.c (lookup_base): Use it.
1593 2010-06-07 Jakub Jelinek <jakub@redhat.com>
1596 * expr.c (mark_exp_read): Handle INDIRECT_REF.
1597 * cvt.c (convert_to_void): Handle INDIRECT_REF like
1598 handled_component_p.
1601 * decl.c (initialize_local_var): If TREE_USED is set on the type,
1602 set also DECL_READ_P on the decl.
1604 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1607 * cp-tree.h (typedef_variant_p): Move this declaration to
1609 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1610 * decl.c (grokdeclarator): Do not rename debug info of an
1611 anonymous tagged type named by a typedef.
1613 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
1616 * class.c (check_field_decls): Move the call to
1617 check_bitfield_decl before trying to set the
1618 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
1620 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
1622 * typeck.c: Update include path for moved files.
1625 * cp-gimplify.c: Likewise.
1626 * cp-lang.c: Likewise.
1628 * semantics.c: Likewise.
1629 * cxx-pretty-print.h: Likewise.
1630 * decl2.c: Likewise.
1631 * parser.c: Likewise.
1632 * cp-objcp-common.c: Likewise.
1633 * cp-tree.h: Likewise.
1634 * name-lookup.c: Likewise.
1636 * name-lookup.h: Likewise.
1637 * config-lang.in: Update paths in gtfiles for files in c-family/.
1638 * Make-lang.in: Likewise.
1640 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
1642 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
1643 * typeck.c (build_ptrmemfunc): Likewise.
1645 2010-06-04 Jason Merrill <jason@redhat.com>
1647 * typeck2.c (merge_exception_specifiers): Adjust merging of
1648 throw() and noexcept(true).
1650 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
1651 using an uninitialized variable.
1653 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
1654 (pp_cxx_expression): Likewise.
1656 Implement noexcept-specification (15.4)
1657 * parser.c (cp_parser_exception_specification_opt): Parse it.
1658 Give -Wdeprecated warning about throw() specs.
1659 * pt.c (tsubst_exception_specification): Handle it.
1660 * error.c (dump_exception_spec): Handle it.
1661 (dump_expr): Handle NOEXCEPT_EXPR.
1662 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
1663 * typeck.c (comp_except_specs): Handle compatibility rules.
1664 Change exact parm to take an enum.
1665 * typeck2.c (merge_exception_specifiers): Handle noexcept.
1666 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
1667 (type_throw_all_p, build_noexcept_spec): New fns.
1668 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
1669 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
1670 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
1671 (noexcept_true_spec, noexcept_false_spec): New macros.
1672 * name-lookup.c (pushdecl_maybe_friend): Adjust.
1673 * search.c (check_final_overrider): Adjust.
1674 * decl.c (check_redeclaration_exception_specification): Adjust.
1675 (use_eh_spec_block): Use type_throw_all_p.
1676 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
1677 Give operator new a noexcept-specification in C++0x mode.
1678 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
1679 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
1681 Implement noexcept operator (5.3.7)
1682 * cp-tree.def (NOEXCEPT_EXPR): New.
1683 * except.c (check_noexcept_r, finish_noexcept_expr): New.
1684 * cp-tree.h: Declare finish_noexcept_expr.
1685 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
1686 * pt.c (tsubst_copy_and_build): And tsubst it.
1687 (type_dependent_expression_p): Handle it.
1688 (value_dependent_expression_p): Handle it.
1690 * call.c (build_conditional_expr): Never fold in unevaluated context.
1691 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
1692 * semantics.c (simplify_aggr_init_expr): Likewise.
1693 * typeck.c (merge_types): Call merge_exception_specifiers.
1694 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
1695 DECL_ANTICIPATED for preferring new type.
1697 2010-06-04 Joseph Myers <joseph@codesourcery.com>
1699 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
1702 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1705 * typeck.c (build_class_member_access_expr): Call mark_exp_read
1706 on object for static data members.
1708 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1709 Jason Merrill <jason@redhat.com>
1712 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
1713 with the same type, call mark_lvalue_use on both.
1715 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
1717 * class.c (struct vtbl_init_data_s): Remove last_init field.
1718 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
1720 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
1722 (build_vtt): Likewise.
1723 (initialize_vtable): Take a VEC instead of a tree.
1724 (build_vtt_inits): Change return type to void. Take a VEC **
1725 instead of a tree *; accumulate results into said VEC.
1726 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
1727 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
1728 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
1730 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
1731 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
1733 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
1734 rather than tree_cons.
1735 (build_vbase_offset_vtbl_entries): Likewise.
1736 (add_vcall_offset): Likewise.
1737 (build_rtti_vtbl_entries): Likewise.
1738 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
1739 * decl.c (initialize_artificial_var): Use build_constructor instead
1740 of build_constructor_from_list.
1742 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
1745 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
1748 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
1750 * parser.c (cp_parser_mem_initializer_list): Change error text.
1752 2010-06-02 Jakub Jelinek <jakub@redhat.com>
1754 * cp-objcp-common.c (shadowed_var_for_decl): Change into
1755 tree_decl_map hashtab from tree_map.
1756 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
1757 (init_shadowed_var_for_decl): Adjust initialization.
1760 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
1761 instead of calling mark_exp_read only when not an assignment.
1764 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
1765 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
1766 Set DECL_VALUE_EXPR on var.
1768 2010-06-02 Jason Merrill <jason@redhat.com>
1770 * error.c (dump_type): Improve typedef handling.
1775 * name-lookup.c (same_entity_p): New.
1776 (ambiguous_decl): Multiple declarations of the same entity
1779 2010-06-01 Jason Merrill <jason@redhat.com>
1782 * call.c (add_list_candidates): Prefer the default constructor.
1783 (build_aggr_conv): Treat missing initializers like { }.
1784 * typeck2.c (process_init_constructor_record): Likewise.
1785 * init.c (expand_default_init): Use digest_init for
1786 direct aggregate initialization, too.
1788 * call.c (add_list_candidates): Split out...
1789 (build_user_type_conversion_1): ...from here.
1790 (build_new_method_call): And here.
1791 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
1794 * call.c (build_list_conv): Set list-initialization flags properly.
1796 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
1798 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
1800 2010-06-01 Arnaud Charlet <charlet@adacore.com>
1801 Matthew Gingell <gingell@adacore.com>
1803 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
1804 * decl2.c: Include langhooks.h and c-ada-spec.h.
1805 (cpp_check, collect_source_refs, collect_ada_namespace,
1806 collect_all_refs): New functions.
1807 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
1808 * lang-specs.h: Ditto.
1810 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1812 * cp-tree.h (cp_build_function_call_nary): Declare.
1813 * typeck.c (cp_build_function_call_nary): Define.
1814 * decl.c (register_dtor_fn): Use it instead of
1815 cp_build_function_call.
1816 (cxx_maybe_build_cleanup): Likewise.
1817 * decl2.c (generate_ctor_or_dtor_function): Likewise.
1818 * except.c (do_get_exception_ptr): Likewise.
1819 (do_begin_catch): Likewise.
1820 (do_allocate_exception): Likewise.
1821 (do_free_exception): Likewise.
1822 (build_throw): Likewise. Use cp_build_function_call_vec instead
1823 of cp_build_function_call.
1824 (do_end_catch): Likewise.
1826 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1828 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
1829 (struct cp_declarator): Move id_loc field up.
1831 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1833 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
1834 this file is included before c-common.h. Define GCC_DIAG_STYLE
1835 before including diagnostic-core.h and toplev.h.
1836 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
1837 * pt.c: Include cp-tree.h before c-common.h.
1839 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1841 * tree.c (c_register_addr_space): Add stub.
1843 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1845 * g++spec.c (lang_specific_driver): Use fatal_error instead of
1848 2010-05-28 Dodji Seketeli <dodji@redhat.com>
1850 Revert fix of PR c++/44188
1851 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
1853 * tree.c (typedef_variant_p): Revert moving this definition to
1855 * decl.c (grokdeclarator): Revert naming typedef handling.
1857 2010-05-27 Joseph Myers <joseph@codesourcery.com>
1859 * call.c: Include diagnostic-core.h instead of diagnostic.h.
1860 * cp-lang.c: Don't include diagnostic.h
1861 * name-lookup.c: Include diagnostic-core.h instead of
1863 (cp_emit_debug_info_for_using): Use seen_error.
1864 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
1865 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
1866 * pt.c (iterative_hash_template_arg): Use seen_error.
1867 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
1868 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
1869 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
1870 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
1873 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1876 * cp-tree.h (typedef_variant_p): Move this declaration to
1878 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1879 * decl.c (grokdeclarator): Do not rename debug info of an
1880 anonymous tagged type named by a typedef.
1882 2010-05-27 Jason Merrill <jason@redhat.com>
1885 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
1888 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
1891 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
1892 * class.c (layout_class_type): Likewise.
1893 * decl.c (finish_enum): Likewise.
1894 * mangle.c (write_builitin_type): Likewise.
1896 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
1898 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
1900 * decl.c (grokdeclarator): Handle __int128.
1901 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
1902 (cp_parser_simple_type_specifier): Likewise.
1903 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
1904 * typeck.c (cp_common_type): Handle __int128.
1905 * mangle.c (integer_type_codes): Add itk_int128 and
1906 itk_unsigned_int128.
1908 2010-05-26 Jason Merrill <jason@redhat.com>
1911 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
1914 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1916 * cp-lang.c: Do not include expr.h.
1918 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1920 * decl.c: Do not include rtl.h
1921 * semantics.c: Likewise.
1923 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
1925 * cp-tree.h: Do not include splay-tree.h.
1926 (struct prtmem_cst): Remove unused field and false comment.
1927 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
1928 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
1929 * init.c: Do not include rtl.h and expr.h.
1930 * class.c: Do not include rtl.h. Include splay-tree.h.
1931 (build_clone): Use plain NULL instead of NULL_RTX.
1932 * decl.c: Do not include expr.h. Explain why rtl.h has to be
1933 included. Include splay-tree.h.
1934 * method.c: Do not include rtl.h and expr.h.
1935 (use_thunk): Use plain NULL instead of NULL_RTX.
1936 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
1937 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
1938 and target.h. Include splay-tree.h.
1939 * expr.c: Do not include rtl.h and expr.h.
1940 * pt.c: Do not include obstack.h and rtl.h.
1941 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
1942 (tsubst_decl): Likewise.
1943 (instantiate_decl): Likewise.
1944 * semantics.c: Do not include exprt.h and debug.h. Explain why
1945 rtl.h has to be included.
1946 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
1947 * call.c: Do not include rtl.h and expr.h.
1948 * search.c: Do not include obstack.h and rtl.h.
1949 * friend.c: Do not include rtl.h and expr.h.
1950 * Make-lang.in: Update dependencies.
1952 2010-05-25 Jakub Jelinek <jakub@redhat.com>
1955 * parser.c (non_integral_constant): Add NIC_NONE.
1956 (required_token): Add RT_NONE.
1957 (cp_parser_unary_expression): Initialize non_constant_p
1959 (cp_parser_asm_definition): Initialize missing to RT_NONE.
1960 (cp_parser_primary_expression, cp_parser_postfix_expression,
1961 cp_parser_cast_expression, cp_parser_binary_expression,
1962 cp_parser_functional_cast): Fix formatting.
1964 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
1967 * parser.c: Remove inclusion of dyn-string.h.
1968 (non_integral_constant): New enum.
1969 (name_lookup_error): New enum.
1970 (required_token): New enum.
1971 (cp_parser_required_error): New function.
1972 (cp_parser_require): Change the type of variable token_desc to
1973 required_token and use cp_parser_required_error.
1974 (cp_parser_require_keyword): Likewise.
1975 (cp_parser_error): Use gmsgid as parameter.
1976 (cp_parser_name_lookup_error): Change the type of variable desired to
1977 name_lookup_error and put the diagnostic in the full sentences. Change
1979 (cp_parser_non_integral_constant_expression): Change the type of the
1980 variable thing to non_integral_constant and put the diagnostics in
1981 full sentences. Change caller.
1983 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
1986 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
1988 2010-05-24 Joseph Myers <joseph@codesourcery.com>
1990 * error.c (cp_diagnostic_starter): Update call to
1991 diagnostic_build_prefix.
1992 (cp_print_error_function,
1993 print_instantiation_partial_context_line): Check show_column flag
1996 2010-05-24 Jason Merrill <jason@redhat.com>
1999 * decl.c (check_initializer): Don't wrap an init-list in a
2001 * init.c (build_aggr_init): Don't assume copy-initialization if
2002 init has CONSTRUCTOR_IS_DIRECT_INIT.
2003 * call.c (build_new_method_call): Sanity check.
2005 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
2007 * rtti.c (tinfo_base_init): Use build_constructor instead of
2008 build_constructor_from_list. Don't cons a tree node for
2010 (generic_initializer): Use build_constructor_single instead of
2011 build_constructor_from_list.
2012 (ptr_initializer): Use build_constructor instead of
2013 build_constructor_from_list
2014 (ptm_initializer): Likewise.
2015 (class_initializer): Likewise. Take varargs instead of TRAIL.
2016 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
2017 build_constructor instead of build_constructor_from_list.
2019 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
2021 * semantics.c: Include bitmap.h.
2022 * Make-lang.in: Update dependencies.
2024 2010-05-22 Jan Hubicka <jh@suse.cz>
2026 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
2028 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
2030 2010-05-21 Joseph Myers <joseph@codesourcery.com>
2032 * cxx-pretty-print.c: Correct merge error.
2034 2010-05-21 Joseph Myers <joseph@codesourcery.com>
2036 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
2037 (cp_print_error_function): Use diagnostic_abstract_origin macro.
2038 (cp_printer): Handle %K here using percent_K_format.
2039 * cxx-pretty-print.c: Include tree-pretty-print.h.
2040 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
2043 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
2045 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
2046 Clean up redundant includes.
2048 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2051 * decl.c (xref_basetypes): Return false in case of ill-formed
2054 2010-05-19 Jason Merrill <jason@redhat.com>
2056 * call.c (reference_binding): Use cp_build_qualified_type_real
2057 and cp_type_quals consistently.
2058 (add_function_candidate): Likewise.
2059 (build_conditional_expr): Likewise.
2060 (convert_like_real): Likewise.
2061 (type_passed_as): Likewise.
2062 * class.c (add_method): Likewise.
2063 (same_signature_p): Likewise.
2064 (layout_class_type): Likewise.
2065 * decl.c (cxx_init_decl_processing): Likewise.
2066 (cp_fname_init): Likewise.
2067 (grokdeclarator): Likewise.
2068 * decl2.c (cp_reconstruct_complex_type): Likewise.
2069 * init.c (build_new_1): Likewise.
2070 * method.c (do_build_copy_constructor): Likewise.
2071 (implicitly_declare_fn): Likewise.
2072 * pt.c (tsubst_aggr_type): Likewise.
2074 * rtti.c (init_rtti_processing): Likewise.
2075 (build_headof): Likewise.
2076 (build_dynamic_cast_1): Likewise.
2077 (tinfo_base_init): Likewise.
2078 (emit_support_tinfos): Likewise.
2079 * semantics.c (capture_decltype): Likewise.
2080 * tree.c (cv_unqualified): Likewise.
2081 * typeck.c (composite_pointer_type): Likewise.
2082 (string_conv_p): Likewise.
2084 * mangle.c (write_CV_qualifiers_for_type): Tweak.
2086 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
2087 * decl.c (start_decl): Likewise.
2088 * semantics.c (finish_compound_literal): Likewise.
2089 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
2090 (cp_type_readonly): Remove.
2091 * cp-tree.h: Remove declaration.
2093 * typeck.c (merge_types): Preserve memfn quals.
2095 * decl.c (grokdeclarator): Don't check quals on fn type.
2096 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
2097 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
2100 * typeck.c (type_memfn_quals): New fn.
2101 (apply_memfn_quals): New fn.
2102 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
2103 (cp_type_readonly): Use cp_type_quals.
2104 * cp-tree.h: Add declarations.
2105 * tree.c (cp_build_qualified_type_real): Don't set, but do
2106 preserve, quals on FUNCTION_TYPE.
2107 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
2108 * decl.c (build_ptrmem_type): Likewise.
2109 (grokdeclarator): Likewise.
2110 (static_fn_type): Likewise.
2111 * decl2.c (change_return_type): Likewise.
2112 (cp_reconstruct_complex_type): Likewise.
2113 * pt.c (tsubst_function_type): Likewise.
2115 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
2117 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
2119 * tree.c (build_min_non_dep_call_vec): Update comment.
2121 2010-05-17 Jason Merrill <jason@redhat.com>
2123 * call.c (struct z_candidate): Add explicit_targs field.
2124 (add_template_candidate_real): Set it.
2125 (build_over_call): Use it to control init-list warning.
2128 * call.c (build_over_call): Limit init-list deduction warning to
2129 cases where the argument is actually an init-list.
2132 * call.c (build_over_call): Don't do bitwise copy for move ctor.
2134 2010-05-17 Dodji Seketeli <dodji@redhat.com>
2135 Jason Merrill <jason@redhat.com>
2138 * decl.c (compute_array_index_type): Call mark_rvalue_use.
2140 2010-05-15 Jason Merrill <jason@redhat.com>
2142 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
2143 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
2145 (finish_eh_spec_block): Adjust.
2147 2010-05-15 Jakub Jelinek <jakub@redhat.com>
2150 * pt.c (tsubst): Unshare template argument.
2152 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
2154 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
2155 * Make-lang.in: Fix dependencies accordingly.
2157 2010-05-14 Jason Merrill <jason@redhat.com>
2160 * except.c (build_throw): Simplify, adjust for DR 475.
2163 * except.c (dtor_nothrow): Return nonzero for type with
2167 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
2168 gimple_build_eh_must_not_throw.
2170 2010-05-14 Martin Jambor <mjambor@suse.cz>
2172 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
2175 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
2177 * call.c (build_new_method_call): Change warning text.
2178 * typeck2.c (build_functional_cast): Change error text.
2180 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
2183 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
2184 shadowing the outer parameter or variables by the declaration of
2185 nested function in nested structure or class. Warn the shadowing by
2186 the declaration of nested lambda expression.
2188 2010-05-13 Jason Merrill <jason@redhat.com>
2190 * typeck.c (cp_build_array_ref): Factor out from...
2191 (build_array_ref): ...here. Drop complain parm.
2192 (build_new_op): Adjust.
2193 * class.c (build_vtbl_ref_1): Adjust.
2194 * decl2.c (grok_array_decl): Adjust.
2195 * cp-tree.h: Adjust prototypes.
2197 2010-05-13 Jan Hubicka <jh@suse.cz>
2199 * decl.c (cp_finish_decl): Do not worry about used attribute.
2201 2010-05-12 Jason Merrill <jason@redhat.com>
2203 * typeck.c (build_array_ref): Take complain parm.
2204 * cp-tree.h: Add it to prototype.
2205 * call.c (build_new_op): Pass it.
2206 * class.c (build_vtbl_ref): Pass it.
2207 * decl2.c (grok_array_decl): Pass it.
2211 * cp-tree.def (NULLPTR_TYPE): Remove.
2212 * cp-tree.h (NULLPTR_TYPE_P): New.
2213 (SCALAR_TYPE_P): Use it.
2214 (nullptr_type_node): New.
2215 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
2216 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
2218 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
2219 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2220 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
2221 * mangle.c (write_type): Likewise.
2222 * name-lookup.c (arg_assoc_type): Likewise.
2223 * typeck.c (build_reinterpret_cast_1): Likewise.
2224 * rtti.c (typeinfo_in_lib_p): Likewise.
2225 (emit_support_tinfos): Remove local nullptr_type_node.
2227 * cp-tree.h (UNKNOWN_TYPE): Remove.
2228 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
2229 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
2230 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
2231 * class.c (instantiate_type): Check unknown_type_node rather than
2233 * name-lookup.c (maybe_push_decl): Likewise.
2234 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2235 (get_typeid): Likewise.
2236 * semantics.c (finish_offsetof): Likewise.
2239 * call.c (add_template_candidate_real): If deduction fails, still
2240 add the template as a non-viable candidate.
2241 (equal_functions): Handle template candidates.
2242 (print_z_candidate): Likewise.
2243 (print_z_candidates): Likewise.
2244 (build_new_function_call): Likewise.
2246 * cp-tree.h (LOOKUP_LIST_ONLY): New.
2247 * call.c (add_candidates): Enforce it.
2248 (build_new_method_call): Try non-list ctor if no viable list ctor.
2249 (build_user_type_conversion_1): Likewise.
2251 * call.c (add_candidates): Distinguish between type(x) and
2253 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
2254 (build_new_method_call): Give better error for conversion op.
2256 * call.c (add_candidates): Add first_arg and return_type parms.
2257 Add special constructor/conversion op handling.
2258 (convert_class_to_reference): Use it.
2259 (build_user_type_conversion_1): Likewise.
2260 (build_op_call): Likewise.
2261 (build_new_method_call): Likewise.
2262 (build_new_op): Adjust.
2263 (perform_overload_resolution): Adjust.
2265 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
2270 * pt.c (process_partial_specialization): Return error_mark_node
2271 in case of unused template parameters in partial specialization.
2273 2010-05-11 Jakub Jelinek <jakub@redhat.com>
2276 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
2277 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
2278 look at its second operand.
2280 2010-05-10 Jason Merrill <jason@redhat.com>
2283 * semantics.c (baselink_for_fns): Revert earlier change.
2286 * typeck.c (cp_build_modify_expr): Complain about assignment to
2287 array from init list.
2289 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
2292 * decl.c (check_initializer): strip array type before checking for
2293 uninitialized const or ref members.
2295 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
2298 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
2299 error count. Emit errors only if compain is true.
2300 (build_new_1): Do not return error_mark_node if
2301 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
2302 errors. Delay the check for user-provided constructor.
2303 (perform_member_init): Adjust.
2304 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
2307 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
2308 Jason Merrill <jason@redhat.com>
2310 Add support for C++0x nullptr.
2311 * cp-tree.def: Add NULLPTR_TYPE.
2312 * cp-tree.h: Add nullptr_node.
2313 (cp_tree_index): Add CPTI_NULLPTR.
2314 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
2315 * call.c (null_ptr_cst_p): Handle nullptr.
2316 (standard_conversion): Likewise.
2317 (convert_arg_to_ellipsis): Likewise.
2318 * mangle.c (write_type): Likewise.
2319 * name-lookup.c (arg_assoc_type): Likewise.
2320 * parser.c (cp_parser_primary_expression): Likewise.
2321 * typeck.c (cp_build_binary_op): Likewise.
2322 (build_reinterpret_cast_1): Likewise.
2323 * error.c (dump_type): Likewise.
2324 (dump_type_prefix, dump_type_suffix): Likewise.
2325 * decl.c (cxx_init_decl_processing): Likewise.
2326 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2327 * cvt.c (ocp_convert): Likewise.
2328 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
2329 nullptr_t tinfo in libsupc++.
2331 2010-05-06 Jason Merrill <jason@redhat.com>
2333 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
2335 2010-04-22 Jakub Jelinek <jakub@redhat.com>
2336 Dodji Seketeli <dodji@redhat.com>
2339 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
2341 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
2342 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
2343 (decay_conversion, perform_integral_promotions): Call rvalue_use.
2344 (cp_build_unary_op): Call lvalue_use.
2345 * decl.c (unused_but_set_errorcount): New variable.
2346 (poplevel): Issue -Wunused-but-set-variable diagnostics.
2347 (duplicate_decls): Merge DECL_READ_P flags.
2348 (start_cleanup_fn): Set DECL_READ_P flag.
2349 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
2350 * tree.c (rvalue): Call rvalue_use.
2351 * pt.c (convert_nontype_argument): Likewise.
2352 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
2353 finish_decltype_type): Likewise.
2354 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
2355 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
2356 or rvalue_use depending on the expr.
2357 * init.c (build_new, build_delete): Likewise.
2358 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
2360 2010-05-05 Jason Merrill <jason@redhat.com>
2363 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
2364 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
2366 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2369 * pt.c (unify): Check each elt for error_mark_node.
2371 2010-05-04 Jason Merrill <jason@redhat.com>
2374 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
2376 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2379 * call.c (build_new_method_call): Return error_mark_node if fns is
2382 2010-05-03 Dodji Seketeli <dodji@redhat.com>
2385 * pt.c (most_specialized_class): Pretend we are processing
2386 a template decl during the call to coerce_template_parms.
2388 2010-05-03 Jason Merrill <jason@redhat.com>
2392 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
2393 from the selected underlying type unless -fstrict-enums. Set
2394 ENUM_UNDERLYING_TYPE to have the restricted range.
2395 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
2396 * class.c (check_bitfield_decl): Likewise.
2398 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
2401 * init.c (build_new_1): Revert the accidental checkin in
2404 2010-04-30 Jason Merrill <jason@redhat.com>
2407 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
2408 (pp_cxx_type_specifier_seq): ...here.
2410 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
2412 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
2413 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
2415 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
2418 * typeck.c (warn_args_num): New function.
2419 (convert_arguments): Use warn_args_num to print the diagnostic
2422 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
2425 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
2426 user-provided constructor while recursing.
2428 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
2431 * error.c (print_instantiation_partial_context_line): Handle
2432 recursive instantiation.
2433 (print_instantiation_partial_context): Likewise.
2435 2010-04-27 Jason Merrill <jason@redhat.com>
2437 * init.c (perform_member_init): Check CLASS_TYPE_P.
2439 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2442 * init.c (perform_member_init): check for uninitialized const or
2443 reference members, including array types.
2445 2010-04-24 Jason Merrill <jason@redhat.com>
2447 * tree.c (get_fns): Split out from get_first_fn.
2448 * cp-tree.h: Declare it.
2449 * search.c (shared_member_p): Use it.
2450 * semantics.c (finish_qualified_id_expr): Simplify.
2451 (finish_id_expression): Simplify.
2453 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
2454 whenever object is NULL_TREE. Don't do 'this' capture here.
2455 (finish_qualified_id_expr): Pass NULL_TREE.
2456 (finish_id_expression): Likewise.
2457 (lambda_expr_this_capture): Likewise.
2459 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
2460 rather than checking current_class_ref directly.
2461 (finish_call_expr): Likewise.
2464 * name-lookup.c (qualify_lookup): Disqualify lambda op().
2465 * class.c (current_nonlambda_class_type): New fn.
2466 * semantics.c (nonlambda_method_basetype): New.
2467 * cp-tree.h: Declare them.
2468 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
2470 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
2473 * semantics.c (lambda_return_type): Complain about
2477 * tree.c (cv_unqualified): Handle error_mark_node.
2480 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
2481 if we don't want errors.
2484 * class.c (convert_to_base): Add complain parameter. Pass
2485 ba_quiet to lookup_base if we don't want errors.
2486 (build_vfield_ref): Pass complain to convert_to_base.
2487 * call.c (convert_like_real): Likewise.
2488 (initialize_reference): Likewise.
2489 (perform_direct_initialization_if_possible): Pass complain to
2491 * cp-tree.h: Adjust.
2493 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2494 Jason Merrill <jason@redhat.com>
2497 * decl.c (check_for_uninitialized_const_var): Handle classes that need
2499 (check_initializer): Call it for classes that need constructing, too.
2500 * class.c (in_class_defaulted_default_constructor): New.
2501 * cp-tree.h: Declare it.
2503 2010-04-20 Jason Merrill <jason@redhat.com>
2506 * init.c (constant_value_1): Treat error_mark_node as a constant
2507 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
2508 * cvt.c (ocp_convert): Handle getting error_mark_node from
2509 integral_constant_value.
2510 * decl.c (compute_array_index_type): Likewise.
2512 2010-04-20 Dodji Seketeli <dodji@redhat.com>
2516 * typeck.c (incompatible_dependent_types_p): If one of the
2517 compared types if not a typedef then honour their main variant
2520 2010-04-20 Jakub Jelinek <jakub@redhat.com>
2522 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
2524 2010-04-19 Dodji Seketeli <dodji@redhat.com>
2527 * typeck.c (structural_comptypes): Test dependent typedefs
2528 incompatibility before testing for their main variant based
2531 2010-04-19 Jakub Jelinek <jakub@redhat.com>
2533 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
2534 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
2536 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2538 * decl.c (cxx_init_decl_processing): Remove second argument in call to
2539 build_common_tree_nodes.
2541 2010-04-14 Jason Merrill <jason@redhat.com>
2544 * parser.c (cp_parser_parenthesized_expression_list): Change
2545 is_attribute_list parm to int to indicate whether or not to
2546 handle initial identifier specially.
2547 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
2549 2010-04-13 Jason Merrill <jason@redhat.com>
2551 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
2553 * parser.c (cp_parser_lambda_expression): Complain about lambda in
2554 unevaluated context.
2555 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
2557 2010-04-12 Jason Merrill <jason@redhat.com>
2560 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
2561 return value directly.
2563 * call.c (type_decays_to): Call cv_unqualified for non-class type.
2565 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
2568 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
2569 * init.c (build_new_1): Check for uninitialized const members and
2570 uninitialized reference members, when using new without
2571 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
2572 (diagnose_uninitialized_cst_or_ref_member): Define, call
2573 diagnose_uninitialized_cst_or_ref_member_1.
2574 (diagnose_uninitialized_cst_or_ref_member_1): New function.
2576 2010-04-12 Richard Guenther <rguenther@suse.de>
2579 * semantics.c (expand_or_defer_fn_1): Do not keep extern
2580 template inline functions.
2582 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
2585 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
2588 2010-04-07 Jason Merrill <jason@redhat.com>
2591 * decl.c (start_preparsed_function): Do defer nested functions.
2593 PR c++/11094, DR 408
2594 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
2595 * decl2.c (finish_static_data_member_decl): Set it.
2596 * decl.c (duplicate_decls): Propagate it.
2597 * pt.c (tsubst_decl): Don't substitute the domain of an array
2598 VAR_DECL if it's set.
2599 (regenerate_decl_from_template): Substitute it here.
2600 (type_dependent_expression_p): Return true if it's set.
2601 * semantics.c (finish_decltype_type): Instantiate such a variable.
2602 * typeck.c (cxx_sizeof_expr): Likewise.
2603 (strip_array_domain): New.
2606 * name-lookup.c (current_decl_namespace): Non-static.
2607 (pop_nested_namespace): Sanity check.
2608 * cp-tree.h: Declare current_decl_namespace.
2609 * decl.c (grokvardecl): Use it instead of current_namespace.
2610 (grokfndecl): Likewise.
2613 * pt.c (tsubst_friend_function): Instatiate a friend that has already
2616 * pt.c (print_template_statistics): New.
2617 * cp-tree.h: Declare it.
2618 * tree.c (cxx_print_statistics): Call it.
2621 * decl.c (grokvardecl): Tweak warning message.
2622 (grokfndecl): Likewise.
2624 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2627 *pt.c (tsubst_decl): Get the arguments of a specialization from
2628 the specialization template, not from the most general template.
2630 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2633 * typeck2.c (process_init_constructor_record):
2634 value-initialize members that are are not explicitely
2637 2010-04-07 Jie Zhang <jie@codesourcery.com>
2640 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
2641 when all of its elements are non-constant and have been split out.
2643 2010-04-06 Taras Glek <taras@mozilla.com>
2644 Jason Merrill <jason@redhat.com>
2646 * parser.c (cp_parser_class_specifier): Set class location to that
2647 of IDENTIFIER_NODE instead of '{' when possible.
2648 * semantics.c (begin_class_definition): Do not overide locations
2649 with less precise ones.
2651 2010-04-06 Jason Merrill <jason@redhat.com>
2654 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
2657 * pt.c (maybe_update_decl_type): Check the return value from
2660 2010-04-01 Jason Merrill <jason@redhat.com>
2662 * decl.c (next_initializable_field): No longer static.
2663 * cp-tree.h: Declare it.
2664 * call.c (build_aggr_conv): Fail if there are more initializers
2665 than initializable fields.
2667 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
2668 instead of void_zero_node.
2670 2010-03-31 Dodji Seketeli <dodji@redhat.com>
2673 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
2674 * pt.c (end_template_parm_list): Store sibling template parms of
2675 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2676 (push_template_decl_real): Don't store the containing template decl
2677 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
2678 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
2679 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2682 2010-03-30 Jason Merrill <jason@redhat.com>
2685 * pt.c (push_template_decl_real): Deal better with running out of
2686 scopes before running out of template parms.
2690 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
2691 function parameter context. Don't print an error if parsing
2695 * pt.c (more_specialized_fn): Don't control cv-qualifier check
2698 2010-03-26 Jason Merrill <jason@redhat.com>
2701 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
2702 c++0x mode, but not other type-names.
2704 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2707 * pt.c (add_to_template_args): Support NULL ARGS;
2708 (most_specialized_class): call coerce_template_parms on
2709 template arguments passed to get_class_bindings. Use
2710 add_to_template_args.
2711 (unify): Handle VAR_DECLs.
2713 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2715 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
2717 * pt.c (get_template_parms_at_level): Adjust.
2719 2010-03-25 Dodji Seketeli <dodji@redhat.com>
2722 * cp-tree.h (get_template_parms_at_level): Declare ...
2723 * pt.c (get_template_parms_at_level): ... new function.
2724 * typeck.c (get_template_parms_of_dependent_type): If a template
2725 type parm's DECL_CONTEXT isn't yet set, get its siblings from
2726 current_template_parms. Use get_template_parms_at_level. Remove
2728 (incompatible_dependent_types_p): If we get empty parms from just one
2729 of the template type parms we are comparing then the template parms are
2732 2010-03-24 Jason Merrill <jason@redhat.com>
2735 * parser.c (make_declarator): Initialize id_loc.
2736 (cp_parser_lambda_declarator_opt): And set it.
2738 2010-03-23 Jason Merrill <jason@redhat.com>
2740 Make lambda conversion op and op() non-static.
2741 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
2742 Also add the thunk function returned by the conversion op.
2743 Mark the conversion deleted if the op() is variadic.
2744 * decl2.c (mark_used): Give helpful message about deleted conversion.
2745 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
2746 * semantics.c (finish_this_expr): Adjust.
2747 * mangle.c (write_closure_type_name): Adjust.
2748 * decl.c (grok_op_properties): Don't allow it.
2749 * call.c (build_user_type_conversion_1): No static conversion ops.
2750 (build_op_call): Or op().
2752 * decl2.c (change_return_type): Fix 'this' quals.
2754 2010-03-22 Jason Merrill <jason@redhat.com>
2757 * tree.c (pod_type_p): Use old meaning in C++98 mode.
2760 * pt.c (contains_auto_r): New fn.
2761 (do_auto_deduction): Use it.
2762 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
2764 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
2767 * decl2.c (grokfield): Handle invalid initializers for member
2770 2010-03-20 Dodji Seketeli <dodji@redhat.com>
2773 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
2775 * decl2.c (vague_linkage_p): Likewise.
2777 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
2780 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
2781 false, in the cp_parser_expression_statement call.
2783 2010-03-05 Jason Merrill <jason@redhat.com>
2785 * mangle.c (mangle_decl): Give name collision error even without
2788 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
2790 * pt.c (process_partial_specialization): Use error_n instead of
2793 2010-03-03 Jason Merrill <jason@redhat.com>
2796 * mangle.c (mangle_decl): Handle VAR_DECL, too.
2798 2010-03-03 Jason Merrill <jason@redhat.com>
2801 * mangle.c: Include cgraph.h.
2802 (mangle_decl): If the mangled name will change in a later
2803 ABI version, make the later mangled name an alias.
2804 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
2805 * Make-lang.in (mangle.o): Depend on cgraph.h.
2806 * method.c (make_alias_for): Handle VAR_DECL, too.
2807 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
2808 * tree.c (no_linkage_check): Adjust.
2809 * decl.c (maybe_commonize_var): Adjust.
2810 * cp-tree.h: Adjust.
2812 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
2814 * pt.c (redeclare_class_template): Use error_n and inform_n.
2816 2010-02-27 Mark Mitchell <mark@codesourcery.com>
2819 * cp-tree.h (push_tinst_level): Declare.
2820 (pop_tinst_level): Likewise.
2821 * pt.c (push_tinst_level): Give it external linkage.
2822 (pop_tinst_level): Likewise.
2823 * mangle.c (mangle_decl_string): Set the source location to that
2824 of the decl while mangling.
2826 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
2829 * pt.c (redeclare_class_template): Return false if there are erroneous
2830 template parameters.
2832 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
2834 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
2837 2010-02-24 Jason Merrill <jason@redhat.com>
2840 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
2842 * class.c (layout_class_type): Don't give -Wabi warning for a bug
2843 in a previous ABI version.
2845 2010-02-23 Jason Merrill <jason@redhat.com>
2848 * typeck2.c (digest_init_r): Accept value init of array.
2850 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
2853 * typeck.c (convert_arguments): Update error message.
2855 2010-02-22 Mike Stump <mikestump@comcast.net>
2858 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
2860 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
2863 * error.c (print_instantiation_partial_context_line): New.
2864 (print_instantiation_partial_context): Print at most 12 contexts,
2865 skip the rest with a message.
2867 2010-02-21 Dodji Seketeli <dodji@redhat.com>
2870 * pt.c (lookup_template_class): Better support of specialization
2871 of member of class template implicit instantiation.
2873 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
2876 * call.c (conversion_null_warnings): Replace -Wconversion with
2878 * cvt.c (build_expr_type_conversion): Likewise.
2880 2010-02-18 Jason Merrill <jason@redhat.com>
2883 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
2886 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
2888 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
2889 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
2892 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
2896 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
2897 (maybe_update_decl_type): New fn.
2898 * parser.c (cp_parser_init_declarator): Use it.
2901 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
2903 2010-02-17 Jason Merrill <jason@redhat.com>
2906 * call.c (build_over_call): Don't create zero-sized assignments.
2907 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
2908 * cp-objcp-common.c (cp_expr_size): Remove.
2909 * cp-tree.h: Remove prototype.
2912 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
2913 decl we looked up doesn't match.
2916 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
2917 have an INIT_EXPR anymore.
2920 * pt.c (convert_nontype_argument): Change assert to test.
2922 2010-02-16 Jason Merrill <jason@redhat.com>
2924 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
2927 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
2928 VIEW_CONVERT_EXPR for conversions between structural equality types
2929 that the back end can't tell are the same.
2932 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
2933 cv-quals from element here.
2934 (cp_build_qualified_type_real): Not here. Preserve typedef name.
2936 2010-02-14 Jason Merrill <jason@redhat.com>
2939 * semantics.c (finish_compound_literal): Use
2940 cp_apply_type_quals_to_decl when creating a static variable.
2942 2010-02-12 Jason Merrill <jason@redhat.com>
2945 * name-lookup.h (current_binding_level): Check for null
2948 2010-02-12 Jason Merrill <jason@redhat.com>
2951 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
2953 2010-02-12 Jakub Jelinek <jakub@redhat.com>
2956 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
2959 2010-02-10 Jason Merrill <jason@redhat.com>
2962 * semantics.c (outer_lambda_capture_p): Revert.
2963 (add_capture): Only finish_member_declaration if
2964 we're in the lambda class.
2965 (register_capture_members): New.
2966 * cp-tree.h: Declare it.
2967 * parser.c (cp_parser_lambda_expression): Call it.
2969 2010-02-10 Jason Merrill <jason@redhat.com>
2972 * semantics.c (outer_lambda_capture_p): Use current_function_decl
2973 instead of current_class_type.
2975 2010-02-10 Jason Merrill <jason@redhat.com>
2977 PR c++/42983, core issue 906
2978 * method.c (defaultable_fn_check): Check virtualness.
2980 2010-02-10 Jason Merrill <jason@redhat.com>
2983 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
2985 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
2987 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
2988 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
2990 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
2991 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
2992 (cp_parser_parameter_declaration)
2993 (cp_parser_exception_specification_opt)
2994 (cp_parser_exception_declaration): Likewise.
2995 * pt.c (check_default_tmpl_args): Likewise.
2996 * search.c (lookup_field_r): Likewise.
2998 2010-02-09 Jason Merrill <jason@redhat.com>
3001 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
3003 2010-02-09 Jason Merrill <jason@redhat.com>
3006 * decl2.c (change_return_type): New fn.
3007 * semantics.c (apply_lambda_return_type): Use it.
3008 * cp-tree.h: Declare it.
3010 2010-02-05 Richard Guenther <rguenther@suse.de>
3012 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
3013 * cp-lang.c: Include gt-cp-cp-lang.h.
3014 * config-lang.in (gtfiles): Add cp/cp-lang.c.
3016 2010-02-05 Dodji Seketeli <dodji@redhat.com>
3019 * typeck.c (get_template_parms_of_dependent_type): Try getting
3020 the template parameters fromt the type itself first.
3022 2010-02-03 Jason Merrill <jason@redhat.com>
3026 * mangle.c (write_unqualified_id): Split out from write_expression.
3027 (write_unqualified_name): Call it.
3028 (write_member_name): Likewise.
3029 (write_expression): Support TEMPLATE_ID_EXPR.
3030 Disambiguate operator names.
3033 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
3036 2010-02-02 Jason Merrill <jason@redhat.com>
3039 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
3040 * optimize.c (clone_body): Remap their initializers when making base
3042 (maybe_clone_body): Complain if multiple clones aren't safe.
3044 2010-01-29 Dodji Seketeli <dodji@redhat.com>
3051 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3052 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3053 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
3054 * pt.c (coerce_template_parms, type_unification_real,
3055 expand_template_argument_pack, coerce_template_parameter_pack):
3056 Set the non default template args count.
3057 (current_template_args): Always set non defaulted
3058 template args count when compiled with --enable-checking
3059 (tsubst_template_args, type_unification_real): Propagate the non
3060 defaulted template args count.
3061 * error.c (get_non_default_template_args_count): Renamed
3062 count_non_default_template_args into this. Don't calculate the
3063 non default template argument count anymore. Use the new
3064 accessor macros above to get it.
3065 (dump_template_argument_list, dump_type, dump_decl,
3066 dump_template_parms): Adjust.
3067 * parser.c (cp_parser_template_argument_list): Always set defaulted
3068 template args count when compiled with --enable-checking.
3070 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
3072 * decl.c (redeclaration_error_message): Wrap the return messages into
3073 G_() for easy translation.
3075 2010-01-28 Jason Merrill <jason@redhat.com>
3078 * semantics.c (begin_class_definition): Don't use type_as_string.
3080 2010-01-28 Dodji Seketeli <dodji@redhat.com>
3084 * typeck.c (get_template_parms_of_dependent_type): Factorized
3085 this out of incompatible_template_type_parms_p
3086 (incompatible_dependent_types_p): Renamed
3087 incompatible_template_type_parms_p into this. Make it detect
3088 two incompatible dependent typedefs too.
3089 (structural_comptypes): Use incompatible_dependent_types_p.
3090 * pt.c (get_template_info):
3091 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
3093 2010-01-20 Janis Johnson <janis187@us.ibm.com>
3094 Jason Merrill <jason@redhat.com>
3096 * mangle.c (write_type): Mangle transparent record as member type.
3097 * semantics.c (begin_class_definition): Recognize decimal classes
3098 and set TYPE_TRANSPARENT_AGGR.
3100 2010-01-20 Jason Merrill <jason@redhat.com>
3103 * mangle.c (write_expression): Handle tree codes that have extra
3104 arguments in the middle-end.
3106 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
3109 * except.c (expand_start_catch_block): Deal correctly with
3110 do_begin_catch returning error_mark_node.
3112 2010-01-20 Jason Merrill <jason@redhat.com>
3115 * class.c (layout_class_type): Set packed_maybe_necessary for packed
3119 * semantics.c (build_lambda_object): Call mark_used on captured
3123 * decl.c (grokdeclarator): Clear type_quals for a member function
3124 declared using a typedef. Don't complain about adding cv-quals
3125 to a function typedef in C++0x mode.
3127 2010-01-20 Jakub Jelinek <jakub@redhat.com>
3129 * decl.c (create_array_type_for_decl): Remove set but not used
3130 variable error_msg. Remove break stmts after return stmts.
3132 2010-01-19 Dodji Seketeli <dodji@redhat.com>
3134 * error.c (dump_template_parms, count_non_default_template_args):
3135 Revert fix of PR c++/42634.
3137 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3140 * error.c (dump_template_parms): Use innermost template
3141 arguments before calling count_non_default_template_args.
3142 (count_non_default_template_args): We are being called with
3143 template innermost arguments now. There is no need to ensure
3146 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3149 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
3151 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3154 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
3156 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3159 *pt.c (tsubst_decl): Get the arguments of a specialization from
3160 the specialization template, not from the most general template.
3162 2010-01-16 Jason Merrill <jason@redhat.com>
3165 * semantics.c (finish_decltype_type): Within a template, treat
3166 unresolved CALL_EXPR as dependent.
3168 2010-01-15 Dodji Seketeli <dodji@redhat.com>
3170 * error.c (dump_template_parms,count_non_default_template_args):
3171 Revert changes of PR c++/42634.
3173 2010-01-14 Jakub Jelinek <jakub@redhat.com>
3176 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
3177 functions with noreturn attribute.
3179 2010-01-14 Jason Merrill <jason@redhat.com>
3182 * call.c (build_new_method_call): Don't free the vec here.
3185 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
3187 2010-01-13 Dodji Seketeli <dodji@redhat.com>
3190 * error.c (dump_template_parms): Use innermost template
3191 arguments before calling count_non_default_template_args.
3192 (count_non_default_template_args): We are being called with
3193 template innermost arguments now. There is no need to ensure
3196 2010-01-07 Dodji Seketeli <dodji@redhat.com>
3199 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
3200 arguments that were previously deduced.
3202 2010-01-05 Jason Merrill <jason@redhat.com>
3204 * pt.c (unify_pack_expansion): Handle deduction from init-list.
3205 * call.c (build_over_call): Don't complain about it.
3207 2010-01-04 Jason Merrill <jason@redhat.com>
3210 * pt.c (tsubst_decl): Don't apply type attributes in place.
3213 * semantics.c (describable_type): Remove decltype comment and
3218 Copyright (C) 2010 Free Software Foundation, Inc.
3220 Copying and distribution of this file, with or without modification,
3221 are permitted in any medium without royalty provided the copyright
3222 notice and this notice are preserved.