1 2010-10-22 Jason Merrill <jason@redhat.com>
4 * init.c (build_vec_init): Handle memberwise move.
6 2010-10-21 Paolo Carlini <paolo.carlini@oracle.com>
9 * call.c (add_function_candidate): Don't use TREE_VALUE on null
12 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
14 * parser.c (cp_parser_objc_method_type): Mark inline. Return a
15 bool instead of calling objc_set_method_type.
16 (cp_parser_objc_method_signature): Updated calls to
17 cp_parser_objc_method_type and to objc_build_method_signature.
18 (cp_parser_objc_method_prototype_list): Updated calls to
19 objc_add_method_declaration. Use token->type to determine if it
20 is a class method or not.
21 (cp_parser_objc_method_definition_list): Same change.
23 2010-10-20 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
26 * parser.c (cp_convert_range_for): Call cp_finish_decl
27 instead of finish_expr_stmt.
29 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
31 * cp-lang.c (finish_file): Removed.
32 * decl2.c (cp_write_global_declarations): Call
33 objc_write_global_declarations when compiling Objective-C++.
35 2010-10-19 Paolo Carlini <paolo.carlini@oracle.com>
38 * pt.c (add_to_template_args): Check extra_args for error_mark_node.
39 (coerce_template_parms): Likewise for args.
41 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
43 Implemented parsing @synthesize and @dynamic for Objective-C++.
44 * parser.c (cp_parser_objc_method_definition_list): Recognize
45 RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
46 (cp_parser_objc_at_dynamic_declaration): New.
47 (cp_parser_objc_at_synthesize_declaration): New.
49 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
51 * parser.c (cp_parser_objc_identifier_list): Check the return
52 value of cp_parser_identifier and react if it is error_mark_node.
54 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
56 Merge from apple/trunk branch on FSF servers.
58 2005-03-01 Fariborz Jahanian <fjahanian@apple.com>
61 * call.c (standard_conversion, implicit_conversion): Ignore
62 'volatile' attribute of artificially volatized type in objc when
63 evaluating various conversion weights.
65 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
68 * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the
69 artiificially 'volatized' type before doing pointer comparison.
71 2010-10-18 Jakub Jelinek <jakub@redhat.com>
74 * semantics.c (finish_goto_stmt): Call mark_rvalue_use on computed
77 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
79 Merge from apple/trunk branch on FSF servers.
81 2006-04-19 Fariborz Jahanian <fjahanian@apple.com>
84 * parser.c (cp_parser_simple_type_specifier): Don't lookup for
85 objc object types if type is scope qualified.
87 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
89 Merge from apple/trunk branch on FSF servers.
91 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
94 * lex.c (unqualified_name_lookup_error): Issue diagnostic
95 for private 'ivar' access.
97 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
99 * parser.c (cp_parser_objc_visibility_spec): Update to use visibility
100 enum, and handle @package.
102 2010-10-15 Jason Merrill <jason@redhat.com>
105 * tree.c (cp_build_qualified_type_real): Don't reuse a variant
106 with a different typedef variant of the element type.
108 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
110 merge from FSF apple 'trunk' branch.
111 2006 Fariborz Jahanian <fjahanian@apple.com>
113 Radars 4436866, 4505126, 4506903, 4517826
114 * typeck.c (finish_class_member_access_expr): Handle CLASS.property
116 (cp_build_modify_expr): Likewise.
117 * parser.c (cp_parser_objc_method_prototype_list): Handle @property.
118 (cp_parser_objc_method_definition_list): Likewise.
119 (cp_parser_objc_property_decl): New.
120 (cp_parser_objc_property_attrlist): New.
121 (cp_parser_objc_at_property): New.
123 2010-10-14 Richard Guenther <rguenther@suse.de>
126 * cp-tree.h (NULLPTR_TYPE_P): Adjust.
127 * decl.c (cxx_init_decl_processing): Build a NULLPTR_TYPE node,
129 * error.c (dump_type): Handle NULLPTR_TYPE.
130 (dump_type_prefix): Likewise.
131 (dump_type_suffix): Likewise.
132 * mangle.c (write_type): Likewise.
133 * name-lookup.c (arg_assoc_type): Likewise.
134 * rtti.c (typeinfo_in_lib_p): Likewise.
135 * pt.c (tsubst): Likewise.
137 2010-10-13 Jason Merrill <jason@redhat.com>
140 * class.c (fixup_attribute_variants): New fn.
141 * cp-tree.h: Declare it.
142 * pt.c (instantiate_class_template): Call it.
143 * semantics.c (begin_class_definition): Call it.
145 2010-10-13 Richard Henderson <rth@redhat.com>
147 * cp-lang.c (cp_eh_personality): Update call to
148 build_personality_function.
149 * except.c (choose_personality_routine): Update function comment.
151 2010-10-13 Richard Guenther <rguenther@suse.de>
153 * tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and
154 clear DECL_CHAIN of NAMESPACE_DECLs.
156 2010-10-11 Martin Jambor <mjambor@suse.cz>
159 * cp-tree.h (current_class_ref): Check that cp_function_chain is
161 * call.c (build_cxx_call): Likewise.
163 2010-10-10 Jason Merrill <jason@redhat.com>
165 * pt.c (tsubst_default_argument): Handle DEFAULT_ARG.
166 (tsubst_default_arguments): Only do this once for cloned fns.
167 (tsubst): Use typedef_variant_p. Handle LANG_TYPE. Don't
169 (tsubst_expr): Avoid calling tsubst_expr for non-expressions.
170 (tsubst_copy_and_build): Likewise.
171 (tsubst_initializer_list): Likewise.
172 (tsubst_copy): Change default to gcc_unreachable. Handle
173 OVERLOAD and PTRMEM_CST.
175 2010-10-10 Jason Merrill <jason@redhat.com>
179 * pt.c (tsubst_copy) [INTEGER_CST]: Instantiate the type.
181 2010-10-07 Andi Kleen <ak@linux.intel.com>
183 * Make-lang.in (c++_OBJS): Remove dummy-checksum.o.
184 (cc1plus-dummy): Remove.
185 (cc1plus-checksum): Change to run checksum over object files
188 2010-10-08 Joseph Myers <joseph@codesourcery.com>
190 * cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
192 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
194 * cp-tree.def: Changed type of AT_ENCODE_EXPR from tcc_unary to
196 * cxx-pretty-print.c (pp_cxx_unary_expression): Added case for
198 * error.c (dump_expr): Added case for AT_ENCODE_EXPR.
199 * pt.c (tsubst_copy): Added case for AT_ENCODE_EXPR.
200 (value_dependent_expression_p): Added case for AT_ENCODE_EXPR.
201 (type_dependent_expression_p): Added case for AT_ENCODE_EXPR.
202 * parser.c (cp_parser_objc_encode_expression): Updated comment.
204 2010-10-07 Nicola Pero <nicola@nicola.brainstorm.co.uk>
206 Merge from apple/trunk branch on FSF servers.
208 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
211 * parser.c (cp_parser_objc_interstitial_code): Recognize
212 and parse RID_NAMESPACE keyword.
214 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
216 * parser.c (cp_parser_objc_method_tail_params_opt): Peek new token after
217 finding ellipsis, before checking for attributes.
219 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
221 Merge from apple/trunk branch on FSF servers.
222 * cp-tree.def: Added AT_ENCODE_EXPR here instead of to the no
223 longer existing gcc/c-common.def.
225 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
228 * pt.c (tsubst_copy_and_build): Instantiate @endcode(T).
229 * parser.c (cp_parser_objc_encode_expression): Build a templatized
230 parse tree for @encode(T).
232 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
235 * c-common.def: Add new expression code AT_ENCODE_EXPR.
237 2010-10-06 Eric Botcazou <ebotcazou@adacore.com>
240 * typeck.c (cp_build_addr_expr_1): Add check for incomplete types in
241 code folding offsetof-like computations.
243 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
246 * parser.c (cp_parser_objc_class_interface): If no identifier
247 follows an @interface token, stop parsing the interface after
249 (cp_parser_objc_class_implementation): If no identifier follows an
250 @implementation token, stop parsing the implementation after
253 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
256 * parser.c (cp_parser_objc_method_keyword_params): If the required
257 colon is not found while parsing parameters, stop parsing them.
259 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
262 * parser.c (cp_parser_objc_class_ivars): Do not eat the EOF or
263 @end after detecting it. Print an error if @end is found without
265 (cp_parser_objc_method_prototype_list): Do not eat the EOF after
266 detecting it. Fixed reading the next token when continuing
267 because of an error in a method signature. Print an error if EOF
268 is found without an '@end'.
269 (cp_parser_objc_method_definition_list): Same change.
271 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
273 Merge from apple/trunk branch on FSF servers:
275 2005-10-17 Fariborz Jahanian <fjahanian@apple.com>
278 * parser.c (cp_parser_objc_method_keyword_params): Check for valid
279 method parameters and issue error.
280 (cp_parser_objc_method_definition_list): Check for invalid tokens
281 which cannot start a function definition.
283 2005-10-14 Fariborz Jahanian <fjahanian@apple.com>
286 * parser.c (cp_parser_objc_message_args): Check for missing message
287 arguments and syntax error.
289 2005-10-13 Fariborz Jahanian <fjahanian@apple.com>
292 * parser.c (cp_parser_objc_class_ivars): Check for @end/eof while
295 2005-08-15 Ziemowit Laski <zlaski@apple.com>
298 * parser.c (cp_parser_objc_interstitial_code): Catch stray
299 '{' and '}' tokens and issue appropriate errors.
301 2005-08-02 Ziemowit Laski <zlaski@apple.com>
304 (cp_parser_statement_seq_opt): In addition to '}' and
305 end-of-file, a statement sequence may also be terminated
308 2010-10-05 Joseph Myers <joseph@codesourcery.com>
310 * cp-tree.h (cxx_print_error_function,
311 cxx_initialize_diagnostics): Declare using diagnostic_context
314 2010-10-04 Andi Kleen <ak@linux.intel.com>
316 * Make-lang.in (g++, cc1plus): Add + to build rule.
318 2010-10-04 Jason Merrill <jason@redhat.com>
320 * tree.c (decl_storage_duration): New.
321 * cp-tree.h: Declare it.
322 (duration_kind): Return values.
324 2010-10-03 Jason Merrill <jason@redhat.com>
326 * typeck.c (require_complete_type_sfinae): Add complain parm to...
327 (require_complete_type): ...this function.
328 (cp_build_array_ref, convert_arguments): Use it.
329 (convert_for_initialization, cp_build_modify_expr): Likewise.
330 * cp-tree.h: Declare it.
331 * call.c (build_over_call): Use it.
333 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
335 merge from FSF 'apple/trunk' branch.
336 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
339 * cp/parser.c (cp_parser_objc_interstitial_code): For
340 @optional/@required set the optional/required flag.
342 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
344 * parser.c (cp_lexer_get_preprocessor_token): Tidied up comments
345 and indentation when finding an Objective-C++ CPP_AT_NAME token.
347 2010-09-29 Richard Guenther <rguenther@suse.de>
349 * cp-tree.h (CP_DECL_CONTEXT): Check DECL_FILE_SCOPE_P.
350 (CP_TYPE_CONTEXT): Similar.
351 (FROB_CONTEXT): Frob global_namespace to the global
352 TRANSLATION_UNIT_DECL.
353 * decl.c (cxx_init_decl_processing): Build a TRANSLATION_UNIT_DECL,
354 set DECL_CONTEXT of global_namespace to it.
355 (start_decl): Use CP_DECL_CONTEXT and test TYPE_P
356 instead of zeroing context.
357 (cp_finish_decl): Use DECL_FILE_SCOPE_P.
358 (grokfndecl): Likewise.
359 (start_preparsed_function): Likewise.
360 * name-lookup.c (maybe_push_decl): Use DECL_NAMESPACE_SCOPE_P.
361 (namespace_binding): Use SCOPE_FILE_SCOPE_P.
362 * pt.c (template_class_depth): Use CP_TYPE_CONTEXT.
363 (is_specialization_of_friend): Use CP_DECL_CONTEXT.
364 (push_template_decl_real): Likewise.
365 (tsubst_friend_class): Likewise. Adjust context comparisons.
366 (instantiate_class_template): Use CP_TYPE_CONTEXT.
367 (tsubst): Do not substitute into TRANSLATION_UNIT_DECL.
368 * cxx-pretty-print.c (pp_cxx_nested_name_specifier): Use
371 2010-09-29 Yao Qi <yao@codesourcery.com>
373 * decl.c (get_atexit_node): Fix typo.
375 2010-09-28 Jason Merrill <jason@redhat.com>
377 * tree.c (lvalue_kind): Rename from lvalue_p_1, make nonstatic.
378 (real_lvalue_p): Take const_tree.
380 * typeck.c (lvalue_or_else): Make temporary arg a permerror.
381 (cp_build_addr_expr_1): Likewise.
383 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
385 Partially merged from apple/trunk branch on FSF servers:
386 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
387 Radar 3803157 (method attributes)
389 * parser.c (cp_parser_objc_method_keyword_params): Handle attributes.
390 (cp_parser_objc_method_tail_params_opt): Likewise.
391 (cp_parser_objc_method_signature): Likewise.
392 (cp_parser_objc_method_maybe_bad_prefix_attributes): New.
393 (cp_parser_objc_method_prototype_list): Handle attributes.
394 (cp_parser_objc_method_definition_list): Likewise.
396 2010-09-28 Richard Henderson <rth@redhat.com>
398 * cp-lang.c: Include "target.h".
399 (cp_eh_personality): Use targetm.except_unwind_info.
400 * Make-lang.in (cp-lang.o): Update deps.
402 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
404 * parser.c (cp_parser_objc_valid_prefix_attributes): New.
405 (cp_parser_declaration): Parse prefix attributes for ObjC++.
406 (cp_parser_objc_protocol_declaration): Handle attributes.
407 (cp_parser_objc_class_interface): Likewise.
408 (cp_parser_objc_declaration): Likewise.
410 2010-09-27 Jason Merrill <jason@redhat.com>
412 Require lvalues as specified by the standard.
413 * typeck.c (lvalue_or_else): Use real_lvalue_p.
414 (cp_build_addr_expr_1): Split out of cp_build_unary_op.
415 (cp_build_addr_expr, cp_build_addr_expr_strict): Interfaces.
416 (decay_conversion, get_member_function_from_ptrfunc): Adjust.
417 (build_x_unary_op, build_reinterpret_cast_1): Adjust.
418 (build_const_cast_1): Adjust.
419 * cp-tree.h: Declare new fns.
420 * call.c (build_this, convert_like_real, build_over_call): Adjust.
421 (initialize_reference): Adjust.
422 * class.c (build_base_path, convert_to_base_statically): Adjust.
423 (build_vfn_ref, resolve_address_of_overloaded_function): Adjust.
424 * cvt.c (build_up_reference, convert_to_reference): Adjust.
425 * decl.c (register_dtor_fn): Adjust.
426 * decl2.c (build_offset_ref_call_from_tree): Adjust.
427 * except.c (initialize_handler_parm): Adjust.
428 * init.c (build_offset_ref, build_delete, build_vec_delete): Adjust.
429 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Adjust.
430 * tree.c (stabilize_expr): Adjust.
432 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
434 Merge from apple/trunk branch on FSF servers:
436 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
439 * typeck.c (composite_pointer_type): Call objc_have_common_type
440 when comparing two objective-c pointer types.
442 2005-07-18 Ziemowit Laski <zlaski@apple.com>
445 * call.c (standard_conversion): Do not issue warnings when
446 comparing ObjC pointer types.
448 2005-06-22 Ziemowit Laski <zlaski@apple.com>
451 * call.c (standard_conversion): Allow for a pointer conversion
452 between any two ObjC pointer types.
453 * typeck.c (composite_pointer_type): Determine common type
454 for two ObjC pointer types.
456 2010-09-24 Jan Hubicka <jh@suse.cz>
458 * decl.c (finish_function): Use decl_replaceable_p
459 * method.c (make_alias_for_thunk): Update call of
460 cgraph_same_body_alias.
462 2010-09-24 Jason Merrill <jason@redhat.com>
464 * decl.c (compute_array_index_type): Remember type dependence of
466 * pt.c (dependent_type_p_r): Don't recompute it here.
468 * error.c (dump_expr) [CASE_CONVERT]: Print conversion between
469 reference and pointer to the same type as "*" or "&".
471 2010-09-24 Nicola Pero <nicola.pero@meta-innovation.com>
473 * typeck.c (warn_args_num): Use warning 'too many arguments to
474 method [methodname]' for an Objective-C method instead of the less
475 satisfactory 'too many arguments to function' (with no method
478 2010-09-21 Jason Merrill <jason@redhat.com>
480 * mangle.c (write_expression) [SCOPE_REF]: Only do -fabi-version=1
481 special handling if we know the member.
483 2010-09-18 Jason Merrill <jason@redhat.com>
485 * call.c (compare_ics): Do lvalue/rvalue reference binding
486 comparison for ck_list, too.
488 2010-09-15 Jason Merrill <jason@redhat.com>
490 * semantics.c (finish_id_expression): Diagnose use of function
491 parms in evaluated context outside function body.
493 * decl2.c (grokbitfield): Diagnose non-integral width.
495 * call.c (convert_like_real): Use the underlying type of the
496 reference for the temporary.
498 2010-09-15 Jakub Jelinek <jakub@redhat.com>
501 * class.c (build_vtbl_initializer): Use fn instead of init's operand
502 as first argument to FDESC_EXPR.
504 2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
507 * decl.c (grokdeclarator): Check build_memfn_type return value
510 2010-09-13 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
512 * semantics.c (finish_for_stmt): Always test flag_new_for_scope.
513 (begin_range_for_stmt): Likewise.
515 2010-09-11 Rodrigo Rivas <rodrigorivascosta@gmail.com>
517 Implement range-based for-statements.
518 * cp-tree.def (RANGE_FOR_STMT): New.
519 * cp-tree.h (RANGE_FOR_DECL, RANGE_FOR_EXPR, RANGE_FOR_BODY): New.
520 (cp_convert_range_for): Declare.
521 * pt.c (tsubst_expr): Add RANGE_FOR_STMT.
522 (tsubst_copy_and_build): perform_koenig_lookup takes extra argument.
523 * semantics.c (begin_range_for_stmt): New.
524 (finish_range_for_decl): New.
525 (finish_for_stmt): Accept also RANGE_FOR_STMT.
526 (perform_koenig_lookup): Add extra argument include_std.
527 * parser.c (cp_parser_c_for): New with code from
528 cp_parser_iteration_statement().
529 (cp_parser_range_for): New.
530 (cp_convert_range_for): New.
531 (cp_parser_iteration_statement): Add range-for support.
532 (cp_parser_condition): Adjust comment.
533 (cp_parser_postfix_expression): perform_koenig_lookup takes extra
535 * dump.c (cp_dump_tree): Add RANGE_FOR_STMT.
536 * cxx-pretty-print.c: Likewise.
537 * lex.c (cxx_init): Likewise.
538 * name-lookup.c (lookup_function_nonclass): Add extra argument
540 (lookup_arg_dependent): Likewise.
541 * name-lookup.h: Likewise.
543 2010-09-10 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
546 * error.c (maybe_warn_cpp0x): Add new warning
547 CPP0X_INLINE_NAMESPACES.
548 * parser.c (cp_parser_namespace_definition): Likewise.
549 * cp-tree.h (cpp0x_warn_str): Likewise.
551 2010-09-10 Richard Guenther <rguenther@suse.de>
553 * decl.c (reshape_init_vector): For VECTOR_TYPEs, use
554 TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE.
556 2010-09-10 Jan Hubicka <jh@suse.cz>
558 PR tree-optimization/45605
559 * cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in
562 2010-09-08 Jakub Jelinek <jakub@redhat.com>
565 * pt.c (tsubst) <case INTEGER_TYPE>: Call mark_rvalue_use
566 before calling fold_decl_constant_value.
568 2010-09-07 Arnaud Charlet <charlet@adacore.com>
570 * cp-tree.h (build_enumerator): Add new location_t parameter.
571 (build_lang_decl_loc): New function.
572 * decl.c (build_enumerator): New parameter loc. Use it when calling
573 build_decl. Replace build_lang_decl with build_lang_decl_loc.
574 * pt.c (tsubst_enum): Adjust call to build_enumerator.
575 * parser.c (cp_parser_enumerator_definition): Ditto.
576 * lex.c (build_lang_decl_loc): New function.
578 2010-09-06 Dodji Seketeli <dodji@redhat.com>
583 * tree.c (strip_typedefs): Strip typedefs from the context of
586 2010-09-06 Mark Mitchell <mark@codesourcery.com>
588 * typeck.c (cp_build_binary_op): Call do_warn_double_promotion.
589 * call.c (build_conditional_expr): Likewise.
590 (convert_arg_to_ellipsis): Likewise.
592 2010-09-06 Arnaud Charlet <charlet@adacore.com>
594 * parser.c (make_pointer_declarator, make_reference_declarator,
595 make_call_declarator, make_array_declarator): Set declarator->id_loc.
596 (cp_parser_init_declarator): Adjust location of decl if appropriate.
598 2010-09-06 Jason Merrill <jason@redhat.com>
600 * call.c (implicit_conversion): Fix value-init of enums.
601 (convert_like_real): Likewise.
603 * decl.c (cp_finish_decl): Don't change init for auto deduction.
605 * pt.c (fold_non_dependent_expr_sfinae): Split out from...
606 (fold_non_dependent_expr): ...here.
607 (convert_nontype_argument): Use it. Take complain parm.
608 Use perform_implicit_conversion instead of ocp_convert.
609 Allow cv-qual changes.
610 (convert_template_argument): Pass complain down.
611 (tsubst_template_arg): Suppress constant expression warnings.
614 * method.c (synthesized_method_walk): In constructors, also check
615 subobject destructors.
617 * semantics.c (finish_compound_literal): Always build a
620 2010-08-30 Paolo Carlini <paolo.carlini@oracle.com>
623 * decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs.
625 2010-08-30 Jakub Jelinek <jakub@redhat.com>
628 * parser.c (cp_parser_omp_atomic): Handle boolean
629 {PRE,POST}_INCREMENT.
631 2010-08-29 Jason Merrill <jason@redhat.com>
634 * parser.c (cp_parser_parameter_declaration): Pop parameter decls
635 after tentative parsing.
637 2010-08-22 Joseph Myers <joseph@codesourcery.com>
639 * Make-lang.in (g++spec.o): Update dependencies.
640 * g++spec.c: Include opts.h
641 (MATH_LIBRARY, LIBSTDCXX): Remove initial "-l".
642 (lang_specific_driver): Use cl_decoded_option structures.
644 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
646 * call.c: Use FOR_EACH_VEC_ELT.
651 * except.c: Likewise.
652 * mangle.c: Likewise.
653 * method.c: Likewise.
654 * name-lookup.c: Likewise.
655 * parser.c: Likewise.
658 * semantics.c: Likewise.
659 * typeck2.c: Likewise.
661 2010-08-19 Jason Merrill <jason@redhat.com>
663 * call.c (reference_related_p): Check for error_mark_node.
664 (add_function_candidate): Check it instead of
665 same_type_ignoring_top_level_qualifiers_p.
668 * init.c (build_new_1): Don't use build_value_init in a template.
669 (build_value_init): Make sure we don't.
672 * cp-gimplify.c (cp_gimplify_expr): Also remove assignment
673 of empty class CONSTRUCTOR.
675 * except.c (pending_noexcept, pending_noexcept_checks): New.
676 (perform_deferred_noexcept_checks): New.
677 (maybe_noexcept_warning): Split from...
678 (finish_noexcept_expr): ...here. Adjust.
679 * decl2.c (cp_write_global_declarations): Call
680 perform_deferred_noexcept_checks.
681 * cp-tree.h: And declare it.
683 2010-08-18 Nathan Froyd <froydnj@codesourcery.com>
686 * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to
689 2010-08-17 Kai Tietz <kai.tietz@onevision.com>
691 * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
692 or if -fms-extensions is enabled check, check permissive.
694 2010-08-09 Jason Merrill <jason@redhat.com>
697 * pt.c (lookup_template_class): Don't re-coerce outer parms.
699 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
701 * call.c (add_builtin_candidates): Use VECs for local variable
702 `types'. Adjust remainder of function accordingly.
704 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
706 * name-lookup.c (is_associated_namespace): Convert local variables
707 to be VECs instead of TREE_LISTs.
709 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
711 * tree.c (varargs_function_p): Use stdarg_p.
713 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
715 * parser.c (cp_default_arg_entry): Declare. Declare a VEC of it.
716 (cp_unparsed_functions_entry): Declare. Declare a VEC of it.
717 (cp_parser) [unparsed_functions_queues]: Rename to unparsed_queues.
718 Change type to a VEC.
719 (unparsed_funs_with_default_args): Define.
720 (unparsed_funs_with_definitions): Define.
721 (push_unparsed_function_queues): New function.
722 (cp_parser_new): Call it.
723 (pop_unparsed_function_queues): New function.
724 (cp_parser_class_specifier): Adjust processing of unparsed functions.
725 (cp_parser_template_declaration_after_export): Use VEC_safe_push.
726 (cp_parser_save_member_function_body): Likewise.
727 (cp_parser_late_parsing_for_member): Call push_unparsed_function_queues
728 and pop_unparsed_function_queues.
729 (cp_parser_late_parsing_default_args): Likewise.
730 (cp_parser_save_default_args): Use VEC_safe_push.
732 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
734 * name-lookup.h (cp_label_binding): Declare. Declare a VEC type
736 (cp_binding_level): Convert shadowed_labels and dead_vars_from_for
738 * decl.c (poplevel): Adjust for type changes.
739 (declare_local_label): Likewise.
741 2010-08-06 Jason Merrill <jason@redhat.com>
743 * typeck.c (complete_type_or_maybe_complain): Split out from...
744 (complete_type_or_else): Here.
745 (build_class_member_access_expr): Call it.
746 (finish_class_member_access_expr): Likewise.
747 * call.c (build_special_member_call): Likewise.
748 * cvt.c (build_expr_type_conversion): Likewise.
749 * init.c (build_new): Likewise.
750 * typeck2.c (build_functional_cast): Likewise.
751 * cp-tree.h: Declare it.
753 * init.c (build_value_init): Add complain parm.
754 (build_value_init_noctor): Likewise.
755 (perform_member_init): Pass it.
756 (expand_aggr_init_1): Likewise.
757 (build_new_1): Likewise.
758 (build_vec_init): Likewise.
759 * pt.c (tsubst_expr): Likewise.
760 * typeck2.c (build_functional_cast): Likewise.
762 * tree.c (build_target_expr_with_type): Handle error_mark_node.
764 * typeck.c (decay_conversion): Any expression with type nullptr_t
767 2010-07-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
770 * decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED.
772 2010-07-27 Jason Merrill <jason@redhat.com>
774 * pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR
775 from build_value_init.
776 * init.c (build_value_init_noctor): Give error for unknown array
779 2010-07-27 Joseph Myers <joseph@codesourcery.com>
781 * cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
783 2010-07-27 Joseph Myers <joseph@codesourcery.com>
785 * cp-objcp-common.c (cxx_initialize_diagnostics): First call
786 c_common_initialize_diagnostics.
787 * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK,
788 LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
790 2010-07-21 Jason Merrill <jason@redhat.com>
792 * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
794 * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
797 2010-07-20 Jeffrey Yasskin <jyasskin@google.com>
800 * pt.c (instantiate_class_template): Propagate the template's
801 location to its instance.
803 2010-07-20 Jason Merrill <jason@redhat.com>
806 * pt.c (tsubst_copy_and_build): Rework last change.
809 * pt.c (tsubst_copy_and_build): Handle partial substitution of
812 2010-07-19 Jason Merrill <jason@redhat.com>
815 * semantics.c (finish_decltype_type): Correct decltype
816 of parenthesized rvalue reference variable.
819 * tree.c (cp_tree_equal): Compare type of *CAST_EXPR.
820 * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR.
822 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com>
825 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t
827 * cp-tree.h: Adjust declaration.
828 * init.c (perform_member_init): Adjust caller.
829 * decl.c (grok_reference_init, cp_finish_decl): Likewise.
830 * typeck2.c (store_init_value): Likewise.
831 (build_functional_cast): Pass complain argument to
832 build_x_compound_expr_from_list.
834 2010-07-16 Jason Merrill <jason@redhat.com>
837 * pt.c (process_partial_specialization): Diagnose partial
838 specialization after instantiation.
839 (most_specialized_class): Add complain parm.
841 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.
843 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
845 * init.c (build_new_1): Use cp_build_function_call_nary instead of
846 cp_build_function_call.
848 2010-07-15 Jason Merrill <jason@redhat.com>
851 * call.c (add_function_candidate): If we're working on an implicit
852 declaration, don't consider candidates that won't match.
853 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
854 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
857 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
858 (TYPE_HAS_USER_OPEQ): New.
859 * decl.c (grok_special_member_properties): Set it.
860 * class.c (add_implicitly_declared_members): Don't lazily declare
861 constructors/operator= if a base or member has a user-declared one.
862 (check_bases_and_members, check_bases): Adjust.
863 (check_field_decls, check_field_decl): Adjust.
865 2010-07-15 Anatoly Sokolov <aesok@post.ru>
867 * decl.c (integer_three_node): Remove.
868 (cxx_init_decl_processing): Do not initialize the integer_three_node.
869 * cp-tree.h (integer_three_node): Remove.
871 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
873 * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
876 * cp-gimplify.c: Likewise.
880 * mangle.c: Likewise.
881 * name-lookup.c: Likewise.
882 * optimize.c: Likewise.
883 * parser.c: Likewise.
886 * search.c: Likewise.
887 * semantics.c: Likewise.
888 * typeck.c: Likewise.
889 * typeck2.c: Likewise.
891 2010-07-14 Jason Merrill <jason@redhat.com>
893 * init.c (sort_mem_initializers): Rename "field_type" to "ctx".
894 (build_field_list): Cache field type.
896 Implement C++0x unrestricted unions (N2544)
897 * class.c (check_field_decl): Loosen union handling in C++0x.
898 * method.c (walk_field_subobs): Split out from...
899 (synthesized_method_walk): ...here. Set msg before loops.
900 (process_subob_fn): Check for triviality in union members.
901 * init.c (sort_mem_initializers): Splice out uninitialized
902 anonymous unions and union members.
903 (push_base_cleanups): Don't automatically destroy anonymous unions
906 2010-07-13 Jason Merrill <jason@redhat.com>
909 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
910 (TYPE_HAS_USER_OPEQ): New.
911 * decl.c (grok_special_member_properties): Set it.
912 * class.c (add_implicitly_declared_members): Don't lazily declare
913 constructors/operator= if a base or member has a user-declared one.
914 (check_bases_and_members, check_bases): Adjust.
915 (check_field_decls, check_field_decl): Adjust.
916 * method.c (synthesized_method_walk): Initialize check_vdtor.
919 * mangle.c (write_type): Canonicalize.
920 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
921 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
923 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
926 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
928 * typeck.c (get_delta_difference): Update prototype, add a
929 tsubst_flags_t parameter; update get_delta_difference_1 calls and
930 add checks for error_mark_node.
931 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
932 parameter; update lookup_base call.
933 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
934 parameter; update get_delta_difference call and add check for
936 (convert_ptrmem): Update prototype, add a tsubst_flags_t
937 parameter; update get_delta_difference call and add check for
938 error_mark_node; update build_ptrmemfunc call.
939 (build_static_cast_1): Adjust convert_ptrmem call.
940 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
941 (cp_build_unary_op): Adjust build_ptrmemfunc call.
942 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
943 and build_ptrmemfunc calls.
944 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
946 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
949 * call.c (build_temp): Add tsubst_flags_t complain parameter;
950 adjust build_special_member_call call, pass complain.
951 (convert_like_real): Adjust build_temp call, pass complain.
953 2010-07-09 Jason Merrill <jason@redhat.com>
956 * cp-tree.h (BV_LOST_PRIMARY): New macro.
957 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
959 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
961 2010-07-08 Jason Merrill <jason@redhat.com>
964 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
965 virtual bases for covariant thunks.
967 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
969 * cp-tree.h: Do not include toplev.h.
971 2010-07-06 Jason Merrill <jason@redhat.com>
974 * call.c (is_std_init_list): Look through typedefs.
977 * init.c (build_offset_ref): If scope isn't dependent,
978 don't exit early. Look at TYPE_MAIN_VARIANT.
979 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
981 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
983 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
985 * cp-tree.h (impl_conv_void): New type.
986 (convert_to_void): Adjust prototype.
987 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
988 diagnostic for easy translation. Change caller.
989 * typeck.c: Update call to convert_to_void.
990 * semantics.c: Likewise.
993 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
995 * decl.c (cp_finish_decl): Call add_local_decl.
996 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
998 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
1000 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
1003 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
1006 * parser.c (cp_parser_primary_expression): Error if local template is
1009 2010-07-02 Le-Chun Wu <lcwu@google.com>
1012 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
1013 (variable or type) shadows another type.
1015 2010-07-02 Jakub Jelinek <jakub@redhat.com>
1018 * typeck.c (convert_for_assignment): When converting a convertible
1019 vector type or objc++ types, call mark_rvalue_use.
1020 * typeck2.c (build_m_component_ref): Use return values from
1021 mark_rvalue_use or mark_lvalue_use.
1022 * class.c (build_base_path): Likewise.
1023 * call.c (build_conditional_expr): Likewise.
1025 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
1028 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
1031 2010-07-01 Richard Guenther <rguenther@suse.de>
1033 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
1034 predicate we are looking for, allow non-gimplified
1037 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
1040 * typeck.c (cp_build_unary_op): Early return error_mark_node when
1041 arg is NULL_TREE too.
1042 * call.c (convert_class_to_reference): Return error_mark_node when
1045 2010-06-30 Michael Matz <matz@suse.de>
1047 * repo.c (finish_repo): Fix typo.
1049 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1051 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
1053 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
1055 * repo.c (pending_repo): Change type to a VEC.
1056 (finish_repo): Adjust for new type of pending_repo.
1057 (repo_emit_p): Likewise.
1059 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
1061 * tree.c: Include gimple.h. Do not include tree-flow.h
1062 * decl.c: Do not include tree-flow.h
1063 * Make-lang.in: Adjust dependencies.
1065 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1067 * decl.c (incomplete_var): Declare. Declare VECs containing them.
1068 (incomplete_vars): Adjust comment. Change type to a VEC.
1069 (maybe_register_incomplete_var): Adjust for new type.
1070 (complete_vars): Adjust iteration over incomplete_vars.
1072 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
1074 * decl.c (struct named_label_entry): Change type of bad_decls field
1076 (poplevel_named_label_1): Adjust for new type of bad_decls.
1077 (check_goto): Likewise.
1079 2010-06-29 Jason Merrill <jason@redhat.com>
1081 Enable implicitly declared move constructor/operator= (N3053).
1082 * class.c (add_implicitly_declared_members): A class with no
1083 explicitly declared copy or move constructor gets both declared
1084 implicitly, and similarly for operator=.
1085 (check_bases): A type with no copy ctor does not inhibit
1086 a const copy ctor in a derived class. It does mean the derived
1088 (check_field_decl): Likewise.
1089 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
1090 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
1091 (trivially_copyable_p): Likewise.
1092 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
1093 * class.c (finish_struct_bits): Likewise.
1094 * tree.c (build_target_expr_with_type): Likewise.
1095 * typeck2.c (store_init_value): Likewise.
1097 Enable implicitly deleted functions (N2346)
1098 * class.c (check_bases_and_members): Adjust lambda flags.
1099 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
1101 * decl2.c (mark_used): Adjust error for use of deleted function.
1103 Machinery to support implicit delete/move.
1104 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
1105 has_complex_move_ctor, has_complex_move_assign bitfields.
1106 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
1107 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
1108 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
1109 (enum special_function_kind): Add sfk_move_assignment.
1110 (LOOKUP_SPECULATIVE): New.
1111 * call.c (build_over_call): Return early if it's set.
1112 (build_over_call): Use trivial_fn_p.
1113 * class.c (check_bases): If the base has no default constructor,
1114 the derived one is non-trivial. Handle move ctor/op=.
1115 (check_field_decl): Likewise.
1116 (check_bases_and_members): Handle move ctor/op=.
1117 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
1118 (type_has_move_constructor, type_has_move_assign): New.
1119 * decl.c (grok_special_member_properties): Handle move ctor/op=.
1120 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
1121 (trivial_fn_p): New.
1122 (do_build_copy_constructor): Use it.
1123 (do_build_assign_ref): Likewise. Handle move assignment.
1124 (build_stub_type, build_stub_object, locate_fn_flags): New.
1125 (locate_ctor): Use locate_fn_flags.
1126 (locate_copy, locate_dtor): Remove.
1127 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
1128 (process_subob_fn, synthesized_method_walk): New.
1129 (maybe_explain_implicit_delete): New.
1130 (implicitly_declare_fn): Use synthesized_method_walk,
1131 type_has_trivial_fn, and type_set_nontrivial_flag.
1132 (defaulted_late_check): Set DECL_DELETED_FN.
1133 (defaultable_fn_check): Handle sfk_move_assignment.
1134 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
1135 implicitly deleted move ctor/op=.
1136 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
1137 (lookup_fnfields_slot): New.
1138 * semantics.c (omp_clause_info_fndecl): Remove.
1139 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
1140 get_copy_assign, trivial_fn_p.
1141 (trait_expr_value): Adjust call to locate_ctor.
1142 * tree.c (special_function_p): Handle sfk_move_assignment.
1144 * class.c (type_has_virtual_destructor): New.
1145 * cp-tree.h: Declare it.
1146 * semantics.c (trait_expr_value): Use it.
1148 * call.c (build_over_call): Only give warnings with tf_warning.
1150 * name-lookup.c (pop_scope): Handle NULL_TREE.
1152 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
1153 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
1154 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
1155 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
1156 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
1157 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
1158 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
1159 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
1160 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
1161 (sfk_assignment_operator): Rename to sfk_copy_assignment.
1162 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
1163 * search.c, semantics.c, tree.c: Adjust.
1165 * pt.c (dependent_scope_ref_p): Remove.
1166 (value_dependent_expression_p): Don't call it.
1167 (type_dependent_expression_p): Here either.
1168 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
1169 if the scope isn't dependent.
1171 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
1175 * pt.c (has_value_dependent_address): New.
1176 (value_dependent_expression_p): Check it.
1177 (convert_nontype_argument): Likewise. Call decay_conversion before
1178 folding if we want a pointer.
1179 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
1180 scope is the current instantiation.
1182 2010-06-28 Jakub Jelinek <jakub@redhat.com>
1185 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
1188 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
1190 * init.c: Do not include except.h.
1193 * cp-lang.c: Likewise.
1195 * semantics.c: Likewise.
1196 * decl2.c: Likewise.
1197 * except.c: Likewise.
1198 (init_exception_processing): Do not set the removed
1199 lang_protect_cleanup_actions here.
1200 (cp_protect_cleanup_actions): Make non-static and remove prototype.
1201 (doing_eh): New, moved from except.c but removed the do_warning flag.
1202 (expand_start_catch_block): Update doing_eh call.
1203 (expand_end_catch_block): Likewise.
1204 (build_throw): Likewise.
1205 * cp-tree.h: Prototype cp_protect_cleanup_actions.
1206 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
1207 cp_protect_cleanup_actions.
1208 * Make-lang.in: Update dependencies.
1210 2010-06-26 Jason Merrill <jason@redhat.com>
1212 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
1213 constructor called with a single argument that takes a reference
1214 to the constructor's class.
1215 (BAD_CONVERSION_RANK): New.
1216 (compare_ics): Use it to compare bad ICSes.
1218 2010-06-25 Joseph Myers <joseph@codesourcery.com>
1220 * lang-specs.h: Remove +e handling.
1222 2010-06-24 Andi Kleen <ak@linux.intel.com>
1224 * parser.c: (cp_parser_question_colon_clause):
1225 Switch to use cp_lexer_peek_token.
1226 Call warn_for_omitted_condop. Call pedwarn for omitted
1229 2010-06-22 Jakub Jelinek <jakub@redhat.com>
1232 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
1233 datum and mark_rvalue_use on component.
1236 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
1237 the CALL_EXPR has no arguments.
1239 2010-06-21 Jason Merrill <jason@redhat.com>
1241 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
1243 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
1246 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
1248 * name-lookup.c (struct arg_lookup): Convert namespaces and
1249 classes fields to VEC.
1250 (arg_assoc_namespace): Adjust for new type of namespaces.
1251 (arg_assoc_class): Adjust for new type of classes.
1252 (lookup_arg_dependent): Use make_tree_vector and
1253 release_tree_vector.
1254 * typeck2.c (build_x_arrow): Use vec_member.
1256 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
1259 * error.c (dump_decl): Better wording for anonymous namespace.
1261 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
1263 * class.c (build_vtbl_initializer): Adjust computation of new_position
1264 and which entry to add padding for.
1266 2010-06-16 Jason Merrill <jason@redhat.com>
1268 * except.c (check_noexcept_r): Return the problematic function.
1269 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
1270 * pt.c (tsubst_copy_and_build): Pass it.
1271 * parser.c (cp_parser_unary_expression): Likewise.
1272 * cp-tree.h: Adjust prototype.
1274 * method.c (defaulted_late_check): Give the defaulted method
1275 the same exception specification as the implicit declaration.
1277 2010-06-15 Jason Merrill <jason@redhat.com>
1279 * class.c (add_implicitly_declared_members): Implicit assignment
1280 operators can also be virtual overriders.
1281 * method.c (lazily_declare_fn): Likewise.
1283 * call.c (convert_like_real): Give "initializing argument of"
1284 information for ambiguous conversion. Give source position
1287 * call.c (print_z_candidates): Do print viable deleted candidates.
1288 (joust): Don't choose a deleted function just because its worst
1289 conversion is better than another candidate's worst.
1291 * call.c (convert_like_real): Don't complain about
1292 list-value-initialization from an explicit constructor.
1294 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
1295 DECL_SOURCE_LOCATION directly.
1297 * class.c (type_has_user_provided_default_constructor): Use
1300 * call.c (is_subseq): Handle ck_aggr, ck_list.
1301 (compare_ics): Treat an aggregate or ambiguous conversion to the
1302 same type as involving the same function.
1304 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
1306 * typeck.c (convert_for_assignment): Fix comment. Change message
1307 format from %d to %qP.
1308 (convert_for_initialization): Fix comment.
1310 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
1312 * cp-tree.h (expr_list_kind): New type.
1313 (impl_conv_rhs): New type.
1314 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
1316 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
1317 diagnostics for easy translation. Change caller.
1318 (convert_for_initialization): Use impl_conv_rhs and change caller.
1319 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
1320 diagnostics for easy translation. Change caller.
1321 * decl.c (bad_spec_place): New enum.
1322 (bad_specifiers): Use it and emit the diagnostics for easy
1323 translation. Change caller.
1324 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
1326 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1328 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
1330 * decl2.c (cp_write_global_declarations): Adjust for new type of
1331 decl_namespace_list.
1332 * name-lookup.c (current_decl_namespace): Likewise.
1333 (push_decl_namespace): Likewise.
1334 (pop_decl_namespace): Likewise.
1336 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1338 * call.c (build_java_interface_fn_ref): Call build_function_type_list
1339 instead of build_function_type.
1340 * decl.c (cxx_init_decl_processing): Likewise.
1341 (declare_global_var): Likewise.
1342 (get_atexit_node): Likewise.
1343 (expand_static_init): Likewise.
1344 * decl2.c (start_objects): Likewise.
1345 (start_static_storage_duration_function): Likewise.
1346 * except.c (init_exception_processing): Likewise.
1347 (build_exc_ptr): Likewise.
1348 (build_throw): Likewise.
1349 * rtti.c (throw_bad_cast): Likewise.
1350 (throw_bad_typeid): Likewise.
1351 (build_dynamic_cast_1): Likewise.
1353 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1355 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
1356 (build_op_delete_call): Likewise.
1357 (build_over_call): Likewise.
1358 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1359 * pt.c (process_partial_specialization): Likewise.
1360 (tsubst_template_args): Likewise.
1361 * semantics.c (finish_asm_stmt): Likewise.
1363 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
1365 * decl.c (record_key_method_defined): New, broken out of ...
1366 (finish_function): ... here. Call it.
1367 (start_decl): Treat aliases as definitions.
1369 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1371 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
1373 * pt.c (maybe_process_partial_specialization): Likewise.
1374 (register_specialization): Likewise.
1375 (add_pending_template): Likewise.
1376 (lookup_template_class): Likewise.
1377 (push_tinst_level): Likewise.
1379 * parser.c (cp_lexer_new_main): Likewise.
1380 (cp_lexer_new_from_tokens): Likewise.
1381 (cp_token_cache_new): Likewise.
1382 (cp_parser_context_new): Likewise.
1383 (cp_parser_new): Likewise.
1384 (cp_parser_nested_name_specifier_opt): Likewise.
1385 (cp_parser_template_id): Likewise.
1387 * name-lookup.c (binding_entry_make): Likewise.
1388 (binding_table_construct): Likewise.
1389 (binding_table_new): Likewise.
1390 (cxx_binding_make): Likewise.
1391 (pushdecl_maybe_friend): Likewise.
1392 (begin_scope): Likewise.
1393 (push_to_top_level): Likewise.
1395 * lex.c (init_reswords): Likewise.
1396 (retrofit_lang_decl): Likewise.
1397 (cxx_dup_lang_specific_decl): Likewise.
1398 (copy_lang_type): Likewise.
1399 (cxx_make_type): Likewise.
1401 * decl.c (make_label_decl): Likewise.
1402 (check_goto): Likewise.
1403 (start_preparsed_function): Likewise.
1404 (save_function_data): Likewise.
1406 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
1408 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
1410 * class.c (finish_struct_1): Likewise.
1412 * cp-tree.h (struct lang_type): Add variable_size GTY option.
1413 (struct lang_decl): Likewise.
1415 * parser.c (cp_parser_new): Update comment to not reference
1418 2010-06-07 Jason Merrill <jason@redhat.com>
1421 * error.c (dump_parameters): Mask out TFF_SCOPE.
1422 (dump_simple_decl): Don't print the scope of a PARM_DECL.
1423 (dump_scope): Remove no-op mask.
1426 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
1428 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
1429 * init.c (build_offset_ref): Use it.
1430 * pt.c (maybe_process_partial_specialization): Use it.
1431 (instantiate_class_template): Use it.
1432 * search.c (lookup_base): Use it.
1434 2010-06-07 Jakub Jelinek <jakub@redhat.com>
1437 * expr.c (mark_exp_read): Handle INDIRECT_REF.
1438 * cvt.c (convert_to_void): Handle INDIRECT_REF like
1439 handled_component_p.
1442 * decl.c (initialize_local_var): If TREE_USED is set on the type,
1443 set also DECL_READ_P on the decl.
1445 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1448 * cp-tree.h (typedef_variant_p): Move this declaration to
1450 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1451 * decl.c (grokdeclarator): Do not rename debug info of an
1452 anonymous tagged type named by a typedef.
1454 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
1457 * class.c (check_field_decls): Move the call to
1458 check_bitfield_decl before trying to set the
1459 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
1461 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
1463 * typeck.c: Update include path for moved files.
1466 * cp-gimplify.c: Likewise.
1467 * cp-lang.c: Likewise.
1469 * semantics.c: Likewise.
1470 * cxx-pretty-print.h: Likewise.
1471 * decl2.c: Likewise.
1472 * parser.c: Likewise.
1473 * cp-objcp-common.c: Likewise.
1474 * cp-tree.h: Likewise.
1475 * name-lookup.c: Likewise.
1477 * name-lookup.h: Likewise.
1478 * config-lang.in: Update paths in gtfiles for files in c-family/.
1479 * Make-lang.in: Likewise.
1481 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
1483 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
1484 * typeck.c (build_ptrmemfunc): Likewise.
1486 2010-06-04 Jason Merrill <jason@redhat.com>
1488 * typeck2.c (merge_exception_specifiers): Adjust merging of
1489 throw() and noexcept(true).
1491 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
1492 using an uninitialized variable.
1494 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
1495 (pp_cxx_expression): Likewise.
1497 Implement noexcept-specification (15.4)
1498 * parser.c (cp_parser_exception_specification_opt): Parse it.
1499 Give -Wdeprecated warning about throw() specs.
1500 * pt.c (tsubst_exception_specification): Handle it.
1501 * error.c (dump_exception_spec): Handle it.
1502 (dump_expr): Handle NOEXCEPT_EXPR.
1503 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
1504 * typeck.c (comp_except_specs): Handle compatibility rules.
1505 Change exact parm to take an enum.
1506 * typeck2.c (merge_exception_specifiers): Handle noexcept.
1507 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
1508 (type_throw_all_p, build_noexcept_spec): New fns.
1509 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
1510 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
1511 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
1512 (noexcept_true_spec, noexcept_false_spec): New macros.
1513 * name-lookup.c (pushdecl_maybe_friend): Adjust.
1514 * search.c (check_final_overrider): Adjust.
1515 * decl.c (check_redeclaration_exception_specification): Adjust.
1516 (use_eh_spec_block): Use type_throw_all_p.
1517 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
1518 Give operator new a noexcept-specification in C++0x mode.
1519 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
1520 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
1522 Implement noexcept operator (5.3.7)
1523 * cp-tree.def (NOEXCEPT_EXPR): New.
1524 * except.c (check_noexcept_r, finish_noexcept_expr): New.
1525 * cp-tree.h: Declare finish_noexcept_expr.
1526 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
1527 * pt.c (tsubst_copy_and_build): And tsubst it.
1528 (type_dependent_expression_p): Handle it.
1529 (value_dependent_expression_p): Handle it.
1531 * call.c (build_conditional_expr): Never fold in unevaluated context.
1532 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
1533 * semantics.c (simplify_aggr_init_expr): Likewise.
1534 * typeck.c (merge_types): Call merge_exception_specifiers.
1535 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
1536 DECL_ANTICIPATED for preferring new type.
1538 2010-06-04 Joseph Myers <joseph@codesourcery.com>
1540 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
1543 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1546 * typeck.c (build_class_member_access_expr): Call mark_exp_read
1547 on object for static data members.
1549 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1550 Jason Merrill <jason@redhat.com>
1553 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
1554 with the same type, call mark_lvalue_use on both.
1556 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
1558 * class.c (struct vtbl_init_data_s): Remove last_init field.
1559 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
1561 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
1563 (build_vtt): Likewise.
1564 (initialize_vtable): Take a VEC instead of a tree.
1565 (build_vtt_inits): Change return type to void. Take a VEC **
1566 instead of a tree *; accumulate results into said VEC.
1567 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
1568 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
1569 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
1571 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
1572 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
1574 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
1575 rather than tree_cons.
1576 (build_vbase_offset_vtbl_entries): Likewise.
1577 (add_vcall_offset): Likewise.
1578 (build_rtti_vtbl_entries): Likewise.
1579 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
1580 * decl.c (initialize_artificial_var): Use build_constructor instead
1581 of build_constructor_from_list.
1583 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
1586 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
1589 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
1591 * parser.c (cp_parser_mem_initializer_list): Change error text.
1593 2010-06-02 Jakub Jelinek <jakub@redhat.com>
1595 * cp-objcp-common.c (shadowed_var_for_decl): Change into
1596 tree_decl_map hashtab from tree_map.
1597 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
1598 (init_shadowed_var_for_decl): Adjust initialization.
1601 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
1602 instead of calling mark_exp_read only when not an assignment.
1605 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
1606 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
1607 Set DECL_VALUE_EXPR on var.
1609 2010-06-02 Jason Merrill <jason@redhat.com>
1611 * error.c (dump_type): Improve typedef handling.
1616 * name-lookup.c (same_entity_p): New.
1617 (ambiguous_decl): Multiple declarations of the same entity
1620 2010-06-01 Jason Merrill <jason@redhat.com>
1623 * call.c (add_list_candidates): Prefer the default constructor.
1624 (build_aggr_conv): Treat missing initializers like { }.
1625 * typeck2.c (process_init_constructor_record): Likewise.
1626 * init.c (expand_default_init): Use digest_init for
1627 direct aggregate initialization, too.
1629 * call.c (add_list_candidates): Split out...
1630 (build_user_type_conversion_1): ...from here.
1631 (build_new_method_call): And here.
1632 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
1635 * call.c (build_list_conv): Set list-initialization flags properly.
1637 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
1639 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
1641 2010-06-01 Arnaud Charlet <charlet@adacore.com>
1642 Matthew Gingell <gingell@adacore.com>
1644 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
1645 * decl2.c: Include langhooks.h and c-ada-spec.h.
1646 (cpp_check, collect_source_refs, collect_ada_namespace,
1647 collect_all_refs): New functions.
1648 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
1649 * lang-specs.h: Ditto.
1651 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1653 * cp-tree.h (cp_build_function_call_nary): Declare.
1654 * typeck.c (cp_build_function_call_nary): Define.
1655 * decl.c (register_dtor_fn): Use it instead of
1656 cp_build_function_call.
1657 (cxx_maybe_build_cleanup): Likewise.
1658 * decl2.c (generate_ctor_or_dtor_function): Likewise.
1659 * except.c (do_get_exception_ptr): Likewise.
1660 (do_begin_catch): Likewise.
1661 (do_allocate_exception): Likewise.
1662 (do_free_exception): Likewise.
1663 (build_throw): Likewise. Use cp_build_function_call_vec instead
1664 of cp_build_function_call.
1665 (do_end_catch): Likewise.
1667 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1669 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
1670 (struct cp_declarator): Move id_loc field up.
1672 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1674 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
1675 this file is included before c-common.h. Define GCC_DIAG_STYLE
1676 before including diagnostic-core.h and toplev.h.
1677 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
1678 * pt.c: Include cp-tree.h before c-common.h.
1680 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1682 * tree.c (c_register_addr_space): Add stub.
1684 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1686 * g++spec.c (lang_specific_driver): Use fatal_error instead of
1689 2010-05-28 Dodji Seketeli <dodji@redhat.com>
1691 Revert fix of PR c++/44188
1692 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
1694 * tree.c (typedef_variant_p): Revert moving this definition to
1696 * decl.c (grokdeclarator): Revert naming typedef handling.
1698 2010-05-27 Joseph Myers <joseph@codesourcery.com>
1700 * call.c: Include diagnostic-core.h instead of diagnostic.h.
1701 * cp-lang.c: Don't include diagnostic.h
1702 * name-lookup.c: Include diagnostic-core.h instead of
1704 (cp_emit_debug_info_for_using): Use seen_error.
1705 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
1706 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
1707 * pt.c (iterative_hash_template_arg): Use seen_error.
1708 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
1709 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
1710 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
1711 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
1714 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1717 * cp-tree.h (typedef_variant_p): Move this declaration to
1719 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1720 * decl.c (grokdeclarator): Do not rename debug info of an
1721 anonymous tagged type named by a typedef.
1723 2010-05-27 Jason Merrill <jason@redhat.com>
1726 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
1729 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
1732 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
1733 * class.c (layout_class_type): Likewise.
1734 * decl.c (finish_enum): Likewise.
1735 * mangle.c (write_builitin_type): Likewise.
1737 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
1739 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
1741 * decl.c (grokdeclarator): Handle __int128.
1742 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
1743 (cp_parser_simple_type_specifier): Likewise.
1744 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
1745 * typeck.c (cp_common_type): Handle __int128.
1746 * mangle.c (integer_type_codes): Add itk_int128 and
1747 itk_unsigned_int128.
1749 2010-05-26 Jason Merrill <jason@redhat.com>
1752 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
1755 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1757 * cp-lang.c: Do not include expr.h.
1759 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1761 * decl.c: Do not include rtl.h
1762 * semantics.c: Likewise.
1764 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
1766 * cp-tree.h: Do not include splay-tree.h.
1767 (struct prtmem_cst): Remove unused field and false comment.
1768 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
1769 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
1770 * init.c: Do not include rtl.h and expr.h.
1771 * class.c: Do not include rtl.h. Include splay-tree.h.
1772 (build_clone): Use plain NULL instead of NULL_RTX.
1773 * decl.c: Do not include expr.h. Explain why rtl.h has to be
1774 included. Include splay-tree.h.
1775 * method.c: Do not include rtl.h and expr.h.
1776 (use_thunk): Use plain NULL instead of NULL_RTX.
1777 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
1778 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
1779 and target.h. Include splay-tree.h.
1780 * expr.c: Do not include rtl.h and expr.h.
1781 * pt.c: Do not include obstack.h and rtl.h.
1782 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
1783 (tsubst_decl): Likewise.
1784 (instantiate_decl): Likewise.
1785 * semantics.c: Do not include exprt.h and debug.h. Explain why
1786 rtl.h has to be included.
1787 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
1788 * call.c: Do not include rtl.h and expr.h.
1789 * search.c: Do not include obstack.h and rtl.h.
1790 * friend.c: Do not include rtl.h and expr.h.
1791 * Make-lang.in: Update dependencies.
1793 2010-05-25 Jakub Jelinek <jakub@redhat.com>
1796 * parser.c (non_integral_constant): Add NIC_NONE.
1797 (required_token): Add RT_NONE.
1798 (cp_parser_unary_expression): Initialize non_constant_p
1800 (cp_parser_asm_definition): Initialize missing to RT_NONE.
1801 (cp_parser_primary_expression, cp_parser_postfix_expression,
1802 cp_parser_cast_expression, cp_parser_binary_expression,
1803 cp_parser_functional_cast): Fix formatting.
1805 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
1808 * parser.c: Remove inclusion of dyn-string.h.
1809 (non_integral_constant): New enum.
1810 (name_lookup_error): New enum.
1811 (required_token): New enum.
1812 (cp_parser_required_error): New function.
1813 (cp_parser_require): Change the type of variable token_desc to
1814 required_token and use cp_parser_required_error.
1815 (cp_parser_require_keyword): Likewise.
1816 (cp_parser_error): Use gmsgid as parameter.
1817 (cp_parser_name_lookup_error): Change the type of variable desired to
1818 name_lookup_error and put the diagnostic in the full sentences. Change
1820 (cp_parser_non_integral_constant_expression): Change the type of the
1821 variable thing to non_integral_constant and put the diagnostics in
1822 full sentences. Change caller.
1824 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
1827 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
1829 2010-05-24 Joseph Myers <joseph@codesourcery.com>
1831 * error.c (cp_diagnostic_starter): Update call to
1832 diagnostic_build_prefix.
1833 (cp_print_error_function,
1834 print_instantiation_partial_context_line): Check show_column flag
1837 2010-05-24 Jason Merrill <jason@redhat.com>
1840 * decl.c (check_initializer): Don't wrap an init-list in a
1842 * init.c (build_aggr_init): Don't assume copy-initialization if
1843 init has CONSTRUCTOR_IS_DIRECT_INIT.
1844 * call.c (build_new_method_call): Sanity check.
1846 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
1848 * rtti.c (tinfo_base_init): Use build_constructor instead of
1849 build_constructor_from_list. Don't cons a tree node for
1851 (generic_initializer): Use build_constructor_single instead of
1852 build_constructor_from_list.
1853 (ptr_initializer): Use build_constructor instead of
1854 build_constructor_from_list
1855 (ptm_initializer): Likewise.
1856 (class_initializer): Likewise. Take varargs instead of TRAIL.
1857 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
1858 build_constructor instead of build_constructor_from_list.
1860 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
1862 * semantics.c: Include bitmap.h.
1863 * Make-lang.in: Update dependencies.
1865 2010-05-22 Jan Hubicka <jh@suse.cz>
1867 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
1869 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
1871 2010-05-21 Joseph Myers <joseph@codesourcery.com>
1873 * cxx-pretty-print.c: Correct merge error.
1875 2010-05-21 Joseph Myers <joseph@codesourcery.com>
1877 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
1878 (cp_print_error_function): Use diagnostic_abstract_origin macro.
1879 (cp_printer): Handle %K here using percent_K_format.
1880 * cxx-pretty-print.c: Include tree-pretty-print.h.
1881 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
1884 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
1886 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
1887 Clean up redundant includes.
1889 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1892 * decl.c (xref_basetypes): Return false in case of ill-formed
1895 2010-05-19 Jason Merrill <jason@redhat.com>
1897 * call.c (reference_binding): Use cp_build_qualified_type_real
1898 and cp_type_quals consistently.
1899 (add_function_candidate): Likewise.
1900 (build_conditional_expr): Likewise.
1901 (convert_like_real): Likewise.
1902 (type_passed_as): Likewise.
1903 * class.c (add_method): Likewise.
1904 (same_signature_p): Likewise.
1905 (layout_class_type): Likewise.
1906 * decl.c (cxx_init_decl_processing): Likewise.
1907 (cp_fname_init): Likewise.
1908 (grokdeclarator): Likewise.
1909 * decl2.c (cp_reconstruct_complex_type): Likewise.
1910 * init.c (build_new_1): Likewise.
1911 * method.c (do_build_copy_constructor): Likewise.
1912 (implicitly_declare_fn): Likewise.
1913 * pt.c (tsubst_aggr_type): Likewise.
1915 * rtti.c (init_rtti_processing): Likewise.
1916 (build_headof): Likewise.
1917 (build_dynamic_cast_1): Likewise.
1918 (tinfo_base_init): Likewise.
1919 (emit_support_tinfos): Likewise.
1920 * semantics.c (capture_decltype): Likewise.
1921 * tree.c (cv_unqualified): Likewise.
1922 * typeck.c (composite_pointer_type): Likewise.
1923 (string_conv_p): Likewise.
1925 * mangle.c (write_CV_qualifiers_for_type): Tweak.
1927 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
1928 * decl.c (start_decl): Likewise.
1929 * semantics.c (finish_compound_literal): Likewise.
1930 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
1931 (cp_type_readonly): Remove.
1932 * cp-tree.h: Remove declaration.
1934 * typeck.c (merge_types): Preserve memfn quals.
1936 * decl.c (grokdeclarator): Don't check quals on fn type.
1937 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
1938 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
1941 * typeck.c (type_memfn_quals): New fn.
1942 (apply_memfn_quals): New fn.
1943 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
1944 (cp_type_readonly): Use cp_type_quals.
1945 * cp-tree.h: Add declarations.
1946 * tree.c (cp_build_qualified_type_real): Don't set, but do
1947 preserve, quals on FUNCTION_TYPE.
1948 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
1949 * decl.c (build_ptrmem_type): Likewise.
1950 (grokdeclarator): Likewise.
1951 (static_fn_type): Likewise.
1952 * decl2.c (change_return_type): Likewise.
1953 (cp_reconstruct_complex_type): Likewise.
1954 * pt.c (tsubst_function_type): Likewise.
1956 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
1958 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
1960 * tree.c (build_min_non_dep_call_vec): Update comment.
1962 2010-05-17 Jason Merrill <jason@redhat.com>
1964 * call.c (struct z_candidate): Add explicit_targs field.
1965 (add_template_candidate_real): Set it.
1966 (build_over_call): Use it to control init-list warning.
1969 * call.c (build_over_call): Limit init-list deduction warning to
1970 cases where the argument is actually an init-list.
1973 * call.c (build_over_call): Don't do bitwise copy for move ctor.
1975 2010-05-17 Dodji Seketeli <dodji@redhat.com>
1976 Jason Merrill <jason@redhat.com>
1979 * decl.c (compute_array_index_type): Call mark_rvalue_use.
1981 2010-05-15 Jason Merrill <jason@redhat.com>
1983 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
1984 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
1986 (finish_eh_spec_block): Adjust.
1988 2010-05-15 Jakub Jelinek <jakub@redhat.com>
1991 * pt.c (tsubst): Unshare template argument.
1993 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
1995 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
1996 * Make-lang.in: Fix dependencies accordingly.
1998 2010-05-14 Jason Merrill <jason@redhat.com>
2001 * except.c (build_throw): Simplify, adjust for DR 475.
2004 * except.c (dtor_nothrow): Return nonzero for type with
2008 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
2009 gimple_build_eh_must_not_throw.
2011 2010-05-14 Martin Jambor <mjambor@suse.cz>
2013 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
2016 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
2018 * call.c (build_new_method_call): Change warning text.
2019 * typeck2.c (build_functional_cast): Change error text.
2021 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
2024 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
2025 shadowing the outer parameter or variables by the declaration of
2026 nested function in nested structure or class. Warn the shadowing by
2027 the declaration of nested lambda expression.
2029 2010-05-13 Jason Merrill <jason@redhat.com>
2031 * typeck.c (cp_build_array_ref): Factor out from...
2032 (build_array_ref): ...here. Drop complain parm.
2033 (build_new_op): Adjust.
2034 * class.c (build_vtbl_ref_1): Adjust.
2035 * decl2.c (grok_array_decl): Adjust.
2036 * cp-tree.h: Adjust prototypes.
2038 2010-05-13 Jan Hubicka <jh@suse.cz>
2040 * decl.c (cp_finish_decl): Do not worry about used attribute.
2042 2010-05-12 Jason Merrill <jason@redhat.com>
2044 * typeck.c (build_array_ref): Take complain parm.
2045 * cp-tree.h: Add it to prototype.
2046 * call.c (build_new_op): Pass it.
2047 * class.c (build_vtbl_ref): Pass it.
2048 * decl2.c (grok_array_decl): Pass it.
2052 * cp-tree.def (NULLPTR_TYPE): Remove.
2053 * cp-tree.h (NULLPTR_TYPE_P): New.
2054 (SCALAR_TYPE_P): Use it.
2055 (nullptr_type_node): New.
2056 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
2057 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
2059 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
2060 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2061 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
2062 * mangle.c (write_type): Likewise.
2063 * name-lookup.c (arg_assoc_type): Likewise.
2064 * typeck.c (build_reinterpret_cast_1): Likewise.
2065 * rtti.c (typeinfo_in_lib_p): Likewise.
2066 (emit_support_tinfos): Remove local nullptr_type_node.
2068 * cp-tree.h (UNKNOWN_TYPE): Remove.
2069 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
2070 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
2071 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
2072 * class.c (instantiate_type): Check unknown_type_node rather than
2074 * name-lookup.c (maybe_push_decl): Likewise.
2075 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2076 (get_typeid): Likewise.
2077 * semantics.c (finish_offsetof): Likewise.
2080 * call.c (add_template_candidate_real): If deduction fails, still
2081 add the template as a non-viable candidate.
2082 (equal_functions): Handle template candidates.
2083 (print_z_candidate): Likewise.
2084 (print_z_candidates): Likewise.
2085 (build_new_function_call): Likewise.
2087 * cp-tree.h (LOOKUP_LIST_ONLY): New.
2088 * call.c (add_candidates): Enforce it.
2089 (build_new_method_call): Try non-list ctor if no viable list ctor.
2090 (build_user_type_conversion_1): Likewise.
2092 * call.c (add_candidates): Distinguish between type(x) and
2094 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
2095 (build_new_method_call): Give better error for conversion op.
2097 * call.c (add_candidates): Add first_arg and return_type parms.
2098 Add special constructor/conversion op handling.
2099 (convert_class_to_reference): Use it.
2100 (build_user_type_conversion_1): Likewise.
2101 (build_op_call): Likewise.
2102 (build_new_method_call): Likewise.
2103 (build_new_op): Adjust.
2104 (perform_overload_resolution): Adjust.
2106 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
2111 * pt.c (process_partial_specialization): Return error_mark_node
2112 in case of unused template parameters in partial specialization.
2114 2010-05-11 Jakub Jelinek <jakub@redhat.com>
2117 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
2118 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
2119 look at its second operand.
2121 2010-05-10 Jason Merrill <jason@redhat.com>
2124 * semantics.c (baselink_for_fns): Revert earlier change.
2127 * typeck.c (cp_build_modify_expr): Complain about assignment to
2128 array from init list.
2130 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
2133 * decl.c (check_initializer): strip array type before checking for
2134 uninitialized const or ref members.
2136 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
2139 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
2140 error count. Emit errors only if compain is true.
2141 (build_new_1): Do not return error_mark_node if
2142 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
2143 errors. Delay the check for user-provided constructor.
2144 (perform_member_init): Adjust.
2145 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
2148 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
2149 Jason Merrill <jason@redhat.com>
2151 Add support for C++0x nullptr.
2152 * cp-tree.def: Add NULLPTR_TYPE.
2153 * cp-tree.h: Add nullptr_node.
2154 (cp_tree_index): Add CPTI_NULLPTR.
2155 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
2156 * call.c (null_ptr_cst_p): Handle nullptr.
2157 (standard_conversion): Likewise.
2158 (convert_arg_to_ellipsis): Likewise.
2159 * mangle.c (write_type): Likewise.
2160 * name-lookup.c (arg_assoc_type): Likewise.
2161 * parser.c (cp_parser_primary_expression): Likewise.
2162 * typeck.c (cp_build_binary_op): Likewise.
2163 (build_reinterpret_cast_1): Likewise.
2164 * error.c (dump_type): Likewise.
2165 (dump_type_prefix, dump_type_suffix): Likewise.
2166 * decl.c (cxx_init_decl_processing): Likewise.
2167 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2168 * cvt.c (ocp_convert): Likewise.
2169 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
2170 nullptr_t tinfo in libsupc++.
2172 2010-05-06 Jason Merrill <jason@redhat.com>
2174 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
2176 2010-04-22 Jakub Jelinek <jakub@redhat.com>
2177 Dodji Seketeli <dodji@redhat.com>
2180 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
2182 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
2183 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
2184 (decay_conversion, perform_integral_promotions): Call rvalue_use.
2185 (cp_build_unary_op): Call lvalue_use.
2186 * decl.c (unused_but_set_errorcount): New variable.
2187 (poplevel): Issue -Wunused-but-set-variable diagnostics.
2188 (duplicate_decls): Merge DECL_READ_P flags.
2189 (start_cleanup_fn): Set DECL_READ_P flag.
2190 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
2191 * tree.c (rvalue): Call rvalue_use.
2192 * pt.c (convert_nontype_argument): Likewise.
2193 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
2194 finish_decltype_type): Likewise.
2195 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
2196 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
2197 or rvalue_use depending on the expr.
2198 * init.c (build_new, build_delete): Likewise.
2199 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
2201 2010-05-05 Jason Merrill <jason@redhat.com>
2204 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
2205 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
2207 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2210 * pt.c (unify): Check each elt for error_mark_node.
2212 2010-05-04 Jason Merrill <jason@redhat.com>
2215 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
2217 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2220 * call.c (build_new_method_call): Return error_mark_node if fns is
2223 2010-05-03 Dodji Seketeli <dodji@redhat.com>
2226 * pt.c (most_specialized_class): Pretend we are processing
2227 a template decl during the call to coerce_template_parms.
2229 2010-05-03 Jason Merrill <jason@redhat.com>
2233 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
2234 from the selected underlying type unless -fstrict-enums. Set
2235 ENUM_UNDERLYING_TYPE to have the restricted range.
2236 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
2237 * class.c (check_bitfield_decl): Likewise.
2239 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
2242 * init.c (build_new_1): Revert the accidental checkin in
2245 2010-04-30 Jason Merrill <jason@redhat.com>
2248 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
2249 (pp_cxx_type_specifier_seq): ...here.
2251 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
2253 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
2254 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
2256 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
2259 * typeck.c (warn_args_num): New function.
2260 (convert_arguments): Use warn_args_num to print the diagnostic
2263 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
2266 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
2267 user-provided constructor while recursing.
2269 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
2272 * error.c (print_instantiation_partial_context_line): Handle
2273 recursive instantiation.
2274 (print_instantiation_partial_context): Likewise.
2276 2010-04-27 Jason Merrill <jason@redhat.com>
2278 * init.c (perform_member_init): Check CLASS_TYPE_P.
2280 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2283 * init.c (perform_member_init): check for uninitialized const or
2284 reference members, including array types.
2286 2010-04-24 Jason Merrill <jason@redhat.com>
2288 * tree.c (get_fns): Split out from get_first_fn.
2289 * cp-tree.h: Declare it.
2290 * search.c (shared_member_p): Use it.
2291 * semantics.c (finish_qualified_id_expr): Simplify.
2292 (finish_id_expression): Simplify.
2294 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
2295 whenever object is NULL_TREE. Don't do 'this' capture here.
2296 (finish_qualified_id_expr): Pass NULL_TREE.
2297 (finish_id_expression): Likewise.
2298 (lambda_expr_this_capture): Likewise.
2300 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
2301 rather than checking current_class_ref directly.
2302 (finish_call_expr): Likewise.
2305 * name-lookup.c (qualify_lookup): Disqualify lambda op().
2306 * class.c (current_nonlambda_class_type): New fn.
2307 * semantics.c (nonlambda_method_basetype): New.
2308 * cp-tree.h: Declare them.
2309 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
2311 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
2314 * semantics.c (lambda_return_type): Complain about
2318 * tree.c (cv_unqualified): Handle error_mark_node.
2321 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
2322 if we don't want errors.
2325 * class.c (convert_to_base): Add complain parameter. Pass
2326 ba_quiet to lookup_base if we don't want errors.
2327 (build_vfield_ref): Pass complain to convert_to_base.
2328 * call.c (convert_like_real): Likewise.
2329 (initialize_reference): Likewise.
2330 (perform_direct_initialization_if_possible): Pass complain to
2332 * cp-tree.h: Adjust.
2334 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2335 Jason Merrill <jason@redhat.com>
2338 * decl.c (check_for_uninitialized_const_var): Handle classes that need
2340 (check_initializer): Call it for classes that need constructing, too.
2341 * class.c (in_class_defaulted_default_constructor): New.
2342 * cp-tree.h: Declare it.
2344 2010-04-20 Jason Merrill <jason@redhat.com>
2347 * init.c (constant_value_1): Treat error_mark_node as a constant
2348 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
2349 * cvt.c (ocp_convert): Handle getting error_mark_node from
2350 integral_constant_value.
2351 * decl.c (compute_array_index_type): Likewise.
2353 2010-04-20 Dodji Seketeli <dodji@redhat.com>
2357 * typeck.c (incompatible_dependent_types_p): If one of the
2358 compared types if not a typedef then honour their main variant
2361 2010-04-20 Jakub Jelinek <jakub@redhat.com>
2363 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
2365 2010-04-19 Dodji Seketeli <dodji@redhat.com>
2368 * typeck.c (structural_comptypes): Test dependent typedefs
2369 incompatibility before testing for their main variant based
2372 2010-04-19 Jakub Jelinek <jakub@redhat.com>
2374 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
2375 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
2377 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2379 * decl.c (cxx_init_decl_processing): Remove second argument in call to
2380 build_common_tree_nodes.
2382 2010-04-14 Jason Merrill <jason@redhat.com>
2385 * parser.c (cp_parser_parenthesized_expression_list): Change
2386 is_attribute_list parm to int to indicate whether or not to
2387 handle initial identifier specially.
2388 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
2390 2010-04-13 Jason Merrill <jason@redhat.com>
2392 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
2394 * parser.c (cp_parser_lambda_expression): Complain about lambda in
2395 unevaluated context.
2396 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
2398 2010-04-12 Jason Merrill <jason@redhat.com>
2401 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
2402 return value directly.
2404 * call.c (type_decays_to): Call cv_unqualified for non-class type.
2406 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
2409 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
2410 * init.c (build_new_1): Check for uninitialized const members and
2411 uninitialized reference members, when using new without
2412 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
2413 (diagnose_uninitialized_cst_or_ref_member): Define, call
2414 diagnose_uninitialized_cst_or_ref_member_1.
2415 (diagnose_uninitialized_cst_or_ref_member_1): New function.
2417 2010-04-12 Richard Guenther <rguenther@suse.de>
2420 * semantics.c (expand_or_defer_fn_1): Do not keep extern
2421 template inline functions.
2423 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
2426 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
2429 2010-04-07 Jason Merrill <jason@redhat.com>
2432 * decl.c (start_preparsed_function): Do defer nested functions.
2434 PR c++/11094, DR 408
2435 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
2436 * decl2.c (finish_static_data_member_decl): Set it.
2437 * decl.c (duplicate_decls): Propagate it.
2438 * pt.c (tsubst_decl): Don't substitute the domain of an array
2439 VAR_DECL if it's set.
2440 (regenerate_decl_from_template): Substitute it here.
2441 (type_dependent_expression_p): Return true if it's set.
2442 * semantics.c (finish_decltype_type): Instantiate such a variable.
2443 * typeck.c (cxx_sizeof_expr): Likewise.
2444 (strip_array_domain): New.
2447 * name-lookup.c (current_decl_namespace): Non-static.
2448 (pop_nested_namespace): Sanity check.
2449 * cp-tree.h: Declare current_decl_namespace.
2450 * decl.c (grokvardecl): Use it instead of current_namespace.
2451 (grokfndecl): Likewise.
2454 * pt.c (tsubst_friend_function): Instatiate a friend that has already
2457 * pt.c (print_template_statistics): New.
2458 * cp-tree.h: Declare it.
2459 * tree.c (cxx_print_statistics): Call it.
2462 * decl.c (grokvardecl): Tweak warning message.
2463 (grokfndecl): Likewise.
2465 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2468 *pt.c (tsubst_decl): Get the arguments of a specialization from
2469 the specialization template, not from the most general template.
2471 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2474 * typeck2.c (process_init_constructor_record):
2475 value-initialize members that are are not explicitely
2478 2010-04-07 Jie Zhang <jie@codesourcery.com>
2481 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
2482 when all of its elements are non-constant and have been split out.
2484 2010-04-06 Taras Glek <taras@mozilla.com>
2485 Jason Merrill <jason@redhat.com>
2487 * parser.c (cp_parser_class_specifier): Set class location to that
2488 of IDENTIFIER_NODE instead of '{' when possible.
2489 * semantics.c (begin_class_definition): Do not overide locations
2490 with less precise ones.
2492 2010-04-06 Jason Merrill <jason@redhat.com>
2495 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
2498 * pt.c (maybe_update_decl_type): Check the return value from
2501 2010-04-01 Jason Merrill <jason@redhat.com>
2503 * decl.c (next_initializable_field): No longer static.
2504 * cp-tree.h: Declare it.
2505 * call.c (build_aggr_conv): Fail if there are more initializers
2506 than initializable fields.
2508 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
2509 instead of void_zero_node.
2511 2010-03-31 Dodji Seketeli <dodji@redhat.com>
2514 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
2515 * pt.c (end_template_parm_list): Store sibling template parms of
2516 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2517 (push_template_decl_real): Don't store the containing template decl
2518 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
2519 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
2520 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2523 2010-03-30 Jason Merrill <jason@redhat.com>
2526 * pt.c (push_template_decl_real): Deal better with running out of
2527 scopes before running out of template parms.
2531 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
2532 function parameter context. Don't print an error if parsing
2536 * pt.c (more_specialized_fn): Don't control cv-qualifier check
2539 2010-03-26 Jason Merrill <jason@redhat.com>
2542 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
2543 c++0x mode, but not other type-names.
2545 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2548 * pt.c (add_to_template_args): Support NULL ARGS;
2549 (most_specialized_class): call coerce_template_parms on
2550 template arguments passed to get_class_bindings. Use
2551 add_to_template_args.
2552 (unify): Handle VAR_DECLs.
2554 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2556 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
2558 * pt.c (get_template_parms_at_level): Adjust.
2560 2010-03-25 Dodji Seketeli <dodji@redhat.com>
2563 * cp-tree.h (get_template_parms_at_level): Declare ...
2564 * pt.c (get_template_parms_at_level): ... new function.
2565 * typeck.c (get_template_parms_of_dependent_type): If a template
2566 type parm's DECL_CONTEXT isn't yet set, get its siblings from
2567 current_template_parms. Use get_template_parms_at_level. Remove
2569 (incompatible_dependent_types_p): If we get empty parms from just one
2570 of the template type parms we are comparing then the template parms are
2573 2010-03-24 Jason Merrill <jason@redhat.com>
2576 * parser.c (make_declarator): Initialize id_loc.
2577 (cp_parser_lambda_declarator_opt): And set it.
2579 2010-03-23 Jason Merrill <jason@redhat.com>
2581 Make lambda conversion op and op() non-static.
2582 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
2583 Also add the thunk function returned by the conversion op.
2584 Mark the conversion deleted if the op() is variadic.
2585 * decl2.c (mark_used): Give helpful message about deleted conversion.
2586 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
2587 * semantics.c (finish_this_expr): Adjust.
2588 * mangle.c (write_closure_type_name): Adjust.
2589 * decl.c (grok_op_properties): Don't allow it.
2590 * call.c (build_user_type_conversion_1): No static conversion ops.
2591 (build_op_call): Or op().
2593 * decl2.c (change_return_type): Fix 'this' quals.
2595 2010-03-22 Jason Merrill <jason@redhat.com>
2598 * tree.c (pod_type_p): Use old meaning in C++98 mode.
2601 * pt.c (contains_auto_r): New fn.
2602 (do_auto_deduction): Use it.
2603 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
2605 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
2608 * decl2.c (grokfield): Handle invalid initializers for member
2611 2010-03-20 Dodji Seketeli <dodji@redhat.com>
2614 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
2616 * decl2.c (vague_linkage_p): Likewise.
2618 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
2621 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
2622 false, in the cp_parser_expression_statement call.
2624 2010-03-05 Jason Merrill <jason@redhat.com>
2626 * mangle.c (mangle_decl): Give name collision error even without
2629 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
2631 * pt.c (process_partial_specialization): Use error_n instead of
2634 2010-03-03 Jason Merrill <jason@redhat.com>
2637 * mangle.c (mangle_decl): Handle VAR_DECL, too.
2639 2010-03-03 Jason Merrill <jason@redhat.com>
2642 * mangle.c: Include cgraph.h.
2643 (mangle_decl): If the mangled name will change in a later
2644 ABI version, make the later mangled name an alias.
2645 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
2646 * Make-lang.in (mangle.o): Depend on cgraph.h.
2647 * method.c (make_alias_for): Handle VAR_DECL, too.
2648 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
2649 * tree.c (no_linkage_check): Adjust.
2650 * decl.c (maybe_commonize_var): Adjust.
2651 * cp-tree.h: Adjust.
2653 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
2655 * pt.c (redeclare_class_template): Use error_n and inform_n.
2657 2010-02-27 Mark Mitchell <mark@codesourcery.com>
2660 * cp-tree.h (push_tinst_level): Declare.
2661 (pop_tinst_level): Likewise.
2662 * pt.c (push_tinst_level): Give it external linkage.
2663 (pop_tinst_level): Likewise.
2664 * mangle.c (mangle_decl_string): Set the source location to that
2665 of the decl while mangling.
2667 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
2670 * pt.c (redeclare_class_template): Return false if there are erroneous
2671 template parameters.
2673 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
2675 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
2678 2010-02-24 Jason Merrill <jason@redhat.com>
2681 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
2683 * class.c (layout_class_type): Don't give -Wabi warning for a bug
2684 in a previous ABI version.
2686 2010-02-23 Jason Merrill <jason@redhat.com>
2689 * typeck2.c (digest_init_r): Accept value init of array.
2691 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
2694 * typeck.c (convert_arguments): Update error message.
2696 2010-02-22 Mike Stump <mikestump@comcast.net>
2699 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
2701 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
2704 * error.c (print_instantiation_partial_context_line): New.
2705 (print_instantiation_partial_context): Print at most 12 contexts,
2706 skip the rest with a message.
2708 2010-02-21 Dodji Seketeli <dodji@redhat.com>
2711 * pt.c (lookup_template_class): Better support of specialization
2712 of member of class template implicit instantiation.
2714 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
2717 * call.c (conversion_null_warnings): Replace -Wconversion with
2719 * cvt.c (build_expr_type_conversion): Likewise.
2721 2010-02-18 Jason Merrill <jason@redhat.com>
2724 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
2727 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
2729 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
2730 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
2733 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
2737 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
2738 (maybe_update_decl_type): New fn.
2739 * parser.c (cp_parser_init_declarator): Use it.
2742 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
2744 2010-02-17 Jason Merrill <jason@redhat.com>
2747 * call.c (build_over_call): Don't create zero-sized assignments.
2748 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
2749 * cp-objcp-common.c (cp_expr_size): Remove.
2750 * cp-tree.h: Remove prototype.
2753 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
2754 decl we looked up doesn't match.
2757 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
2758 have an INIT_EXPR anymore.
2761 * pt.c (convert_nontype_argument): Change assert to test.
2763 2010-02-16 Jason Merrill <jason@redhat.com>
2765 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
2768 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
2769 VIEW_CONVERT_EXPR for conversions between structural equality types
2770 that the back end can't tell are the same.
2773 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
2774 cv-quals from element here.
2775 (cp_build_qualified_type_real): Not here. Preserve typedef name.
2777 2010-02-14 Jason Merrill <jason@redhat.com>
2780 * semantics.c (finish_compound_literal): Use
2781 cp_apply_type_quals_to_decl when creating a static variable.
2783 2010-02-12 Jason Merrill <jason@redhat.com>
2786 * name-lookup.h (current_binding_level): Check for null
2789 2010-02-12 Jason Merrill <jason@redhat.com>
2792 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
2794 2010-02-12 Jakub Jelinek <jakub@redhat.com>
2797 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
2800 2010-02-10 Jason Merrill <jason@redhat.com>
2803 * semantics.c (outer_lambda_capture_p): Revert.
2804 (add_capture): Only finish_member_declaration if
2805 we're in the lambda class.
2806 (register_capture_members): New.
2807 * cp-tree.h: Declare it.
2808 * parser.c (cp_parser_lambda_expression): Call it.
2810 2010-02-10 Jason Merrill <jason@redhat.com>
2813 * semantics.c (outer_lambda_capture_p): Use current_function_decl
2814 instead of current_class_type.
2816 2010-02-10 Jason Merrill <jason@redhat.com>
2818 PR c++/42983, core issue 906
2819 * method.c (defaultable_fn_check): Check virtualness.
2821 2010-02-10 Jason Merrill <jason@redhat.com>
2824 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
2826 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
2828 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
2829 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
2831 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
2832 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
2833 (cp_parser_parameter_declaration)
2834 (cp_parser_exception_specification_opt)
2835 (cp_parser_exception_declaration): Likewise.
2836 * pt.c (check_default_tmpl_args): Likewise.
2837 * search.c (lookup_field_r): Likewise.
2839 2010-02-09 Jason Merrill <jason@redhat.com>
2842 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
2844 2010-02-09 Jason Merrill <jason@redhat.com>
2847 * decl2.c (change_return_type): New fn.
2848 * semantics.c (apply_lambda_return_type): Use it.
2849 * cp-tree.h: Declare it.
2851 2010-02-05 Richard Guenther <rguenther@suse.de>
2853 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
2854 * cp-lang.c: Include gt-cp-cp-lang.h.
2855 * config-lang.in (gtfiles): Add cp/cp-lang.c.
2857 2010-02-05 Dodji Seketeli <dodji@redhat.com>
2860 * typeck.c (get_template_parms_of_dependent_type): Try getting
2861 the template parameters fromt the type itself first.
2863 2010-02-03 Jason Merrill <jason@redhat.com>
2867 * mangle.c (write_unqualified_id): Split out from write_expression.
2868 (write_unqualified_name): Call it.
2869 (write_member_name): Likewise.
2870 (write_expression): Support TEMPLATE_ID_EXPR.
2871 Disambiguate operator names.
2874 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
2877 2010-02-02 Jason Merrill <jason@redhat.com>
2880 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
2881 * optimize.c (clone_body): Remap their initializers when making base
2883 (maybe_clone_body): Complain if multiple clones aren't safe.
2885 2010-01-29 Dodji Seketeli <dodji@redhat.com>
2892 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
2893 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
2894 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
2895 * pt.c (coerce_template_parms, type_unification_real,
2896 expand_template_argument_pack, coerce_template_parameter_pack):
2897 Set the non default template args count.
2898 (current_template_args): Always set non defaulted
2899 template args count when compiled with --enable-checking
2900 (tsubst_template_args, type_unification_real): Propagate the non
2901 defaulted template args count.
2902 * error.c (get_non_default_template_args_count): Renamed
2903 count_non_default_template_args into this. Don't calculate the
2904 non default template argument count anymore. Use the new
2905 accessor macros above to get it.
2906 (dump_template_argument_list, dump_type, dump_decl,
2907 dump_template_parms): Adjust.
2908 * parser.c (cp_parser_template_argument_list): Always set defaulted
2909 template args count when compiled with --enable-checking.
2911 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
2913 * decl.c (redeclaration_error_message): Wrap the return messages into
2914 G_() for easy translation.
2916 2010-01-28 Jason Merrill <jason@redhat.com>
2919 * semantics.c (begin_class_definition): Don't use type_as_string.
2921 2010-01-28 Dodji Seketeli <dodji@redhat.com>
2925 * typeck.c (get_template_parms_of_dependent_type): Factorized
2926 this out of incompatible_template_type_parms_p
2927 (incompatible_dependent_types_p): Renamed
2928 incompatible_template_type_parms_p into this. Make it detect
2929 two incompatible dependent typedefs too.
2930 (structural_comptypes): Use incompatible_dependent_types_p.
2931 * pt.c (get_template_info):
2932 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
2934 2010-01-20 Janis Johnson <janis187@us.ibm.com>
2935 Jason Merrill <jason@redhat.com>
2937 * mangle.c (write_type): Mangle transparent record as member type.
2938 * semantics.c (begin_class_definition): Recognize decimal classes
2939 and set TYPE_TRANSPARENT_AGGR.
2941 2010-01-20 Jason Merrill <jason@redhat.com>
2944 * mangle.c (write_expression): Handle tree codes that have extra
2945 arguments in the middle-end.
2947 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
2950 * except.c (expand_start_catch_block): Deal correctly with
2951 do_begin_catch returning error_mark_node.
2953 2010-01-20 Jason Merrill <jason@redhat.com>
2956 * class.c (layout_class_type): Set packed_maybe_necessary for packed
2960 * semantics.c (build_lambda_object): Call mark_used on captured
2964 * decl.c (grokdeclarator): Clear type_quals for a member function
2965 declared using a typedef. Don't complain about adding cv-quals
2966 to a function typedef in C++0x mode.
2968 2010-01-20 Jakub Jelinek <jakub@redhat.com>
2970 * decl.c (create_array_type_for_decl): Remove set but not used
2971 variable error_msg. Remove break stmts after return stmts.
2973 2010-01-19 Dodji Seketeli <dodji@redhat.com>
2975 * error.c (dump_template_parms, count_non_default_template_args):
2976 Revert fix of PR c++/42634.
2978 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2981 * error.c (dump_template_parms): Use innermost template
2982 arguments before calling count_non_default_template_args.
2983 (count_non_default_template_args): We are being called with
2984 template innermost arguments now. There is no need to ensure
2987 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2990 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
2992 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2995 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
2997 2010-01-17 Dodji Seketeli <dodji@redhat.com>
3000 *pt.c (tsubst_decl): Get the arguments of a specialization from
3001 the specialization template, not from the most general template.
3003 2010-01-16 Jason Merrill <jason@redhat.com>
3006 * semantics.c (finish_decltype_type): Within a template, treat
3007 unresolved CALL_EXPR as dependent.
3009 2010-01-15 Dodji Seketeli <dodji@redhat.com>
3011 * error.c (dump_template_parms,count_non_default_template_args):
3012 Revert changes of PR c++/42634.
3014 2010-01-14 Jakub Jelinek <jakub@redhat.com>
3017 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
3018 functions with noreturn attribute.
3020 2010-01-14 Jason Merrill <jason@redhat.com>
3023 * call.c (build_new_method_call): Don't free the vec here.
3026 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
3028 2010-01-13 Dodji Seketeli <dodji@redhat.com>
3031 * error.c (dump_template_parms): Use innermost template
3032 arguments before calling count_non_default_template_args.
3033 (count_non_default_template_args): We are being called with
3034 template innermost arguments now. There is no need to ensure
3037 2010-01-07 Dodji Seketeli <dodji@redhat.com>
3040 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
3041 arguments that were previously deduced.
3043 2010-01-05 Jason Merrill <jason@redhat.com>
3045 * pt.c (unify_pack_expansion): Handle deduction from init-list.
3046 * call.c (build_over_call): Don't complain about it.
3048 2010-01-04 Jason Merrill <jason@redhat.com>
3051 * pt.c (tsubst_decl): Don't apply type attributes in place.
3054 * semantics.c (describable_type): Remove decltype comment and
3059 Copyright (C) 2010 Free Software Foundation, Inc.
3061 Copying and distribution of this file, with or without modification,
3062 are permitted in any medium without royalty provided the copyright
3063 notice and this notice are preserved.