1 2010-10-06 Eric Botcazou <ebotcazou@adacore.com>
4 * typeck.c (cp_build_addr_expr_1): Add check for incomplete types in
5 code folding offsetof-like computations.
7 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
10 * parser.c (cp_parser_objc_class_interface): If no identifier
11 follows an @interface token, stop parsing the interface after
13 (cp_parser_objc_class_implementation): If no identifier follows an
14 @implementation token, stop parsing the implementation after
17 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
20 * parser.c (cp_parser_objc_method_keyword_params): If the required
21 colon is not found while parsing parameters, stop parsing them.
23 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
26 * parser.c (cp_parser_objc_class_ivars): Do not eat the EOF or
27 @end after detecting it. Print an error if @end is found without
29 (cp_parser_objc_method_prototype_list): Do not eat the EOF after
30 detecting it. Fixed reading the next token when continuing
31 because of an error in a method signature. Print an error if EOF
32 is found without an '@end'.
33 (cp_parser_objc_method_definition_list): Same change.
35 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
37 Merge from apple/trunk branch on FSF servers:
39 2005-10-17 Fariborz Jahanian <fjahanian@apple.com>
42 * parser.c (cp_parser_objc_method_keyword_params): Check for valid
43 method parameters and issue error.
44 (cp_parser_objc_method_definition_list): Check for invalid tokens
45 which cannot start a function definition.
47 2005-10-14 Fariborz Jahanian <fjahanian@apple.com>
50 * parser.c (cp_parser_objc_message_args): Check for missing message
51 arguments and syntax error.
53 2005-10-13 Fariborz Jahanian <fjahanian@apple.com>
56 * parser.c (cp_parser_objc_class_ivars): Check for @end/eof while
59 2005-08-15 Ziemowit Laski <zlaski@apple.com>
62 * parser.c (cp_parser_objc_interstitial_code): Catch stray
63 '{' and '}' tokens and issue appropriate errors.
65 2005-08-02 Ziemowit Laski <zlaski@apple.com>
68 (cp_parser_statement_seq_opt): In addition to '}' and
69 end-of-file, a statement sequence may also be terminated
72 2010-10-05 Joseph Myers <joseph@codesourcery.com>
74 * cp-tree.h (cxx_print_error_function,
75 cxx_initialize_diagnostics): Declare using diagnostic_context
78 2010-10-04 Andi Kleen <ak@linux.intel.com>
80 * Make-lang.in (g++, cc1plus): Add + to build rule.
82 2010-10-04 Jason Merrill <jason@redhat.com>
84 * tree.c (decl_storage_duration): New.
85 * cp-tree.h: Declare it.
86 (duration_kind): Return values.
88 2010-10-03 Jason Merrill <jason@redhat.com>
90 * typeck.c (require_complete_type_sfinae): Add complain parm to...
91 (require_complete_type): ...this function.
92 (cp_build_array_ref, convert_arguments): Use it.
93 (convert_for_initialization, cp_build_modify_expr): Likewise.
94 * cp-tree.h: Declare it.
95 * call.c (build_over_call): Use it.
97 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
99 merge from FSF 'apple/trunk' branch.
100 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
103 * cp/parser.c (cp_parser_objc_interstitial_code): For
104 @optional/@required set the optional/required flag.
106 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
108 * parser.c (cp_lexer_get_preprocessor_token): Tidied up comments
109 and indentation when finding an Objective-C++ CPP_AT_NAME token.
111 2010-09-29 Richard Guenther <rguenther@suse.de>
113 * cp-tree.h (CP_DECL_CONTEXT): Check DECL_FILE_SCOPE_P.
114 (CP_TYPE_CONTEXT): Similar.
115 (FROB_CONTEXT): Frob global_namespace to the global
116 TRANSLATION_UNIT_DECL.
117 * decl.c (cxx_init_decl_processing): Build a TRANSLATION_UNIT_DECL,
118 set DECL_CONTEXT of global_namespace to it.
119 (start_decl): Use CP_DECL_CONTEXT and test TYPE_P
120 instead of zeroing context.
121 (cp_finish_decl): Use DECL_FILE_SCOPE_P.
122 (grokfndecl): Likewise.
123 (start_preparsed_function): Likewise.
124 * name-lookup.c (maybe_push_decl): Use DECL_NAMESPACE_SCOPE_P.
125 (namespace_binding): Use SCOPE_FILE_SCOPE_P.
126 * pt.c (template_class_depth): Use CP_TYPE_CONTEXT.
127 (is_specialization_of_friend): Use CP_DECL_CONTEXT.
128 (push_template_decl_real): Likewise.
129 (tsubst_friend_class): Likewise. Adjust context comparisons.
130 (instantiate_class_template): Use CP_TYPE_CONTEXT.
131 (tsubst): Do not substitute into TRANSLATION_UNIT_DECL.
132 * cxx-pretty-print.c (pp_cxx_nested_name_specifier): Use
135 2010-09-29 Yao Qi <yao@codesourcery.com>
137 * decl.c (get_atexit_node): Fix typo.
139 2010-09-28 Jason Merrill <jason@redhat.com>
141 * tree.c (lvalue_kind): Rename from lvalue_p_1, make nonstatic.
142 (real_lvalue_p): Take const_tree.
144 * typeck.c (lvalue_or_else): Make temporary arg a permerror.
145 (cp_build_addr_expr_1): Likewise.
147 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
149 Partially merged from apple/trunk branch on FSF servers:
150 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
151 Radar 3803157 (method attributes)
153 * parser.c (cp_parser_objc_method_keyword_params): Handle attributes.
154 (cp_parser_objc_method_tail_params_opt): Likewise.
155 (cp_parser_objc_method_signature): Likewise.
156 (cp_parser_objc_method_maybe_bad_prefix_attributes): New.
157 (cp_parser_objc_method_prototype_list): Handle attributes.
158 (cp_parser_objc_method_definition_list): Likewise.
160 2010-09-28 Richard Henderson <rth@redhat.com>
162 * cp-lang.c: Include "target.h".
163 (cp_eh_personality): Use targetm.except_unwind_info.
164 * Make-lang.in (cp-lang.o): Update deps.
166 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
168 * parser.c (cp_parser_objc_valid_prefix_attributes): New.
169 (cp_parser_declaration): Parse prefix attributes for ObjC++.
170 (cp_parser_objc_protocol_declaration): Handle attributes.
171 (cp_parser_objc_class_interface): Likewise.
172 (cp_parser_objc_declaration): Likewise.
174 2010-09-27 Jason Merrill <jason@redhat.com>
176 Require lvalues as specified by the standard.
177 * typeck.c (lvalue_or_else): Use real_lvalue_p.
178 (cp_build_addr_expr_1): Split out of cp_build_unary_op.
179 (cp_build_addr_expr, cp_build_addr_expr_strict): Interfaces.
180 (decay_conversion, get_member_function_from_ptrfunc): Adjust.
181 (build_x_unary_op, build_reinterpret_cast_1): Adjust.
182 (build_const_cast_1): Adjust.
183 * cp-tree.h: Declare new fns.
184 * call.c (build_this, convert_like_real, build_over_call): Adjust.
185 (initialize_reference): Adjust.
186 * class.c (build_base_path, convert_to_base_statically): Adjust.
187 (build_vfn_ref, resolve_address_of_overloaded_function): Adjust.
188 * cvt.c (build_up_reference, convert_to_reference): Adjust.
189 * decl.c (register_dtor_fn): Adjust.
190 * decl2.c (build_offset_ref_call_from_tree): Adjust.
191 * except.c (initialize_handler_parm): Adjust.
192 * init.c (build_offset_ref, build_delete, build_vec_delete): Adjust.
193 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Adjust.
194 * tree.c (stabilize_expr): Adjust.
196 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
198 Merge from apple/trunk branch on FSF servers:
200 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
203 * typeck.c (composite_pointer_type): Call objc_have_common_type
204 when comparing two objective-c pointer types.
206 2005-07-18 Ziemowit Laski <zlaski@apple.com>
209 * call.c (standard_conversion): Do not issue warnings when
210 comparing ObjC pointer types.
212 2005-06-22 Ziemowit Laski <zlaski@apple.com>
215 * call.c (standard_conversion): Allow for a pointer conversion
216 between any two ObjC pointer types.
217 * typeck.c (composite_pointer_type): Determine common type
218 for two ObjC pointer types.
220 2010-09-24 Jan Hubicka <jh@suse.cz>
222 * decl.c (finish_function): Use decl_replaceable_p
223 * method.c (make_alias_for_thunk): Update call of cgraph_same_body_alias.
225 2010-09-24 Jason Merrill <jason@redhat.com>
227 * decl.c (compute_array_index_type): Remember type dependence of
229 * pt.c (dependent_type_p_r): Don't recompute it here.
231 * error.c (dump_expr) [CASE_CONVERT]: Print conversion between
232 reference and pointer to the same type as "*" or "&".
234 2010-09-24 Nicola Pero <nicola.pero@meta-innovation.com>
236 * typeck.c (warn_args_num): Use warning 'too many arguments to
237 method [methodname]' for an Objective-C method instead of the less
238 satisfactory 'too many arguments to function' (with no method
241 2010-09-21 Jason Merrill <jason@redhat.com>
243 * mangle.c (write_expression) [SCOPE_REF]: Only do -fabi-version=1
244 special handling if we know the member.
246 2010-09-18 Jason Merrill <jason@redhat.com>
248 * call.c (compare_ics): Do lvalue/rvalue reference binding
249 comparison for ck_list, too.
251 2010-09-15 Jason Merrill <jason@redhat.com>
253 * semantics.c (finish_id_expression): Diagnose use of function
254 parms in evaluated context outside function body.
256 * decl2.c (grokbitfield): Diagnose non-integral width.
258 * call.c (convert_like_real): Use the underlying type of the
259 reference for the temporary.
261 2010-09-15 Jakub Jelinek <jakub@redhat.com>
264 * class.c (build_vtbl_initializer): Use fn instead of init's operand
265 as first argument to FDESC_EXPR.
267 2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
270 * decl.c (grokdeclarator): Check build_memfn_type return value
273 2010-09-13 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
275 * semantics.c (finish_for_stmt): Always test flag_new_for_scope.
276 (begin_range_for_stmt): Likewise.
278 2010-09-11 Rodrigo Rivas <rodrigorivascosta@gmail.com>
280 Implement range-based for-statements.
281 * cp-tree.def (RANGE_FOR_STMT): New.
282 * cp-tree.h (RANGE_FOR_DECL, RANGE_FOR_EXPR, RANGE_FOR_BODY): New.
283 (cp_convert_range_for): Declare.
284 * pt.c (tsubst_expr): Add RANGE_FOR_STMT.
285 (tsubst_copy_and_build): perform_koenig_lookup takes extra argument.
286 * semantics.c (begin_range_for_stmt): New.
287 (finish_range_for_decl): New.
288 (finish_for_stmt): Accept also RANGE_FOR_STMT.
289 (perform_koenig_lookup): Add extra argument include_std.
290 * parser.c (cp_parser_c_for): New with code from
291 cp_parser_iteration_statement().
292 (cp_parser_range_for): New.
293 (cp_convert_range_for): New.
294 (cp_parser_iteration_statement): Add range-for support.
295 (cp_parser_condition): Adjust comment.
296 (cp_parser_postfix_expression): perform_koenig_lookup takes extra
298 * dump.c (cp_dump_tree): Add RANGE_FOR_STMT.
299 * cxx-pretty-print.c: Likewise.
300 * lex.c (cxx_init): Likewise.
301 * name-lookup.c (lookup_function_nonclass): Add extra argument
303 (lookup_arg_dependent): Likewise.
304 * name-lookup.h: Likewise.
306 2010-09-10 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
309 * error.c (maybe_warn_cpp0x): Add new warning
310 CPP0X_INLINE_NAMESPACES.
311 * parser.c (cp_parser_namespace_definition): Likewise.
312 * cp-tree.h (cpp0x_warn_str): Likewise.
314 2010-09-10 Richard Guenther <rguenther@suse.de>
316 * decl.c (reshape_init_vector): For VECTOR_TYPEs, use
317 TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE.
319 2010-09-10 Jan Hubicka <jh@suse.cz>
321 PR tree-optimization/45605
322 * cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in
325 2010-09-08 Jakub Jelinek <jakub@redhat.com>
328 * pt.c (tsubst) <case INTEGER_TYPE>: Call mark_rvalue_use
329 before calling fold_decl_constant_value.
331 2010-09-07 Arnaud Charlet <charlet@adacore.com>
333 * cp-tree.h (build_enumerator): Add new location_t parameter.
334 (build_lang_decl_loc): New function.
335 * decl.c (build_enumerator): New parameter loc. Use it when calling
336 build_decl. Replace build_lang_decl with build_lang_decl_loc.
337 * pt.c (tsubst_enum): Adjust call to build_enumerator.
338 * parser.c (cp_parser_enumerator_definition): Ditto.
339 * lex.c (build_lang_decl_loc): New function.
341 2010-09-06 Dodji Seketeli <dodji@redhat.com>
346 * tree.c (strip_typedefs): Strip typedefs from the context of
349 2010-09-06 Mark Mitchell <mark@codesourcery.com>
351 * typeck.c (cp_build_binary_op): Call do_warn_double_promotion.
352 * call.c (build_conditional_expr): Likewise.
353 (convert_arg_to_ellipsis): Likewise.
355 2010-09-06 Arnaud Charlet <charlet@adacore.com>
357 * parser.c (make_pointer_declarator, make_reference_declarator,
358 make_call_declarator, make_array_declarator): Set declarator->id_loc.
359 (cp_parser_init_declarator): Adjust location of decl if appropriate.
361 2010-09-06 Jason Merrill <jason@redhat.com>
363 * call.c (implicit_conversion): Fix value-init of enums.
364 (convert_like_real): Likewise.
366 * decl.c (cp_finish_decl): Don't change init for auto deduction.
368 * pt.c (fold_non_dependent_expr_sfinae): Split out from...
369 (fold_non_dependent_expr): ...here.
370 (convert_nontype_argument): Use it. Take complain parm.
371 Use perform_implicit_conversion instead of ocp_convert.
372 Allow cv-qual changes.
373 (convert_template_argument): Pass complain down.
374 (tsubst_template_arg): Suppress constant expression warnings.
377 * method.c (synthesized_method_walk): In constructors, also check
378 subobject destructors.
380 * semantics.c (finish_compound_literal): Always build a
383 2010-08-30 Paolo Carlini <paolo.carlini@oracle.com>
386 * decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs.
388 2010-08-30 Jakub Jelinek <jakub@redhat.com>
391 * parser.c (cp_parser_omp_atomic): Handle boolean
392 {PRE,POST}_INCREMENT.
394 2010-08-29 Jason Merrill <jason@redhat.com>
397 * parser.c (cp_parser_parameter_declaration): Pop parameter decls
398 after tentative parsing.
400 2010-08-22 Joseph Myers <joseph@codesourcery.com>
402 * Make-lang.in (g++spec.o): Update dependencies.
403 * g++spec.c: Include opts.h
404 (MATH_LIBRARY, LIBSTDCXX): Remove initial "-l".
405 (lang_specific_driver): Use cl_decoded_option structures.
407 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
409 * call.c: Use FOR_EACH_VEC_ELT.
414 * except.c: Likewise.
415 * mangle.c: Likewise.
416 * method.c: Likewise.
417 * name-lookup.c: Likewise.
418 * parser.c: Likewise.
421 * semantics.c: Likewise.
422 * typeck2.c: Likewise.
424 2010-08-19 Jason Merrill <jason@redhat.com>
426 * call.c (reference_related_p): Check for error_mark_node.
427 (add_function_candidate): Check it instead of
428 same_type_ignoring_top_level_qualifiers_p.
431 * init.c (build_new_1): Don't use build_value_init in a template.
432 (build_value_init): Make sure we don't.
435 * cp-gimplify.c (cp_gimplify_expr): Also remove assignment
436 of empty class CONSTRUCTOR.
438 * except.c (pending_noexcept, pending_noexcept_checks): New.
439 (perform_deferred_noexcept_checks): New.
440 (maybe_noexcept_warning): Split from...
441 (finish_noexcept_expr): ...here. Adjust.
442 * decl2.c (cp_write_global_declarations): Call
443 perform_deferred_noexcept_checks.
444 * cp-tree.h: And declare it.
446 2010-08-18 Nathan Froyd <froydnj@codesourcery.com>
449 * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to
452 2010-08-17 Kai Tietz <kai.tietz@onevision.com>
454 * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
455 or if -fms-extensions is enabled check, check permissive.
457 2010-08-09 Jason Merrill <jason@redhat.com>
460 * pt.c (lookup_template_class): Don't re-coerce outer parms.
462 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
464 * call.c (add_builtin_candidates): Use VECs for local variable
465 `types'. Adjust remainder of function accordingly.
467 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
469 * name-lookup.c (is_associated_namespace): Convert local variables
470 to be VECs instead of TREE_LISTs.
472 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
474 * tree.c (varargs_function_p): Use stdarg_p.
476 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
478 * parser.c (cp_default_arg_entry): Declare. Declare a VEC of it.
479 (cp_unparsed_functions_entry): Declare. Declare a VEC of it.
480 (cp_parser) [unparsed_functions_queues]: Rename to unparsed_queues.
481 Change type to a VEC.
482 (unparsed_funs_with_default_args): Define.
483 (unparsed_funs_with_definitions): Define.
484 (push_unparsed_function_queues): New function.
485 (cp_parser_new): Call it.
486 (pop_unparsed_function_queues): New function.
487 (cp_parser_class_specifier): Adjust processing of unparsed functions.
488 (cp_parser_template_declaration_after_export): Use VEC_safe_push.
489 (cp_parser_save_member_function_body): Likewise.
490 (cp_parser_late_parsing_for_member): Call push_unparsed_function_queues
491 and pop_unparsed_function_queues.
492 (cp_parser_late_parsing_default_args): Likewise.
493 (cp_parser_save_default_args): Use VEC_safe_push.
495 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
497 * name-lookup.h (cp_label_binding): Declare. Declare a VEC type
499 (cp_binding_level): Convert shadowed_labels and dead_vars_from_for
501 * decl.c (poplevel): Adjust for type changes.
502 (declare_local_label): Likewise.
504 2010-08-06 Jason Merrill <jason@redhat.com>
506 * typeck.c (complete_type_or_maybe_complain): Split out from...
507 (complete_type_or_else): Here.
508 (build_class_member_access_expr): Call it.
509 (finish_class_member_access_expr): Likewise.
510 * call.c (build_special_member_call): Likewise.
511 * cvt.c (build_expr_type_conversion): Likewise.
512 * init.c (build_new): Likewise.
513 * typeck2.c (build_functional_cast): Likewise.
514 * cp-tree.h: Declare it.
516 * init.c (build_value_init): Add complain parm.
517 (build_value_init_noctor): Likewise.
518 (perform_member_init): Pass it.
519 (expand_aggr_init_1): Likewise.
520 (build_new_1): Likewise.
521 (build_vec_init): Likewise.
522 * pt.c (tsubst_expr): Likewise.
523 * typeck2.c (build_functional_cast): Likewise.
525 * tree.c (build_target_expr_with_type): Handle error_mark_node.
527 * typeck.c (decay_conversion): Any expression with type nullptr_t
530 2010-07-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
533 * decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED.
535 2010-07-27 Jason Merrill <jason@redhat.com>
537 * pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR
538 from build_value_init.
539 * init.c (build_value_init_noctor): Give error for unknown array
542 2010-07-27 Joseph Myers <joseph@codesourcery.com>
544 * cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
546 2010-07-27 Joseph Myers <joseph@codesourcery.com>
548 * cp-objcp-common.c (cxx_initialize_diagnostics): First call
549 c_common_initialize_diagnostics.
550 * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK,
551 LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
553 2010-07-21 Jason Merrill <jason@redhat.com>
555 * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
557 * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
560 2010-07-20 Jeffrey Yasskin <jyasskin@google.com>
563 * pt.c (instantiate_class_template): Propagate the template's
564 location to its instance.
566 2010-07-20 Jason Merrill <jason@redhat.com>
569 * pt.c (tsubst_copy_and_build): Rework last change.
572 * pt.c (tsubst_copy_and_build): Handle partial substitution of
575 2010-07-19 Jason Merrill <jason@redhat.com>
578 * semantics.c (finish_decltype_type): Correct decltype
579 of parenthesized rvalue reference variable.
582 * tree.c (cp_tree_equal): Compare type of *CAST_EXPR.
583 * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR.
585 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com>
588 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t
590 * cp-tree.h: Adjust declaration.
591 * init.c (perform_member_init): Adjust caller.
592 * decl.c (grok_reference_init, cp_finish_decl): Likewise.
593 * typeck2.c (store_init_value): Likewise.
594 (build_functional_cast): Pass complain argument to
595 build_x_compound_expr_from_list.
597 2010-07-16 Jason Merrill <jason@redhat.com>
600 * pt.c (process_partial_specialization): Diagnose partial
601 specialization after instantiation.
602 (most_specialized_class): Add complain parm.
604 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.
606 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
608 * init.c (build_new_1): Use cp_build_function_call_nary instead of
609 cp_build_function_call.
611 2010-07-15 Jason Merrill <jason@redhat.com>
614 * call.c (add_function_candidate): If we're working on an implicit
615 declaration, don't consider candidates that won't match.
616 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
617 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
620 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
621 (TYPE_HAS_USER_OPEQ): New.
622 * decl.c (grok_special_member_properties): Set it.
623 * class.c (add_implicitly_declared_members): Don't lazily declare
624 constructors/operator= if a base or member has a user-declared one.
625 (check_bases_and_members, check_bases): Adjust.
626 (check_field_decls, check_field_decl): Adjust.
628 2010-07-15 Anatoly Sokolov <aesok@post.ru>
630 * decl.c (integer_three_node): Remove.
631 (cxx_init_decl_processing): Do not initialize the integer_three_node.
632 * cp-tree.h (integer_three_node): Remove.
634 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
636 * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
639 * cp-gimplify.c: Likewise.
643 * mangle.c: Likewise.
644 * name-lookup.c: Likewise.
645 * optimize.c: Likewise.
646 * parser.c: Likewise.
649 * search.c: Likewise.
650 * semantics.c: Likewise.
651 * typeck.c: Likewise.
652 * typeck2.c: Likewise.
654 2010-07-14 Jason Merrill <jason@redhat.com>
656 * init.c (sort_mem_initializers): Rename "field_type" to "ctx".
657 (build_field_list): Cache field type.
659 Implement C++0x unrestricted unions (N2544)
660 * class.c (check_field_decl): Loosen union handling in C++0x.
661 * method.c (walk_field_subobs): Split out from...
662 (synthesized_method_walk): ...here. Set msg before loops.
663 (process_subob_fn): Check for triviality in union members.
664 * init.c (sort_mem_initializers): Splice out uninitialized
665 anonymous unions and union members.
666 (push_base_cleanups): Don't automatically destroy anonymous unions
669 2010-07-13 Jason Merrill <jason@redhat.com>
672 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
673 (TYPE_HAS_USER_OPEQ): New.
674 * decl.c (grok_special_member_properties): Set it.
675 * class.c (add_implicitly_declared_members): Don't lazily declare
676 constructors/operator= if a base or member has a user-declared one.
677 (check_bases_and_members, check_bases): Adjust.
678 (check_field_decls, check_field_decl): Adjust.
679 * method.c (synthesized_method_walk): Initialize check_vdtor.
682 * mangle.c (write_type): Canonicalize.
683 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
684 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
686 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
689 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
691 * typeck.c (get_delta_difference): Update prototype, add a
692 tsubst_flags_t parameter; update get_delta_difference_1 calls and
693 add checks for error_mark_node.
694 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
695 parameter; update lookup_base call.
696 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
697 parameter; update get_delta_difference call and add check for
699 (convert_ptrmem): Update prototype, add a tsubst_flags_t
700 parameter; update get_delta_difference call and add check for
701 error_mark_node; update build_ptrmemfunc call.
702 (build_static_cast_1): Adjust convert_ptrmem call.
703 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
704 (cp_build_unary_op): Adjust build_ptrmemfunc call.
705 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
706 and build_ptrmemfunc calls.
707 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
709 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
712 * call.c (build_temp): Add tsubst_flags_t complain parameter;
713 adjust build_special_member_call call, pass complain.
714 (convert_like_real): Adjust build_temp call, pass complain.
716 2010-07-09 Jason Merrill <jason@redhat.com>
719 * cp-tree.h (BV_LOST_PRIMARY): New macro.
720 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
722 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
724 2010-07-08 Jason Merrill <jason@redhat.com>
727 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
728 virtual bases for covariant thunks.
730 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
732 * cp-tree.h: Do not include toplev.h.
734 2010-07-06 Jason Merrill <jason@redhat.com>
737 * call.c (is_std_init_list): Look through typedefs.
740 * init.c (build_offset_ref): If scope isn't dependent,
741 don't exit early. Look at TYPE_MAIN_VARIANT.
742 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
744 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
746 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
748 * cp-tree.h (impl_conv_void): New type.
749 (convert_to_void): Adjust prototype.
750 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
751 diagnostic for easy translation. Change caller.
752 * typeck.c: Update call to convert_to_void.
753 * semantics.c: Likewise.
756 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
758 * decl.c (cp_finish_decl): Call add_local_decl.
759 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
761 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
763 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
766 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
769 * parser.c (cp_parser_primary_expression): Error if local template is
772 2010-07-02 Le-Chun Wu <lcwu@google.com>
775 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
776 (variable or type) shadows another type.
778 2010-07-02 Jakub Jelinek <jakub@redhat.com>
781 * typeck.c (convert_for_assignment): When converting a convertible
782 vector type or objc++ types, call mark_rvalue_use.
783 * typeck2.c (build_m_component_ref): Use return values from
784 mark_rvalue_use or mark_lvalue_use.
785 * class.c (build_base_path): Likewise.
786 * call.c (build_conditional_expr): Likewise.
788 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
791 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
794 2010-07-01 Richard Guenther <rguenther@suse.de>
796 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
797 predicate we are looking for, allow non-gimplified
800 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
803 * typeck.c (cp_build_unary_op): Early return error_mark_node when
804 arg is NULL_TREE too.
805 * call.c (convert_class_to_reference): Return error_mark_node when
808 2010-06-30 Michael Matz <matz@suse.de>
810 * repo.c (finish_repo): Fix typo.
812 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
814 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
816 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
818 * repo.c (pending_repo): Change type to a VEC.
819 (finish_repo): Adjust for new type of pending_repo.
820 (repo_emit_p): Likewise.
822 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
824 * tree.c: Include gimple.h. Do not include tree-flow.h
825 * decl.c: Do not include tree-flow.h
826 * Make-lang.in: Adjust dependencies.
828 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
830 * decl.c (incomplete_var): Declare. Declare VECs containing them.
831 (incomplete_vars): Adjust comment. Change type to a VEC.
832 (maybe_register_incomplete_var): Adjust for new type.
833 (complete_vars): Adjust iteration over incomplete_vars.
835 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
837 * decl.c (struct named_label_entry): Change type of bad_decls field
839 (poplevel_named_label_1): Adjust for new type of bad_decls.
840 (check_goto): Likewise.
842 2010-06-29 Jason Merrill <jason@redhat.com>
844 Enable implicitly declared move constructor/operator= (N3053).
845 * class.c (add_implicitly_declared_members): A class with no
846 explicitly declared copy or move constructor gets both declared
847 implicitly, and similarly for operator=.
848 (check_bases): A type with no copy ctor does not inhibit
849 a const copy ctor in a derived class. It does mean the derived
851 (check_field_decl): Likewise.
852 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
853 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
854 (trivially_copyable_p): Likewise.
855 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
856 * class.c (finish_struct_bits): Likewise.
857 * tree.c (build_target_expr_with_type): Likewise.
858 * typeck2.c (store_init_value): Likewise.
860 Enable implicitly deleted functions (N2346)
861 * class.c (check_bases_and_members): Adjust lambda flags.
862 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
864 * decl2.c (mark_used): Adjust error for use of deleted function.
866 Machinery to support implicit delete/move.
867 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
868 has_complex_move_ctor, has_complex_move_assign bitfields.
869 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
870 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
871 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
872 (enum special_function_kind): Add sfk_move_assignment.
873 (LOOKUP_SPECULATIVE): New.
874 * call.c (build_over_call): Return early if it's set.
875 (build_over_call): Use trivial_fn_p.
876 * class.c (check_bases): If the base has no default constructor,
877 the derived one is non-trivial. Handle move ctor/op=.
878 (check_field_decl): Likewise.
879 (check_bases_and_members): Handle move ctor/op=.
880 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
881 (type_has_move_constructor, type_has_move_assign): New.
882 * decl.c (grok_special_member_properties): Handle move ctor/op=.
883 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
885 (do_build_copy_constructor): Use it.
886 (do_build_assign_ref): Likewise. Handle move assignment.
887 (build_stub_type, build_stub_object, locate_fn_flags): New.
888 (locate_ctor): Use locate_fn_flags.
889 (locate_copy, locate_dtor): Remove.
890 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
891 (process_subob_fn, synthesized_method_walk): New.
892 (maybe_explain_implicit_delete): New.
893 (implicitly_declare_fn): Use synthesized_method_walk,
894 type_has_trivial_fn, and type_set_nontrivial_flag.
895 (defaulted_late_check): Set DECL_DELETED_FN.
896 (defaultable_fn_check): Handle sfk_move_assignment.
897 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
898 implicitly deleted move ctor/op=.
899 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
900 (lookup_fnfields_slot): New.
901 * semantics.c (omp_clause_info_fndecl): Remove.
902 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
903 get_copy_assign, trivial_fn_p.
904 (trait_expr_value): Adjust call to locate_ctor.
905 * tree.c (special_function_p): Handle sfk_move_assignment.
907 * class.c (type_has_virtual_destructor): New.
908 * cp-tree.h: Declare it.
909 * semantics.c (trait_expr_value): Use it.
911 * call.c (build_over_call): Only give warnings with tf_warning.
913 * name-lookup.c (pop_scope): Handle NULL_TREE.
915 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
916 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
917 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
918 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
919 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
920 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
921 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
922 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
923 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
924 (sfk_assignment_operator): Rename to sfk_copy_assignment.
925 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
926 * search.c, semantics.c, tree.c: Adjust.
928 * pt.c (dependent_scope_ref_p): Remove.
929 (value_dependent_expression_p): Don't call it.
930 (type_dependent_expression_p): Here either.
931 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
932 if the scope isn't dependent.
934 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
938 * pt.c (has_value_dependent_address): New.
939 (value_dependent_expression_p): Check it.
940 (convert_nontype_argument): Likewise. Call decay_conversion before
941 folding if we want a pointer.
942 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
943 scope is the current instantiation.
945 2010-06-28 Jakub Jelinek <jakub@redhat.com>
948 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
951 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
953 * init.c: Do not include except.h.
956 * cp-lang.c: Likewise.
958 * semantics.c: Likewise.
960 * except.c: Likewise.
961 (init_exception_processing): Do not set the removed
962 lang_protect_cleanup_actions here.
963 (cp_protect_cleanup_actions): Make non-static and remove prototype.
964 (doing_eh): New, moved from except.c but removed the do_warning flag.
965 (expand_start_catch_block): Update doing_eh call.
966 (expand_end_catch_block): Likewise.
967 (build_throw): Likewise.
968 * cp-tree.h: Prototype cp_protect_cleanup_actions.
969 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
970 cp_protect_cleanup_actions.
971 * Make-lang.in: Update dependencies.
973 2010-06-26 Jason Merrill <jason@redhat.com>
975 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
976 constructor called with a single argument that takes a reference
977 to the constructor's class.
978 (BAD_CONVERSION_RANK): New.
979 (compare_ics): Use it to compare bad ICSes.
981 2010-06-25 Joseph Myers <joseph@codesourcery.com>
983 * lang-specs.h: Remove +e handling.
985 2010-06-24 Andi Kleen <ak@linux.intel.com>
987 * parser.c: (cp_parser_question_colon_clause):
988 Switch to use cp_lexer_peek_token.
989 Call warn_for_omitted_condop. Call pedwarn for omitted
992 2010-06-22 Jakub Jelinek <jakub@redhat.com>
995 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
996 datum and mark_rvalue_use on component.
999 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
1000 the CALL_EXPR has no arguments.
1002 2010-06-21 Jason Merrill <jason@redhat.com>
1004 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
1006 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
1009 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
1011 * name-lookup.c (struct arg_lookup): Convert namespaces and
1012 classes fields to VEC.
1013 (arg_assoc_namespace): Adjust for new type of namespaces.
1014 (arg_assoc_class): Adjust for new type of classes.
1015 (lookup_arg_dependent): Use make_tree_vector and
1016 release_tree_vector.
1017 * typeck2.c (build_x_arrow): Use vec_member.
1019 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
1022 * error.c (dump_decl): Better wording for anonymous namespace.
1024 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
1026 * class.c (build_vtbl_initializer): Adjust computation of new_position
1027 and which entry to add padding for.
1029 2010-06-16 Jason Merrill <jason@redhat.com>
1031 * except.c (check_noexcept_r): Return the problematic function.
1032 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
1033 * pt.c (tsubst_copy_and_build): Pass it.
1034 * parser.c (cp_parser_unary_expression): Likewise.
1035 * cp-tree.h: Adjust prototype.
1037 * method.c (defaulted_late_check): Give the defaulted method
1038 the same exception specification as the implicit declaration.
1040 2010-06-15 Jason Merrill <jason@redhat.com>
1042 * class.c (add_implicitly_declared_members): Implicit assignment
1043 operators can also be virtual overriders.
1044 * method.c (lazily_declare_fn): Likewise.
1046 * call.c (convert_like_real): Give "initializing argument of"
1047 information for ambiguous conversion. Give source position
1050 * call.c (print_z_candidates): Do print viable deleted candidates.
1051 (joust): Don't choose a deleted function just because its worst
1052 conversion is better than another candidate's worst.
1054 * call.c (convert_like_real): Don't complain about
1055 list-value-initialization from an explicit constructor.
1057 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
1058 DECL_SOURCE_LOCATION directly.
1060 * class.c (type_has_user_provided_default_constructor): Use
1063 * call.c (is_subseq): Handle ck_aggr, ck_list.
1064 (compare_ics): Treat an aggregate or ambiguous conversion to the
1065 same type as involving the same function.
1067 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
1069 * typeck.c (convert_for_assignment): Fix comment. Change message
1070 format from %d to %qP.
1071 (convert_for_initialization): Fix comment.
1073 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
1075 * cp-tree.h (expr_list_kind): New type.
1076 (impl_conv_rhs): New type.
1077 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
1079 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
1080 diagnostics for easy translation. Change caller.
1081 (convert_for_initialization): Use impl_conv_rhs and change caller.
1082 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
1083 diagnostics for easy translation. Change caller.
1084 * decl.c (bad_spec_place): New enum.
1085 (bad_specifiers): Use it and emit the diagnostics for easy
1086 translation. Change caller.
1087 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
1089 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1091 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
1093 * decl2.c (cp_write_global_declarations): Adjust for new type of
1094 decl_namespace_list.
1095 * name-lookup.c (current_decl_namespace): Likewise.
1096 (push_decl_namespace): Likewise.
1097 (pop_decl_namespace): Likewise.
1099 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1101 * call.c (build_java_interface_fn_ref): Call build_function_type_list
1102 instead of build_function_type.
1103 * decl.c (cxx_init_decl_processing): Likewise.
1104 (declare_global_var): Likewise.
1105 (get_atexit_node): Likewise.
1106 (expand_static_init): Likewise.
1107 * decl2.c (start_objects): Likewise.
1108 (start_static_storage_duration_function): Likewise.
1109 * except.c (init_exception_processing): Likewise.
1110 (build_exc_ptr): Likewise.
1111 (build_throw): Likewise.
1112 * rtti.c (throw_bad_cast): Likewise.
1113 (throw_bad_typeid): Likewise.
1114 (build_dynamic_cast_1): Likewise.
1116 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1118 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
1119 (build_op_delete_call): Likewise.
1120 (build_over_call): Likewise.
1121 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1122 * pt.c (process_partial_specialization): Likewise.
1123 (tsubst_template_args): Likewise.
1124 * semantics.c (finish_asm_stmt): Likewise.
1126 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
1128 * decl.c (record_key_method_defined): New, broken out of ...
1129 (finish_function): ... here. Call it.
1130 (start_decl): Treat aliases as definitions.
1132 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1134 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
1136 * pt.c (maybe_process_partial_specialization): Likewise.
1137 (register_specialization): Likewise.
1138 (add_pending_template): Likewise.
1139 (lookup_template_class): Likewise.
1140 (push_tinst_level): Likewise.
1142 * parser.c (cp_lexer_new_main): Likewise.
1143 (cp_lexer_new_from_tokens): Likewise.
1144 (cp_token_cache_new): Likewise.
1145 (cp_parser_context_new): Likewise.
1146 (cp_parser_new): Likewise.
1147 (cp_parser_nested_name_specifier_opt): Likewise.
1148 (cp_parser_template_id): Likewise.
1150 * name-lookup.c (binding_entry_make): Likewise.
1151 (binding_table_construct): Likewise.
1152 (binding_table_new): Likewise.
1153 (cxx_binding_make): Likewise.
1154 (pushdecl_maybe_friend): Likewise.
1155 (begin_scope): Likewise.
1156 (push_to_top_level): Likewise.
1158 * lex.c (init_reswords): Likewise.
1159 (retrofit_lang_decl): Likewise.
1160 (cxx_dup_lang_specific_decl): Likewise.
1161 (copy_lang_type): Likewise.
1162 (cxx_make_type): Likewise.
1164 * decl.c (make_label_decl): Likewise.
1165 (check_goto): Likewise.
1166 (start_preparsed_function): Likewise.
1167 (save_function_data): Likewise.
1169 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
1171 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
1173 * class.c (finish_struct_1): Likewise.
1175 * cp-tree.h (struct lang_type): Add variable_size GTY option.
1176 (struct lang_decl): Likewise.
1178 * parser.c (cp_parser_new): Update comment to not reference
1181 2010-06-07 Jason Merrill <jason@redhat.com>
1184 * error.c (dump_parameters): Mask out TFF_SCOPE.
1185 (dump_simple_decl): Don't print the scope of a PARM_DECL.
1186 (dump_scope): Remove no-op mask.
1189 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
1191 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
1192 * init.c (build_offset_ref): Use it.
1193 * pt.c (maybe_process_partial_specialization): Use it.
1194 (instantiate_class_template): Use it.
1195 * search.c (lookup_base): Use it.
1197 2010-06-07 Jakub Jelinek <jakub@redhat.com>
1200 * expr.c (mark_exp_read): Handle INDIRECT_REF.
1201 * cvt.c (convert_to_void): Handle INDIRECT_REF like
1202 handled_component_p.
1205 * decl.c (initialize_local_var): If TREE_USED is set on the type,
1206 set also DECL_READ_P on the decl.
1208 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1211 * cp-tree.h (typedef_variant_p): Move this declaration to
1213 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1214 * decl.c (grokdeclarator): Do not rename debug info of an
1215 anonymous tagged type named by a typedef.
1217 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
1220 * class.c (check_field_decls): Move the call to
1221 check_bitfield_decl before trying to set the
1222 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
1224 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
1226 * typeck.c: Update include path for moved files.
1229 * cp-gimplify.c: Likewise.
1230 * cp-lang.c: Likewise.
1232 * semantics.c: Likewise.
1233 * cxx-pretty-print.h: Likewise.
1234 * decl2.c: Likewise.
1235 * parser.c: Likewise.
1236 * cp-objcp-common.c: Likewise.
1237 * cp-tree.h: Likewise.
1238 * name-lookup.c: Likewise.
1240 * name-lookup.h: Likewise.
1241 * config-lang.in: Update paths in gtfiles for files in c-family/.
1242 * Make-lang.in: Likewise.
1244 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
1246 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
1247 * typeck.c (build_ptrmemfunc): Likewise.
1249 2010-06-04 Jason Merrill <jason@redhat.com>
1251 * typeck2.c (merge_exception_specifiers): Adjust merging of
1252 throw() and noexcept(true).
1254 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
1255 using an uninitialized variable.
1257 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
1258 (pp_cxx_expression): Likewise.
1260 Implement noexcept-specification (15.4)
1261 * parser.c (cp_parser_exception_specification_opt): Parse it.
1262 Give -Wdeprecated warning about throw() specs.
1263 * pt.c (tsubst_exception_specification): Handle it.
1264 * error.c (dump_exception_spec): Handle it.
1265 (dump_expr): Handle NOEXCEPT_EXPR.
1266 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
1267 * typeck.c (comp_except_specs): Handle compatibility rules.
1268 Change exact parm to take an enum.
1269 * typeck2.c (merge_exception_specifiers): Handle noexcept.
1270 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
1271 (type_throw_all_p, build_noexcept_spec): New fns.
1272 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
1273 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
1274 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
1275 (noexcept_true_spec, noexcept_false_spec): New macros.
1276 * name-lookup.c (pushdecl_maybe_friend): Adjust.
1277 * search.c (check_final_overrider): Adjust.
1278 * decl.c (check_redeclaration_exception_specification): Adjust.
1279 (use_eh_spec_block): Use type_throw_all_p.
1280 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
1281 Give operator new a noexcept-specification in C++0x mode.
1282 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
1283 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
1285 Implement noexcept operator (5.3.7)
1286 * cp-tree.def (NOEXCEPT_EXPR): New.
1287 * except.c (check_noexcept_r, finish_noexcept_expr): New.
1288 * cp-tree.h: Declare finish_noexcept_expr.
1289 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
1290 * pt.c (tsubst_copy_and_build): And tsubst it.
1291 (type_dependent_expression_p): Handle it.
1292 (value_dependent_expression_p): Handle it.
1294 * call.c (build_conditional_expr): Never fold in unevaluated context.
1295 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
1296 * semantics.c (simplify_aggr_init_expr): Likewise.
1297 * typeck.c (merge_types): Call merge_exception_specifiers.
1298 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
1299 DECL_ANTICIPATED for preferring new type.
1301 2010-06-04 Joseph Myers <joseph@codesourcery.com>
1303 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
1306 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1309 * typeck.c (build_class_member_access_expr): Call mark_exp_read
1310 on object for static data members.
1312 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1313 Jason Merrill <jason@redhat.com>
1316 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
1317 with the same type, call mark_lvalue_use on both.
1319 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
1321 * class.c (struct vtbl_init_data_s): Remove last_init field.
1322 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
1324 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
1326 (build_vtt): Likewise.
1327 (initialize_vtable): Take a VEC instead of a tree.
1328 (build_vtt_inits): Change return type to void. Take a VEC **
1329 instead of a tree *; accumulate results into said VEC.
1330 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
1331 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
1332 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
1334 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
1335 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
1337 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
1338 rather than tree_cons.
1339 (build_vbase_offset_vtbl_entries): Likewise.
1340 (add_vcall_offset): Likewise.
1341 (build_rtti_vtbl_entries): Likewise.
1342 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
1343 * decl.c (initialize_artificial_var): Use build_constructor instead
1344 of build_constructor_from_list.
1346 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
1349 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
1352 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
1354 * parser.c (cp_parser_mem_initializer_list): Change error text.
1356 2010-06-02 Jakub Jelinek <jakub@redhat.com>
1358 * cp-objcp-common.c (shadowed_var_for_decl): Change into
1359 tree_decl_map hashtab from tree_map.
1360 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
1361 (init_shadowed_var_for_decl): Adjust initialization.
1364 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
1365 instead of calling mark_exp_read only when not an assignment.
1368 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
1369 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
1370 Set DECL_VALUE_EXPR on var.
1372 2010-06-02 Jason Merrill <jason@redhat.com>
1374 * error.c (dump_type): Improve typedef handling.
1379 * name-lookup.c (same_entity_p): New.
1380 (ambiguous_decl): Multiple declarations of the same entity
1383 2010-06-01 Jason Merrill <jason@redhat.com>
1386 * call.c (add_list_candidates): Prefer the default constructor.
1387 (build_aggr_conv): Treat missing initializers like { }.
1388 * typeck2.c (process_init_constructor_record): Likewise.
1389 * init.c (expand_default_init): Use digest_init for
1390 direct aggregate initialization, too.
1392 * call.c (add_list_candidates): Split out...
1393 (build_user_type_conversion_1): ...from here.
1394 (build_new_method_call): And here.
1395 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
1398 * call.c (build_list_conv): Set list-initialization flags properly.
1400 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
1402 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
1404 2010-06-01 Arnaud Charlet <charlet@adacore.com>
1405 Matthew Gingell <gingell@adacore.com>
1407 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
1408 * decl2.c: Include langhooks.h and c-ada-spec.h.
1409 (cpp_check, collect_source_refs, collect_ada_namespace,
1410 collect_all_refs): New functions.
1411 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
1412 * lang-specs.h: Ditto.
1414 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1416 * cp-tree.h (cp_build_function_call_nary): Declare.
1417 * typeck.c (cp_build_function_call_nary): Define.
1418 * decl.c (register_dtor_fn): Use it instead of
1419 cp_build_function_call.
1420 (cxx_maybe_build_cleanup): Likewise.
1421 * decl2.c (generate_ctor_or_dtor_function): Likewise.
1422 * except.c (do_get_exception_ptr): Likewise.
1423 (do_begin_catch): Likewise.
1424 (do_allocate_exception): Likewise.
1425 (do_free_exception): Likewise.
1426 (build_throw): Likewise. Use cp_build_function_call_vec instead
1427 of cp_build_function_call.
1428 (do_end_catch): Likewise.
1430 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1432 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
1433 (struct cp_declarator): Move id_loc field up.
1435 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1437 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
1438 this file is included before c-common.h. Define GCC_DIAG_STYLE
1439 before including diagnostic-core.h and toplev.h.
1440 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
1441 * pt.c: Include cp-tree.h before c-common.h.
1443 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1445 * tree.c (c_register_addr_space): Add stub.
1447 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1449 * g++spec.c (lang_specific_driver): Use fatal_error instead of
1452 2010-05-28 Dodji Seketeli <dodji@redhat.com>
1454 Revert fix of PR c++/44188
1455 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
1457 * tree.c (typedef_variant_p): Revert moving this definition to
1459 * decl.c (grokdeclarator): Revert naming typedef handling.
1461 2010-05-27 Joseph Myers <joseph@codesourcery.com>
1463 * call.c: Include diagnostic-core.h instead of diagnostic.h.
1464 * cp-lang.c: Don't include diagnostic.h
1465 * name-lookup.c: Include diagnostic-core.h instead of
1467 (cp_emit_debug_info_for_using): Use seen_error.
1468 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
1469 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
1470 * pt.c (iterative_hash_template_arg): Use seen_error.
1471 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
1472 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
1473 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
1474 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
1477 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1480 * cp-tree.h (typedef_variant_p): Move this declaration to
1482 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1483 * decl.c (grokdeclarator): Do not rename debug info of an
1484 anonymous tagged type named by a typedef.
1486 2010-05-27 Jason Merrill <jason@redhat.com>
1489 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
1492 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
1495 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
1496 * class.c (layout_class_type): Likewise.
1497 * decl.c (finish_enum): Likewise.
1498 * mangle.c (write_builitin_type): Likewise.
1500 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
1502 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
1504 * decl.c (grokdeclarator): Handle __int128.
1505 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
1506 (cp_parser_simple_type_specifier): Likewise.
1507 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
1508 * typeck.c (cp_common_type): Handle __int128.
1509 * mangle.c (integer_type_codes): Add itk_int128 and
1510 itk_unsigned_int128.
1512 2010-05-26 Jason Merrill <jason@redhat.com>
1515 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
1518 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1520 * cp-lang.c: Do not include expr.h.
1522 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1524 * decl.c: Do not include rtl.h
1525 * semantics.c: Likewise.
1527 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
1529 * cp-tree.h: Do not include splay-tree.h.
1530 (struct prtmem_cst): Remove unused field and false comment.
1531 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
1532 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
1533 * init.c: Do not include rtl.h and expr.h.
1534 * class.c: Do not include rtl.h. Include splay-tree.h.
1535 (build_clone): Use plain NULL instead of NULL_RTX.
1536 * decl.c: Do not include expr.h. Explain why rtl.h has to be
1537 included. Include splay-tree.h.
1538 * method.c: Do not include rtl.h and expr.h.
1539 (use_thunk): Use plain NULL instead of NULL_RTX.
1540 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
1541 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
1542 and target.h. Include splay-tree.h.
1543 * expr.c: Do not include rtl.h and expr.h.
1544 * pt.c: Do not include obstack.h and rtl.h.
1545 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
1546 (tsubst_decl): Likewise.
1547 (instantiate_decl): Likewise.
1548 * semantics.c: Do not include exprt.h and debug.h. Explain why
1549 rtl.h has to be included.
1550 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
1551 * call.c: Do not include rtl.h and expr.h.
1552 * search.c: Do not include obstack.h and rtl.h.
1553 * friend.c: Do not include rtl.h and expr.h.
1554 * Make-lang.in: Update dependencies.
1556 2010-05-25 Jakub Jelinek <jakub@redhat.com>
1559 * parser.c (non_integral_constant): Add NIC_NONE.
1560 (required_token): Add RT_NONE.
1561 (cp_parser_unary_expression): Initialize non_constant_p
1563 (cp_parser_asm_definition): Initialize missing to RT_NONE.
1564 (cp_parser_primary_expression, cp_parser_postfix_expression,
1565 cp_parser_cast_expression, cp_parser_binary_expression,
1566 cp_parser_functional_cast): Fix formatting.
1568 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
1571 * parser.c: Remove inclusion of dyn-string.h.
1572 (non_integral_constant): New enum.
1573 (name_lookup_error): New enum.
1574 (required_token): New enum.
1575 (cp_parser_required_error): New function.
1576 (cp_parser_require): Change the type of variable token_desc to
1577 required_token and use cp_parser_required_error.
1578 (cp_parser_require_keyword): Likewise.
1579 (cp_parser_error): Use gmsgid as parameter.
1580 (cp_parser_name_lookup_error): Change the type of variable desired to
1581 name_lookup_error and put the diagnostic in the full sentences. Change
1583 (cp_parser_non_integral_constant_expression): Change the type of the
1584 variable thing to non_integral_constant and put the diagnostics in
1585 full sentences. Change caller.
1587 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
1590 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
1592 2010-05-24 Joseph Myers <joseph@codesourcery.com>
1594 * error.c (cp_diagnostic_starter): Update call to
1595 diagnostic_build_prefix.
1596 (cp_print_error_function,
1597 print_instantiation_partial_context_line): Check show_column flag
1600 2010-05-24 Jason Merrill <jason@redhat.com>
1603 * decl.c (check_initializer): Don't wrap an init-list in a
1605 * init.c (build_aggr_init): Don't assume copy-initialization if
1606 init has CONSTRUCTOR_IS_DIRECT_INIT.
1607 * call.c (build_new_method_call): Sanity check.
1609 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
1611 * rtti.c (tinfo_base_init): Use build_constructor instead of
1612 build_constructor_from_list. Don't cons a tree node for
1614 (generic_initializer): Use build_constructor_single instead of
1615 build_constructor_from_list.
1616 (ptr_initializer): Use build_constructor instead of
1617 build_constructor_from_list
1618 (ptm_initializer): Likewise.
1619 (class_initializer): Likewise. Take varargs instead of TRAIL.
1620 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
1621 build_constructor instead of build_constructor_from_list.
1623 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
1625 * semantics.c: Include bitmap.h.
1626 * Make-lang.in: Update dependencies.
1628 2010-05-22 Jan Hubicka <jh@suse.cz>
1630 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
1632 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
1634 2010-05-21 Joseph Myers <joseph@codesourcery.com>
1636 * cxx-pretty-print.c: Correct merge error.
1638 2010-05-21 Joseph Myers <joseph@codesourcery.com>
1640 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
1641 (cp_print_error_function): Use diagnostic_abstract_origin macro.
1642 (cp_printer): Handle %K here using percent_K_format.
1643 * cxx-pretty-print.c: Include tree-pretty-print.h.
1644 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
1647 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
1649 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
1650 Clean up redundant includes.
1652 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1655 * decl.c (xref_basetypes): Return false in case of ill-formed
1658 2010-05-19 Jason Merrill <jason@redhat.com>
1660 * call.c (reference_binding): Use cp_build_qualified_type_real
1661 and cp_type_quals consistently.
1662 (add_function_candidate): Likewise.
1663 (build_conditional_expr): Likewise.
1664 (convert_like_real): Likewise.
1665 (type_passed_as): Likewise.
1666 * class.c (add_method): Likewise.
1667 (same_signature_p): Likewise.
1668 (layout_class_type): Likewise.
1669 * decl.c (cxx_init_decl_processing): Likewise.
1670 (cp_fname_init): Likewise.
1671 (grokdeclarator): Likewise.
1672 * decl2.c (cp_reconstruct_complex_type): Likewise.
1673 * init.c (build_new_1): Likewise.
1674 * method.c (do_build_copy_constructor): Likewise.
1675 (implicitly_declare_fn): Likewise.
1676 * pt.c (tsubst_aggr_type): Likewise.
1678 * rtti.c (init_rtti_processing): Likewise.
1679 (build_headof): Likewise.
1680 (build_dynamic_cast_1): Likewise.
1681 (tinfo_base_init): Likewise.
1682 (emit_support_tinfos): Likewise.
1683 * semantics.c (capture_decltype): Likewise.
1684 * tree.c (cv_unqualified): Likewise.
1685 * typeck.c (composite_pointer_type): Likewise.
1686 (string_conv_p): Likewise.
1688 * mangle.c (write_CV_qualifiers_for_type): Tweak.
1690 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
1691 * decl.c (start_decl): Likewise.
1692 * semantics.c (finish_compound_literal): Likewise.
1693 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
1694 (cp_type_readonly): Remove.
1695 * cp-tree.h: Remove declaration.
1697 * typeck.c (merge_types): Preserve memfn quals.
1699 * decl.c (grokdeclarator): Don't check quals on fn type.
1700 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
1701 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
1704 * typeck.c (type_memfn_quals): New fn.
1705 (apply_memfn_quals): New fn.
1706 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
1707 (cp_type_readonly): Use cp_type_quals.
1708 * cp-tree.h: Add declarations.
1709 * tree.c (cp_build_qualified_type_real): Don't set, but do
1710 preserve, quals on FUNCTION_TYPE.
1711 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
1712 * decl.c (build_ptrmem_type): Likewise.
1713 (grokdeclarator): Likewise.
1714 (static_fn_type): Likewise.
1715 * decl2.c (change_return_type): Likewise.
1716 (cp_reconstruct_complex_type): Likewise.
1717 * pt.c (tsubst_function_type): Likewise.
1719 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
1721 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
1723 * tree.c (build_min_non_dep_call_vec): Update comment.
1725 2010-05-17 Jason Merrill <jason@redhat.com>
1727 * call.c (struct z_candidate): Add explicit_targs field.
1728 (add_template_candidate_real): Set it.
1729 (build_over_call): Use it to control init-list warning.
1732 * call.c (build_over_call): Limit init-list deduction warning to
1733 cases where the argument is actually an init-list.
1736 * call.c (build_over_call): Don't do bitwise copy for move ctor.
1738 2010-05-17 Dodji Seketeli <dodji@redhat.com>
1739 Jason Merrill <jason@redhat.com>
1742 * decl.c (compute_array_index_type): Call mark_rvalue_use.
1744 2010-05-15 Jason Merrill <jason@redhat.com>
1746 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
1747 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
1749 (finish_eh_spec_block): Adjust.
1751 2010-05-15 Jakub Jelinek <jakub@redhat.com>
1754 * pt.c (tsubst): Unshare template argument.
1756 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
1758 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
1759 * Make-lang.in: Fix dependencies accordingly.
1761 2010-05-14 Jason Merrill <jason@redhat.com>
1764 * except.c (build_throw): Simplify, adjust for DR 475.
1767 * except.c (dtor_nothrow): Return nonzero for type with
1771 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
1772 gimple_build_eh_must_not_throw.
1774 2010-05-14 Martin Jambor <mjambor@suse.cz>
1776 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
1779 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
1781 * call.c (build_new_method_call): Change warning text.
1782 * typeck2.c (build_functional_cast): Change error text.
1784 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
1787 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
1788 shadowing the outer parameter or variables by the declaration of
1789 nested function in nested structure or class. Warn the shadowing by
1790 the declaration of nested lambda expression.
1792 2010-05-13 Jason Merrill <jason@redhat.com>
1794 * typeck.c (cp_build_array_ref): Factor out from...
1795 (build_array_ref): ...here. Drop complain parm.
1796 (build_new_op): Adjust.
1797 * class.c (build_vtbl_ref_1): Adjust.
1798 * decl2.c (grok_array_decl): Adjust.
1799 * cp-tree.h: Adjust prototypes.
1801 2010-05-13 Jan Hubicka <jh@suse.cz>
1803 * decl.c (cp_finish_decl): Do not worry about used attribute.
1805 2010-05-12 Jason Merrill <jason@redhat.com>
1807 * typeck.c (build_array_ref): Take complain parm.
1808 * cp-tree.h: Add it to prototype.
1809 * call.c (build_new_op): Pass it.
1810 * class.c (build_vtbl_ref): Pass it.
1811 * decl2.c (grok_array_decl): Pass it.
1815 * cp-tree.def (NULLPTR_TYPE): Remove.
1816 * cp-tree.h (NULLPTR_TYPE_P): New.
1817 (SCALAR_TYPE_P): Use it.
1818 (nullptr_type_node): New.
1819 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
1820 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
1822 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
1823 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1824 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
1825 * mangle.c (write_type): Likewise.
1826 * name-lookup.c (arg_assoc_type): Likewise.
1827 * typeck.c (build_reinterpret_cast_1): Likewise.
1828 * rtti.c (typeinfo_in_lib_p): Likewise.
1829 (emit_support_tinfos): Remove local nullptr_type_node.
1831 * cp-tree.h (UNKNOWN_TYPE): Remove.
1832 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
1833 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
1834 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
1835 * class.c (instantiate_type): Check unknown_type_node rather than
1837 * name-lookup.c (maybe_push_decl): Likewise.
1838 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1839 (get_typeid): Likewise.
1840 * semantics.c (finish_offsetof): Likewise.
1843 * call.c (add_template_candidate_real): If deduction fails, still
1844 add the template as a non-viable candidate.
1845 (equal_functions): Handle template candidates.
1846 (print_z_candidate): Likewise.
1847 (print_z_candidates): Likewise.
1848 (build_new_function_call): Likewise.
1850 * cp-tree.h (LOOKUP_LIST_ONLY): New.
1851 * call.c (add_candidates): Enforce it.
1852 (build_new_method_call): Try non-list ctor if no viable list ctor.
1853 (build_user_type_conversion_1): Likewise.
1855 * call.c (add_candidates): Distinguish between type(x) and
1857 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
1858 (build_new_method_call): Give better error for conversion op.
1860 * call.c (add_candidates): Add first_arg and return_type parms.
1861 Add special constructor/conversion op handling.
1862 (convert_class_to_reference): Use it.
1863 (build_user_type_conversion_1): Likewise.
1864 (build_op_call): Likewise.
1865 (build_new_method_call): Likewise.
1866 (build_new_op): Adjust.
1867 (perform_overload_resolution): Adjust.
1869 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
1874 * pt.c (process_partial_specialization): Return error_mark_node
1875 in case of unused template parameters in partial specialization.
1877 2010-05-11 Jakub Jelinek <jakub@redhat.com>
1880 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
1881 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
1882 look at its second operand.
1884 2010-05-10 Jason Merrill <jason@redhat.com>
1887 * semantics.c (baselink_for_fns): Revert earlier change.
1890 * typeck.c (cp_build_modify_expr): Complain about assignment to
1891 array from init list.
1893 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
1896 * decl.c (check_initializer): strip array type before checking for
1897 uninitialized const or ref members.
1899 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
1902 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
1903 error count. Emit errors only if compain is true.
1904 (build_new_1): Do not return error_mark_node if
1905 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
1906 errors. Delay the check for user-provided constructor.
1907 (perform_member_init): Adjust.
1908 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
1911 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
1912 Jason Merrill <jason@redhat.com>
1914 Add support for C++0x nullptr.
1915 * cp-tree.def: Add NULLPTR_TYPE.
1916 * cp-tree.h: Add nullptr_node.
1917 (cp_tree_index): Add CPTI_NULLPTR.
1918 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
1919 * call.c (null_ptr_cst_p): Handle nullptr.
1920 (standard_conversion): Likewise.
1921 (convert_arg_to_ellipsis): Likewise.
1922 * mangle.c (write_type): Likewise.
1923 * name-lookup.c (arg_assoc_type): Likewise.
1924 * parser.c (cp_parser_primary_expression): Likewise.
1925 * typeck.c (cp_build_binary_op): Likewise.
1926 (build_reinterpret_cast_1): Likewise.
1927 * error.c (dump_type): Likewise.
1928 (dump_type_prefix, dump_type_suffix): Likewise.
1929 * decl.c (cxx_init_decl_processing): Likewise.
1930 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1931 * cvt.c (ocp_convert): Likewise.
1932 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
1933 nullptr_t tinfo in libsupc++.
1935 2010-05-06 Jason Merrill <jason@redhat.com>
1937 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
1939 2010-04-22 Jakub Jelinek <jakub@redhat.com>
1940 Dodji Seketeli <dodji@redhat.com>
1943 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
1945 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
1946 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
1947 (decay_conversion, perform_integral_promotions): Call rvalue_use.
1948 (cp_build_unary_op): Call lvalue_use.
1949 * decl.c (unused_but_set_errorcount): New variable.
1950 (poplevel): Issue -Wunused-but-set-variable diagnostics.
1951 (duplicate_decls): Merge DECL_READ_P flags.
1952 (start_cleanup_fn): Set DECL_READ_P flag.
1953 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
1954 * tree.c (rvalue): Call rvalue_use.
1955 * pt.c (convert_nontype_argument): Likewise.
1956 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
1957 finish_decltype_type): Likewise.
1958 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
1959 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
1960 or rvalue_use depending on the expr.
1961 * init.c (build_new, build_delete): Likewise.
1962 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
1964 2010-05-05 Jason Merrill <jason@redhat.com>
1967 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
1968 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
1970 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1973 * pt.c (unify): Check each elt for error_mark_node.
1975 2010-05-04 Jason Merrill <jason@redhat.com>
1978 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
1980 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1983 * call.c (build_new_method_call): Return error_mark_node if fns is
1986 2010-05-03 Dodji Seketeli <dodji@redhat.com>
1989 * pt.c (most_specialized_class): Pretend we are processing
1990 a template decl during the call to coerce_template_parms.
1992 2010-05-03 Jason Merrill <jason@redhat.com>
1996 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
1997 from the selected underlying type unless -fstrict-enums. Set
1998 ENUM_UNDERLYING_TYPE to have the restricted range.
1999 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
2000 * class.c (check_bitfield_decl): Likewise.
2002 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
2005 * init.c (build_new_1): Revert the accidental checkin in
2008 2010-04-30 Jason Merrill <jason@redhat.com>
2011 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
2012 (pp_cxx_type_specifier_seq): ...here.
2014 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
2016 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
2017 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
2019 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
2022 * typeck.c (warn_args_num): New function.
2023 (convert_arguments): Use warn_args_num to print the diagnostic
2026 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
2029 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
2030 user-provided constructor while recursing.
2032 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
2035 * error.c (print_instantiation_partial_context_line): Handle
2036 recursive instantiation.
2037 (print_instantiation_partial_context): Likewise.
2039 2010-04-27 Jason Merrill <jason@redhat.com>
2041 * init.c (perform_member_init): Check CLASS_TYPE_P.
2043 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2046 * init.c (perform_member_init): check for uninitialized const or
2047 reference members, including array types.
2049 2010-04-24 Jason Merrill <jason@redhat.com>
2051 * tree.c (get_fns): Split out from get_first_fn.
2052 * cp-tree.h: Declare it.
2053 * search.c (shared_member_p): Use it.
2054 * semantics.c (finish_qualified_id_expr): Simplify.
2055 (finish_id_expression): Simplify.
2057 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
2058 whenever object is NULL_TREE. Don't do 'this' capture here.
2059 (finish_qualified_id_expr): Pass NULL_TREE.
2060 (finish_id_expression): Likewise.
2061 (lambda_expr_this_capture): Likewise.
2063 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
2064 rather than checking current_class_ref directly.
2065 (finish_call_expr): Likewise.
2068 * name-lookup.c (qualify_lookup): Disqualify lambda op().
2069 * class.c (current_nonlambda_class_type): New fn.
2070 * semantics.c (nonlambda_method_basetype): New.
2071 * cp-tree.h: Declare them.
2072 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
2074 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
2077 * semantics.c (lambda_return_type): Complain about
2081 * tree.c (cv_unqualified): Handle error_mark_node.
2084 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
2085 if we don't want errors.
2088 * class.c (convert_to_base): Add complain parameter. Pass
2089 ba_quiet to lookup_base if we don't want errors.
2090 (build_vfield_ref): Pass complain to convert_to_base.
2091 * call.c (convert_like_real): Likewise.
2092 (initialize_reference): Likewise.
2093 (perform_direct_initialization_if_possible): Pass complain to
2095 * cp-tree.h: Adjust.
2097 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2098 Jason Merrill <jason@redhat.com>
2101 * decl.c (check_for_uninitialized_const_var): Handle classes that need
2103 (check_initializer): Call it for classes that need constructing, too.
2104 * class.c (in_class_defaulted_default_constructor): New.
2105 * cp-tree.h: Declare it.
2107 2010-04-20 Jason Merrill <jason@redhat.com>
2110 * init.c (constant_value_1): Treat error_mark_node as a constant
2111 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
2112 * cvt.c (ocp_convert): Handle getting error_mark_node from
2113 integral_constant_value.
2114 * decl.c (compute_array_index_type): Likewise.
2116 2010-04-20 Dodji Seketeli <dodji@redhat.com>
2120 * typeck.c (incompatible_dependent_types_p): If one of the
2121 compared types if not a typedef then honour their main variant
2124 2010-04-20 Jakub Jelinek <jakub@redhat.com>
2126 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
2128 2010-04-19 Dodji Seketeli <dodji@redhat.com>
2131 * typeck.c (structural_comptypes): Test dependent typedefs
2132 incompatibility before testing for their main variant based
2135 2010-04-19 Jakub Jelinek <jakub@redhat.com>
2137 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
2138 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
2140 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2142 * decl.c (cxx_init_decl_processing): Remove second argument in call to
2143 build_common_tree_nodes.
2145 2010-04-14 Jason Merrill <jason@redhat.com>
2148 * parser.c (cp_parser_parenthesized_expression_list): Change
2149 is_attribute_list parm to int to indicate whether or not to
2150 handle initial identifier specially.
2151 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
2153 2010-04-13 Jason Merrill <jason@redhat.com>
2155 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
2157 * parser.c (cp_parser_lambda_expression): Complain about lambda in
2158 unevaluated context.
2159 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
2161 2010-04-12 Jason Merrill <jason@redhat.com>
2164 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
2165 return value directly.
2167 * call.c (type_decays_to): Call cv_unqualified for non-class type.
2169 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
2172 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
2173 * init.c (build_new_1): Check for uninitialized const members and
2174 uninitialized reference members, when using new without
2175 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
2176 (diagnose_uninitialized_cst_or_ref_member): Define, call
2177 diagnose_uninitialized_cst_or_ref_member_1.
2178 (diagnose_uninitialized_cst_or_ref_member_1): New function.
2180 2010-04-12 Richard Guenther <rguenther@suse.de>
2183 * semantics.c (expand_or_defer_fn_1): Do not keep extern
2184 template inline functions.
2186 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
2189 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
2192 2010-04-07 Jason Merrill <jason@redhat.com>
2195 * decl.c (start_preparsed_function): Do defer nested functions.
2197 PR c++/11094, DR 408
2198 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
2199 * decl2.c (finish_static_data_member_decl): Set it.
2200 * decl.c (duplicate_decls): Propagate it.
2201 * pt.c (tsubst_decl): Don't substitute the domain of an array
2202 VAR_DECL if it's set.
2203 (regenerate_decl_from_template): Substitute it here.
2204 (type_dependent_expression_p): Return true if it's set.
2205 * semantics.c (finish_decltype_type): Instantiate such a variable.
2206 * typeck.c (cxx_sizeof_expr): Likewise.
2207 (strip_array_domain): New.
2210 * name-lookup.c (current_decl_namespace): Non-static.
2211 (pop_nested_namespace): Sanity check.
2212 * cp-tree.h: Declare current_decl_namespace.
2213 * decl.c (grokvardecl): Use it instead of current_namespace.
2214 (grokfndecl): Likewise.
2217 * pt.c (tsubst_friend_function): Instatiate a friend that has already
2220 * pt.c (print_template_statistics): New.
2221 * cp-tree.h: Declare it.
2222 * tree.c (cxx_print_statistics): Call it.
2225 * decl.c (grokvardecl): Tweak warning message.
2226 (grokfndecl): Likewise.
2228 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2231 *pt.c (tsubst_decl): Get the arguments of a specialization from
2232 the specialization template, not from the most general template.
2234 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2237 * typeck2.c (process_init_constructor_record):
2238 value-initialize members that are are not explicitely
2241 2010-04-07 Jie Zhang <jie@codesourcery.com>
2244 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
2245 when all of its elements are non-constant and have been split out.
2247 2010-04-06 Taras Glek <taras@mozilla.com>
2248 Jason Merrill <jason@redhat.com>
2250 * parser.c (cp_parser_class_specifier): Set class location to that
2251 of IDENTIFIER_NODE instead of '{' when possible.
2252 * semantics.c (begin_class_definition): Do not overide locations
2253 with less precise ones.
2255 2010-04-06 Jason Merrill <jason@redhat.com>
2258 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
2261 * pt.c (maybe_update_decl_type): Check the return value from
2264 2010-04-01 Jason Merrill <jason@redhat.com>
2266 * decl.c (next_initializable_field): No longer static.
2267 * cp-tree.h: Declare it.
2268 * call.c (build_aggr_conv): Fail if there are more initializers
2269 than initializable fields.
2271 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
2272 instead of void_zero_node.
2274 2010-03-31 Dodji Seketeli <dodji@redhat.com>
2277 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
2278 * pt.c (end_template_parm_list): Store sibling template parms of
2279 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2280 (push_template_decl_real): Don't store the containing template decl
2281 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
2282 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
2283 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2286 2010-03-30 Jason Merrill <jason@redhat.com>
2289 * pt.c (push_template_decl_real): Deal better with running out of
2290 scopes before running out of template parms.
2294 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
2295 function parameter context. Don't print an error if parsing
2299 * pt.c (more_specialized_fn): Don't control cv-qualifier check
2302 2010-03-26 Jason Merrill <jason@redhat.com>
2305 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
2306 c++0x mode, but not other type-names.
2308 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2311 * pt.c (add_to_template_args): Support NULL ARGS;
2312 (most_specialized_class): call coerce_template_parms on
2313 template arguments passed to get_class_bindings. Use
2314 add_to_template_args.
2315 (unify): Handle VAR_DECLs.
2317 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2319 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
2321 * pt.c (get_template_parms_at_level): Adjust.
2323 2010-03-25 Dodji Seketeli <dodji@redhat.com>
2326 * cp-tree.h (get_template_parms_at_level): Declare ...
2327 * pt.c (get_template_parms_at_level): ... new function.
2328 * typeck.c (get_template_parms_of_dependent_type): If a template
2329 type parm's DECL_CONTEXT isn't yet set, get its siblings from
2330 current_template_parms. Use get_template_parms_at_level. Remove
2332 (incompatible_dependent_types_p): If we get empty parms from just one
2333 of the template type parms we are comparing then the template parms are
2336 2010-03-24 Jason Merrill <jason@redhat.com>
2339 * parser.c (make_declarator): Initialize id_loc.
2340 (cp_parser_lambda_declarator_opt): And set it.
2342 2010-03-23 Jason Merrill <jason@redhat.com>
2344 Make lambda conversion op and op() non-static.
2345 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
2346 Also add the thunk function returned by the conversion op.
2347 Mark the conversion deleted if the op() is variadic.
2348 * decl2.c (mark_used): Give helpful message about deleted conversion.
2349 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
2350 * semantics.c (finish_this_expr): Adjust.
2351 * mangle.c (write_closure_type_name): Adjust.
2352 * decl.c (grok_op_properties): Don't allow it.
2353 * call.c (build_user_type_conversion_1): No static conversion ops.
2354 (build_op_call): Or op().
2356 * decl2.c (change_return_type): Fix 'this' quals.
2358 2010-03-22 Jason Merrill <jason@redhat.com>
2361 * tree.c (pod_type_p): Use old meaning in C++98 mode.
2364 * pt.c (contains_auto_r): New fn.
2365 (do_auto_deduction): Use it.
2366 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
2368 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
2371 * decl2.c (grokfield): Handle invalid initializers for member
2374 2010-03-20 Dodji Seketeli <dodji@redhat.com>
2377 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
2379 * decl2.c (vague_linkage_p): Likewise.
2381 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
2384 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
2385 false, in the cp_parser_expression_statement call.
2387 2010-03-05 Jason Merrill <jason@redhat.com>
2389 * mangle.c (mangle_decl): Give name collision error even without
2392 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
2394 * pt.c (process_partial_specialization): Use error_n instead of
2397 2010-03-03 Jason Merrill <jason@redhat.com>
2400 * mangle.c (mangle_decl): Handle VAR_DECL, too.
2402 2010-03-03 Jason Merrill <jason@redhat.com>
2405 * mangle.c: Include cgraph.h.
2406 (mangle_decl): If the mangled name will change in a later
2407 ABI version, make the later mangled name an alias.
2408 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
2409 * Make-lang.in (mangle.o): Depend on cgraph.h.
2410 * method.c (make_alias_for): Handle VAR_DECL, too.
2411 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
2412 * tree.c (no_linkage_check): Adjust.
2413 * decl.c (maybe_commonize_var): Adjust.
2414 * cp-tree.h: Adjust.
2416 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
2418 * pt.c (redeclare_class_template): Use error_n and inform_n.
2420 2010-02-27 Mark Mitchell <mark@codesourcery.com>
2423 * cp-tree.h (push_tinst_level): Declare.
2424 (pop_tinst_level): Likewise.
2425 * pt.c (push_tinst_level): Give it external linkage.
2426 (pop_tinst_level): Likewise.
2427 * mangle.c (mangle_decl_string): Set the source location to that
2428 of the decl while mangling.
2430 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
2433 * pt.c (redeclare_class_template): Return false if there are erroneous
2434 template parameters.
2436 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
2438 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
2441 2010-02-24 Jason Merrill <jason@redhat.com>
2444 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
2446 * class.c (layout_class_type): Don't give -Wabi warning for a bug
2447 in a previous ABI version.
2449 2010-02-23 Jason Merrill <jason@redhat.com>
2452 * typeck2.c (digest_init_r): Accept value init of array.
2454 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
2457 * typeck.c (convert_arguments): Update error message.
2459 2010-02-22 Mike Stump <mikestump@comcast.net>
2462 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
2464 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
2467 * error.c (print_instantiation_partial_context_line): New.
2468 (print_instantiation_partial_context): Print at most 12 contexts,
2469 skip the rest with a message.
2471 2010-02-21 Dodji Seketeli <dodji@redhat.com>
2474 * pt.c (lookup_template_class): Better support of specialization
2475 of member of class template implicit instantiation.
2477 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
2480 * call.c (conversion_null_warnings): Replace -Wconversion with
2482 * cvt.c (build_expr_type_conversion): Likewise.
2484 2010-02-18 Jason Merrill <jason@redhat.com>
2487 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
2490 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
2492 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
2493 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
2496 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
2500 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
2501 (maybe_update_decl_type): New fn.
2502 * parser.c (cp_parser_init_declarator): Use it.
2505 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
2507 2010-02-17 Jason Merrill <jason@redhat.com>
2510 * call.c (build_over_call): Don't create zero-sized assignments.
2511 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
2512 * cp-objcp-common.c (cp_expr_size): Remove.
2513 * cp-tree.h: Remove prototype.
2516 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
2517 decl we looked up doesn't match.
2520 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
2521 have an INIT_EXPR anymore.
2524 * pt.c (convert_nontype_argument): Change assert to test.
2526 2010-02-16 Jason Merrill <jason@redhat.com>
2528 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
2531 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
2532 VIEW_CONVERT_EXPR for conversions between structural equality types
2533 that the back end can't tell are the same.
2536 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
2537 cv-quals from element here.
2538 (cp_build_qualified_type_real): Not here. Preserve typedef name.
2540 2010-02-14 Jason Merrill <jason@redhat.com>
2543 * semantics.c (finish_compound_literal): Use
2544 cp_apply_type_quals_to_decl when creating a static variable.
2546 2010-02-12 Jason Merrill <jason@redhat.com>
2549 * name-lookup.h (current_binding_level): Check for null
2552 2010-02-12 Jason Merrill <jason@redhat.com>
2555 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
2557 2010-02-12 Jakub Jelinek <jakub@redhat.com>
2560 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
2563 2010-02-10 Jason Merrill <jason@redhat.com>
2566 * semantics.c (outer_lambda_capture_p): Revert.
2567 (add_capture): Only finish_member_declaration if
2568 we're in the lambda class.
2569 (register_capture_members): New.
2570 * cp-tree.h: Declare it.
2571 * parser.c (cp_parser_lambda_expression): Call it.
2573 2010-02-10 Jason Merrill <jason@redhat.com>
2576 * semantics.c (outer_lambda_capture_p): Use current_function_decl
2577 instead of current_class_type.
2579 2010-02-10 Jason Merrill <jason@redhat.com>
2581 PR c++/42983, core issue 906
2582 * method.c (defaultable_fn_check): Check virtualness.
2584 2010-02-10 Jason Merrill <jason@redhat.com>
2587 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
2589 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
2591 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
2592 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
2594 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
2595 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
2596 (cp_parser_parameter_declaration)
2597 (cp_parser_exception_specification_opt)
2598 (cp_parser_exception_declaration): Likewise.
2599 * pt.c (check_default_tmpl_args): Likewise.
2600 * search.c (lookup_field_r): Likewise.
2602 2010-02-09 Jason Merrill <jason@redhat.com>
2605 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
2607 2010-02-09 Jason Merrill <jason@redhat.com>
2610 * decl2.c (change_return_type): New fn.
2611 * semantics.c (apply_lambda_return_type): Use it.
2612 * cp-tree.h: Declare it.
2614 2010-02-05 Richard Guenther <rguenther@suse.de>
2616 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
2617 * cp-lang.c: Include gt-cp-cp-lang.h.
2618 * config-lang.in (gtfiles): Add cp/cp-lang.c.
2620 2010-02-05 Dodji Seketeli <dodji@redhat.com>
2623 * typeck.c (get_template_parms_of_dependent_type): Try getting
2624 the template parameters fromt the type itself first.
2626 2010-02-03 Jason Merrill <jason@redhat.com>
2630 * mangle.c (write_unqualified_id): Split out from write_expression.
2631 (write_unqualified_name): Call it.
2632 (write_member_name): Likewise.
2633 (write_expression): Support TEMPLATE_ID_EXPR.
2634 Disambiguate operator names.
2637 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
2640 2010-02-02 Jason Merrill <jason@redhat.com>
2643 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
2644 * optimize.c (clone_body): Remap their initializers when making base
2646 (maybe_clone_body): Complain if multiple clones aren't safe.
2648 2010-01-29 Dodji Seketeli <dodji@redhat.com>
2655 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
2656 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
2657 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
2658 * pt.c (coerce_template_parms, type_unification_real,
2659 expand_template_argument_pack, coerce_template_parameter_pack):
2660 Set the non default template args count.
2661 (current_template_args): Always set non defaulted
2662 template args count when compiled with --enable-checking
2663 (tsubst_template_args, type_unification_real): Propagate the non
2664 defaulted template args count.
2665 * error.c (get_non_default_template_args_count): Renamed
2666 count_non_default_template_args into this. Don't calculate the
2667 non default template argument count anymore. Use the new
2668 accessor macros above to get it.
2669 (dump_template_argument_list, dump_type, dump_decl,
2670 dump_template_parms): Adjust.
2671 * parser.c (cp_parser_template_argument_list): Always set defaulted
2672 template args count when compiled with --enable-checking.
2674 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
2676 * decl.c (redeclaration_error_message): Wrap the return messages into
2677 G_() for easy translation.
2679 2010-01-28 Jason Merrill <jason@redhat.com>
2682 * semantics.c (begin_class_definition): Don't use type_as_string.
2684 2010-01-28 Dodji Seketeli <dodji@redhat.com>
2688 * typeck.c (get_template_parms_of_dependent_type): Factorized
2689 this out of incompatible_template_type_parms_p
2690 (incompatible_dependent_types_p): Renamed
2691 incompatible_template_type_parms_p into this. Make it detect
2692 two incompatible dependent typedefs too.
2693 (structural_comptypes): Use incompatible_dependent_types_p.
2694 * pt.c (get_template_info):
2695 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
2697 2010-01-20 Janis Johnson <janis187@us.ibm.com>
2698 Jason Merrill <jason@redhat.com>
2700 * mangle.c (write_type): Mangle transparent record as member type.
2701 * semantics.c (begin_class_definition): Recognize decimal classes
2702 and set TYPE_TRANSPARENT_AGGR.
2704 2010-01-20 Jason Merrill <jason@redhat.com>
2707 * mangle.c (write_expression): Handle tree codes that have extra
2708 arguments in the middle-end.
2710 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
2713 * except.c (expand_start_catch_block): Deal correctly with
2714 do_begin_catch returning error_mark_node.
2716 2010-01-20 Jason Merrill <jason@redhat.com>
2719 * class.c (layout_class_type): Set packed_maybe_necessary for packed
2723 * semantics.c (build_lambda_object): Call mark_used on captured
2727 * decl.c (grokdeclarator): Clear type_quals for a member function
2728 declared using a typedef. Don't complain about adding cv-quals
2729 to a function typedef in C++0x mode.
2731 2010-01-20 Jakub Jelinek <jakub@redhat.com>
2733 * decl.c (create_array_type_for_decl): Remove set but not used
2734 variable error_msg. Remove break stmts after return stmts.
2736 2010-01-19 Dodji Seketeli <dodji@redhat.com>
2738 * error.c (dump_template_parms, count_non_default_template_args):
2739 Revert fix of PR c++/42634.
2741 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2744 * error.c (dump_template_parms): Use innermost template
2745 arguments before calling count_non_default_template_args.
2746 (count_non_default_template_args): We are being called with
2747 template innermost arguments now. There is no need to ensure
2750 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2753 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
2755 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2758 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
2760 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2763 *pt.c (tsubst_decl): Get the arguments of a specialization from
2764 the specialization template, not from the most general template.
2766 2010-01-16 Jason Merrill <jason@redhat.com>
2769 * semantics.c (finish_decltype_type): Within a template, treat
2770 unresolved CALL_EXPR as dependent.
2772 2010-01-15 Dodji Seketeli <dodji@redhat.com>
2774 * error.c (dump_template_parms,count_non_default_template_args):
2775 Revert changes of PR c++/42634.
2777 2010-01-14 Jakub Jelinek <jakub@redhat.com>
2780 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
2781 functions with noreturn attribute.
2783 2010-01-14 Jason Merrill <jason@redhat.com>
2786 * call.c (build_new_method_call): Don't free the vec here.
2789 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
2791 2010-01-13 Dodji Seketeli <dodji@redhat.com>
2794 * error.c (dump_template_parms): Use innermost template
2795 arguments before calling count_non_default_template_args.
2796 (count_non_default_template_args): We are being called with
2797 template innermost arguments now. There is no need to ensure
2800 2010-01-07 Dodji Seketeli <dodji@redhat.com>
2803 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
2804 arguments that were previously deduced.
2806 2010-01-05 Jason Merrill <jason@redhat.com>
2808 * pt.c (unify_pack_expansion): Handle deduction from init-list.
2809 * call.c (build_over_call): Don't complain about it.
2811 2010-01-04 Jason Merrill <jason@redhat.com>
2814 * pt.c (tsubst_decl): Don't apply type attributes in place.
2817 * semantics.c (describable_type): Remove decltype comment and
2822 Copyright (C) 2010 Free Software Foundation, Inc.
2824 Copying and distribution of this file, with or without modification,
2825 are permitted in any medium without royalty provided the copyright
2826 notice and this notice are preserved.