1 2010-07-13 Jason Merrill <jason@redhat.com>
4 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
5 (TYPE_HAS_USER_OPEQ): New.
6 * decl.c (grok_special_member_properties): Set it.
7 * class.c (add_implicitly_declared_members): Don't lazily declare
8 constructors/operator= if a base or member has a user-declared one.
9 (check_bases_and_members, check_bases): Adjust.
10 (check_field_decls, check_field_decl): Adjust.
11 * method.c (synthesized_method_walk): Initialize check_vdtor.
14 * mangle.c (write_type): Canonicalize.
15 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
16 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
18 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
21 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
23 * typeck.c (get_delta_difference): Update prototype, add a
24 tsubst_flags_t parameter; update get_delta_difference_1 calls and
25 add checks for error_mark_node.
26 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
27 parameter; update lookup_base call.
28 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
29 parameter; update get_delta_difference call and add check for
31 (convert_ptrmem): Update prototype, add a tsubst_flags_t
32 parameter; update get_delta_difference call and add check for
33 error_mark_node; update build_ptrmemfunc call.
34 (build_static_cast_1): Adjust convert_ptrmem call.
35 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
36 (cp_build_unary_op): Adjust build_ptrmemfunc call.
37 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
38 and build_ptrmemfunc calls.
39 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
41 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
44 * call.c (build_temp): Add tsubst_flags_t complain parameter;
45 adjust build_special_member_call call, pass complain.
46 (convert_like_real): Adjust build_temp call, pass complain.
48 2010-07-09 Jason Merrill <jason@redhat.com>
51 * cp-tree.h (BV_LOST_PRIMARY): New macro.
52 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
54 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
56 2010-07-08 Jason Merrill <jason@redhat.com>
59 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
60 virtual bases for covariant thunks.
62 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
64 * cp-tree.h: Do not include toplev.h.
66 2010-07-06 Jason Merrill <jason@redhat.com>
69 * call.c (is_std_init_list): Look through typedefs.
72 * init.c (build_offset_ref): If scope isn't dependent,
73 don't exit early. Look at TYPE_MAIN_VARIANT.
74 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
76 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
78 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
80 * cp-tree.h (impl_conv_void): New type.
81 (convert_to_void): Adjust prototype.
82 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
83 diagnostic for easy translation. Change caller.
84 * typeck.c: Update call to convert_to_void.
85 * semantics.c: Likewise.
88 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
90 * decl.c (cp_finish_decl): Call add_local_decl.
91 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
93 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
95 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
98 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
101 * parser.c (cp_parser_primary_expression): Error if local template is
104 2010-07-02 Le-Chun Wu <lcwu@google.com>
107 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
108 (variable or type) shadows another type.
110 2010-07-02 Jakub Jelinek <jakub@redhat.com>
113 * typeck.c (convert_for_assignment): When converting a convertible
114 vector type or objc++ types, call mark_rvalue_use.
115 * typeck2.c (build_m_component_ref): Use return values from
116 mark_rvalue_use or mark_lvalue_use.
117 * class.c (build_base_path): Likewise.
118 * call.c (build_conditional_expr): Likewise.
120 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
123 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
126 2010-07-01 Richard Guenther <rguenther@suse.de>
128 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
129 predicate we are looking for, allow non-gimplified
132 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
135 * typeck.c (cp_build_unary_op): Early return error_mark_node when
136 arg is NULL_TREE too.
137 * call.c (convert_class_to_reference): Return error_mark_node when
140 2010-06-30 Michael Matz <matz@suse.de>
142 * repo.c (finish_repo): Fix typo.
144 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
146 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
148 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
150 * repo.c (pending_repo): Change type to a VEC.
151 (finish_repo): Adjust for new type of pending_repo.
152 (repo_emit_p): Likewise.
154 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
156 * tree.c: Include gimple.h. Do not include tree-flow.h
157 * decl.c: Do not include tree-flow.h
158 * Make-lang.in: Adjust dependencies.
160 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
162 * decl.c (incomplete_var): Declare. Declare VECs containing them.
163 (incomplete_vars): Adjust comment. Change type to a VEC.
164 (maybe_register_incomplete_var): Adjust for new type.
165 (complete_vars): Adjust iteration over incomplete_vars.
167 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
169 * decl.c (struct named_label_entry): Change type of bad_decls field
171 (poplevel_named_label_1): Adjust for new type of bad_decls.
172 (check_goto): Likewise.
174 2010-06-29 Jason Merrill <jason@redhat.com>
176 Enable implicitly declared move constructor/operator= (N3053).
177 * class.c (add_implicitly_declared_members): A class with no
178 explicitly declared copy or move constructor gets both declared
179 implicitly, and similarly for operator=.
180 (check_bases): A type with no copy ctor does not inhibit
181 a const copy ctor in a derived class. It does mean the derived
183 (check_field_decl): Likewise.
184 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
185 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
186 (trivially_copyable_p): Likewise.
187 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
188 * class.c (finish_struct_bits): Likewise.
189 * tree.c (build_target_expr_with_type): Likewise.
190 * typeck2.c (store_init_value): Likewise.
192 Enable implicitly deleted functions (N2346)
193 * class.c (check_bases_and_members): Adjust lambda flags.
194 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
196 * decl2.c (mark_used): Adjust error for use of deleted function.
198 Machinery to support implicit delete/move.
199 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
200 has_complex_move_ctor, has_complex_move_assign bitfields.
201 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
202 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
203 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
204 (enum special_function_kind): Add sfk_move_assignment.
205 (LOOKUP_SPECULATIVE): New.
206 * call.c (build_over_call): Return early if it's set.
207 (build_over_call): Use trivial_fn_p.
208 * class.c (check_bases): If the base has no default constructor,
209 the derived one is non-trivial. Handle move ctor/op=.
210 (check_field_decl): Likewise.
211 (check_bases_and_members): Handle move ctor/op=.
212 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
213 (type_has_move_constructor, type_has_move_assign): New.
214 * decl.c (grok_special_member_properties): Handle move ctor/op=.
215 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
217 (do_build_copy_constructor): Use it.
218 (do_build_assign_ref): Likewise. Handle move assignment.
219 (build_stub_type, build_stub_object, locate_fn_flags): New.
220 (locate_ctor): Use locate_fn_flags.
221 (locate_copy, locate_dtor): Remove.
222 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
223 (process_subob_fn, synthesized_method_walk): New.
224 (maybe_explain_implicit_delete): New.
225 (implicitly_declare_fn): Use synthesized_method_walk,
226 type_has_trivial_fn, and type_set_nontrivial_flag.
227 (defaulted_late_check): Set DECL_DELETED_FN.
228 (defaultable_fn_check): Handle sfk_move_assignment.
229 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
230 implicitly deleted move ctor/op=.
231 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
232 (lookup_fnfields_slot): New.
233 * semantics.c (omp_clause_info_fndecl): Remove.
234 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
235 get_copy_assign, trivial_fn_p.
236 (trait_expr_value): Adjust call to locate_ctor.
237 * tree.c (special_function_p): Handle sfk_move_assignment.
239 * class.c (type_has_virtual_destructor): New.
240 * cp-tree.h: Declare it.
241 * semantics.c (trait_expr_value): Use it.
243 * call.c (build_over_call): Only give warnings with tf_warning.
245 * name-lookup.c (pop_scope): Handle NULL_TREE.
247 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
248 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
249 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
250 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
251 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
252 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
253 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
254 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
255 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
256 (sfk_assignment_operator): Rename to sfk_copy_assignment.
257 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
258 * search.c, semantics.c, tree.c: Adjust.
260 * pt.c (dependent_scope_ref_p): Remove.
261 (value_dependent_expression_p): Don't call it.
262 (type_dependent_expression_p): Here either.
263 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
264 if the scope isn't dependent.
266 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
270 * pt.c (has_value_dependent_address): New.
271 (value_dependent_expression_p): Check it.
272 (convert_nontype_argument): Likewise. Call decay_conversion before
273 folding if we want a pointer.
274 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
275 scope is the current instantiation.
277 2010-06-28 Jakub Jelinek <jakub@redhat.com>
280 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
283 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
285 * init.c: Do not include except.h.
288 * cp-lang.c: Likewise.
290 * semantics.c: Likewise.
292 * except.c: Likewise.
293 (init_exception_processing): Do not set the removed
294 lang_protect_cleanup_actions here.
295 (cp_protect_cleanup_actions): Make non-static and remove prototype.
296 (doing_eh): New, moved from except.c but removed the do_warning flag.
297 (expand_start_catch_block): Update doing_eh call.
298 (expand_end_catch_block): Likewise.
299 (build_throw): Likewise.
300 * cp-tree.h: Prototype cp_protect_cleanup_actions.
301 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
302 cp_protect_cleanup_actions.
303 * Make-lang.in: Update dependencies.
305 2010-06-26 Jason Merrill <jason@redhat.com>
307 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
308 constructor called with a single argument that takes a reference
309 to the constructor's class.
310 (BAD_CONVERSION_RANK): New.
311 (compare_ics): Use it to compare bad ICSes.
313 2010-06-25 Joseph Myers <joseph@codesourcery.com>
315 * lang-specs.h: Remove +e handling.
317 2010-06-24 Andi Kleen <ak@linux.intel.com>
319 * parser.c: (cp_parser_question_colon_clause):
320 Switch to use cp_lexer_peek_token.
321 Call warn_for_omitted_condop. Call pedwarn for omitted
324 2010-06-22 Jakub Jelinek <jakub@redhat.com>
327 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
328 datum and mark_rvalue_use on component.
331 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
332 the CALL_EXPR has no arguments.
334 2010-06-21 Jason Merrill <jason@redhat.com>
336 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
338 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
341 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
343 * name-lookup.c (struct arg_lookup): Convert namespaces and
344 classes fields to VEC.
345 (arg_assoc_namespace): Adjust for new type of namespaces.
346 (arg_assoc_class): Adjust for new type of classes.
347 (lookup_arg_dependent): Use make_tree_vector and
349 * typeck2.c (build_x_arrow): Use vec_member.
351 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
354 * error.c (dump_decl): Better wording for anonymous namespace.
356 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
358 * class.c (build_vtbl_initializer): Adjust computation of new_position
359 and which entry to add padding for.
361 2010-06-16 Jason Merrill <jason@redhat.com>
363 * except.c (check_noexcept_r): Return the problematic function.
364 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
365 * pt.c (tsubst_copy_and_build): Pass it.
366 * parser.c (cp_parser_unary_expression): Likewise.
367 * cp-tree.h: Adjust prototype.
369 * method.c (defaulted_late_check): Give the defaulted method
370 the same exception specification as the implicit declaration.
372 2010-06-15 Jason Merrill <jason@redhat.com>
374 * class.c (add_implicitly_declared_members): Implicit assignment
375 operators can also be virtual overriders.
376 * method.c (lazily_declare_fn): Likewise.
378 * call.c (convert_like_real): Give "initializing argument of"
379 information for ambiguous conversion. Give source position
382 * call.c (print_z_candidates): Do print viable deleted candidates.
383 (joust): Don't choose a deleted function just because its worst
384 conversion is better than another candidate's worst.
386 * call.c (convert_like_real): Don't complain about
387 list-value-initialization from an explicit constructor.
389 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
390 DECL_SOURCE_LOCATION directly.
392 * class.c (type_has_user_provided_default_constructor): Use
395 * call.c (is_subseq): Handle ck_aggr, ck_list.
396 (compare_ics): Treat an aggregate or ambiguous conversion to the
397 same type as involving the same function.
399 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
401 * typeck.c (convert_for_assignment): Fix comment. Change message
402 format from %d to %qP.
403 (convert_for_initialization): Fix comment.
405 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
407 * cp-tree.h (expr_list_kind): New type.
408 (impl_conv_rhs): New type.
409 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
411 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
412 diagnostics for easy translation. Change caller.
413 (convert_for_initialization): Use impl_conv_rhs and change caller.
414 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
415 diagnostics for easy translation. Change caller.
416 * decl.c (bad_spec_place): New enum.
417 (bad_specifiers): Use it and emit the diagnostics for easy
418 translation. Change caller.
419 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
421 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
423 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
425 * decl2.c (cp_write_global_declarations): Adjust for new type of
427 * name-lookup.c (current_decl_namespace): Likewise.
428 (push_decl_namespace): Likewise.
429 (pop_decl_namespace): Likewise.
431 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
433 * call.c (build_java_interface_fn_ref): Call build_function_type_list
434 instead of build_function_type.
435 * decl.c (cxx_init_decl_processing): Likewise.
436 (declare_global_var): Likewise.
437 (get_atexit_node): Likewise.
438 (expand_static_init): Likewise.
439 * decl2.c (start_objects): Likewise.
440 (start_static_storage_duration_function): Likewise.
441 * except.c (init_exception_processing): Likewise.
442 (build_exc_ptr): Likewise.
443 (build_throw): Likewise.
444 * rtti.c (throw_bad_cast): Likewise.
445 (throw_bad_typeid): Likewise.
446 (build_dynamic_cast_1): Likewise.
448 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
450 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
451 (build_op_delete_call): Likewise.
452 (build_over_call): Likewise.
453 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
454 * pt.c (process_partial_specialization): Likewise.
455 (tsubst_template_args): Likewise.
456 * semantics.c (finish_asm_stmt): Likewise.
458 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
460 * decl.c (record_key_method_defined): New, broken out of ...
461 (finish_function): ... here. Call it.
462 (start_decl): Treat aliases as definitions.
464 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
466 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
468 * pt.c (maybe_process_partial_specialization): Likewise.
469 (register_specialization): Likewise.
470 (add_pending_template): Likewise.
471 (lookup_template_class): Likewise.
472 (push_tinst_level): Likewise.
474 * parser.c (cp_lexer_new_main): Likewise.
475 (cp_lexer_new_from_tokens): Likewise.
476 (cp_token_cache_new): Likewise.
477 (cp_parser_context_new): Likewise.
478 (cp_parser_new): Likewise.
479 (cp_parser_nested_name_specifier_opt): Likewise.
480 (cp_parser_template_id): Likewise.
482 * name-lookup.c (binding_entry_make): Likewise.
483 (binding_table_construct): Likewise.
484 (binding_table_new): Likewise.
485 (cxx_binding_make): Likewise.
486 (pushdecl_maybe_friend): Likewise.
487 (begin_scope): Likewise.
488 (push_to_top_level): Likewise.
490 * lex.c (init_reswords): Likewise.
491 (retrofit_lang_decl): Likewise.
492 (cxx_dup_lang_specific_decl): Likewise.
493 (copy_lang_type): Likewise.
494 (cxx_make_type): Likewise.
496 * decl.c (make_label_decl): Likewise.
497 (check_goto): Likewise.
498 (start_preparsed_function): Likewise.
499 (save_function_data): Likewise.
501 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
503 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
505 * class.c (finish_struct_1): Likewise.
507 * cp-tree.h (struct lang_type): Add variable_size GTY option.
508 (struct lang_decl): Likewise.
510 * parser.c (cp_parser_new): Update comment to not reference
513 2010-06-07 Jason Merrill <jason@redhat.com>
516 * error.c (dump_parameters): Mask out TFF_SCOPE.
517 (dump_simple_decl): Don't print the scope of a PARM_DECL.
518 (dump_scope): Remove no-op mask.
521 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
523 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
524 * init.c (build_offset_ref): Use it.
525 * pt.c (maybe_process_partial_specialization): Use it.
526 (instantiate_class_template): Use it.
527 * search.c (lookup_base): Use it.
529 2010-06-07 Jakub Jelinek <jakub@redhat.com>
532 * expr.c (mark_exp_read): Handle INDIRECT_REF.
533 * cvt.c (convert_to_void): Handle INDIRECT_REF like
537 * decl.c (initialize_local_var): If TREE_USED is set on the type,
538 set also DECL_READ_P on the decl.
540 2010-05-25 Dodji Seketeli <dodji@redhat.com>
543 * cp-tree.h (typedef_variant_p): Move this declaration to
545 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
546 * decl.c (grokdeclarator): Do not rename debug info of an
547 anonymous tagged type named by a typedef.
549 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
552 * class.c (check_field_decls): Move the call to
553 check_bitfield_decl before trying to set the
554 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
556 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
558 * typeck.c: Update include path for moved files.
561 * cp-gimplify.c: Likewise.
562 * cp-lang.c: Likewise.
564 * semantics.c: Likewise.
565 * cxx-pretty-print.h: Likewise.
567 * parser.c: Likewise.
568 * cp-objcp-common.c: Likewise.
569 * cp-tree.h: Likewise.
570 * name-lookup.c: Likewise.
572 * name-lookup.h: Likewise.
573 * config-lang.in: Update paths in gtfiles for files in c-family/.
574 * Make-lang.in: Likewise.
576 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
578 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
579 * typeck.c (build_ptrmemfunc): Likewise.
581 2010-06-04 Jason Merrill <jason@redhat.com>
583 * typeck2.c (merge_exception_specifiers): Adjust merging of
584 throw() and noexcept(true).
586 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
587 using an uninitialized variable.
589 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
590 (pp_cxx_expression): Likewise.
592 Implement noexcept-specification (15.4)
593 * parser.c (cp_parser_exception_specification_opt): Parse it.
594 Give -Wdeprecated warning about throw() specs.
595 * pt.c (tsubst_exception_specification): Handle it.
596 * error.c (dump_exception_spec): Handle it.
597 (dump_expr): Handle NOEXCEPT_EXPR.
598 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
599 * typeck.c (comp_except_specs): Handle compatibility rules.
600 Change exact parm to take an enum.
601 * typeck2.c (merge_exception_specifiers): Handle noexcept.
602 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
603 (type_throw_all_p, build_noexcept_spec): New fns.
604 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
605 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
606 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
607 (noexcept_true_spec, noexcept_false_spec): New macros.
608 * name-lookup.c (pushdecl_maybe_friend): Adjust.
609 * search.c (check_final_overrider): Adjust.
610 * decl.c (check_redeclaration_exception_specification): Adjust.
611 (use_eh_spec_block): Use type_throw_all_p.
612 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
613 Give operator new a noexcept-specification in C++0x mode.
614 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
615 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
617 Implement noexcept operator (5.3.7)
618 * cp-tree.def (NOEXCEPT_EXPR): New.
619 * except.c (check_noexcept_r, finish_noexcept_expr): New.
620 * cp-tree.h: Declare finish_noexcept_expr.
621 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
622 * pt.c (tsubst_copy_and_build): And tsubst it.
623 (type_dependent_expression_p): Handle it.
624 (value_dependent_expression_p): Handle it.
626 * call.c (build_conditional_expr): Never fold in unevaluated context.
627 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
628 * semantics.c (simplify_aggr_init_expr): Likewise.
629 * typeck.c (merge_types): Call merge_exception_specifiers.
630 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
631 DECL_ANTICIPATED for preferring new type.
633 2010-06-04 Joseph Myers <joseph@codesourcery.com>
635 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
638 2010-06-04 Jakub Jelinek <jakub@redhat.com>
641 * typeck.c (build_class_member_access_expr): Call mark_exp_read
642 on object for static data members.
644 2010-06-04 Jakub Jelinek <jakub@redhat.com>
645 Jason Merrill <jason@redhat.com>
648 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
649 with the same type, call mark_lvalue_use on both.
651 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
653 * class.c (struct vtbl_init_data_s): Remove last_init field.
654 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
656 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
658 (build_vtt): Likewise.
659 (initialize_vtable): Take a VEC instead of a tree.
660 (build_vtt_inits): Change return type to void. Take a VEC **
661 instead of a tree *; accumulate results into said VEC.
662 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
663 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
664 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
666 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
667 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
669 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
670 rather than tree_cons.
671 (build_vbase_offset_vtbl_entries): Likewise.
672 (add_vcall_offset): Likewise.
673 (build_rtti_vtbl_entries): Likewise.
674 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
675 * decl.c (initialize_artificial_var): Use build_constructor instead
676 of build_constructor_from_list.
678 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
681 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
684 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
686 * parser.c (cp_parser_mem_initializer_list): Change error text.
688 2010-06-02 Jakub Jelinek <jakub@redhat.com>
690 * cp-objcp-common.c (shadowed_var_for_decl): Change into
691 tree_decl_map hashtab from tree_map.
692 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
693 (init_shadowed_var_for_decl): Adjust initialization.
696 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
697 instead of calling mark_exp_read only when not an assignment.
700 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
701 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
702 Set DECL_VALUE_EXPR on var.
704 2010-06-02 Jason Merrill <jason@redhat.com>
706 * error.c (dump_type): Improve typedef handling.
711 * name-lookup.c (same_entity_p): New.
712 (ambiguous_decl): Multiple declarations of the same entity
715 2010-06-01 Jason Merrill <jason@redhat.com>
718 * call.c (add_list_candidates): Prefer the default constructor.
719 (build_aggr_conv): Treat missing initializers like { }.
720 * typeck2.c (process_init_constructor_record): Likewise.
721 * init.c (expand_default_init): Use digest_init for
722 direct aggregate initialization, too.
724 * call.c (add_list_candidates): Split out...
725 (build_user_type_conversion_1): ...from here.
726 (build_new_method_call): And here.
727 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
730 * call.c (build_list_conv): Set list-initialization flags properly.
732 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
734 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
736 2010-06-01 Arnaud Charlet <charlet@adacore.com>
737 Matthew Gingell <gingell@adacore.com>
739 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
740 * decl2.c: Include langhooks.h and c-ada-spec.h.
741 (cpp_check, collect_source_refs, collect_ada_namespace,
742 collect_all_refs): New functions.
743 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
744 * lang-specs.h: Ditto.
746 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
748 * cp-tree.h (cp_build_function_call_nary): Declare.
749 * typeck.c (cp_build_function_call_nary): Define.
750 * decl.c (register_dtor_fn): Use it instead of
751 cp_build_function_call.
752 (cxx_maybe_build_cleanup): Likewise.
753 * decl2.c (generate_ctor_or_dtor_function): Likewise.
754 * except.c (do_get_exception_ptr): Likewise.
755 (do_begin_catch): Likewise.
756 (do_allocate_exception): Likewise.
757 (do_free_exception): Likewise.
758 (build_throw): Likewise. Use cp_build_function_call_vec instead
759 of cp_build_function_call.
760 (do_end_catch): Likewise.
762 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
764 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
765 (struct cp_declarator): Move id_loc field up.
767 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
769 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
770 this file is included before c-common.h. Define GCC_DIAG_STYLE
771 before including diagnostic-core.h and toplev.h.
772 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
773 * pt.c: Include cp-tree.h before c-common.h.
775 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
777 * tree.c (c_register_addr_space): Add stub.
779 2010-05-28 Joseph Myers <joseph@codesourcery.com>
781 * g++spec.c (lang_specific_driver): Use fatal_error instead of
784 2010-05-28 Dodji Seketeli <dodji@redhat.com>
786 Revert fix of PR c++/44188
787 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
789 * tree.c (typedef_variant_p): Revert moving this definition to
791 * decl.c (grokdeclarator): Revert naming typedef handling.
793 2010-05-27 Joseph Myers <joseph@codesourcery.com>
795 * call.c: Include diagnostic-core.h instead of diagnostic.h.
796 * cp-lang.c: Don't include diagnostic.h
797 * name-lookup.c: Include diagnostic-core.h instead of
799 (cp_emit_debug_info_for_using): Use seen_error.
800 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
801 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
802 * pt.c (iterative_hash_template_arg): Use seen_error.
803 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
804 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
805 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
806 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
809 2010-05-25 Dodji Seketeli <dodji@redhat.com>
812 * cp-tree.h (typedef_variant_p): Move this declaration to
814 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
815 * decl.c (grokdeclarator): Do not rename debug info of an
816 anonymous tagged type named by a typedef.
818 2010-05-27 Jason Merrill <jason@redhat.com>
821 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
824 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
827 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
828 * class.c (layout_class_type): Likewise.
829 * decl.c (finish_enum): Likewise.
830 * mangle.c (write_builitin_type): Likewise.
832 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
834 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
836 * decl.c (grokdeclarator): Handle __int128.
837 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
838 (cp_parser_simple_type_specifier): Likewise.
839 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
840 * typeck.c (cp_common_type): Handle __int128.
841 * mangle.c (integer_type_codes): Add itk_int128 and
844 2010-05-26 Jason Merrill <jason@redhat.com>
847 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
850 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
852 * cp-lang.c: Do not include expr.h.
854 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
856 * decl.c: Do not include rtl.h
857 * semantics.c: Likewise.
859 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
861 * cp-tree.h: Do not include splay-tree.h.
862 (struct prtmem_cst): Remove unused field and false comment.
863 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
864 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
865 * init.c: Do not include rtl.h and expr.h.
866 * class.c: Do not include rtl.h. Include splay-tree.h.
867 (build_clone): Use plain NULL instead of NULL_RTX.
868 * decl.c: Do not include expr.h. Explain why rtl.h has to be
869 included. Include splay-tree.h.
870 * method.c: Do not include rtl.h and expr.h.
871 (use_thunk): Use plain NULL instead of NULL_RTX.
872 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
873 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
874 and target.h. Include splay-tree.h.
875 * expr.c: Do not include rtl.h and expr.h.
876 * pt.c: Do not include obstack.h and rtl.h.
877 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
878 (tsubst_decl): Likewise.
879 (instantiate_decl): Likewise.
880 * semantics.c: Do not include exprt.h and debug.h. Explain why
881 rtl.h has to be included.
882 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
883 * call.c: Do not include rtl.h and expr.h.
884 * search.c: Do not include obstack.h and rtl.h.
885 * friend.c: Do not include rtl.h and expr.h.
886 * Make-lang.in: Update dependencies.
888 2010-05-25 Jakub Jelinek <jakub@redhat.com>
891 * parser.c (non_integral_constant): Add NIC_NONE.
892 (required_token): Add RT_NONE.
893 (cp_parser_unary_expression): Initialize non_constant_p
895 (cp_parser_asm_definition): Initialize missing to RT_NONE.
896 (cp_parser_primary_expression, cp_parser_postfix_expression,
897 cp_parser_cast_expression, cp_parser_binary_expression,
898 cp_parser_functional_cast): Fix formatting.
900 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
903 * parser.c: Remove inclusion of dyn-string.h.
904 (non_integral_constant): New enum.
905 (name_lookup_error): New enum.
906 (required_token): New enum.
907 (cp_parser_required_error): New function.
908 (cp_parser_require): Change the type of variable token_desc to
909 required_token and use cp_parser_required_error.
910 (cp_parser_require_keyword): Likewise.
911 (cp_parser_error): Use gmsgid as parameter.
912 (cp_parser_name_lookup_error): Change the type of variable desired to
913 name_lookup_error and put the diagnostic in the full sentences. Change
915 (cp_parser_non_integral_constant_expression): Change the type of the
916 variable thing to non_integral_constant and put the diagnostics in
917 full sentences. Change caller.
919 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
922 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
924 2010-05-24 Joseph Myers <joseph@codesourcery.com>
926 * error.c (cp_diagnostic_starter): Update call to
927 diagnostic_build_prefix.
928 (cp_print_error_function,
929 print_instantiation_partial_context_line): Check show_column flag
932 2010-05-24 Jason Merrill <jason@redhat.com>
935 * decl.c (check_initializer): Don't wrap an init-list in a
937 * init.c (build_aggr_init): Don't assume copy-initialization if
938 init has CONSTRUCTOR_IS_DIRECT_INIT.
939 * call.c (build_new_method_call): Sanity check.
941 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
943 * rtti.c (tinfo_base_init): Use build_constructor instead of
944 build_constructor_from_list. Don't cons a tree node for
946 (generic_initializer): Use build_constructor_single instead of
947 build_constructor_from_list.
948 (ptr_initializer): Use build_constructor instead of
949 build_constructor_from_list
950 (ptm_initializer): Likewise.
951 (class_initializer): Likewise. Take varargs instead of TRAIL.
952 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
953 build_constructor instead of build_constructor_from_list.
955 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
957 * semantics.c: Include bitmap.h.
958 * Make-lang.in: Update dependencies.
960 2010-05-22 Jan Hubicka <jh@suse.cz>
962 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
964 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
966 2010-05-21 Joseph Myers <joseph@codesourcery.com>
968 * cxx-pretty-print.c: Correct merge error.
970 2010-05-21 Joseph Myers <joseph@codesourcery.com>
972 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
973 (cp_print_error_function): Use diagnostic_abstract_origin macro.
974 (cp_printer): Handle %K here using percent_K_format.
975 * cxx-pretty-print.c: Include tree-pretty-print.h.
976 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
979 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
981 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
982 Clean up redundant includes.
984 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
987 * decl.c (xref_basetypes): Return false in case of ill-formed
990 2010-05-19 Jason Merrill <jason@redhat.com>
992 * call.c (reference_binding): Use cp_build_qualified_type_real
993 and cp_type_quals consistently.
994 (add_function_candidate): Likewise.
995 (build_conditional_expr): Likewise.
996 (convert_like_real): Likewise.
997 (type_passed_as): Likewise.
998 * class.c (add_method): Likewise.
999 (same_signature_p): Likewise.
1000 (layout_class_type): Likewise.
1001 * decl.c (cxx_init_decl_processing): Likewise.
1002 (cp_fname_init): Likewise.
1003 (grokdeclarator): Likewise.
1004 * decl2.c (cp_reconstruct_complex_type): Likewise.
1005 * init.c (build_new_1): Likewise.
1006 * method.c (do_build_copy_constructor): Likewise.
1007 (implicitly_declare_fn): Likewise.
1008 * pt.c (tsubst_aggr_type): Likewise.
1010 * rtti.c (init_rtti_processing): Likewise.
1011 (build_headof): Likewise.
1012 (build_dynamic_cast_1): Likewise.
1013 (tinfo_base_init): Likewise.
1014 (emit_support_tinfos): Likewise.
1015 * semantics.c (capture_decltype): Likewise.
1016 * tree.c (cv_unqualified): Likewise.
1017 * typeck.c (composite_pointer_type): Likewise.
1018 (string_conv_p): Likewise.
1020 * mangle.c (write_CV_qualifiers_for_type): Tweak.
1022 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
1023 * decl.c (start_decl): Likewise.
1024 * semantics.c (finish_compound_literal): Likewise.
1025 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
1026 (cp_type_readonly): Remove.
1027 * cp-tree.h: Remove declaration.
1029 * typeck.c (merge_types): Preserve memfn quals.
1031 * decl.c (grokdeclarator): Don't check quals on fn type.
1032 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
1033 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
1036 * typeck.c (type_memfn_quals): New fn.
1037 (apply_memfn_quals): New fn.
1038 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
1039 (cp_type_readonly): Use cp_type_quals.
1040 * cp-tree.h: Add declarations.
1041 * tree.c (cp_build_qualified_type_real): Don't set, but do
1042 preserve, quals on FUNCTION_TYPE.
1043 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
1044 * decl.c (build_ptrmem_type): Likewise.
1045 (grokdeclarator): Likewise.
1046 (static_fn_type): Likewise.
1047 * decl2.c (change_return_type): Likewise.
1048 (cp_reconstruct_complex_type): Likewise.
1049 * pt.c (tsubst_function_type): Likewise.
1051 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
1053 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
1055 * tree.c (build_min_non_dep_call_vec): Update comment.
1057 2010-05-17 Jason Merrill <jason@redhat.com>
1059 * call.c (struct z_candidate): Add explicit_targs field.
1060 (add_template_candidate_real): Set it.
1061 (build_over_call): Use it to control init-list warning.
1064 * call.c (build_over_call): Limit init-list deduction warning to
1065 cases where the argument is actually an init-list.
1068 * call.c (build_over_call): Don't do bitwise copy for move ctor.
1070 2010-05-17 Dodji Seketeli <dodji@redhat.com>
1071 Jason Merrill <jason@redhat.com>
1074 * decl.c (compute_array_index_type): Call mark_rvalue_use.
1076 2010-05-15 Jason Merrill <jason@redhat.com>
1078 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
1079 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
1081 (finish_eh_spec_block): Adjust.
1083 2010-05-15 Jakub Jelinek <jakub@redhat.com>
1086 * pt.c (tsubst): Unshare template argument.
1088 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
1090 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
1091 * Make-lang.in: Fix dependencies accordingly.
1093 2010-05-14 Jason Merrill <jason@redhat.com>
1096 * except.c (build_throw): Simplify, adjust for DR 475.
1099 * except.c (dtor_nothrow): Return nonzero for type with
1103 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
1104 gimple_build_eh_must_not_throw.
1106 2010-05-14 Martin Jambor <mjambor@suse.cz>
1108 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
1111 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
1113 * call.c (build_new_method_call): Change warning text.
1114 * typeck2.c (build_functional_cast): Change error text.
1116 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
1119 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
1120 shadowing the outer parameter or variables by the declaration of
1121 nested function in nested structure or class. Warn the shadowing by
1122 the declaration of nested lambda expression.
1124 2010-05-13 Jason Merrill <jason@redhat.com>
1126 * typeck.c (cp_build_array_ref): Factor out from...
1127 (build_array_ref): ...here. Drop complain parm.
1128 (build_new_op): Adjust.
1129 * class.c (build_vtbl_ref_1): Adjust.
1130 * decl2.c (grok_array_decl): Adjust.
1131 * cp-tree.h: Adjust prototypes.
1133 2010-05-13 Jan Hubicka <jh@suse.cz>
1135 * decl.c (cp_finish_decl): Do not worry about used attribute.
1137 2010-05-12 Jason Merrill <jason@redhat.com>
1139 * typeck.c (build_array_ref): Take complain parm.
1140 * cp-tree.h: Add it to prototype.
1141 * call.c (build_new_op): Pass it.
1142 * class.c (build_vtbl_ref): Pass it.
1143 * decl2.c (grok_array_decl): Pass it.
1147 * cp-tree.def (NULLPTR_TYPE): Remove.
1148 * cp-tree.h (NULLPTR_TYPE_P): New.
1149 (SCALAR_TYPE_P): Use it.
1150 (nullptr_type_node): New.
1151 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
1152 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
1154 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
1155 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1156 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
1157 * mangle.c (write_type): Likewise.
1158 * name-lookup.c (arg_assoc_type): Likewise.
1159 * typeck.c (build_reinterpret_cast_1): Likewise.
1160 * rtti.c (typeinfo_in_lib_p): Likewise.
1161 (emit_support_tinfos): Remove local nullptr_type_node.
1163 * cp-tree.h (UNKNOWN_TYPE): Remove.
1164 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
1165 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
1166 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
1167 * class.c (instantiate_type): Check unknown_type_node rather than
1169 * name-lookup.c (maybe_push_decl): Likewise.
1170 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1171 (get_typeid): Likewise.
1172 * semantics.c (finish_offsetof): Likewise.
1175 * call.c (add_template_candidate_real): If deduction fails, still
1176 add the template as a non-viable candidate.
1177 (equal_functions): Handle template candidates.
1178 (print_z_candidate): Likewise.
1179 (print_z_candidates): Likewise.
1180 (build_new_function_call): Likewise.
1182 * cp-tree.h (LOOKUP_LIST_ONLY): New.
1183 * call.c (add_candidates): Enforce it.
1184 (build_new_method_call): Try non-list ctor if no viable list ctor.
1185 (build_user_type_conversion_1): Likewise.
1187 * call.c (add_candidates): Distinguish between type(x) and
1189 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
1190 (build_new_method_call): Give better error for conversion op.
1192 * call.c (add_candidates): Add first_arg and return_type parms.
1193 Add special constructor/conversion op handling.
1194 (convert_class_to_reference): Use it.
1195 (build_user_type_conversion_1): Likewise.
1196 (build_op_call): Likewise.
1197 (build_new_method_call): Likewise.
1198 (build_new_op): Adjust.
1199 (perform_overload_resolution): Adjust.
1201 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
1206 * pt.c (process_partial_specialization): Return error_mark_node
1207 in case of unused template parameters in partial specialization.
1209 2010-05-11 Jakub Jelinek <jakub@redhat.com>
1212 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
1213 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
1214 look at its second operand.
1216 2010-05-10 Jason Merrill <jason@redhat.com>
1219 * semantics.c (baselink_for_fns): Revert earlier change.
1222 * typeck.c (cp_build_modify_expr): Complain about assignment to
1223 array from init list.
1225 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
1228 * decl.c (check_initializer): strip array type before checking for
1229 uninitialized const or ref members.
1231 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
1234 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
1235 error count. Emit errors only if compain is true.
1236 (build_new_1): Do not return error_mark_node if
1237 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
1238 errors. Delay the check for user-provided constructor.
1239 (perform_member_init): Adjust.
1240 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
1243 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
1244 Jason Merrill <jason@redhat.com>
1246 Add support for C++0x nullptr.
1247 * cp-tree.def: Add NULLPTR_TYPE.
1248 * cp-tree.h: Add nullptr_node.
1249 (cp_tree_index): Add CPTI_NULLPTR.
1250 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
1251 * call.c (null_ptr_cst_p): Handle nullptr.
1252 (standard_conversion): Likewise.
1253 (convert_arg_to_ellipsis): Likewise.
1254 * mangle.c (write_type): Likewise.
1255 * name-lookup.c (arg_assoc_type): Likewise.
1256 * parser.c (cp_parser_primary_expression): Likewise.
1257 * typeck.c (cp_build_binary_op): Likewise.
1258 (build_reinterpret_cast_1): Likewise.
1259 * error.c (dump_type): Likewise.
1260 (dump_type_prefix, dump_type_suffix): Likewise.
1261 * decl.c (cxx_init_decl_processing): Likewise.
1262 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1263 * cvt.c (ocp_convert): Likewise.
1264 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
1265 nullptr_t tinfo in libsupc++.
1267 2010-05-06 Jason Merrill <jason@redhat.com>
1269 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
1271 2010-04-22 Jakub Jelinek <jakub@redhat.com>
1272 Dodji Seketeli <dodji@redhat.com>
1275 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
1277 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
1278 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
1279 (decay_conversion, perform_integral_promotions): Call rvalue_use.
1280 (cp_build_unary_op): Call lvalue_use.
1281 * decl.c (unused_but_set_errorcount): New variable.
1282 (poplevel): Issue -Wunused-but-set-variable diagnostics.
1283 (duplicate_decls): Merge DECL_READ_P flags.
1284 (start_cleanup_fn): Set DECL_READ_P flag.
1285 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
1286 * tree.c (rvalue): Call rvalue_use.
1287 * pt.c (convert_nontype_argument): Likewise.
1288 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
1289 finish_decltype_type): Likewise.
1290 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
1291 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
1292 or rvalue_use depending on the expr.
1293 * init.c (build_new, build_delete): Likewise.
1294 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
1296 2010-05-05 Jason Merrill <jason@redhat.com>
1299 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
1300 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
1302 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1305 * pt.c (unify): Check each elt for error_mark_node.
1307 2010-05-04 Jason Merrill <jason@redhat.com>
1310 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
1312 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1315 * call.c (build_new_method_call): Return error_mark_node if fns is
1318 2010-05-03 Dodji Seketeli <dodji@redhat.com>
1321 * pt.c (most_specialized_class): Pretend we are processing
1322 a template decl during the call to coerce_template_parms.
1324 2010-05-03 Jason Merrill <jason@redhat.com>
1328 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
1329 from the selected underlying type unless -fstrict-enums. Set
1330 ENUM_UNDERLYING_TYPE to have the restricted range.
1331 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
1332 * class.c (check_bitfield_decl): Likewise.
1334 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
1337 * init.c (build_new_1): Revert the accidental checkin in
1340 2010-04-30 Jason Merrill <jason@redhat.com>
1343 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
1344 (pp_cxx_type_specifier_seq): ...here.
1346 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
1348 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
1349 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
1351 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
1354 * typeck.c (warn_args_num): New function.
1355 (convert_arguments): Use warn_args_num to print the diagnostic
1358 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
1361 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
1362 user-provided constructor while recursing.
1364 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
1367 * error.c (print_instantiation_partial_context_line): Handle
1368 recursive instantiation.
1369 (print_instantiation_partial_context): Likewise.
1371 2010-04-27 Jason Merrill <jason@redhat.com>
1373 * init.c (perform_member_init): Check CLASS_TYPE_P.
1375 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
1378 * init.c (perform_member_init): check for uninitialized const or
1379 reference members, including array types.
1381 2010-04-24 Jason Merrill <jason@redhat.com>
1383 * tree.c (get_fns): Split out from get_first_fn.
1384 * cp-tree.h: Declare it.
1385 * search.c (shared_member_p): Use it.
1386 * semantics.c (finish_qualified_id_expr): Simplify.
1387 (finish_id_expression): Simplify.
1389 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
1390 whenever object is NULL_TREE. Don't do 'this' capture here.
1391 (finish_qualified_id_expr): Pass NULL_TREE.
1392 (finish_id_expression): Likewise.
1393 (lambda_expr_this_capture): Likewise.
1395 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
1396 rather than checking current_class_ref directly.
1397 (finish_call_expr): Likewise.
1400 * name-lookup.c (qualify_lookup): Disqualify lambda op().
1401 * class.c (current_nonlambda_class_type): New fn.
1402 * semantics.c (nonlambda_method_basetype): New.
1403 * cp-tree.h: Declare them.
1404 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
1406 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
1409 * semantics.c (lambda_return_type): Complain about
1413 * tree.c (cv_unqualified): Handle error_mark_node.
1416 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
1417 if we don't want errors.
1420 * class.c (convert_to_base): Add complain parameter. Pass
1421 ba_quiet to lookup_base if we don't want errors.
1422 (build_vfield_ref): Pass complain to convert_to_base.
1423 * call.c (convert_like_real): Likewise.
1424 (initialize_reference): Likewise.
1425 (perform_direct_initialization_if_possible): Pass complain to
1427 * cp-tree.h: Adjust.
1429 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
1430 Jason Merrill <jason@redhat.com>
1433 * decl.c (check_for_uninitialized_const_var): Handle classes that need
1435 (check_initializer): Call it for classes that need constructing, too.
1436 * class.c (in_class_defaulted_default_constructor): New.
1437 * cp-tree.h: Declare it.
1439 2010-04-20 Jason Merrill <jason@redhat.com>
1442 * init.c (constant_value_1): Treat error_mark_node as a constant
1443 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
1444 * cvt.c (ocp_convert): Handle getting error_mark_node from
1445 integral_constant_value.
1446 * decl.c (compute_array_index_type): Likewise.
1448 2010-04-20 Dodji Seketeli <dodji@redhat.com>
1452 * typeck.c (incompatible_dependent_types_p): If one of the
1453 compared types if not a typedef then honour their main variant
1456 2010-04-20 Jakub Jelinek <jakub@redhat.com>
1458 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
1460 2010-04-19 Dodji Seketeli <dodji@redhat.com>
1463 * typeck.c (structural_comptypes): Test dependent typedefs
1464 incompatibility before testing for their main variant based
1467 2010-04-19 Jakub Jelinek <jakub@redhat.com>
1469 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
1470 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
1472 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1474 * decl.c (cxx_init_decl_processing): Remove second argument in call to
1475 build_common_tree_nodes.
1477 2010-04-14 Jason Merrill <jason@redhat.com>
1480 * parser.c (cp_parser_parenthesized_expression_list): Change
1481 is_attribute_list parm to int to indicate whether or not to
1482 handle initial identifier specially.
1483 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
1485 2010-04-13 Jason Merrill <jason@redhat.com>
1487 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
1489 * parser.c (cp_parser_lambda_expression): Complain about lambda in
1490 unevaluated context.
1491 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
1493 2010-04-12 Jason Merrill <jason@redhat.com>
1496 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
1497 return value directly.
1499 * call.c (type_decays_to): Call cv_unqualified for non-class type.
1501 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
1504 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
1505 * init.c (build_new_1): Check for uninitialized const members and
1506 uninitialized reference members, when using new without
1507 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
1508 (diagnose_uninitialized_cst_or_ref_member): Define, call
1509 diagnose_uninitialized_cst_or_ref_member_1.
1510 (diagnose_uninitialized_cst_or_ref_member_1): New function.
1512 2010-04-12 Richard Guenther <rguenther@suse.de>
1515 * semantics.c (expand_or_defer_fn_1): Do not keep extern
1516 template inline functions.
1518 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
1521 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
1524 2010-04-07 Jason Merrill <jason@redhat.com>
1527 * decl.c (start_preparsed_function): Do defer nested functions.
1529 PR c++/11094, DR 408
1530 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
1531 * decl2.c (finish_static_data_member_decl): Set it.
1532 * decl.c (duplicate_decls): Propagate it.
1533 * pt.c (tsubst_decl): Don't substitute the domain of an array
1534 VAR_DECL if it's set.
1535 (regenerate_decl_from_template): Substitute it here.
1536 (type_dependent_expression_p): Return true if it's set.
1537 * semantics.c (finish_decltype_type): Instantiate such a variable.
1538 * typeck.c (cxx_sizeof_expr): Likewise.
1539 (strip_array_domain): New.
1542 * name-lookup.c (current_decl_namespace): Non-static.
1543 (pop_nested_namespace): Sanity check.
1544 * cp-tree.h: Declare current_decl_namespace.
1545 * decl.c (grokvardecl): Use it instead of current_namespace.
1546 (grokfndecl): Likewise.
1549 * pt.c (tsubst_friend_function): Instatiate a friend that has already
1552 * pt.c (print_template_statistics): New.
1553 * cp-tree.h: Declare it.
1554 * tree.c (cxx_print_statistics): Call it.
1557 * decl.c (grokvardecl): Tweak warning message.
1558 (grokfndecl): Likewise.
1560 2010-04-07 Dodji Seketeli <dodji@redhat.com>
1563 *pt.c (tsubst_decl): Get the arguments of a specialization from
1564 the specialization template, not from the most general template.
1566 2010-04-07 Dodji Seketeli <dodji@redhat.com>
1569 * typeck2.c (process_init_constructor_record):
1570 value-initialize members that are are not explicitely
1573 2010-04-07 Jie Zhang <jie@codesourcery.com>
1576 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
1577 when all of its elements are non-constant and have been split out.
1579 2010-04-06 Taras Glek <taras@mozilla.com>
1580 Jason Merrill <jason@redhat.com>
1582 * parser.c (cp_parser_class_specifier): Set class location to that
1583 of IDENTIFIER_NODE instead of '{' when possible.
1584 * semantics.c (begin_class_definition): Do not overide locations
1585 with less precise ones.
1587 2010-04-06 Jason Merrill <jason@redhat.com>
1590 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
1593 * pt.c (maybe_update_decl_type): Check the return value from
1596 2010-04-01 Jason Merrill <jason@redhat.com>
1598 * decl.c (next_initializable_field): No longer static.
1599 * cp-tree.h: Declare it.
1600 * call.c (build_aggr_conv): Fail if there are more initializers
1601 than initializable fields.
1603 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
1604 instead of void_zero_node.
1606 2010-03-31 Dodji Seketeli <dodji@redhat.com>
1609 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
1610 * pt.c (end_template_parm_list): Store sibling template parms of
1611 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
1612 (push_template_decl_real): Don't store the containing template decl
1613 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
1614 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
1615 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
1618 2010-03-30 Jason Merrill <jason@redhat.com>
1621 * pt.c (push_template_decl_real): Deal better with running out of
1622 scopes before running out of template parms.
1626 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
1627 function parameter context. Don't print an error if parsing
1631 * pt.c (more_specialized_fn): Don't control cv-qualifier check
1634 2010-03-26 Jason Merrill <jason@redhat.com>
1637 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
1638 c++0x mode, but not other type-names.
1640 2010-03-26 Dodji Seketeli <dodji@redhat.com>
1643 * pt.c (add_to_template_args): Support NULL ARGS;
1644 (most_specialized_class): call coerce_template_parms on
1645 template arguments passed to get_class_bindings. Use
1646 add_to_template_args.
1647 (unify): Handle VAR_DECLs.
1649 2010-03-26 Dodji Seketeli <dodji@redhat.com>
1651 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
1653 * pt.c (get_template_parms_at_level): Adjust.
1655 2010-03-25 Dodji Seketeli <dodji@redhat.com>
1658 * cp-tree.h (get_template_parms_at_level): Declare ...
1659 * pt.c (get_template_parms_at_level): ... new function.
1660 * typeck.c (get_template_parms_of_dependent_type): If a template
1661 type parm's DECL_CONTEXT isn't yet set, get its siblings from
1662 current_template_parms. Use get_template_parms_at_level. Remove
1664 (incompatible_dependent_types_p): If we get empty parms from just one
1665 of the template type parms we are comparing then the template parms are
1668 2010-03-24 Jason Merrill <jason@redhat.com>
1671 * parser.c (make_declarator): Initialize id_loc.
1672 (cp_parser_lambda_declarator_opt): And set it.
1674 2010-03-23 Jason Merrill <jason@redhat.com>
1676 Make lambda conversion op and op() non-static.
1677 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
1678 Also add the thunk function returned by the conversion op.
1679 Mark the conversion deleted if the op() is variadic.
1680 * decl2.c (mark_used): Give helpful message about deleted conversion.
1681 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
1682 * semantics.c (finish_this_expr): Adjust.
1683 * mangle.c (write_closure_type_name): Adjust.
1684 * decl.c (grok_op_properties): Don't allow it.
1685 * call.c (build_user_type_conversion_1): No static conversion ops.
1686 (build_op_call): Or op().
1688 * decl2.c (change_return_type): Fix 'this' quals.
1690 2010-03-22 Jason Merrill <jason@redhat.com>
1693 * tree.c (pod_type_p): Use old meaning in C++98 mode.
1696 * pt.c (contains_auto_r): New fn.
1697 (do_auto_deduction): Use it.
1698 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
1700 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
1703 * decl2.c (grokfield): Handle invalid initializers for member
1706 2010-03-20 Dodji Seketeli <dodji@redhat.com>
1709 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
1711 * decl2.c (vague_linkage_p): Likewise.
1713 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1716 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
1717 false, in the cp_parser_expression_statement call.
1719 2010-03-05 Jason Merrill <jason@redhat.com>
1721 * mangle.c (mangle_decl): Give name collision error even without
1724 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
1726 * pt.c (process_partial_specialization): Use error_n instead of
1729 2010-03-03 Jason Merrill <jason@redhat.com>
1732 * mangle.c (mangle_decl): Handle VAR_DECL, too.
1734 2010-03-03 Jason Merrill <jason@redhat.com>
1737 * mangle.c: Include cgraph.h.
1738 (mangle_decl): If the mangled name will change in a later
1739 ABI version, make the later mangled name an alias.
1740 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
1741 * Make-lang.in (mangle.o): Depend on cgraph.h.
1742 * method.c (make_alias_for): Handle VAR_DECL, too.
1743 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
1744 * tree.c (no_linkage_check): Adjust.
1745 * decl.c (maybe_commonize_var): Adjust.
1746 * cp-tree.h: Adjust.
1748 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
1750 * pt.c (redeclare_class_template): Use error_n and inform_n.
1752 2010-02-27 Mark Mitchell <mark@codesourcery.com>
1755 * cp-tree.h (push_tinst_level): Declare.
1756 (pop_tinst_level): Likewise.
1757 * pt.c (push_tinst_level): Give it external linkage.
1758 (pop_tinst_level): Likewise.
1759 * mangle.c (mangle_decl_string): Set the source location to that
1760 of the decl while mangling.
1762 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
1765 * pt.c (redeclare_class_template): Return false if there are erroneous
1766 template parameters.
1768 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
1770 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
1773 2010-02-24 Jason Merrill <jason@redhat.com>
1776 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
1778 * class.c (layout_class_type): Don't give -Wabi warning for a bug
1779 in a previous ABI version.
1781 2010-02-23 Jason Merrill <jason@redhat.com>
1784 * typeck2.c (digest_init_r): Accept value init of array.
1786 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
1789 * typeck.c (convert_arguments): Update error message.
1791 2010-02-22 Mike Stump <mikestump@comcast.net>
1794 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
1796 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1799 * error.c (print_instantiation_partial_context_line): New.
1800 (print_instantiation_partial_context): Print at most 12 contexts,
1801 skip the rest with a message.
1803 2010-02-21 Dodji Seketeli <dodji@redhat.com>
1806 * pt.c (lookup_template_class): Better support of specialization
1807 of member of class template implicit instantiation.
1809 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
1812 * call.c (conversion_null_warnings): Replace -Wconversion with
1814 * cvt.c (build_expr_type_conversion): Likewise.
1816 2010-02-18 Jason Merrill <jason@redhat.com>
1819 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
1822 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
1824 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
1825 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
1828 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
1832 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
1833 (maybe_update_decl_type): New fn.
1834 * parser.c (cp_parser_init_declarator): Use it.
1837 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
1839 2010-02-17 Jason Merrill <jason@redhat.com>
1842 * call.c (build_over_call): Don't create zero-sized assignments.
1843 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
1844 * cp-objcp-common.c (cp_expr_size): Remove.
1845 * cp-tree.h: Remove prototype.
1848 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
1849 decl we looked up doesn't match.
1852 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
1853 have an INIT_EXPR anymore.
1856 * pt.c (convert_nontype_argument): Change assert to test.
1858 2010-02-16 Jason Merrill <jason@redhat.com>
1860 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
1863 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
1864 VIEW_CONVERT_EXPR for conversions between structural equality types
1865 that the back end can't tell are the same.
1868 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
1869 cv-quals from element here.
1870 (cp_build_qualified_type_real): Not here. Preserve typedef name.
1872 2010-02-14 Jason Merrill <jason@redhat.com>
1875 * semantics.c (finish_compound_literal): Use
1876 cp_apply_type_quals_to_decl when creating a static variable.
1878 2010-02-12 Jason Merrill <jason@redhat.com>
1881 * name-lookup.h (current_binding_level): Check for null
1884 2010-02-12 Jason Merrill <jason@redhat.com>
1887 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
1889 2010-02-12 Jakub Jelinek <jakub@redhat.com>
1892 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
1895 2010-02-10 Jason Merrill <jason@redhat.com>
1898 * semantics.c (outer_lambda_capture_p): Revert.
1899 (add_capture): Only finish_member_declaration if
1900 we're in the lambda class.
1901 (register_capture_members): New.
1902 * cp-tree.h: Declare it.
1903 * parser.c (cp_parser_lambda_expression): Call it.
1905 2010-02-10 Jason Merrill <jason@redhat.com>
1908 * semantics.c (outer_lambda_capture_p): Use current_function_decl
1909 instead of current_class_type.
1911 2010-02-10 Jason Merrill <jason@redhat.com>
1913 PR c++/42983, core issue 906
1914 * method.c (defaultable_fn_check): Check virtualness.
1916 2010-02-10 Jason Merrill <jason@redhat.com>
1919 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
1921 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
1923 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
1924 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
1926 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
1927 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
1928 (cp_parser_parameter_declaration)
1929 (cp_parser_exception_specification_opt)
1930 (cp_parser_exception_declaration): Likewise.
1931 * pt.c (check_default_tmpl_args): Likewise.
1932 * search.c (lookup_field_r): Likewise.
1934 2010-02-09 Jason Merrill <jason@redhat.com>
1937 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
1939 2010-02-09 Jason Merrill <jason@redhat.com>
1942 * decl2.c (change_return_type): New fn.
1943 * semantics.c (apply_lambda_return_type): Use it.
1944 * cp-tree.h: Declare it.
1946 2010-02-05 Richard Guenther <rguenther@suse.de>
1948 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
1949 * cp-lang.c: Include gt-cp-cp-lang.h.
1950 * config-lang.in (gtfiles): Add cp/cp-lang.c.
1952 2010-02-05 Dodji Seketeli <dodji@redhat.com>
1955 * typeck.c (get_template_parms_of_dependent_type): Try getting
1956 the template parameters fromt the type itself first.
1958 2010-02-03 Jason Merrill <jason@redhat.com>
1962 * mangle.c (write_unqualified_id): Split out from write_expression.
1963 (write_unqualified_name): Call it.
1964 (write_member_name): Likewise.
1965 (write_expression): Support TEMPLATE_ID_EXPR.
1966 Disambiguate operator names.
1969 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
1972 2010-02-02 Jason Merrill <jason@redhat.com>
1975 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
1976 * optimize.c (clone_body): Remap their initializers when making base
1978 (maybe_clone_body): Complain if multiple clones aren't safe.
1980 2010-01-29 Dodji Seketeli <dodji@redhat.com>
1987 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
1988 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
1989 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
1990 * pt.c (coerce_template_parms, type_unification_real,
1991 expand_template_argument_pack, coerce_template_parameter_pack):
1992 Set the non default template args count.
1993 (current_template_args): Always set non defaulted
1994 template args count when compiled with --enable-checking
1995 (tsubst_template_args, type_unification_real): Propagate the non
1996 defaulted template args count.
1997 * error.c (get_non_default_template_args_count): Renamed
1998 count_non_default_template_args into this. Don't calculate the
1999 non default template argument count anymore. Use the new
2000 accessor macros above to get it.
2001 (dump_template_argument_list, dump_type, dump_decl,
2002 dump_template_parms): Adjust.
2003 * parser.c (cp_parser_template_argument_list): Always set defaulted
2004 template args count when compiled with --enable-checking.
2006 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
2008 * decl.c (redeclaration_error_message): Wrap the return messages into
2009 G_() for easy translation.
2011 2010-01-28 Jason Merrill <jason@redhat.com>
2014 * semantics.c (begin_class_definition): Don't use type_as_string.
2016 2010-01-28 Dodji Seketeli <dodji@redhat.com>
2020 * typeck.c (get_template_parms_of_dependent_type): Factorized
2021 this out of incompatible_template_type_parms_p
2022 (incompatible_dependent_types_p): Renamed
2023 incompatible_template_type_parms_p into this. Make it detect
2024 two incompatible dependent typedefs too.
2025 (structural_comptypes): Use incompatible_dependent_types_p.
2026 * pt.c (get_template_info):
2027 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
2029 2010-01-20 Janis Johnson <janis187@us.ibm.com>
2030 Jason Merrill <jason@redhat.com>
2032 * mangle.c (write_type): Mangle transparent record as member type.
2033 * semantics.c (begin_class_definition): Recognize decimal classes
2034 and set TYPE_TRANSPARENT_AGGR.
2036 2010-01-20 Jason Merrill <jason@redhat.com>
2039 * mangle.c (write_expression): Handle tree codes that have extra
2040 arguments in the middle-end.
2042 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
2045 * except.c (expand_start_catch_block): Deal correctly with
2046 do_begin_catch returning error_mark_node.
2048 2010-01-20 Jason Merrill <jason@redhat.com>
2051 * class.c (layout_class_type): Set packed_maybe_necessary for packed
2055 * semantics.c (build_lambda_object): Call mark_used on captured
2059 * decl.c (grokdeclarator): Clear type_quals for a member function
2060 declared using a typedef. Don't complain about adding cv-quals
2061 to a function typedef in C++0x mode.
2063 2010-01-20 Jakub Jelinek <jakub@redhat.com>
2065 * decl.c (create_array_type_for_decl): Remove set but not used
2066 variable error_msg. Remove break stmts after return stmts.
2068 2010-01-19 Dodji Seketeli <dodji@redhat.com>
2070 * error.c (dump_template_parms, count_non_default_template_args):
2071 Revert fix of PR c++/42634.
2073 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2076 * error.c (dump_template_parms): Use innermost template
2077 arguments before calling count_non_default_template_args.
2078 (count_non_default_template_args): We are being called with
2079 template innermost arguments now. There is no need to ensure
2082 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2085 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
2087 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2090 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
2092 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2095 *pt.c (tsubst_decl): Get the arguments of a specialization from
2096 the specialization template, not from the most general template.
2098 2010-01-16 Jason Merrill <jason@redhat.com>
2101 * semantics.c (finish_decltype_type): Within a template, treat
2102 unresolved CALL_EXPR as dependent.
2104 2010-01-15 Dodji Seketeli <dodji@redhat.com>
2106 * error.c (dump_template_parms,count_non_default_template_args):
2107 Revert changes of PR c++/42634.
2109 2010-01-14 Jakub Jelinek <jakub@redhat.com>
2112 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
2113 functions with noreturn attribute.
2115 2010-01-14 Jason Merrill <jason@redhat.com>
2118 * call.c (build_new_method_call): Don't free the vec here.
2121 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
2123 2010-01-13 Dodji Seketeli <dodji@redhat.com>
2126 * error.c (dump_template_parms): Use innermost template
2127 arguments before calling count_non_default_template_args.
2128 (count_non_default_template_args): We are being called with
2129 template innermost arguments now. There is no need to ensure
2132 2010-01-07 Dodji Seketeli <dodji@redhat.com>
2135 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
2136 arguments that were previously deduced.
2138 2010-01-05 Jason Merrill <jason@redhat.com>
2140 * pt.c (unify_pack_expansion): Handle deduction from init-list.
2141 * call.c (build_over_call): Don't complain about it.
2143 2010-01-04 Jason Merrill <jason@redhat.com>
2146 * pt.c (tsubst_decl): Don't apply type attributes in place.
2149 * semantics.c (describable_type): Remove decltype comment and
2154 Copyright (C) 2010 Free Software Foundation, Inc.
2156 Copying and distribution of this file, with or without modification,
2157 are permitted in any medium without royalty provided the copyright
2158 notice and this notice are preserved.