1 2010-10-27 Jason Merrill <jason@redhat.com>
3 * call.c (build_integral_nontype_arg_conv): New.
4 * cp-tree.h: Declare it.
5 * pt.c (convert_nontype_argument): Use it.
7 * error.c (dump_simple_decl): Print constexpr.
9 * cvt.c (build_up_reference): Use target_type for the temporary var.
11 * except.c (build_throw): Set EXPR_LOCATION.
13 * tree.c (build_cplus_new): Handle CONSTRUCTOR.
15 * semantics.c (finish_compound_stmt): Avoid creating an
16 unnecessary BIND_EXPR.
18 * call.c (convert_like_real): Don't check narrowing if the element
19 is also an initializer-list.
21 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
23 * parser.c (cp_parser_objc_at_property_declaration): Recognize
24 RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC.
25 Do not use objc_set_property_attr, but use local variables
26 instead. Detect repeated usage of setter, getter and ivar
27 attributes. Improved error processing when a setter name does not
28 end in ':'. Do not check for CPP_CLOSE_PAREN after we determined
29 that the token is a keyword. Updated call to
30 objc_add_property_declaration.
32 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
34 * parser.c (cp_parser_objc_property_decl): Renamed to
35 cp_parser_objc_struct_declaration. Return the parsed trees
36 instead of calling objc_add_property_variable directly. Detect
37 missing or invalid declspecs. Implemented attributes. Do not eat
38 the ';' at the end. Exit loop whenever a non-comma is parsed, not
40 (cp_parser_objc_at_property): Renamed to
41 cp_parser_objc_at_property_declaration. Updated calls to
42 objc_add_property_variable, now objc_add_property_declaration, and
43 to cp_parser_objc_property_decl, now
44 cp_parser_objc_struct_declaration. Rewritten all code to be more
45 robust in dealing with syntax errors, and almost identical to the
46 one in c_parser_objc_at_property_declaration.
47 (cp_parser_objc_property_attrlist): Removed.
48 (cp_parser_objc_method_prototype_list): Updated call to
49 cp_parser_objc_at_property.
50 (cp_parser_objc_method_definition_list): Same change.
51 (cp_parser_objc_class_ivars): Detect a number of invalid
52 declarations of instance variables and produce errors when they
55 2010-10-26 Jason Merrill <jason@redhat.com>
57 * tree.c (build_vec_init_expr): Split out from...
58 (build_array_copy): ...here.
59 * init.c (perform_member_init): Use it.
60 * cp-tree.h: Declare it.
61 * cp-gimplify.c (cp_gimplify_init_expr): Don't gimplify the slot for
62 VEC_INIT_EXPR and AGGR_INIT_EXPR here. Drop pre/post parameters.
63 (cp_gimplify_expr): Handle array default-initialization via
66 * tree.c (stabilize_expr): Handle xvalues properly.
68 * call.c (build_over_call): Use argarray[0] for 'this' argument.
70 * decl.c (finish_function): Don't look at function_depth.
72 2010-10-25 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
74 Implement opaque-enum-specifiers for C++0x.
75 * cp-tree.h (SET_OPAQUE_ENUM_P): New.
77 (ENUM_FIXED_UNDERLYING_TYPE_P): New.
78 (start_enum): Update prototype.
79 (finish_enum_value_list): New prototype.
80 * parser.c (cp_parser_elaborated_type_specifier): Issue a pedwarn if
81 "enum class" is used in an elaborated-type-specifier.
82 (cp_parser_enum_specifier): Rewrite to parse opaque-enum-specifiers.
83 * decl.c (copy_type_enum): New.
84 (finish_enum_value_list): New, with code from finish_enum.
85 (finish_enum): A lot of code removed. Added a gcc_assert.
86 (start_enum): Add parameters enumtype and is_new.
87 Rewrite to work with opaque-enum-specifiers.
88 * pt.c (maybe_process_partial_specialization): Allow for template
89 specialization of enumerations, with a pedwarn.
90 (lookup_template_class): Update call to start_enum. Call to
92 (tsubst_enum): Call to begin_scope, finish_scope and
93 finish_enum_value_list.
95 2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
97 Removed Objective-C++ specific replacement of cxx_printable_name.
98 * cp-objcp-common.h: Added LANG_HOOKS_DECL_PRINTABLE_NAME, set
99 to cxx_printable_name for both C++ and Objective-C++.
100 * cp-lang.h: Removed LANG_HOOKS_DECL_PRINTABLE_NAME.
102 * error.c (dump_decl): For Objective-C++, call
103 objc_maybe_printable_name here ...
104 * tree.c (cxx_printable_name_internal): ... instead of here.
106 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
108 * tree.c (cxx_printable_name_internal): In Objective-C++, call
109 objc_maybe_printable_name.
111 2010-10-22 Jason Merrill <jason@redhat.com>
114 * pt.c (instantiate_class_template): Don't instantiate default
118 * init.c (build_vec_init): Handle memberwise move.
120 2010-10-21 Paolo Carlini <paolo.carlini@oracle.com>
123 * call.c (add_function_candidate): Don't use TREE_VALUE on null
126 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
128 * parser.c (cp_parser_objc_method_type): Mark inline. Return a
129 bool instead of calling objc_set_method_type.
130 (cp_parser_objc_method_signature): Updated calls to
131 cp_parser_objc_method_type and to objc_build_method_signature.
132 (cp_parser_objc_method_prototype_list): Updated calls to
133 objc_add_method_declaration. Use token->type to determine if it
134 is a class method or not.
135 (cp_parser_objc_method_definition_list): Same change.
137 2010-10-20 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
140 * parser.c (cp_convert_range_for): Call cp_finish_decl
141 instead of finish_expr_stmt.
143 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
145 * cp-lang.c (finish_file): Removed.
146 * decl2.c (cp_write_global_declarations): Call
147 objc_write_global_declarations when compiling Objective-C++.
149 2010-10-19 Paolo Carlini <paolo.carlini@oracle.com>
152 * pt.c (add_to_template_args): Check extra_args for error_mark_node.
153 (coerce_template_parms): Likewise for args.
155 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
157 Implemented parsing @synthesize and @dynamic for Objective-C++.
158 * parser.c (cp_parser_objc_method_definition_list): Recognize
159 RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
160 (cp_parser_objc_at_dynamic_declaration): New.
161 (cp_parser_objc_at_synthesize_declaration): New.
163 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
165 * parser.c (cp_parser_objc_identifier_list): Check the return
166 value of cp_parser_identifier and react if it is error_mark_node.
168 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
170 Merge from apple/trunk branch on FSF servers.
172 2005-03-01 Fariborz Jahanian <fjahanian@apple.com>
175 * call.c (standard_conversion, implicit_conversion): Ignore
176 'volatile' attribute of artificially volatized type in objc when
177 evaluating various conversion weights.
179 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
182 * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the
183 artiificially 'volatized' type before doing pointer comparison.
185 2010-10-18 Jakub Jelinek <jakub@redhat.com>
188 * semantics.c (finish_goto_stmt): Call mark_rvalue_use on computed
191 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
193 Merge from apple/trunk branch on FSF servers.
195 2006-04-19 Fariborz Jahanian <fjahanian@apple.com>
198 * parser.c (cp_parser_simple_type_specifier): Don't lookup for
199 objc object types if type is scope qualified.
201 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
203 Merge from apple/trunk branch on FSF servers.
205 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
208 * lex.c (unqualified_name_lookup_error): Issue diagnostic
209 for private 'ivar' access.
211 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
213 * parser.c (cp_parser_objc_visibility_spec): Update to use visibility
214 enum, and handle @package.
216 2010-10-15 Jason Merrill <jason@redhat.com>
219 * tree.c (cp_build_qualified_type_real): Don't reuse a variant
220 with a different typedef variant of the element type.
222 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
224 merge from FSF apple 'trunk' branch.
225 2006 Fariborz Jahanian <fjahanian@apple.com>
227 Radars 4436866, 4505126, 4506903, 4517826
228 * typeck.c (finish_class_member_access_expr): Handle CLASS.property
230 (cp_build_modify_expr): Likewise.
231 * parser.c (cp_parser_objc_method_prototype_list): Handle @property.
232 (cp_parser_objc_method_definition_list): Likewise.
233 (cp_parser_objc_property_decl): New.
234 (cp_parser_objc_property_attrlist): New.
235 (cp_parser_objc_at_property): New.
237 2010-10-14 Richard Guenther <rguenther@suse.de>
240 * cp-tree.h (NULLPTR_TYPE_P): Adjust.
241 * decl.c (cxx_init_decl_processing): Build a NULLPTR_TYPE node,
243 * error.c (dump_type): Handle NULLPTR_TYPE.
244 (dump_type_prefix): Likewise.
245 (dump_type_suffix): Likewise.
246 * mangle.c (write_type): Likewise.
247 * name-lookup.c (arg_assoc_type): Likewise.
248 * rtti.c (typeinfo_in_lib_p): Likewise.
249 * pt.c (tsubst): Likewise.
251 2010-10-13 Jason Merrill <jason@redhat.com>
254 * class.c (fixup_attribute_variants): New fn.
255 * cp-tree.h: Declare it.
256 * pt.c (instantiate_class_template): Call it.
257 * semantics.c (begin_class_definition): Call it.
259 2010-10-13 Richard Henderson <rth@redhat.com>
261 * cp-lang.c (cp_eh_personality): Update call to
262 build_personality_function.
263 * except.c (choose_personality_routine): Update function comment.
265 2010-10-13 Richard Guenther <rguenther@suse.de>
267 * tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and
268 clear DECL_CHAIN of NAMESPACE_DECLs.
270 2010-10-11 Martin Jambor <mjambor@suse.cz>
273 * cp-tree.h (current_class_ref): Check that cp_function_chain is
275 * call.c (build_cxx_call): Likewise.
277 2010-10-10 Jason Merrill <jason@redhat.com>
279 * pt.c (tsubst_default_argument): Handle DEFAULT_ARG.
280 (tsubst_default_arguments): Only do this once for cloned fns.
281 (tsubst): Use typedef_variant_p. Handle LANG_TYPE. Don't
283 (tsubst_expr): Avoid calling tsubst_expr for non-expressions.
284 (tsubst_copy_and_build): Likewise.
285 (tsubst_initializer_list): Likewise.
286 (tsubst_copy): Change default to gcc_unreachable. Handle
287 OVERLOAD and PTRMEM_CST.
289 2010-10-10 Jason Merrill <jason@redhat.com>
293 * pt.c (tsubst_copy) [INTEGER_CST]: Instantiate the type.
295 2010-10-07 Andi Kleen <ak@linux.intel.com>
297 * Make-lang.in (c++_OBJS): Remove dummy-checksum.o.
298 (cc1plus-dummy): Remove.
299 (cc1plus-checksum): Change to run checksum over object files
302 2010-10-08 Joseph Myers <joseph@codesourcery.com>
304 * cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
306 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
308 * cp-tree.def: Changed type of AT_ENCODE_EXPR from tcc_unary to
310 * cxx-pretty-print.c (pp_cxx_unary_expression): Added case for
312 * error.c (dump_expr): Added case for AT_ENCODE_EXPR.
313 * pt.c (tsubst_copy): Added case for AT_ENCODE_EXPR.
314 (value_dependent_expression_p): Added case for AT_ENCODE_EXPR.
315 (type_dependent_expression_p): Added case for AT_ENCODE_EXPR.
316 * parser.c (cp_parser_objc_encode_expression): Updated comment.
318 2010-10-07 Nicola Pero <nicola@nicola.brainstorm.co.uk>
320 Merge from apple/trunk branch on FSF servers.
322 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
325 * parser.c (cp_parser_objc_interstitial_code): Recognize
326 and parse RID_NAMESPACE keyword.
328 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
330 * parser.c (cp_parser_objc_method_tail_params_opt): Peek new token after
331 finding ellipsis, before checking for attributes.
333 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
335 Merge from apple/trunk branch on FSF servers.
336 * cp-tree.def: Added AT_ENCODE_EXPR here instead of to the no
337 longer existing gcc/c-common.def.
339 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
342 * pt.c (tsubst_copy_and_build): Instantiate @endcode(T).
343 * parser.c (cp_parser_objc_encode_expression): Build a templatized
344 parse tree for @encode(T).
346 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
349 * c-common.def: Add new expression code AT_ENCODE_EXPR.
351 2010-10-06 Eric Botcazou <ebotcazou@adacore.com>
354 * typeck.c (cp_build_addr_expr_1): Add check for incomplete types in
355 code folding offsetof-like computations.
357 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
360 * parser.c (cp_parser_objc_class_interface): If no identifier
361 follows an @interface token, stop parsing the interface after
363 (cp_parser_objc_class_implementation): If no identifier follows an
364 @implementation token, stop parsing the implementation after
367 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
370 * parser.c (cp_parser_objc_method_keyword_params): If the required
371 colon is not found while parsing parameters, stop parsing them.
373 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
376 * parser.c (cp_parser_objc_class_ivars): Do not eat the EOF or
377 @end after detecting it. Print an error if @end is found without
379 (cp_parser_objc_method_prototype_list): Do not eat the EOF after
380 detecting it. Fixed reading the next token when continuing
381 because of an error in a method signature. Print an error if EOF
382 is found without an '@end'.
383 (cp_parser_objc_method_definition_list): Same change.
385 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
387 Merge from apple/trunk branch on FSF servers:
389 2005-10-17 Fariborz Jahanian <fjahanian@apple.com>
392 * parser.c (cp_parser_objc_method_keyword_params): Check for valid
393 method parameters and issue error.
394 (cp_parser_objc_method_definition_list): Check for invalid tokens
395 which cannot start a function definition.
397 2005-10-14 Fariborz Jahanian <fjahanian@apple.com>
400 * parser.c (cp_parser_objc_message_args): Check for missing message
401 arguments and syntax error.
403 2005-10-13 Fariborz Jahanian <fjahanian@apple.com>
406 * parser.c (cp_parser_objc_class_ivars): Check for @end/eof while
409 2005-08-15 Ziemowit Laski <zlaski@apple.com>
412 * parser.c (cp_parser_objc_interstitial_code): Catch stray
413 '{' and '}' tokens and issue appropriate errors.
415 2005-08-02 Ziemowit Laski <zlaski@apple.com>
418 (cp_parser_statement_seq_opt): In addition to '}' and
419 end-of-file, a statement sequence may also be terminated
422 2010-10-05 Joseph Myers <joseph@codesourcery.com>
424 * cp-tree.h (cxx_print_error_function,
425 cxx_initialize_diagnostics): Declare using diagnostic_context
428 2010-10-04 Andi Kleen <ak@linux.intel.com>
430 * Make-lang.in (g++, cc1plus): Add + to build rule.
432 2010-10-04 Jason Merrill <jason@redhat.com>
434 * tree.c (decl_storage_duration): New.
435 * cp-tree.h: Declare it.
436 (duration_kind): Return values.
438 2010-10-03 Jason Merrill <jason@redhat.com>
440 * typeck.c (require_complete_type_sfinae): Add complain parm to...
441 (require_complete_type): ...this function.
442 (cp_build_array_ref, convert_arguments): Use it.
443 (convert_for_initialization, cp_build_modify_expr): Likewise.
444 * cp-tree.h: Declare it.
445 * call.c (build_over_call): Use it.
447 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
449 merge from FSF 'apple/trunk' branch.
450 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
453 * cp/parser.c (cp_parser_objc_interstitial_code): For
454 @optional/@required set the optional/required flag.
456 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
458 * parser.c (cp_lexer_get_preprocessor_token): Tidied up comments
459 and indentation when finding an Objective-C++ CPP_AT_NAME token.
461 2010-09-29 Richard Guenther <rguenther@suse.de>
463 * cp-tree.h (CP_DECL_CONTEXT): Check DECL_FILE_SCOPE_P.
464 (CP_TYPE_CONTEXT): Similar.
465 (FROB_CONTEXT): Frob global_namespace to the global
466 TRANSLATION_UNIT_DECL.
467 * decl.c (cxx_init_decl_processing): Build a TRANSLATION_UNIT_DECL,
468 set DECL_CONTEXT of global_namespace to it.
469 (start_decl): Use CP_DECL_CONTEXT and test TYPE_P
470 instead of zeroing context.
471 (cp_finish_decl): Use DECL_FILE_SCOPE_P.
472 (grokfndecl): Likewise.
473 (start_preparsed_function): Likewise.
474 * name-lookup.c (maybe_push_decl): Use DECL_NAMESPACE_SCOPE_P.
475 (namespace_binding): Use SCOPE_FILE_SCOPE_P.
476 * pt.c (template_class_depth): Use CP_TYPE_CONTEXT.
477 (is_specialization_of_friend): Use CP_DECL_CONTEXT.
478 (push_template_decl_real): Likewise.
479 (tsubst_friend_class): Likewise. Adjust context comparisons.
480 (instantiate_class_template): Use CP_TYPE_CONTEXT.
481 (tsubst): Do not substitute into TRANSLATION_UNIT_DECL.
482 * cxx-pretty-print.c (pp_cxx_nested_name_specifier): Use
485 2010-09-29 Yao Qi <yao@codesourcery.com>
487 * decl.c (get_atexit_node): Fix typo.
489 2010-09-28 Jason Merrill <jason@redhat.com>
491 * tree.c (lvalue_kind): Rename from lvalue_p_1, make nonstatic.
492 (real_lvalue_p): Take const_tree.
494 * typeck.c (lvalue_or_else): Make temporary arg a permerror.
495 (cp_build_addr_expr_1): Likewise.
497 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
499 Partially merged from apple/trunk branch on FSF servers:
500 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
501 Radar 3803157 (method attributes)
503 * parser.c (cp_parser_objc_method_keyword_params): Handle attributes.
504 (cp_parser_objc_method_tail_params_opt): Likewise.
505 (cp_parser_objc_method_signature): Likewise.
506 (cp_parser_objc_method_maybe_bad_prefix_attributes): New.
507 (cp_parser_objc_method_prototype_list): Handle attributes.
508 (cp_parser_objc_method_definition_list): Likewise.
510 2010-09-28 Richard Henderson <rth@redhat.com>
512 * cp-lang.c: Include "target.h".
513 (cp_eh_personality): Use targetm.except_unwind_info.
514 * Make-lang.in (cp-lang.o): Update deps.
516 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
518 * parser.c (cp_parser_objc_valid_prefix_attributes): New.
519 (cp_parser_declaration): Parse prefix attributes for ObjC++.
520 (cp_parser_objc_protocol_declaration): Handle attributes.
521 (cp_parser_objc_class_interface): Likewise.
522 (cp_parser_objc_declaration): Likewise.
524 2010-09-27 Jason Merrill <jason@redhat.com>
526 Require lvalues as specified by the standard.
527 * typeck.c (lvalue_or_else): Use real_lvalue_p.
528 (cp_build_addr_expr_1): Split out of cp_build_unary_op.
529 (cp_build_addr_expr, cp_build_addr_expr_strict): Interfaces.
530 (decay_conversion, get_member_function_from_ptrfunc): Adjust.
531 (build_x_unary_op, build_reinterpret_cast_1): Adjust.
532 (build_const_cast_1): Adjust.
533 * cp-tree.h: Declare new fns.
534 * call.c (build_this, convert_like_real, build_over_call): Adjust.
535 (initialize_reference): Adjust.
536 * class.c (build_base_path, convert_to_base_statically): Adjust.
537 (build_vfn_ref, resolve_address_of_overloaded_function): Adjust.
538 * cvt.c (build_up_reference, convert_to_reference): Adjust.
539 * decl.c (register_dtor_fn): Adjust.
540 * decl2.c (build_offset_ref_call_from_tree): Adjust.
541 * except.c (initialize_handler_parm): Adjust.
542 * init.c (build_offset_ref, build_delete, build_vec_delete): Adjust.
543 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Adjust.
544 * tree.c (stabilize_expr): Adjust.
546 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
548 Merge from apple/trunk branch on FSF servers:
550 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
553 * typeck.c (composite_pointer_type): Call objc_have_common_type
554 when comparing two objective-c pointer types.
556 2005-07-18 Ziemowit Laski <zlaski@apple.com>
559 * call.c (standard_conversion): Do not issue warnings when
560 comparing ObjC pointer types.
562 2005-06-22 Ziemowit Laski <zlaski@apple.com>
565 * call.c (standard_conversion): Allow for a pointer conversion
566 between any two ObjC pointer types.
567 * typeck.c (composite_pointer_type): Determine common type
568 for two ObjC pointer types.
570 2010-09-24 Jan Hubicka <jh@suse.cz>
572 * decl.c (finish_function): Use decl_replaceable_p
573 * method.c (make_alias_for_thunk): Update call of
574 cgraph_same_body_alias.
576 2010-09-24 Jason Merrill <jason@redhat.com>
578 * decl.c (compute_array_index_type): Remember type dependence of
580 * pt.c (dependent_type_p_r): Don't recompute it here.
582 * error.c (dump_expr) [CASE_CONVERT]: Print conversion between
583 reference and pointer to the same type as "*" or "&".
585 2010-09-24 Nicola Pero <nicola.pero@meta-innovation.com>
587 * typeck.c (warn_args_num): Use warning 'too many arguments to
588 method [methodname]' for an Objective-C method instead of the less
589 satisfactory 'too many arguments to function' (with no method
592 2010-09-21 Jason Merrill <jason@redhat.com>
594 * mangle.c (write_expression) [SCOPE_REF]: Only do -fabi-version=1
595 special handling if we know the member.
597 2010-09-18 Jason Merrill <jason@redhat.com>
599 * call.c (compare_ics): Do lvalue/rvalue reference binding
600 comparison for ck_list, too.
602 2010-09-15 Jason Merrill <jason@redhat.com>
604 * semantics.c (finish_id_expression): Diagnose use of function
605 parms in evaluated context outside function body.
607 * decl2.c (grokbitfield): Diagnose non-integral width.
609 * call.c (convert_like_real): Use the underlying type of the
610 reference for the temporary.
612 2010-09-15 Jakub Jelinek <jakub@redhat.com>
615 * class.c (build_vtbl_initializer): Use fn instead of init's operand
616 as first argument to FDESC_EXPR.
618 2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
621 * decl.c (grokdeclarator): Check build_memfn_type return value
624 2010-09-13 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
626 * semantics.c (finish_for_stmt): Always test flag_new_for_scope.
627 (begin_range_for_stmt): Likewise.
629 2010-09-11 Rodrigo Rivas <rodrigorivascosta@gmail.com>
631 Implement range-based for-statements.
632 * cp-tree.def (RANGE_FOR_STMT): New.
633 * cp-tree.h (RANGE_FOR_DECL, RANGE_FOR_EXPR, RANGE_FOR_BODY): New.
634 (cp_convert_range_for): Declare.
635 * pt.c (tsubst_expr): Add RANGE_FOR_STMT.
636 (tsubst_copy_and_build): perform_koenig_lookup takes extra argument.
637 * semantics.c (begin_range_for_stmt): New.
638 (finish_range_for_decl): New.
639 (finish_for_stmt): Accept also RANGE_FOR_STMT.
640 (perform_koenig_lookup): Add extra argument include_std.
641 * parser.c (cp_parser_c_for): New with code from
642 cp_parser_iteration_statement().
643 (cp_parser_range_for): New.
644 (cp_convert_range_for): New.
645 (cp_parser_iteration_statement): Add range-for support.
646 (cp_parser_condition): Adjust comment.
647 (cp_parser_postfix_expression): perform_koenig_lookup takes extra
649 * dump.c (cp_dump_tree): Add RANGE_FOR_STMT.
650 * cxx-pretty-print.c: Likewise.
651 * lex.c (cxx_init): Likewise.
652 * name-lookup.c (lookup_function_nonclass): Add extra argument
654 (lookup_arg_dependent): Likewise.
655 * name-lookup.h: Likewise.
657 2010-09-10 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
660 * error.c (maybe_warn_cpp0x): Add new warning
661 CPP0X_INLINE_NAMESPACES.
662 * parser.c (cp_parser_namespace_definition): Likewise.
663 * cp-tree.h (cpp0x_warn_str): Likewise.
665 2010-09-10 Richard Guenther <rguenther@suse.de>
667 * decl.c (reshape_init_vector): For VECTOR_TYPEs, use
668 TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE.
670 2010-09-10 Jan Hubicka <jh@suse.cz>
672 PR tree-optimization/45605
673 * cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in
676 2010-09-08 Jakub Jelinek <jakub@redhat.com>
679 * pt.c (tsubst) <case INTEGER_TYPE>: Call mark_rvalue_use
680 before calling fold_decl_constant_value.
682 2010-09-07 Arnaud Charlet <charlet@adacore.com>
684 * cp-tree.h (build_enumerator): Add new location_t parameter.
685 (build_lang_decl_loc): New function.
686 * decl.c (build_enumerator): New parameter loc. Use it when calling
687 build_decl. Replace build_lang_decl with build_lang_decl_loc.
688 * pt.c (tsubst_enum): Adjust call to build_enumerator.
689 * parser.c (cp_parser_enumerator_definition): Ditto.
690 * lex.c (build_lang_decl_loc): New function.
692 2010-09-06 Dodji Seketeli <dodji@redhat.com>
697 * tree.c (strip_typedefs): Strip typedefs from the context of
700 2010-09-06 Mark Mitchell <mark@codesourcery.com>
702 * typeck.c (cp_build_binary_op): Call do_warn_double_promotion.
703 * call.c (build_conditional_expr): Likewise.
704 (convert_arg_to_ellipsis): Likewise.
706 2010-09-06 Arnaud Charlet <charlet@adacore.com>
708 * parser.c (make_pointer_declarator, make_reference_declarator,
709 make_call_declarator, make_array_declarator): Set declarator->id_loc.
710 (cp_parser_init_declarator): Adjust location of decl if appropriate.
712 2010-09-06 Jason Merrill <jason@redhat.com>
714 * call.c (implicit_conversion): Fix value-init of enums.
715 (convert_like_real): Likewise.
717 * decl.c (cp_finish_decl): Don't change init for auto deduction.
719 * pt.c (fold_non_dependent_expr_sfinae): Split out from...
720 (fold_non_dependent_expr): ...here.
721 (convert_nontype_argument): Use it. Take complain parm.
722 Use perform_implicit_conversion instead of ocp_convert.
723 Allow cv-qual changes.
724 (convert_template_argument): Pass complain down.
725 (tsubst_template_arg): Suppress constant expression warnings.
728 * method.c (synthesized_method_walk): In constructors, also check
729 subobject destructors.
731 * semantics.c (finish_compound_literal): Always build a
734 2010-08-30 Paolo Carlini <paolo.carlini@oracle.com>
737 * decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs.
739 2010-08-30 Jakub Jelinek <jakub@redhat.com>
742 * parser.c (cp_parser_omp_atomic): Handle boolean
743 {PRE,POST}_INCREMENT.
745 2010-08-29 Jason Merrill <jason@redhat.com>
748 * parser.c (cp_parser_parameter_declaration): Pop parameter decls
749 after tentative parsing.
751 2010-08-22 Joseph Myers <joseph@codesourcery.com>
753 * Make-lang.in (g++spec.o): Update dependencies.
754 * g++spec.c: Include opts.h
755 (MATH_LIBRARY, LIBSTDCXX): Remove initial "-l".
756 (lang_specific_driver): Use cl_decoded_option structures.
758 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
760 * call.c: Use FOR_EACH_VEC_ELT.
765 * except.c: Likewise.
766 * mangle.c: Likewise.
767 * method.c: Likewise.
768 * name-lookup.c: Likewise.
769 * parser.c: Likewise.
772 * semantics.c: Likewise.
773 * typeck2.c: Likewise.
775 2010-08-19 Jason Merrill <jason@redhat.com>
777 * call.c (reference_related_p): Check for error_mark_node.
778 (add_function_candidate): Check it instead of
779 same_type_ignoring_top_level_qualifiers_p.
782 * init.c (build_new_1): Don't use build_value_init in a template.
783 (build_value_init): Make sure we don't.
786 * cp-gimplify.c (cp_gimplify_expr): Also remove assignment
787 of empty class CONSTRUCTOR.
789 * except.c (pending_noexcept, pending_noexcept_checks): New.
790 (perform_deferred_noexcept_checks): New.
791 (maybe_noexcept_warning): Split from...
792 (finish_noexcept_expr): ...here. Adjust.
793 * decl2.c (cp_write_global_declarations): Call
794 perform_deferred_noexcept_checks.
795 * cp-tree.h: And declare it.
797 2010-08-18 Nathan Froyd <froydnj@codesourcery.com>
800 * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to
803 2010-08-17 Kai Tietz <kai.tietz@onevision.com>
805 * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
806 or if -fms-extensions is enabled check, check permissive.
808 2010-08-09 Jason Merrill <jason@redhat.com>
811 * pt.c (lookup_template_class): Don't re-coerce outer parms.
813 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
815 * call.c (add_builtin_candidates): Use VECs for local variable
816 `types'. Adjust remainder of function accordingly.
818 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
820 * name-lookup.c (is_associated_namespace): Convert local variables
821 to be VECs instead of TREE_LISTs.
823 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
825 * tree.c (varargs_function_p): Use stdarg_p.
827 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
829 * parser.c (cp_default_arg_entry): Declare. Declare a VEC of it.
830 (cp_unparsed_functions_entry): Declare. Declare a VEC of it.
831 (cp_parser) [unparsed_functions_queues]: Rename to unparsed_queues.
832 Change type to a VEC.
833 (unparsed_funs_with_default_args): Define.
834 (unparsed_funs_with_definitions): Define.
835 (push_unparsed_function_queues): New function.
836 (cp_parser_new): Call it.
837 (pop_unparsed_function_queues): New function.
838 (cp_parser_class_specifier): Adjust processing of unparsed functions.
839 (cp_parser_template_declaration_after_export): Use VEC_safe_push.
840 (cp_parser_save_member_function_body): Likewise.
841 (cp_parser_late_parsing_for_member): Call push_unparsed_function_queues
842 and pop_unparsed_function_queues.
843 (cp_parser_late_parsing_default_args): Likewise.
844 (cp_parser_save_default_args): Use VEC_safe_push.
846 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
848 * name-lookup.h (cp_label_binding): Declare. Declare a VEC type
850 (cp_binding_level): Convert shadowed_labels and dead_vars_from_for
852 * decl.c (poplevel): Adjust for type changes.
853 (declare_local_label): Likewise.
855 2010-08-06 Jason Merrill <jason@redhat.com>
857 * typeck.c (complete_type_or_maybe_complain): Split out from...
858 (complete_type_or_else): Here.
859 (build_class_member_access_expr): Call it.
860 (finish_class_member_access_expr): Likewise.
861 * call.c (build_special_member_call): Likewise.
862 * cvt.c (build_expr_type_conversion): Likewise.
863 * init.c (build_new): Likewise.
864 * typeck2.c (build_functional_cast): Likewise.
865 * cp-tree.h: Declare it.
867 * init.c (build_value_init): Add complain parm.
868 (build_value_init_noctor): Likewise.
869 (perform_member_init): Pass it.
870 (expand_aggr_init_1): Likewise.
871 (build_new_1): Likewise.
872 (build_vec_init): Likewise.
873 * pt.c (tsubst_expr): Likewise.
874 * typeck2.c (build_functional_cast): Likewise.
876 * tree.c (build_target_expr_with_type): Handle error_mark_node.
878 * typeck.c (decay_conversion): Any expression with type nullptr_t
881 2010-07-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
884 * decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED.
886 2010-07-27 Jason Merrill <jason@redhat.com>
888 * pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR
889 from build_value_init.
890 * init.c (build_value_init_noctor): Give error for unknown array
893 2010-07-27 Joseph Myers <joseph@codesourcery.com>
895 * cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
897 2010-07-27 Joseph Myers <joseph@codesourcery.com>
899 * cp-objcp-common.c (cxx_initialize_diagnostics): First call
900 c_common_initialize_diagnostics.
901 * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK,
902 LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
904 2010-07-21 Jason Merrill <jason@redhat.com>
906 * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
908 * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
911 2010-07-20 Jeffrey Yasskin <jyasskin@google.com>
914 * pt.c (instantiate_class_template): Propagate the template's
915 location to its instance.
917 2010-07-20 Jason Merrill <jason@redhat.com>
920 * pt.c (tsubst_copy_and_build): Rework last change.
923 * pt.c (tsubst_copy_and_build): Handle partial substitution of
926 2010-07-19 Jason Merrill <jason@redhat.com>
929 * semantics.c (finish_decltype_type): Correct decltype
930 of parenthesized rvalue reference variable.
933 * tree.c (cp_tree_equal): Compare type of *CAST_EXPR.
934 * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR.
936 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com>
939 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t
941 * cp-tree.h: Adjust declaration.
942 * init.c (perform_member_init): Adjust caller.
943 * decl.c (grok_reference_init, cp_finish_decl): Likewise.
944 * typeck2.c (store_init_value): Likewise.
945 (build_functional_cast): Pass complain argument to
946 build_x_compound_expr_from_list.
948 2010-07-16 Jason Merrill <jason@redhat.com>
951 * pt.c (process_partial_specialization): Diagnose partial
952 specialization after instantiation.
953 (most_specialized_class): Add complain parm.
955 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.
957 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
959 * init.c (build_new_1): Use cp_build_function_call_nary instead of
960 cp_build_function_call.
962 2010-07-15 Jason Merrill <jason@redhat.com>
965 * call.c (add_function_candidate): If we're working on an implicit
966 declaration, don't consider candidates that won't match.
967 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
968 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
971 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
972 (TYPE_HAS_USER_OPEQ): New.
973 * decl.c (grok_special_member_properties): Set it.
974 * class.c (add_implicitly_declared_members): Don't lazily declare
975 constructors/operator= if a base or member has a user-declared one.
976 (check_bases_and_members, check_bases): Adjust.
977 (check_field_decls, check_field_decl): Adjust.
979 2010-07-15 Anatoly Sokolov <aesok@post.ru>
981 * decl.c (integer_three_node): Remove.
982 (cxx_init_decl_processing): Do not initialize the integer_three_node.
983 * cp-tree.h (integer_three_node): Remove.
985 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
987 * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
990 * cp-gimplify.c: Likewise.
994 * mangle.c: Likewise.
995 * name-lookup.c: Likewise.
996 * optimize.c: Likewise.
997 * parser.c: Likewise.
1000 * search.c: Likewise.
1001 * semantics.c: Likewise.
1002 * typeck.c: Likewise.
1003 * typeck2.c: Likewise.
1005 2010-07-14 Jason Merrill <jason@redhat.com>
1007 * init.c (sort_mem_initializers): Rename "field_type" to "ctx".
1008 (build_field_list): Cache field type.
1010 Implement C++0x unrestricted unions (N2544)
1011 * class.c (check_field_decl): Loosen union handling in C++0x.
1012 * method.c (walk_field_subobs): Split out from...
1013 (synthesized_method_walk): ...here. Set msg before loops.
1014 (process_subob_fn): Check for triviality in union members.
1015 * init.c (sort_mem_initializers): Splice out uninitialized
1016 anonymous unions and union members.
1017 (push_base_cleanups): Don't automatically destroy anonymous unions
1020 2010-07-13 Jason Merrill <jason@redhat.com>
1023 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
1024 (TYPE_HAS_USER_OPEQ): New.
1025 * decl.c (grok_special_member_properties): Set it.
1026 * class.c (add_implicitly_declared_members): Don't lazily declare
1027 constructors/operator= if a base or member has a user-declared one.
1028 (check_bases_and_members, check_bases): Adjust.
1029 (check_field_decls, check_field_decl): Adjust.
1030 * method.c (synthesized_method_walk): Initialize check_vdtor.
1033 * mangle.c (write_type): Canonicalize.
1034 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
1035 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
1037 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
1040 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
1042 * typeck.c (get_delta_difference): Update prototype, add a
1043 tsubst_flags_t parameter; update get_delta_difference_1 calls and
1044 add checks for error_mark_node.
1045 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
1046 parameter; update lookup_base call.
1047 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
1048 parameter; update get_delta_difference call and add check for
1050 (convert_ptrmem): Update prototype, add a tsubst_flags_t
1051 parameter; update get_delta_difference call and add check for
1052 error_mark_node; update build_ptrmemfunc call.
1053 (build_static_cast_1): Adjust convert_ptrmem call.
1054 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
1055 (cp_build_unary_op): Adjust build_ptrmemfunc call.
1056 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
1057 and build_ptrmemfunc calls.
1058 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
1060 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
1063 * call.c (build_temp): Add tsubst_flags_t complain parameter;
1064 adjust build_special_member_call call, pass complain.
1065 (convert_like_real): Adjust build_temp call, pass complain.
1067 2010-07-09 Jason Merrill <jason@redhat.com>
1070 * cp-tree.h (BV_LOST_PRIMARY): New macro.
1071 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
1072 Set BV_LOST_PRIMARY.
1073 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
1075 2010-07-08 Jason Merrill <jason@redhat.com>
1078 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
1079 virtual bases for covariant thunks.
1081 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
1083 * cp-tree.h: Do not include toplev.h.
1085 2010-07-06 Jason Merrill <jason@redhat.com>
1088 * call.c (is_std_init_list): Look through typedefs.
1091 * init.c (build_offset_ref): If scope isn't dependent,
1092 don't exit early. Look at TYPE_MAIN_VARIANT.
1093 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
1095 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
1097 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
1099 * cp-tree.h (impl_conv_void): New type.
1100 (convert_to_void): Adjust prototype.
1101 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
1102 diagnostic for easy translation. Change caller.
1103 * typeck.c: Update call to convert_to_void.
1104 * semantics.c: Likewise.
1107 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
1109 * decl.c (cp_finish_decl): Call add_local_decl.
1110 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
1112 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
1114 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
1117 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
1120 * parser.c (cp_parser_primary_expression): Error if local template is
1123 2010-07-02 Le-Chun Wu <lcwu@google.com>
1126 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
1127 (variable or type) shadows another type.
1129 2010-07-02 Jakub Jelinek <jakub@redhat.com>
1132 * typeck.c (convert_for_assignment): When converting a convertible
1133 vector type or objc++ types, call mark_rvalue_use.
1134 * typeck2.c (build_m_component_ref): Use return values from
1135 mark_rvalue_use or mark_lvalue_use.
1136 * class.c (build_base_path): Likewise.
1137 * call.c (build_conditional_expr): Likewise.
1139 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1142 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
1145 2010-07-01 Richard Guenther <rguenther@suse.de>
1147 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
1148 predicate we are looking for, allow non-gimplified
1151 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1154 * typeck.c (cp_build_unary_op): Early return error_mark_node when
1155 arg is NULL_TREE too.
1156 * call.c (convert_class_to_reference): Return error_mark_node when
1159 2010-06-30 Michael Matz <matz@suse.de>
1161 * repo.c (finish_repo): Fix typo.
1163 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1165 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
1167 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1169 * repo.c (pending_repo): Change type to a VEC.
1170 (finish_repo): Adjust for new type of pending_repo.
1171 (repo_emit_p): Likewise.
1173 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
1175 * tree.c: Include gimple.h. Do not include tree-flow.h
1176 * decl.c: Do not include tree-flow.h
1177 * Make-lang.in: Adjust dependencies.
1179 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1181 * decl.c (incomplete_var): Declare. Declare VECs containing them.
1182 (incomplete_vars): Adjust comment. Change type to a VEC.
1183 (maybe_register_incomplete_var): Adjust for new type.
1184 (complete_vars): Adjust iteration over incomplete_vars.
1186 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1188 * decl.c (struct named_label_entry): Change type of bad_decls field
1190 (poplevel_named_label_1): Adjust for new type of bad_decls.
1191 (check_goto): Likewise.
1193 2010-06-29 Jason Merrill <jason@redhat.com>
1195 Enable implicitly declared move constructor/operator= (N3053).
1196 * class.c (add_implicitly_declared_members): A class with no
1197 explicitly declared copy or move constructor gets both declared
1198 implicitly, and similarly for operator=.
1199 (check_bases): A type with no copy ctor does not inhibit
1200 a const copy ctor in a derived class. It does mean the derived
1202 (check_field_decl): Likewise.
1203 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
1204 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
1205 (trivially_copyable_p): Likewise.
1206 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
1207 * class.c (finish_struct_bits): Likewise.
1208 * tree.c (build_target_expr_with_type): Likewise.
1209 * typeck2.c (store_init_value): Likewise.
1211 Enable implicitly deleted functions (N2346)
1212 * class.c (check_bases_and_members): Adjust lambda flags.
1213 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
1215 * decl2.c (mark_used): Adjust error for use of deleted function.
1217 Machinery to support implicit delete/move.
1218 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
1219 has_complex_move_ctor, has_complex_move_assign bitfields.
1220 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
1221 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
1222 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
1223 (enum special_function_kind): Add sfk_move_assignment.
1224 (LOOKUP_SPECULATIVE): New.
1225 * call.c (build_over_call): Return early if it's set.
1226 (build_over_call): Use trivial_fn_p.
1227 * class.c (check_bases): If the base has no default constructor,
1228 the derived one is non-trivial. Handle move ctor/op=.
1229 (check_field_decl): Likewise.
1230 (check_bases_and_members): Handle move ctor/op=.
1231 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
1232 (type_has_move_constructor, type_has_move_assign): New.
1233 * decl.c (grok_special_member_properties): Handle move ctor/op=.
1234 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
1235 (trivial_fn_p): New.
1236 (do_build_copy_constructor): Use it.
1237 (do_build_assign_ref): Likewise. Handle move assignment.
1238 (build_stub_type, build_stub_object, locate_fn_flags): New.
1239 (locate_ctor): Use locate_fn_flags.
1240 (locate_copy, locate_dtor): Remove.
1241 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
1242 (process_subob_fn, synthesized_method_walk): New.
1243 (maybe_explain_implicit_delete): New.
1244 (implicitly_declare_fn): Use synthesized_method_walk,
1245 type_has_trivial_fn, and type_set_nontrivial_flag.
1246 (defaulted_late_check): Set DECL_DELETED_FN.
1247 (defaultable_fn_check): Handle sfk_move_assignment.
1248 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
1249 implicitly deleted move ctor/op=.
1250 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
1251 (lookup_fnfields_slot): New.
1252 * semantics.c (omp_clause_info_fndecl): Remove.
1253 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
1254 get_copy_assign, trivial_fn_p.
1255 (trait_expr_value): Adjust call to locate_ctor.
1256 * tree.c (special_function_p): Handle sfk_move_assignment.
1258 * class.c (type_has_virtual_destructor): New.
1259 * cp-tree.h: Declare it.
1260 * semantics.c (trait_expr_value): Use it.
1262 * call.c (build_over_call): Only give warnings with tf_warning.
1264 * name-lookup.c (pop_scope): Handle NULL_TREE.
1266 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
1267 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
1268 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
1269 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
1270 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
1271 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
1272 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
1273 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
1274 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
1275 (sfk_assignment_operator): Rename to sfk_copy_assignment.
1276 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
1277 * search.c, semantics.c, tree.c: Adjust.
1279 * pt.c (dependent_scope_ref_p): Remove.
1280 (value_dependent_expression_p): Don't call it.
1281 (type_dependent_expression_p): Here either.
1282 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
1283 if the scope isn't dependent.
1285 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
1289 * pt.c (has_value_dependent_address): New.
1290 (value_dependent_expression_p): Check it.
1291 (convert_nontype_argument): Likewise. Call decay_conversion before
1292 folding if we want a pointer.
1293 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
1294 scope is the current instantiation.
1296 2010-06-28 Jakub Jelinek <jakub@redhat.com>
1299 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
1302 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
1304 * init.c: Do not include except.h.
1307 * cp-lang.c: Likewise.
1309 * semantics.c: Likewise.
1310 * decl2.c: Likewise.
1311 * except.c: Likewise.
1312 (init_exception_processing): Do not set the removed
1313 lang_protect_cleanup_actions here.
1314 (cp_protect_cleanup_actions): Make non-static and remove prototype.
1315 (doing_eh): New, moved from except.c but removed the do_warning flag.
1316 (expand_start_catch_block): Update doing_eh call.
1317 (expand_end_catch_block): Likewise.
1318 (build_throw): Likewise.
1319 * cp-tree.h: Prototype cp_protect_cleanup_actions.
1320 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
1321 cp_protect_cleanup_actions.
1322 * Make-lang.in: Update dependencies.
1324 2010-06-26 Jason Merrill <jason@redhat.com>
1326 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
1327 constructor called with a single argument that takes a reference
1328 to the constructor's class.
1329 (BAD_CONVERSION_RANK): New.
1330 (compare_ics): Use it to compare bad ICSes.
1332 2010-06-25 Joseph Myers <joseph@codesourcery.com>
1334 * lang-specs.h: Remove +e handling.
1336 2010-06-24 Andi Kleen <ak@linux.intel.com>
1338 * parser.c: (cp_parser_question_colon_clause):
1339 Switch to use cp_lexer_peek_token.
1340 Call warn_for_omitted_condop. Call pedwarn for omitted
1343 2010-06-22 Jakub Jelinek <jakub@redhat.com>
1346 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
1347 datum and mark_rvalue_use on component.
1350 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
1351 the CALL_EXPR has no arguments.
1353 2010-06-21 Jason Merrill <jason@redhat.com>
1355 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
1357 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
1360 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
1362 * name-lookup.c (struct arg_lookup): Convert namespaces and
1363 classes fields to VEC.
1364 (arg_assoc_namespace): Adjust for new type of namespaces.
1365 (arg_assoc_class): Adjust for new type of classes.
1366 (lookup_arg_dependent): Use make_tree_vector and
1367 release_tree_vector.
1368 * typeck2.c (build_x_arrow): Use vec_member.
1370 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
1373 * error.c (dump_decl): Better wording for anonymous namespace.
1375 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
1377 * class.c (build_vtbl_initializer): Adjust computation of new_position
1378 and which entry to add padding for.
1380 2010-06-16 Jason Merrill <jason@redhat.com>
1382 * except.c (check_noexcept_r): Return the problematic function.
1383 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
1384 * pt.c (tsubst_copy_and_build): Pass it.
1385 * parser.c (cp_parser_unary_expression): Likewise.
1386 * cp-tree.h: Adjust prototype.
1388 * method.c (defaulted_late_check): Give the defaulted method
1389 the same exception specification as the implicit declaration.
1391 2010-06-15 Jason Merrill <jason@redhat.com>
1393 * class.c (add_implicitly_declared_members): Implicit assignment
1394 operators can also be virtual overriders.
1395 * method.c (lazily_declare_fn): Likewise.
1397 * call.c (convert_like_real): Give "initializing argument of"
1398 information for ambiguous conversion. Give source position
1401 * call.c (print_z_candidates): Do print viable deleted candidates.
1402 (joust): Don't choose a deleted function just because its worst
1403 conversion is better than another candidate's worst.
1405 * call.c (convert_like_real): Don't complain about
1406 list-value-initialization from an explicit constructor.
1408 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
1409 DECL_SOURCE_LOCATION directly.
1411 * class.c (type_has_user_provided_default_constructor): Use
1414 * call.c (is_subseq): Handle ck_aggr, ck_list.
1415 (compare_ics): Treat an aggregate or ambiguous conversion to the
1416 same type as involving the same function.
1418 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
1420 * typeck.c (convert_for_assignment): Fix comment. Change message
1421 format from %d to %qP.
1422 (convert_for_initialization): Fix comment.
1424 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
1426 * cp-tree.h (expr_list_kind): New type.
1427 (impl_conv_rhs): New type.
1428 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
1430 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
1431 diagnostics for easy translation. Change caller.
1432 (convert_for_initialization): Use impl_conv_rhs and change caller.
1433 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
1434 diagnostics for easy translation. Change caller.
1435 * decl.c (bad_spec_place): New enum.
1436 (bad_specifiers): Use it and emit the diagnostics for easy
1437 translation. Change caller.
1438 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
1440 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1442 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
1444 * decl2.c (cp_write_global_declarations): Adjust for new type of
1445 decl_namespace_list.
1446 * name-lookup.c (current_decl_namespace): Likewise.
1447 (push_decl_namespace): Likewise.
1448 (pop_decl_namespace): Likewise.
1450 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1452 * call.c (build_java_interface_fn_ref): Call build_function_type_list
1453 instead of build_function_type.
1454 * decl.c (cxx_init_decl_processing): Likewise.
1455 (declare_global_var): Likewise.
1456 (get_atexit_node): Likewise.
1457 (expand_static_init): Likewise.
1458 * decl2.c (start_objects): Likewise.
1459 (start_static_storage_duration_function): Likewise.
1460 * except.c (init_exception_processing): Likewise.
1461 (build_exc_ptr): Likewise.
1462 (build_throw): Likewise.
1463 * rtti.c (throw_bad_cast): Likewise.
1464 (throw_bad_typeid): Likewise.
1465 (build_dynamic_cast_1): Likewise.
1467 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1469 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
1470 (build_op_delete_call): Likewise.
1471 (build_over_call): Likewise.
1472 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1473 * pt.c (process_partial_specialization): Likewise.
1474 (tsubst_template_args): Likewise.
1475 * semantics.c (finish_asm_stmt): Likewise.
1477 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
1479 * decl.c (record_key_method_defined): New, broken out of ...
1480 (finish_function): ... here. Call it.
1481 (start_decl): Treat aliases as definitions.
1483 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1485 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
1487 * pt.c (maybe_process_partial_specialization): Likewise.
1488 (register_specialization): Likewise.
1489 (add_pending_template): Likewise.
1490 (lookup_template_class): Likewise.
1491 (push_tinst_level): Likewise.
1493 * parser.c (cp_lexer_new_main): Likewise.
1494 (cp_lexer_new_from_tokens): Likewise.
1495 (cp_token_cache_new): Likewise.
1496 (cp_parser_context_new): Likewise.
1497 (cp_parser_new): Likewise.
1498 (cp_parser_nested_name_specifier_opt): Likewise.
1499 (cp_parser_template_id): Likewise.
1501 * name-lookup.c (binding_entry_make): Likewise.
1502 (binding_table_construct): Likewise.
1503 (binding_table_new): Likewise.
1504 (cxx_binding_make): Likewise.
1505 (pushdecl_maybe_friend): Likewise.
1506 (begin_scope): Likewise.
1507 (push_to_top_level): Likewise.
1509 * lex.c (init_reswords): Likewise.
1510 (retrofit_lang_decl): Likewise.
1511 (cxx_dup_lang_specific_decl): Likewise.
1512 (copy_lang_type): Likewise.
1513 (cxx_make_type): Likewise.
1515 * decl.c (make_label_decl): Likewise.
1516 (check_goto): Likewise.
1517 (start_preparsed_function): Likewise.
1518 (save_function_data): Likewise.
1520 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
1522 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
1524 * class.c (finish_struct_1): Likewise.
1526 * cp-tree.h (struct lang_type): Add variable_size GTY option.
1527 (struct lang_decl): Likewise.
1529 * parser.c (cp_parser_new): Update comment to not reference
1532 2010-06-07 Jason Merrill <jason@redhat.com>
1535 * error.c (dump_parameters): Mask out TFF_SCOPE.
1536 (dump_simple_decl): Don't print the scope of a PARM_DECL.
1537 (dump_scope): Remove no-op mask.
1540 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
1542 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
1543 * init.c (build_offset_ref): Use it.
1544 * pt.c (maybe_process_partial_specialization): Use it.
1545 (instantiate_class_template): Use it.
1546 * search.c (lookup_base): Use it.
1548 2010-06-07 Jakub Jelinek <jakub@redhat.com>
1551 * expr.c (mark_exp_read): Handle INDIRECT_REF.
1552 * cvt.c (convert_to_void): Handle INDIRECT_REF like
1553 handled_component_p.
1556 * decl.c (initialize_local_var): If TREE_USED is set on the type,
1557 set also DECL_READ_P on the decl.
1559 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1562 * cp-tree.h (typedef_variant_p): Move this declaration to
1564 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1565 * decl.c (grokdeclarator): Do not rename debug info of an
1566 anonymous tagged type named by a typedef.
1568 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
1571 * class.c (check_field_decls): Move the call to
1572 check_bitfield_decl before trying to set the
1573 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
1575 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
1577 * typeck.c: Update include path for moved files.
1580 * cp-gimplify.c: Likewise.
1581 * cp-lang.c: Likewise.
1583 * semantics.c: Likewise.
1584 * cxx-pretty-print.h: Likewise.
1585 * decl2.c: Likewise.
1586 * parser.c: Likewise.
1587 * cp-objcp-common.c: Likewise.
1588 * cp-tree.h: Likewise.
1589 * name-lookup.c: Likewise.
1591 * name-lookup.h: Likewise.
1592 * config-lang.in: Update paths in gtfiles for files in c-family/.
1593 * Make-lang.in: Likewise.
1595 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
1597 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
1598 * typeck.c (build_ptrmemfunc): Likewise.
1600 2010-06-04 Jason Merrill <jason@redhat.com>
1602 * typeck2.c (merge_exception_specifiers): Adjust merging of
1603 throw() and noexcept(true).
1605 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
1606 using an uninitialized variable.
1608 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
1609 (pp_cxx_expression): Likewise.
1611 Implement noexcept-specification (15.4)
1612 * parser.c (cp_parser_exception_specification_opt): Parse it.
1613 Give -Wdeprecated warning about throw() specs.
1614 * pt.c (tsubst_exception_specification): Handle it.
1615 * error.c (dump_exception_spec): Handle it.
1616 (dump_expr): Handle NOEXCEPT_EXPR.
1617 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
1618 * typeck.c (comp_except_specs): Handle compatibility rules.
1619 Change exact parm to take an enum.
1620 * typeck2.c (merge_exception_specifiers): Handle noexcept.
1621 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
1622 (type_throw_all_p, build_noexcept_spec): New fns.
1623 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
1624 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
1625 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
1626 (noexcept_true_spec, noexcept_false_spec): New macros.
1627 * name-lookup.c (pushdecl_maybe_friend): Adjust.
1628 * search.c (check_final_overrider): Adjust.
1629 * decl.c (check_redeclaration_exception_specification): Adjust.
1630 (use_eh_spec_block): Use type_throw_all_p.
1631 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
1632 Give operator new a noexcept-specification in C++0x mode.
1633 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
1634 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
1636 Implement noexcept operator (5.3.7)
1637 * cp-tree.def (NOEXCEPT_EXPR): New.
1638 * except.c (check_noexcept_r, finish_noexcept_expr): New.
1639 * cp-tree.h: Declare finish_noexcept_expr.
1640 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
1641 * pt.c (tsubst_copy_and_build): And tsubst it.
1642 (type_dependent_expression_p): Handle it.
1643 (value_dependent_expression_p): Handle it.
1645 * call.c (build_conditional_expr): Never fold in unevaluated context.
1646 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
1647 * semantics.c (simplify_aggr_init_expr): Likewise.
1648 * typeck.c (merge_types): Call merge_exception_specifiers.
1649 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
1650 DECL_ANTICIPATED for preferring new type.
1652 2010-06-04 Joseph Myers <joseph@codesourcery.com>
1654 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
1657 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1660 * typeck.c (build_class_member_access_expr): Call mark_exp_read
1661 on object for static data members.
1663 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1664 Jason Merrill <jason@redhat.com>
1667 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
1668 with the same type, call mark_lvalue_use on both.
1670 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
1672 * class.c (struct vtbl_init_data_s): Remove last_init field.
1673 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
1675 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
1677 (build_vtt): Likewise.
1678 (initialize_vtable): Take a VEC instead of a tree.
1679 (build_vtt_inits): Change return type to void. Take a VEC **
1680 instead of a tree *; accumulate results into said VEC.
1681 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
1682 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
1683 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
1685 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
1686 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
1688 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
1689 rather than tree_cons.
1690 (build_vbase_offset_vtbl_entries): Likewise.
1691 (add_vcall_offset): Likewise.
1692 (build_rtti_vtbl_entries): Likewise.
1693 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
1694 * decl.c (initialize_artificial_var): Use build_constructor instead
1695 of build_constructor_from_list.
1697 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
1700 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
1703 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
1705 * parser.c (cp_parser_mem_initializer_list): Change error text.
1707 2010-06-02 Jakub Jelinek <jakub@redhat.com>
1709 * cp-objcp-common.c (shadowed_var_for_decl): Change into
1710 tree_decl_map hashtab from tree_map.
1711 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
1712 (init_shadowed_var_for_decl): Adjust initialization.
1715 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
1716 instead of calling mark_exp_read only when not an assignment.
1719 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
1720 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
1721 Set DECL_VALUE_EXPR on var.
1723 2010-06-02 Jason Merrill <jason@redhat.com>
1725 * error.c (dump_type): Improve typedef handling.
1730 * name-lookup.c (same_entity_p): New.
1731 (ambiguous_decl): Multiple declarations of the same entity
1734 2010-06-01 Jason Merrill <jason@redhat.com>
1737 * call.c (add_list_candidates): Prefer the default constructor.
1738 (build_aggr_conv): Treat missing initializers like { }.
1739 * typeck2.c (process_init_constructor_record): Likewise.
1740 * init.c (expand_default_init): Use digest_init for
1741 direct aggregate initialization, too.
1743 * call.c (add_list_candidates): Split out...
1744 (build_user_type_conversion_1): ...from here.
1745 (build_new_method_call): And here.
1746 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
1749 * call.c (build_list_conv): Set list-initialization flags properly.
1751 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
1753 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
1755 2010-06-01 Arnaud Charlet <charlet@adacore.com>
1756 Matthew Gingell <gingell@adacore.com>
1758 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
1759 * decl2.c: Include langhooks.h and c-ada-spec.h.
1760 (cpp_check, collect_source_refs, collect_ada_namespace,
1761 collect_all_refs): New functions.
1762 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
1763 * lang-specs.h: Ditto.
1765 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1767 * cp-tree.h (cp_build_function_call_nary): Declare.
1768 * typeck.c (cp_build_function_call_nary): Define.
1769 * decl.c (register_dtor_fn): Use it instead of
1770 cp_build_function_call.
1771 (cxx_maybe_build_cleanup): Likewise.
1772 * decl2.c (generate_ctor_or_dtor_function): Likewise.
1773 * except.c (do_get_exception_ptr): Likewise.
1774 (do_begin_catch): Likewise.
1775 (do_allocate_exception): Likewise.
1776 (do_free_exception): Likewise.
1777 (build_throw): Likewise. Use cp_build_function_call_vec instead
1778 of cp_build_function_call.
1779 (do_end_catch): Likewise.
1781 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1783 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
1784 (struct cp_declarator): Move id_loc field up.
1786 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1788 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
1789 this file is included before c-common.h. Define GCC_DIAG_STYLE
1790 before including diagnostic-core.h and toplev.h.
1791 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
1792 * pt.c: Include cp-tree.h before c-common.h.
1794 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1796 * tree.c (c_register_addr_space): Add stub.
1798 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1800 * g++spec.c (lang_specific_driver): Use fatal_error instead of
1803 2010-05-28 Dodji Seketeli <dodji@redhat.com>
1805 Revert fix of PR c++/44188
1806 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
1808 * tree.c (typedef_variant_p): Revert moving this definition to
1810 * decl.c (grokdeclarator): Revert naming typedef handling.
1812 2010-05-27 Joseph Myers <joseph@codesourcery.com>
1814 * call.c: Include diagnostic-core.h instead of diagnostic.h.
1815 * cp-lang.c: Don't include diagnostic.h
1816 * name-lookup.c: Include diagnostic-core.h instead of
1818 (cp_emit_debug_info_for_using): Use seen_error.
1819 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
1820 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
1821 * pt.c (iterative_hash_template_arg): Use seen_error.
1822 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
1823 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
1824 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
1825 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
1828 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1831 * cp-tree.h (typedef_variant_p): Move this declaration to
1833 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1834 * decl.c (grokdeclarator): Do not rename debug info of an
1835 anonymous tagged type named by a typedef.
1837 2010-05-27 Jason Merrill <jason@redhat.com>
1840 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
1843 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
1846 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
1847 * class.c (layout_class_type): Likewise.
1848 * decl.c (finish_enum): Likewise.
1849 * mangle.c (write_builitin_type): Likewise.
1851 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
1853 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
1855 * decl.c (grokdeclarator): Handle __int128.
1856 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
1857 (cp_parser_simple_type_specifier): Likewise.
1858 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
1859 * typeck.c (cp_common_type): Handle __int128.
1860 * mangle.c (integer_type_codes): Add itk_int128 and
1861 itk_unsigned_int128.
1863 2010-05-26 Jason Merrill <jason@redhat.com>
1866 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
1869 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1871 * cp-lang.c: Do not include expr.h.
1873 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1875 * decl.c: Do not include rtl.h
1876 * semantics.c: Likewise.
1878 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
1880 * cp-tree.h: Do not include splay-tree.h.
1881 (struct prtmem_cst): Remove unused field and false comment.
1882 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
1883 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
1884 * init.c: Do not include rtl.h and expr.h.
1885 * class.c: Do not include rtl.h. Include splay-tree.h.
1886 (build_clone): Use plain NULL instead of NULL_RTX.
1887 * decl.c: Do not include expr.h. Explain why rtl.h has to be
1888 included. Include splay-tree.h.
1889 * method.c: Do not include rtl.h and expr.h.
1890 (use_thunk): Use plain NULL instead of NULL_RTX.
1891 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
1892 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
1893 and target.h. Include splay-tree.h.
1894 * expr.c: Do not include rtl.h and expr.h.
1895 * pt.c: Do not include obstack.h and rtl.h.
1896 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
1897 (tsubst_decl): Likewise.
1898 (instantiate_decl): Likewise.
1899 * semantics.c: Do not include exprt.h and debug.h. Explain why
1900 rtl.h has to be included.
1901 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
1902 * call.c: Do not include rtl.h and expr.h.
1903 * search.c: Do not include obstack.h and rtl.h.
1904 * friend.c: Do not include rtl.h and expr.h.
1905 * Make-lang.in: Update dependencies.
1907 2010-05-25 Jakub Jelinek <jakub@redhat.com>
1910 * parser.c (non_integral_constant): Add NIC_NONE.
1911 (required_token): Add RT_NONE.
1912 (cp_parser_unary_expression): Initialize non_constant_p
1914 (cp_parser_asm_definition): Initialize missing to RT_NONE.
1915 (cp_parser_primary_expression, cp_parser_postfix_expression,
1916 cp_parser_cast_expression, cp_parser_binary_expression,
1917 cp_parser_functional_cast): Fix formatting.
1919 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
1922 * parser.c: Remove inclusion of dyn-string.h.
1923 (non_integral_constant): New enum.
1924 (name_lookup_error): New enum.
1925 (required_token): New enum.
1926 (cp_parser_required_error): New function.
1927 (cp_parser_require): Change the type of variable token_desc to
1928 required_token and use cp_parser_required_error.
1929 (cp_parser_require_keyword): Likewise.
1930 (cp_parser_error): Use gmsgid as parameter.
1931 (cp_parser_name_lookup_error): Change the type of variable desired to
1932 name_lookup_error and put the diagnostic in the full sentences. Change
1934 (cp_parser_non_integral_constant_expression): Change the type of the
1935 variable thing to non_integral_constant and put the diagnostics in
1936 full sentences. Change caller.
1938 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
1941 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
1943 2010-05-24 Joseph Myers <joseph@codesourcery.com>
1945 * error.c (cp_diagnostic_starter): Update call to
1946 diagnostic_build_prefix.
1947 (cp_print_error_function,
1948 print_instantiation_partial_context_line): Check show_column flag
1951 2010-05-24 Jason Merrill <jason@redhat.com>
1954 * decl.c (check_initializer): Don't wrap an init-list in a
1956 * init.c (build_aggr_init): Don't assume copy-initialization if
1957 init has CONSTRUCTOR_IS_DIRECT_INIT.
1958 * call.c (build_new_method_call): Sanity check.
1960 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
1962 * rtti.c (tinfo_base_init): Use build_constructor instead of
1963 build_constructor_from_list. Don't cons a tree node for
1965 (generic_initializer): Use build_constructor_single instead of
1966 build_constructor_from_list.
1967 (ptr_initializer): Use build_constructor instead of
1968 build_constructor_from_list
1969 (ptm_initializer): Likewise.
1970 (class_initializer): Likewise. Take varargs instead of TRAIL.
1971 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
1972 build_constructor instead of build_constructor_from_list.
1974 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
1976 * semantics.c: Include bitmap.h.
1977 * Make-lang.in: Update dependencies.
1979 2010-05-22 Jan Hubicka <jh@suse.cz>
1981 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
1983 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
1985 2010-05-21 Joseph Myers <joseph@codesourcery.com>
1987 * cxx-pretty-print.c: Correct merge error.
1989 2010-05-21 Joseph Myers <joseph@codesourcery.com>
1991 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
1992 (cp_print_error_function): Use diagnostic_abstract_origin macro.
1993 (cp_printer): Handle %K here using percent_K_format.
1994 * cxx-pretty-print.c: Include tree-pretty-print.h.
1995 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
1998 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
2000 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
2001 Clean up redundant includes.
2003 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
2006 * decl.c (xref_basetypes): Return false in case of ill-formed
2009 2010-05-19 Jason Merrill <jason@redhat.com>
2011 * call.c (reference_binding): Use cp_build_qualified_type_real
2012 and cp_type_quals consistently.
2013 (add_function_candidate): Likewise.
2014 (build_conditional_expr): Likewise.
2015 (convert_like_real): Likewise.
2016 (type_passed_as): Likewise.
2017 * class.c (add_method): Likewise.
2018 (same_signature_p): Likewise.
2019 (layout_class_type): Likewise.
2020 * decl.c (cxx_init_decl_processing): Likewise.
2021 (cp_fname_init): Likewise.
2022 (grokdeclarator): Likewise.
2023 * decl2.c (cp_reconstruct_complex_type): Likewise.
2024 * init.c (build_new_1): Likewise.
2025 * method.c (do_build_copy_constructor): Likewise.
2026 (implicitly_declare_fn): Likewise.
2027 * pt.c (tsubst_aggr_type): Likewise.
2029 * rtti.c (init_rtti_processing): Likewise.
2030 (build_headof): Likewise.
2031 (build_dynamic_cast_1): Likewise.
2032 (tinfo_base_init): Likewise.
2033 (emit_support_tinfos): Likewise.
2034 * semantics.c (capture_decltype): Likewise.
2035 * tree.c (cv_unqualified): Likewise.
2036 * typeck.c (composite_pointer_type): Likewise.
2037 (string_conv_p): Likewise.
2039 * mangle.c (write_CV_qualifiers_for_type): Tweak.
2041 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
2042 * decl.c (start_decl): Likewise.
2043 * semantics.c (finish_compound_literal): Likewise.
2044 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
2045 (cp_type_readonly): Remove.
2046 * cp-tree.h: Remove declaration.
2048 * typeck.c (merge_types): Preserve memfn quals.
2050 * decl.c (grokdeclarator): Don't check quals on fn type.
2051 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
2052 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
2055 * typeck.c (type_memfn_quals): New fn.
2056 (apply_memfn_quals): New fn.
2057 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
2058 (cp_type_readonly): Use cp_type_quals.
2059 * cp-tree.h: Add declarations.
2060 * tree.c (cp_build_qualified_type_real): Don't set, but do
2061 preserve, quals on FUNCTION_TYPE.
2062 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
2063 * decl.c (build_ptrmem_type): Likewise.
2064 (grokdeclarator): Likewise.
2065 (static_fn_type): Likewise.
2066 * decl2.c (change_return_type): Likewise.
2067 (cp_reconstruct_complex_type): Likewise.
2068 * pt.c (tsubst_function_type): Likewise.
2070 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
2072 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
2074 * tree.c (build_min_non_dep_call_vec): Update comment.
2076 2010-05-17 Jason Merrill <jason@redhat.com>
2078 * call.c (struct z_candidate): Add explicit_targs field.
2079 (add_template_candidate_real): Set it.
2080 (build_over_call): Use it to control init-list warning.
2083 * call.c (build_over_call): Limit init-list deduction warning to
2084 cases where the argument is actually an init-list.
2087 * call.c (build_over_call): Don't do bitwise copy for move ctor.
2089 2010-05-17 Dodji Seketeli <dodji@redhat.com>
2090 Jason Merrill <jason@redhat.com>
2093 * decl.c (compute_array_index_type): Call mark_rvalue_use.
2095 2010-05-15 Jason Merrill <jason@redhat.com>
2097 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
2098 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
2100 (finish_eh_spec_block): Adjust.
2102 2010-05-15 Jakub Jelinek <jakub@redhat.com>
2105 * pt.c (tsubst): Unshare template argument.
2107 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
2109 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
2110 * Make-lang.in: Fix dependencies accordingly.
2112 2010-05-14 Jason Merrill <jason@redhat.com>
2115 * except.c (build_throw): Simplify, adjust for DR 475.
2118 * except.c (dtor_nothrow): Return nonzero for type with
2122 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
2123 gimple_build_eh_must_not_throw.
2125 2010-05-14 Martin Jambor <mjambor@suse.cz>
2127 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
2130 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
2132 * call.c (build_new_method_call): Change warning text.
2133 * typeck2.c (build_functional_cast): Change error text.
2135 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
2138 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
2139 shadowing the outer parameter or variables by the declaration of
2140 nested function in nested structure or class. Warn the shadowing by
2141 the declaration of nested lambda expression.
2143 2010-05-13 Jason Merrill <jason@redhat.com>
2145 * typeck.c (cp_build_array_ref): Factor out from...
2146 (build_array_ref): ...here. Drop complain parm.
2147 (build_new_op): Adjust.
2148 * class.c (build_vtbl_ref_1): Adjust.
2149 * decl2.c (grok_array_decl): Adjust.
2150 * cp-tree.h: Adjust prototypes.
2152 2010-05-13 Jan Hubicka <jh@suse.cz>
2154 * decl.c (cp_finish_decl): Do not worry about used attribute.
2156 2010-05-12 Jason Merrill <jason@redhat.com>
2158 * typeck.c (build_array_ref): Take complain parm.
2159 * cp-tree.h: Add it to prototype.
2160 * call.c (build_new_op): Pass it.
2161 * class.c (build_vtbl_ref): Pass it.
2162 * decl2.c (grok_array_decl): Pass it.
2166 * cp-tree.def (NULLPTR_TYPE): Remove.
2167 * cp-tree.h (NULLPTR_TYPE_P): New.
2168 (SCALAR_TYPE_P): Use it.
2169 (nullptr_type_node): New.
2170 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
2171 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
2173 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
2174 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2175 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
2176 * mangle.c (write_type): Likewise.
2177 * name-lookup.c (arg_assoc_type): Likewise.
2178 * typeck.c (build_reinterpret_cast_1): Likewise.
2179 * rtti.c (typeinfo_in_lib_p): Likewise.
2180 (emit_support_tinfos): Remove local nullptr_type_node.
2182 * cp-tree.h (UNKNOWN_TYPE): Remove.
2183 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
2184 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
2185 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
2186 * class.c (instantiate_type): Check unknown_type_node rather than
2188 * name-lookup.c (maybe_push_decl): Likewise.
2189 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2190 (get_typeid): Likewise.
2191 * semantics.c (finish_offsetof): Likewise.
2194 * call.c (add_template_candidate_real): If deduction fails, still
2195 add the template as a non-viable candidate.
2196 (equal_functions): Handle template candidates.
2197 (print_z_candidate): Likewise.
2198 (print_z_candidates): Likewise.
2199 (build_new_function_call): Likewise.
2201 * cp-tree.h (LOOKUP_LIST_ONLY): New.
2202 * call.c (add_candidates): Enforce it.
2203 (build_new_method_call): Try non-list ctor if no viable list ctor.
2204 (build_user_type_conversion_1): Likewise.
2206 * call.c (add_candidates): Distinguish between type(x) and
2208 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
2209 (build_new_method_call): Give better error for conversion op.
2211 * call.c (add_candidates): Add first_arg and return_type parms.
2212 Add special constructor/conversion op handling.
2213 (convert_class_to_reference): Use it.
2214 (build_user_type_conversion_1): Likewise.
2215 (build_op_call): Likewise.
2216 (build_new_method_call): Likewise.
2217 (build_new_op): Adjust.
2218 (perform_overload_resolution): Adjust.
2220 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
2225 * pt.c (process_partial_specialization): Return error_mark_node
2226 in case of unused template parameters in partial specialization.
2228 2010-05-11 Jakub Jelinek <jakub@redhat.com>
2231 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
2232 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
2233 look at its second operand.
2235 2010-05-10 Jason Merrill <jason@redhat.com>
2238 * semantics.c (baselink_for_fns): Revert earlier change.
2241 * typeck.c (cp_build_modify_expr): Complain about assignment to
2242 array from init list.
2244 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
2247 * decl.c (check_initializer): strip array type before checking for
2248 uninitialized const or ref members.
2250 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
2253 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
2254 error count. Emit errors only if compain is true.
2255 (build_new_1): Do not return error_mark_node if
2256 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
2257 errors. Delay the check for user-provided constructor.
2258 (perform_member_init): Adjust.
2259 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
2262 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
2263 Jason Merrill <jason@redhat.com>
2265 Add support for C++0x nullptr.
2266 * cp-tree.def: Add NULLPTR_TYPE.
2267 * cp-tree.h: Add nullptr_node.
2268 (cp_tree_index): Add CPTI_NULLPTR.
2269 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
2270 * call.c (null_ptr_cst_p): Handle nullptr.
2271 (standard_conversion): Likewise.
2272 (convert_arg_to_ellipsis): Likewise.
2273 * mangle.c (write_type): Likewise.
2274 * name-lookup.c (arg_assoc_type): Likewise.
2275 * parser.c (cp_parser_primary_expression): Likewise.
2276 * typeck.c (cp_build_binary_op): Likewise.
2277 (build_reinterpret_cast_1): Likewise.
2278 * error.c (dump_type): Likewise.
2279 (dump_type_prefix, dump_type_suffix): Likewise.
2280 * decl.c (cxx_init_decl_processing): Likewise.
2281 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2282 * cvt.c (ocp_convert): Likewise.
2283 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
2284 nullptr_t tinfo in libsupc++.
2286 2010-05-06 Jason Merrill <jason@redhat.com>
2288 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
2290 2010-04-22 Jakub Jelinek <jakub@redhat.com>
2291 Dodji Seketeli <dodji@redhat.com>
2294 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
2296 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
2297 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
2298 (decay_conversion, perform_integral_promotions): Call rvalue_use.
2299 (cp_build_unary_op): Call lvalue_use.
2300 * decl.c (unused_but_set_errorcount): New variable.
2301 (poplevel): Issue -Wunused-but-set-variable diagnostics.
2302 (duplicate_decls): Merge DECL_READ_P flags.
2303 (start_cleanup_fn): Set DECL_READ_P flag.
2304 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
2305 * tree.c (rvalue): Call rvalue_use.
2306 * pt.c (convert_nontype_argument): Likewise.
2307 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
2308 finish_decltype_type): Likewise.
2309 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
2310 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
2311 or rvalue_use depending on the expr.
2312 * init.c (build_new, build_delete): Likewise.
2313 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
2315 2010-05-05 Jason Merrill <jason@redhat.com>
2318 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
2319 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
2321 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2324 * pt.c (unify): Check each elt for error_mark_node.
2326 2010-05-04 Jason Merrill <jason@redhat.com>
2329 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
2331 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2334 * call.c (build_new_method_call): Return error_mark_node if fns is
2337 2010-05-03 Dodji Seketeli <dodji@redhat.com>
2340 * pt.c (most_specialized_class): Pretend we are processing
2341 a template decl during the call to coerce_template_parms.
2343 2010-05-03 Jason Merrill <jason@redhat.com>
2347 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
2348 from the selected underlying type unless -fstrict-enums. Set
2349 ENUM_UNDERLYING_TYPE to have the restricted range.
2350 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
2351 * class.c (check_bitfield_decl): Likewise.
2353 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
2356 * init.c (build_new_1): Revert the accidental checkin in
2359 2010-04-30 Jason Merrill <jason@redhat.com>
2362 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
2363 (pp_cxx_type_specifier_seq): ...here.
2365 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
2367 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
2368 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
2370 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
2373 * typeck.c (warn_args_num): New function.
2374 (convert_arguments): Use warn_args_num to print the diagnostic
2377 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
2380 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
2381 user-provided constructor while recursing.
2383 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
2386 * error.c (print_instantiation_partial_context_line): Handle
2387 recursive instantiation.
2388 (print_instantiation_partial_context): Likewise.
2390 2010-04-27 Jason Merrill <jason@redhat.com>
2392 * init.c (perform_member_init): Check CLASS_TYPE_P.
2394 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2397 * init.c (perform_member_init): check for uninitialized const or
2398 reference members, including array types.
2400 2010-04-24 Jason Merrill <jason@redhat.com>
2402 * tree.c (get_fns): Split out from get_first_fn.
2403 * cp-tree.h: Declare it.
2404 * search.c (shared_member_p): Use it.
2405 * semantics.c (finish_qualified_id_expr): Simplify.
2406 (finish_id_expression): Simplify.
2408 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
2409 whenever object is NULL_TREE. Don't do 'this' capture here.
2410 (finish_qualified_id_expr): Pass NULL_TREE.
2411 (finish_id_expression): Likewise.
2412 (lambda_expr_this_capture): Likewise.
2414 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
2415 rather than checking current_class_ref directly.
2416 (finish_call_expr): Likewise.
2419 * name-lookup.c (qualify_lookup): Disqualify lambda op().
2420 * class.c (current_nonlambda_class_type): New fn.
2421 * semantics.c (nonlambda_method_basetype): New.
2422 * cp-tree.h: Declare them.
2423 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
2425 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
2428 * semantics.c (lambda_return_type): Complain about
2432 * tree.c (cv_unqualified): Handle error_mark_node.
2435 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
2436 if we don't want errors.
2439 * class.c (convert_to_base): Add complain parameter. Pass
2440 ba_quiet to lookup_base if we don't want errors.
2441 (build_vfield_ref): Pass complain to convert_to_base.
2442 * call.c (convert_like_real): Likewise.
2443 (initialize_reference): Likewise.
2444 (perform_direct_initialization_if_possible): Pass complain to
2446 * cp-tree.h: Adjust.
2448 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2449 Jason Merrill <jason@redhat.com>
2452 * decl.c (check_for_uninitialized_const_var): Handle classes that need
2454 (check_initializer): Call it for classes that need constructing, too.
2455 * class.c (in_class_defaulted_default_constructor): New.
2456 * cp-tree.h: Declare it.
2458 2010-04-20 Jason Merrill <jason@redhat.com>
2461 * init.c (constant_value_1): Treat error_mark_node as a constant
2462 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
2463 * cvt.c (ocp_convert): Handle getting error_mark_node from
2464 integral_constant_value.
2465 * decl.c (compute_array_index_type): Likewise.
2467 2010-04-20 Dodji Seketeli <dodji@redhat.com>
2471 * typeck.c (incompatible_dependent_types_p): If one of the
2472 compared types if not a typedef then honour their main variant
2475 2010-04-20 Jakub Jelinek <jakub@redhat.com>
2477 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
2479 2010-04-19 Dodji Seketeli <dodji@redhat.com>
2482 * typeck.c (structural_comptypes): Test dependent typedefs
2483 incompatibility before testing for their main variant based
2486 2010-04-19 Jakub Jelinek <jakub@redhat.com>
2488 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
2489 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
2491 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2493 * decl.c (cxx_init_decl_processing): Remove second argument in call to
2494 build_common_tree_nodes.
2496 2010-04-14 Jason Merrill <jason@redhat.com>
2499 * parser.c (cp_parser_parenthesized_expression_list): Change
2500 is_attribute_list parm to int to indicate whether or not to
2501 handle initial identifier specially.
2502 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
2504 2010-04-13 Jason Merrill <jason@redhat.com>
2506 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
2508 * parser.c (cp_parser_lambda_expression): Complain about lambda in
2509 unevaluated context.
2510 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
2512 2010-04-12 Jason Merrill <jason@redhat.com>
2515 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
2516 return value directly.
2518 * call.c (type_decays_to): Call cv_unqualified for non-class type.
2520 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
2523 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
2524 * init.c (build_new_1): Check for uninitialized const members and
2525 uninitialized reference members, when using new without
2526 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
2527 (diagnose_uninitialized_cst_or_ref_member): Define, call
2528 diagnose_uninitialized_cst_or_ref_member_1.
2529 (diagnose_uninitialized_cst_or_ref_member_1): New function.
2531 2010-04-12 Richard Guenther <rguenther@suse.de>
2534 * semantics.c (expand_or_defer_fn_1): Do not keep extern
2535 template inline functions.
2537 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
2540 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
2543 2010-04-07 Jason Merrill <jason@redhat.com>
2546 * decl.c (start_preparsed_function): Do defer nested functions.
2548 PR c++/11094, DR 408
2549 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
2550 * decl2.c (finish_static_data_member_decl): Set it.
2551 * decl.c (duplicate_decls): Propagate it.
2552 * pt.c (tsubst_decl): Don't substitute the domain of an array
2553 VAR_DECL if it's set.
2554 (regenerate_decl_from_template): Substitute it here.
2555 (type_dependent_expression_p): Return true if it's set.
2556 * semantics.c (finish_decltype_type): Instantiate such a variable.
2557 * typeck.c (cxx_sizeof_expr): Likewise.
2558 (strip_array_domain): New.
2561 * name-lookup.c (current_decl_namespace): Non-static.
2562 (pop_nested_namespace): Sanity check.
2563 * cp-tree.h: Declare current_decl_namespace.
2564 * decl.c (grokvardecl): Use it instead of current_namespace.
2565 (grokfndecl): Likewise.
2568 * pt.c (tsubst_friend_function): Instatiate a friend that has already
2571 * pt.c (print_template_statistics): New.
2572 * cp-tree.h: Declare it.
2573 * tree.c (cxx_print_statistics): Call it.
2576 * decl.c (grokvardecl): Tweak warning message.
2577 (grokfndecl): Likewise.
2579 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2582 *pt.c (tsubst_decl): Get the arguments of a specialization from
2583 the specialization template, not from the most general template.
2585 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2588 * typeck2.c (process_init_constructor_record):
2589 value-initialize members that are are not explicitely
2592 2010-04-07 Jie Zhang <jie@codesourcery.com>
2595 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
2596 when all of its elements are non-constant and have been split out.
2598 2010-04-06 Taras Glek <taras@mozilla.com>
2599 Jason Merrill <jason@redhat.com>
2601 * parser.c (cp_parser_class_specifier): Set class location to that
2602 of IDENTIFIER_NODE instead of '{' when possible.
2603 * semantics.c (begin_class_definition): Do not overide locations
2604 with less precise ones.
2606 2010-04-06 Jason Merrill <jason@redhat.com>
2609 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
2612 * pt.c (maybe_update_decl_type): Check the return value from
2615 2010-04-01 Jason Merrill <jason@redhat.com>
2617 * decl.c (next_initializable_field): No longer static.
2618 * cp-tree.h: Declare it.
2619 * call.c (build_aggr_conv): Fail if there are more initializers
2620 than initializable fields.
2622 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
2623 instead of void_zero_node.
2625 2010-03-31 Dodji Seketeli <dodji@redhat.com>
2628 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
2629 * pt.c (end_template_parm_list): Store sibling template parms of
2630 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2631 (push_template_decl_real): Don't store the containing template decl
2632 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
2633 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
2634 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2637 2010-03-30 Jason Merrill <jason@redhat.com>
2640 * pt.c (push_template_decl_real): Deal better with running out of
2641 scopes before running out of template parms.
2645 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
2646 function parameter context. Don't print an error if parsing
2650 * pt.c (more_specialized_fn): Don't control cv-qualifier check
2653 2010-03-26 Jason Merrill <jason@redhat.com>
2656 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
2657 c++0x mode, but not other type-names.
2659 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2662 * pt.c (add_to_template_args): Support NULL ARGS;
2663 (most_specialized_class): call coerce_template_parms on
2664 template arguments passed to get_class_bindings. Use
2665 add_to_template_args.
2666 (unify): Handle VAR_DECLs.
2668 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2670 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
2672 * pt.c (get_template_parms_at_level): Adjust.
2674 2010-03-25 Dodji Seketeli <dodji@redhat.com>
2677 * cp-tree.h (get_template_parms_at_level): Declare ...
2678 * pt.c (get_template_parms_at_level): ... new function.
2679 * typeck.c (get_template_parms_of_dependent_type): If a template
2680 type parm's DECL_CONTEXT isn't yet set, get its siblings from
2681 current_template_parms. Use get_template_parms_at_level. Remove
2683 (incompatible_dependent_types_p): If we get empty parms from just one
2684 of the template type parms we are comparing then the template parms are
2687 2010-03-24 Jason Merrill <jason@redhat.com>
2690 * parser.c (make_declarator): Initialize id_loc.
2691 (cp_parser_lambda_declarator_opt): And set it.
2693 2010-03-23 Jason Merrill <jason@redhat.com>
2695 Make lambda conversion op and op() non-static.
2696 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
2697 Also add the thunk function returned by the conversion op.
2698 Mark the conversion deleted if the op() is variadic.
2699 * decl2.c (mark_used): Give helpful message about deleted conversion.
2700 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
2701 * semantics.c (finish_this_expr): Adjust.
2702 * mangle.c (write_closure_type_name): Adjust.
2703 * decl.c (grok_op_properties): Don't allow it.
2704 * call.c (build_user_type_conversion_1): No static conversion ops.
2705 (build_op_call): Or op().
2707 * decl2.c (change_return_type): Fix 'this' quals.
2709 2010-03-22 Jason Merrill <jason@redhat.com>
2712 * tree.c (pod_type_p): Use old meaning in C++98 mode.
2715 * pt.c (contains_auto_r): New fn.
2716 (do_auto_deduction): Use it.
2717 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
2719 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
2722 * decl2.c (grokfield): Handle invalid initializers for member
2725 2010-03-20 Dodji Seketeli <dodji@redhat.com>
2728 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
2730 * decl2.c (vague_linkage_p): Likewise.
2732 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
2735 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
2736 false, in the cp_parser_expression_statement call.
2738 2010-03-05 Jason Merrill <jason@redhat.com>
2740 * mangle.c (mangle_decl): Give name collision error even without
2743 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
2745 * pt.c (process_partial_specialization): Use error_n instead of
2748 2010-03-03 Jason Merrill <jason@redhat.com>
2751 * mangle.c (mangle_decl): Handle VAR_DECL, too.
2753 2010-03-03 Jason Merrill <jason@redhat.com>
2756 * mangle.c: Include cgraph.h.
2757 (mangle_decl): If the mangled name will change in a later
2758 ABI version, make the later mangled name an alias.
2759 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
2760 * Make-lang.in (mangle.o): Depend on cgraph.h.
2761 * method.c (make_alias_for): Handle VAR_DECL, too.
2762 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
2763 * tree.c (no_linkage_check): Adjust.
2764 * decl.c (maybe_commonize_var): Adjust.
2765 * cp-tree.h: Adjust.
2767 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
2769 * pt.c (redeclare_class_template): Use error_n and inform_n.
2771 2010-02-27 Mark Mitchell <mark@codesourcery.com>
2774 * cp-tree.h (push_tinst_level): Declare.
2775 (pop_tinst_level): Likewise.
2776 * pt.c (push_tinst_level): Give it external linkage.
2777 (pop_tinst_level): Likewise.
2778 * mangle.c (mangle_decl_string): Set the source location to that
2779 of the decl while mangling.
2781 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
2784 * pt.c (redeclare_class_template): Return false if there are erroneous
2785 template parameters.
2787 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
2789 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
2792 2010-02-24 Jason Merrill <jason@redhat.com>
2795 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
2797 * class.c (layout_class_type): Don't give -Wabi warning for a bug
2798 in a previous ABI version.
2800 2010-02-23 Jason Merrill <jason@redhat.com>
2803 * typeck2.c (digest_init_r): Accept value init of array.
2805 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
2808 * typeck.c (convert_arguments): Update error message.
2810 2010-02-22 Mike Stump <mikestump@comcast.net>
2813 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
2815 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
2818 * error.c (print_instantiation_partial_context_line): New.
2819 (print_instantiation_partial_context): Print at most 12 contexts,
2820 skip the rest with a message.
2822 2010-02-21 Dodji Seketeli <dodji@redhat.com>
2825 * pt.c (lookup_template_class): Better support of specialization
2826 of member of class template implicit instantiation.
2828 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
2831 * call.c (conversion_null_warnings): Replace -Wconversion with
2833 * cvt.c (build_expr_type_conversion): Likewise.
2835 2010-02-18 Jason Merrill <jason@redhat.com>
2838 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
2841 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
2843 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
2844 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
2847 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
2851 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
2852 (maybe_update_decl_type): New fn.
2853 * parser.c (cp_parser_init_declarator): Use it.
2856 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
2858 2010-02-17 Jason Merrill <jason@redhat.com>
2861 * call.c (build_over_call): Don't create zero-sized assignments.
2862 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
2863 * cp-objcp-common.c (cp_expr_size): Remove.
2864 * cp-tree.h: Remove prototype.
2867 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
2868 decl we looked up doesn't match.
2871 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
2872 have an INIT_EXPR anymore.
2875 * pt.c (convert_nontype_argument): Change assert to test.
2877 2010-02-16 Jason Merrill <jason@redhat.com>
2879 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
2882 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
2883 VIEW_CONVERT_EXPR for conversions between structural equality types
2884 that the back end can't tell are the same.
2887 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
2888 cv-quals from element here.
2889 (cp_build_qualified_type_real): Not here. Preserve typedef name.
2891 2010-02-14 Jason Merrill <jason@redhat.com>
2894 * semantics.c (finish_compound_literal): Use
2895 cp_apply_type_quals_to_decl when creating a static variable.
2897 2010-02-12 Jason Merrill <jason@redhat.com>
2900 * name-lookup.h (current_binding_level): Check for null
2903 2010-02-12 Jason Merrill <jason@redhat.com>
2906 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
2908 2010-02-12 Jakub Jelinek <jakub@redhat.com>
2911 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
2914 2010-02-10 Jason Merrill <jason@redhat.com>
2917 * semantics.c (outer_lambda_capture_p): Revert.
2918 (add_capture): Only finish_member_declaration if
2919 we're in the lambda class.
2920 (register_capture_members): New.
2921 * cp-tree.h: Declare it.
2922 * parser.c (cp_parser_lambda_expression): Call it.
2924 2010-02-10 Jason Merrill <jason@redhat.com>
2927 * semantics.c (outer_lambda_capture_p): Use current_function_decl
2928 instead of current_class_type.
2930 2010-02-10 Jason Merrill <jason@redhat.com>
2932 PR c++/42983, core issue 906
2933 * method.c (defaultable_fn_check): Check virtualness.
2935 2010-02-10 Jason Merrill <jason@redhat.com>
2938 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
2940 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
2942 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
2943 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
2945 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
2946 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
2947 (cp_parser_parameter_declaration)
2948 (cp_parser_exception_specification_opt)
2949 (cp_parser_exception_declaration): Likewise.
2950 * pt.c (check_default_tmpl_args): Likewise.
2951 * search.c (lookup_field_r): Likewise.
2953 2010-02-09 Jason Merrill <jason@redhat.com>
2956 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
2958 2010-02-09 Jason Merrill <jason@redhat.com>
2961 * decl2.c (change_return_type): New fn.
2962 * semantics.c (apply_lambda_return_type): Use it.
2963 * cp-tree.h: Declare it.
2965 2010-02-05 Richard Guenther <rguenther@suse.de>
2967 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
2968 * cp-lang.c: Include gt-cp-cp-lang.h.
2969 * config-lang.in (gtfiles): Add cp/cp-lang.c.
2971 2010-02-05 Dodji Seketeli <dodji@redhat.com>
2974 * typeck.c (get_template_parms_of_dependent_type): Try getting
2975 the template parameters fromt the type itself first.
2977 2010-02-03 Jason Merrill <jason@redhat.com>
2981 * mangle.c (write_unqualified_id): Split out from write_expression.
2982 (write_unqualified_name): Call it.
2983 (write_member_name): Likewise.
2984 (write_expression): Support TEMPLATE_ID_EXPR.
2985 Disambiguate operator names.
2988 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
2991 2010-02-02 Jason Merrill <jason@redhat.com>
2994 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
2995 * optimize.c (clone_body): Remap their initializers when making base
2997 (maybe_clone_body): Complain if multiple clones aren't safe.
2999 2010-01-29 Dodji Seketeli <dodji@redhat.com>
3006 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3007 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
3008 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
3009 * pt.c (coerce_template_parms, type_unification_real,
3010 expand_template_argument_pack, coerce_template_parameter_pack):
3011 Set the non default template args count.
3012 (current_template_args): Always set non defaulted
3013 template args count when compiled with --enable-checking
3014 (tsubst_template_args, type_unification_real): Propagate the non
3015 defaulted template args count.
3016 * error.c (get_non_default_template_args_count): Renamed
3017 count_non_default_template_args into this. Don't calculate the
3018 non default template argument count anymore. Use the new
3019 accessor macros above to get it.
3020 (dump_template_argument_list, dump_type, dump_decl,
3021 dump_template_parms): Adjust.
3022 * parser.c (cp_parser_template_argument_list): Always set defaulted
3023 template args count when compiled with --enable-checking.
3025 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
3027 * decl.c (redeclaration_error_message): Wrap the return messages into
3028 G_() for easy translation.
3030 2010-01-28 Jason Merrill <jason@redhat.com>
3033 * semantics.c (begin_class_definition): Don't use type_as_string.
3035 2010-01-28 Dodji Seketeli <dodji@redhat.com>
3039 * typeck.c (get_template_parms_of_dependent_type): Factorized
3040 this out of incompatible_template_type_parms_p
3041 (incompatible_dependent_types_p): Renamed
3042 incompatible_template_type_parms_p into this. Make it detect
3043 two incompatible dependent typedefs too.
3044 (structural_comptypes): Use incompatible_dependent_types_p.
3045 * pt.c (get_template_info):
3046 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
3048 2010-01-20 Janis Johnson <janis187@us.ibm.com>
3049 Jason Merrill <jason@redhat.com>
3051 * mangle.c (write_type): Mangle transparent record as member type.
3052 * semantics.c (begin_class_definition): Recognize decimal classes
3053 and set TYPE_TRANSPARENT_AGGR.
3055 2010-01-20 Jason Merrill <jason@redhat.com>
3058 * mangle.c (write_expression): Handle tree codes that have extra
3059 arguments in the middle-end.
3061 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
3064 * except.c (expand_start_catch_block): Deal correctly with
3065 do_begin_catch returning error_mark_node.
3067 2010-01-20 Jason Merrill <jason@redhat.com>
3070 * class.c (layout_class_type): Set packed_maybe_necessary for packed
3074 * semantics.c (build_lambda_object): Call mark_used on captured
3078 * decl.c (grokdeclarator): Clear type_quals for a member function
3079 declared using a typedef. Don't complain about adding cv-quals
3080 to a function typedef in C++0x mode.
3082 2010-01-20 Jakub Jelinek <jakub@redhat.com>
3084 * decl.c (create_array_type_for_decl): Remove set but not used
3085 variable error_msg. Remove break stmts after return stmts.
3087 2010-01-19 Dodji Seketeli <dodji@redhat.com>
3089 * error.c (dump_template_parms, count_non_default_template_args):
3090 Revert fix of PR c++/42634.
3092 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3095 * error.c (dump_template_parms): Use innermost template
3096 arguments before calling count_non_default_template_args.
3097 (count_non_default_template_args): We are being called with
3098 template innermost arguments now. There is no need to ensure
3101 2010-01-18 Dodji Seketeli <dodji@redhat.com>
3104 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
3106 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3109 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
3111 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3114 *pt.c (tsubst_decl): Get the arguments of a specialization from
3115 the specialization template, not from the most general template.
3117 2010-01-16 Jason Merrill <jason@redhat.com>
3120 * semantics.c (finish_decltype_type): Within a template, treat
3121 unresolved CALL_EXPR as dependent.
3123 2010-01-15 Dodji Seketeli <dodji@redhat.com>
3125 * error.c (dump_template_parms,count_non_default_template_args):
3126 Revert changes of PR c++/42634.
3128 2010-01-14 Jakub Jelinek <jakub@redhat.com>
3131 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
3132 functions with noreturn attribute.
3134 2010-01-14 Jason Merrill <jason@redhat.com>
3137 * call.c (build_new_method_call): Don't free the vec here.
3140 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
3142 2010-01-13 Dodji Seketeli <dodji@redhat.com>
3145 * error.c (dump_template_parms): Use innermost template
3146 arguments before calling count_non_default_template_args.
3147 (count_non_default_template_args): We are being called with
3148 template innermost arguments now. There is no need to ensure
3151 2010-01-07 Dodji Seketeli <dodji@redhat.com>
3154 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
3155 arguments that were previously deduced.
3157 2010-01-05 Jason Merrill <jason@redhat.com>
3159 * pt.c (unify_pack_expansion): Handle deduction from init-list.
3160 * call.c (build_over_call): Don't complain about it.
3162 2010-01-04 Jason Merrill <jason@redhat.com>
3165 * pt.c (tsubst_decl): Don't apply type attributes in place.
3168 * semantics.c (describable_type): Remove decltype comment and
3173 Copyright (C) 2010 Free Software Foundation, Inc.
3175 Copying and distribution of this file, with or without modification,
3176 are permitted in any medium without royalty provided the copyright
3177 notice and this notice are preserved.