1 2010-07-21 Jason Merrill <jason@redhat.com>
3 * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
5 * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
8 2010-07-20 Jeffrey Yasskin <jyasskin@google.com>
11 * pt.c (instantiate_class_template): Propagate the template's
12 location to its instance.
14 2010-07-20 Jason Merrill <jason@redhat.com>
17 * pt.c (tsubst_copy_and_build): Rework last change.
20 * pt.c (tsubst_copy_and_build): Handle partial substitution of
23 2010-07-19 Jason Merrill <jason@redhat.com>
26 * semantics.c (finish_decltype_type): Correct decltype
27 of parenthesized rvalue reference variable.
30 * tree.c (cp_tree_equal): Compare type of *CAST_EXPR.
31 * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR.
33 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com>
36 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t
38 * cp-tree.h: Adjust declaration.
39 * init.c (perform_member_init): Adjust caller.
40 * decl.c (grok_reference_init, cp_finish_decl): Likewise.
41 * typeck2.c (store_init_value): Likewise.
42 (build_functional_cast): Pass complain argument to
43 build_x_compound_expr_from_list.
45 2010-07-16 Jason Merrill <jason@redhat.com>
48 * pt.c (process_partial_specialization): Diagnose partial
49 specialization after instantiation.
50 (most_specialized_class): Add complain parm.
52 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.
54 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
56 * init.c (build_new_1): Use cp_build_function_call_nary instead of
57 cp_build_function_call.
59 2010-07-15 Jason Merrill <jason@redhat.com>
62 * call.c (add_function_candidate): If we're working on an implicit
63 declaration, don't consider candidates that won't match.
64 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
65 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
68 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
69 (TYPE_HAS_USER_OPEQ): New.
70 * decl.c (grok_special_member_properties): Set it.
71 * class.c (add_implicitly_declared_members): Don't lazily declare
72 constructors/operator= if a base or member has a user-declared one.
73 (check_bases_and_members, check_bases): Adjust.
74 (check_field_decls, check_field_decl): Adjust.
76 2010-07-15 Anatoly Sokolov <aesok@post.ru>
78 * decl.c (integer_three_node): Remove.
79 (cxx_init_decl_processing): Do not initialize the integer_three_node.
80 * cp-tree.h (integer_three_node): Remove.
82 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
84 * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
87 * cp-gimplify.c: Likewise.
92 * name-lookup.c: Likewise.
93 * optimize.c: Likewise.
98 * semantics.c: Likewise.
100 * typeck2.c: Likewise.
102 2010-07-14 Jason Merrill <jason@redhat.com>
104 * init.c (sort_mem_initializers): Rename "field_type" to "ctx".
105 (build_field_list): Cache field type.
107 Implement C++0x unrestricted unions (N2544)
108 * class.c (check_field_decl): Loosen union handling in C++0x.
109 * method.c (walk_field_subobs): Split out from...
110 (synthesized_method_walk): ...here. Set msg before loops.
111 (process_subob_fn): Check for triviality in union members.
112 * init.c (sort_mem_initializers): Splice out uninitialized
113 anonymous unions and union members.
114 (push_base_cleanups): Don't automatically destroy anonymous unions
117 2010-07-13 Jason Merrill <jason@redhat.com>
120 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
121 (TYPE_HAS_USER_OPEQ): New.
122 * decl.c (grok_special_member_properties): Set it.
123 * class.c (add_implicitly_declared_members): Don't lazily declare
124 constructors/operator= if a base or member has a user-declared one.
125 (check_bases_and_members, check_bases): Adjust.
126 (check_field_decls, check_field_decl): Adjust.
127 * method.c (synthesized_method_walk): Initialize check_vdtor.
130 * mangle.c (write_type): Canonicalize.
131 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
132 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
134 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
137 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
139 * typeck.c (get_delta_difference): Update prototype, add a
140 tsubst_flags_t parameter; update get_delta_difference_1 calls and
141 add checks for error_mark_node.
142 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
143 parameter; update lookup_base call.
144 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
145 parameter; update get_delta_difference call and add check for
147 (convert_ptrmem): Update prototype, add a tsubst_flags_t
148 parameter; update get_delta_difference call and add check for
149 error_mark_node; update build_ptrmemfunc call.
150 (build_static_cast_1): Adjust convert_ptrmem call.
151 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
152 (cp_build_unary_op): Adjust build_ptrmemfunc call.
153 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
154 and build_ptrmemfunc calls.
155 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
157 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
160 * call.c (build_temp): Add tsubst_flags_t complain parameter;
161 adjust build_special_member_call call, pass complain.
162 (convert_like_real): Adjust build_temp call, pass complain.
164 2010-07-09 Jason Merrill <jason@redhat.com>
167 * cp-tree.h (BV_LOST_PRIMARY): New macro.
168 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
170 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
172 2010-07-08 Jason Merrill <jason@redhat.com>
175 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
176 virtual bases for covariant thunks.
178 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
180 * cp-tree.h: Do not include toplev.h.
182 2010-07-06 Jason Merrill <jason@redhat.com>
185 * call.c (is_std_init_list): Look through typedefs.
188 * init.c (build_offset_ref): If scope isn't dependent,
189 don't exit early. Look at TYPE_MAIN_VARIANT.
190 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
192 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
194 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
196 * cp-tree.h (impl_conv_void): New type.
197 (convert_to_void): Adjust prototype.
198 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
199 diagnostic for easy translation. Change caller.
200 * typeck.c: Update call to convert_to_void.
201 * semantics.c: Likewise.
204 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
206 * decl.c (cp_finish_decl): Call add_local_decl.
207 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
209 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
211 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
214 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
217 * parser.c (cp_parser_primary_expression): Error if local template is
220 2010-07-02 Le-Chun Wu <lcwu@google.com>
223 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
224 (variable or type) shadows another type.
226 2010-07-02 Jakub Jelinek <jakub@redhat.com>
229 * typeck.c (convert_for_assignment): When converting a convertible
230 vector type or objc++ types, call mark_rvalue_use.
231 * typeck2.c (build_m_component_ref): Use return values from
232 mark_rvalue_use or mark_lvalue_use.
233 * class.c (build_base_path): Likewise.
234 * call.c (build_conditional_expr): Likewise.
236 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
239 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
242 2010-07-01 Richard Guenther <rguenther@suse.de>
244 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
245 predicate we are looking for, allow non-gimplified
248 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
251 * typeck.c (cp_build_unary_op): Early return error_mark_node when
252 arg is NULL_TREE too.
253 * call.c (convert_class_to_reference): Return error_mark_node when
256 2010-06-30 Michael Matz <matz@suse.de>
258 * repo.c (finish_repo): Fix typo.
260 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
262 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
264 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
266 * repo.c (pending_repo): Change type to a VEC.
267 (finish_repo): Adjust for new type of pending_repo.
268 (repo_emit_p): Likewise.
270 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
272 * tree.c: Include gimple.h. Do not include tree-flow.h
273 * decl.c: Do not include tree-flow.h
274 * Make-lang.in: Adjust dependencies.
276 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
278 * decl.c (incomplete_var): Declare. Declare VECs containing them.
279 (incomplete_vars): Adjust comment. Change type to a VEC.
280 (maybe_register_incomplete_var): Adjust for new type.
281 (complete_vars): Adjust iteration over incomplete_vars.
283 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
285 * decl.c (struct named_label_entry): Change type of bad_decls field
287 (poplevel_named_label_1): Adjust for new type of bad_decls.
288 (check_goto): Likewise.
290 2010-06-29 Jason Merrill <jason@redhat.com>
292 Enable implicitly declared move constructor/operator= (N3053).
293 * class.c (add_implicitly_declared_members): A class with no
294 explicitly declared copy or move constructor gets both declared
295 implicitly, and similarly for operator=.
296 (check_bases): A type with no copy ctor does not inhibit
297 a const copy ctor in a derived class. It does mean the derived
299 (check_field_decl): Likewise.
300 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
301 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
302 (trivially_copyable_p): Likewise.
303 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
304 * class.c (finish_struct_bits): Likewise.
305 * tree.c (build_target_expr_with_type): Likewise.
306 * typeck2.c (store_init_value): Likewise.
308 Enable implicitly deleted functions (N2346)
309 * class.c (check_bases_and_members): Adjust lambda flags.
310 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
312 * decl2.c (mark_used): Adjust error for use of deleted function.
314 Machinery to support implicit delete/move.
315 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
316 has_complex_move_ctor, has_complex_move_assign bitfields.
317 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
318 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
319 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
320 (enum special_function_kind): Add sfk_move_assignment.
321 (LOOKUP_SPECULATIVE): New.
322 * call.c (build_over_call): Return early if it's set.
323 (build_over_call): Use trivial_fn_p.
324 * class.c (check_bases): If the base has no default constructor,
325 the derived one is non-trivial. Handle move ctor/op=.
326 (check_field_decl): Likewise.
327 (check_bases_and_members): Handle move ctor/op=.
328 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
329 (type_has_move_constructor, type_has_move_assign): New.
330 * decl.c (grok_special_member_properties): Handle move ctor/op=.
331 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
333 (do_build_copy_constructor): Use it.
334 (do_build_assign_ref): Likewise. Handle move assignment.
335 (build_stub_type, build_stub_object, locate_fn_flags): New.
336 (locate_ctor): Use locate_fn_flags.
337 (locate_copy, locate_dtor): Remove.
338 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
339 (process_subob_fn, synthesized_method_walk): New.
340 (maybe_explain_implicit_delete): New.
341 (implicitly_declare_fn): Use synthesized_method_walk,
342 type_has_trivial_fn, and type_set_nontrivial_flag.
343 (defaulted_late_check): Set DECL_DELETED_FN.
344 (defaultable_fn_check): Handle sfk_move_assignment.
345 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
346 implicitly deleted move ctor/op=.
347 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
348 (lookup_fnfields_slot): New.
349 * semantics.c (omp_clause_info_fndecl): Remove.
350 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
351 get_copy_assign, trivial_fn_p.
352 (trait_expr_value): Adjust call to locate_ctor.
353 * tree.c (special_function_p): Handle sfk_move_assignment.
355 * class.c (type_has_virtual_destructor): New.
356 * cp-tree.h: Declare it.
357 * semantics.c (trait_expr_value): Use it.
359 * call.c (build_over_call): Only give warnings with tf_warning.
361 * name-lookup.c (pop_scope): Handle NULL_TREE.
363 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
364 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
365 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
366 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
367 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
368 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
369 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
370 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
371 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
372 (sfk_assignment_operator): Rename to sfk_copy_assignment.
373 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
374 * search.c, semantics.c, tree.c: Adjust.
376 * pt.c (dependent_scope_ref_p): Remove.
377 (value_dependent_expression_p): Don't call it.
378 (type_dependent_expression_p): Here either.
379 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
380 if the scope isn't dependent.
382 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
386 * pt.c (has_value_dependent_address): New.
387 (value_dependent_expression_p): Check it.
388 (convert_nontype_argument): Likewise. Call decay_conversion before
389 folding if we want a pointer.
390 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
391 scope is the current instantiation.
393 2010-06-28 Jakub Jelinek <jakub@redhat.com>
396 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
399 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
401 * init.c: Do not include except.h.
404 * cp-lang.c: Likewise.
406 * semantics.c: Likewise.
408 * except.c: Likewise.
409 (init_exception_processing): Do not set the removed
410 lang_protect_cleanup_actions here.
411 (cp_protect_cleanup_actions): Make non-static and remove prototype.
412 (doing_eh): New, moved from except.c but removed the do_warning flag.
413 (expand_start_catch_block): Update doing_eh call.
414 (expand_end_catch_block): Likewise.
415 (build_throw): Likewise.
416 * cp-tree.h: Prototype cp_protect_cleanup_actions.
417 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
418 cp_protect_cleanup_actions.
419 * Make-lang.in: Update dependencies.
421 2010-06-26 Jason Merrill <jason@redhat.com>
423 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
424 constructor called with a single argument that takes a reference
425 to the constructor's class.
426 (BAD_CONVERSION_RANK): New.
427 (compare_ics): Use it to compare bad ICSes.
429 2010-06-25 Joseph Myers <joseph@codesourcery.com>
431 * lang-specs.h: Remove +e handling.
433 2010-06-24 Andi Kleen <ak@linux.intel.com>
435 * parser.c: (cp_parser_question_colon_clause):
436 Switch to use cp_lexer_peek_token.
437 Call warn_for_omitted_condop. Call pedwarn for omitted
440 2010-06-22 Jakub Jelinek <jakub@redhat.com>
443 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
444 datum and mark_rvalue_use on component.
447 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
448 the CALL_EXPR has no arguments.
450 2010-06-21 Jason Merrill <jason@redhat.com>
452 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
454 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
457 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
459 * name-lookup.c (struct arg_lookup): Convert namespaces and
460 classes fields to VEC.
461 (arg_assoc_namespace): Adjust for new type of namespaces.
462 (arg_assoc_class): Adjust for new type of classes.
463 (lookup_arg_dependent): Use make_tree_vector and
465 * typeck2.c (build_x_arrow): Use vec_member.
467 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
470 * error.c (dump_decl): Better wording for anonymous namespace.
472 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
474 * class.c (build_vtbl_initializer): Adjust computation of new_position
475 and which entry to add padding for.
477 2010-06-16 Jason Merrill <jason@redhat.com>
479 * except.c (check_noexcept_r): Return the problematic function.
480 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
481 * pt.c (tsubst_copy_and_build): Pass it.
482 * parser.c (cp_parser_unary_expression): Likewise.
483 * cp-tree.h: Adjust prototype.
485 * method.c (defaulted_late_check): Give the defaulted method
486 the same exception specification as the implicit declaration.
488 2010-06-15 Jason Merrill <jason@redhat.com>
490 * class.c (add_implicitly_declared_members): Implicit assignment
491 operators can also be virtual overriders.
492 * method.c (lazily_declare_fn): Likewise.
494 * call.c (convert_like_real): Give "initializing argument of"
495 information for ambiguous conversion. Give source position
498 * call.c (print_z_candidates): Do print viable deleted candidates.
499 (joust): Don't choose a deleted function just because its worst
500 conversion is better than another candidate's worst.
502 * call.c (convert_like_real): Don't complain about
503 list-value-initialization from an explicit constructor.
505 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
506 DECL_SOURCE_LOCATION directly.
508 * class.c (type_has_user_provided_default_constructor): Use
511 * call.c (is_subseq): Handle ck_aggr, ck_list.
512 (compare_ics): Treat an aggregate or ambiguous conversion to the
513 same type as involving the same function.
515 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
517 * typeck.c (convert_for_assignment): Fix comment. Change message
518 format from %d to %qP.
519 (convert_for_initialization): Fix comment.
521 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
523 * cp-tree.h (expr_list_kind): New type.
524 (impl_conv_rhs): New type.
525 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
527 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
528 diagnostics for easy translation. Change caller.
529 (convert_for_initialization): Use impl_conv_rhs and change caller.
530 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
531 diagnostics for easy translation. Change caller.
532 * decl.c (bad_spec_place): New enum.
533 (bad_specifiers): Use it and emit the diagnostics for easy
534 translation. Change caller.
535 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
537 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
539 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
541 * decl2.c (cp_write_global_declarations): Adjust for new type of
543 * name-lookup.c (current_decl_namespace): Likewise.
544 (push_decl_namespace): Likewise.
545 (pop_decl_namespace): Likewise.
547 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
549 * call.c (build_java_interface_fn_ref): Call build_function_type_list
550 instead of build_function_type.
551 * decl.c (cxx_init_decl_processing): Likewise.
552 (declare_global_var): Likewise.
553 (get_atexit_node): Likewise.
554 (expand_static_init): Likewise.
555 * decl2.c (start_objects): Likewise.
556 (start_static_storage_duration_function): Likewise.
557 * except.c (init_exception_processing): Likewise.
558 (build_exc_ptr): Likewise.
559 (build_throw): Likewise.
560 * rtti.c (throw_bad_cast): Likewise.
561 (throw_bad_typeid): Likewise.
562 (build_dynamic_cast_1): Likewise.
564 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
566 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
567 (build_op_delete_call): Likewise.
568 (build_over_call): Likewise.
569 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
570 * pt.c (process_partial_specialization): Likewise.
571 (tsubst_template_args): Likewise.
572 * semantics.c (finish_asm_stmt): Likewise.
574 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
576 * decl.c (record_key_method_defined): New, broken out of ...
577 (finish_function): ... here. Call it.
578 (start_decl): Treat aliases as definitions.
580 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
582 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
584 * pt.c (maybe_process_partial_specialization): Likewise.
585 (register_specialization): Likewise.
586 (add_pending_template): Likewise.
587 (lookup_template_class): Likewise.
588 (push_tinst_level): Likewise.
590 * parser.c (cp_lexer_new_main): Likewise.
591 (cp_lexer_new_from_tokens): Likewise.
592 (cp_token_cache_new): Likewise.
593 (cp_parser_context_new): Likewise.
594 (cp_parser_new): Likewise.
595 (cp_parser_nested_name_specifier_opt): Likewise.
596 (cp_parser_template_id): Likewise.
598 * name-lookup.c (binding_entry_make): Likewise.
599 (binding_table_construct): Likewise.
600 (binding_table_new): Likewise.
601 (cxx_binding_make): Likewise.
602 (pushdecl_maybe_friend): Likewise.
603 (begin_scope): Likewise.
604 (push_to_top_level): Likewise.
606 * lex.c (init_reswords): Likewise.
607 (retrofit_lang_decl): Likewise.
608 (cxx_dup_lang_specific_decl): Likewise.
609 (copy_lang_type): Likewise.
610 (cxx_make_type): Likewise.
612 * decl.c (make_label_decl): Likewise.
613 (check_goto): Likewise.
614 (start_preparsed_function): Likewise.
615 (save_function_data): Likewise.
617 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
619 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
621 * class.c (finish_struct_1): Likewise.
623 * cp-tree.h (struct lang_type): Add variable_size GTY option.
624 (struct lang_decl): Likewise.
626 * parser.c (cp_parser_new): Update comment to not reference
629 2010-06-07 Jason Merrill <jason@redhat.com>
632 * error.c (dump_parameters): Mask out TFF_SCOPE.
633 (dump_simple_decl): Don't print the scope of a PARM_DECL.
634 (dump_scope): Remove no-op mask.
637 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
639 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
640 * init.c (build_offset_ref): Use it.
641 * pt.c (maybe_process_partial_specialization): Use it.
642 (instantiate_class_template): Use it.
643 * search.c (lookup_base): Use it.
645 2010-06-07 Jakub Jelinek <jakub@redhat.com>
648 * expr.c (mark_exp_read): Handle INDIRECT_REF.
649 * cvt.c (convert_to_void): Handle INDIRECT_REF like
653 * decl.c (initialize_local_var): If TREE_USED is set on the type,
654 set also DECL_READ_P on the decl.
656 2010-05-25 Dodji Seketeli <dodji@redhat.com>
659 * cp-tree.h (typedef_variant_p): Move this declaration to
661 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
662 * decl.c (grokdeclarator): Do not rename debug info of an
663 anonymous tagged type named by a typedef.
665 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
668 * class.c (check_field_decls): Move the call to
669 check_bitfield_decl before trying to set the
670 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
672 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
674 * typeck.c: Update include path for moved files.
677 * cp-gimplify.c: Likewise.
678 * cp-lang.c: Likewise.
680 * semantics.c: Likewise.
681 * cxx-pretty-print.h: Likewise.
683 * parser.c: Likewise.
684 * cp-objcp-common.c: Likewise.
685 * cp-tree.h: Likewise.
686 * name-lookup.c: Likewise.
688 * name-lookup.h: Likewise.
689 * config-lang.in: Update paths in gtfiles for files in c-family/.
690 * Make-lang.in: Likewise.
692 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
694 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
695 * typeck.c (build_ptrmemfunc): Likewise.
697 2010-06-04 Jason Merrill <jason@redhat.com>
699 * typeck2.c (merge_exception_specifiers): Adjust merging of
700 throw() and noexcept(true).
702 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
703 using an uninitialized variable.
705 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
706 (pp_cxx_expression): Likewise.
708 Implement noexcept-specification (15.4)
709 * parser.c (cp_parser_exception_specification_opt): Parse it.
710 Give -Wdeprecated warning about throw() specs.
711 * pt.c (tsubst_exception_specification): Handle it.
712 * error.c (dump_exception_spec): Handle it.
713 (dump_expr): Handle NOEXCEPT_EXPR.
714 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
715 * typeck.c (comp_except_specs): Handle compatibility rules.
716 Change exact parm to take an enum.
717 * typeck2.c (merge_exception_specifiers): Handle noexcept.
718 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
719 (type_throw_all_p, build_noexcept_spec): New fns.
720 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
721 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
722 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
723 (noexcept_true_spec, noexcept_false_spec): New macros.
724 * name-lookup.c (pushdecl_maybe_friend): Adjust.
725 * search.c (check_final_overrider): Adjust.
726 * decl.c (check_redeclaration_exception_specification): Adjust.
727 (use_eh_spec_block): Use type_throw_all_p.
728 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
729 Give operator new a noexcept-specification in C++0x mode.
730 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
731 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
733 Implement noexcept operator (5.3.7)
734 * cp-tree.def (NOEXCEPT_EXPR): New.
735 * except.c (check_noexcept_r, finish_noexcept_expr): New.
736 * cp-tree.h: Declare finish_noexcept_expr.
737 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
738 * pt.c (tsubst_copy_and_build): And tsubst it.
739 (type_dependent_expression_p): Handle it.
740 (value_dependent_expression_p): Handle it.
742 * call.c (build_conditional_expr): Never fold in unevaluated context.
743 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
744 * semantics.c (simplify_aggr_init_expr): Likewise.
745 * typeck.c (merge_types): Call merge_exception_specifiers.
746 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
747 DECL_ANTICIPATED for preferring new type.
749 2010-06-04 Joseph Myers <joseph@codesourcery.com>
751 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
754 2010-06-04 Jakub Jelinek <jakub@redhat.com>
757 * typeck.c (build_class_member_access_expr): Call mark_exp_read
758 on object for static data members.
760 2010-06-04 Jakub Jelinek <jakub@redhat.com>
761 Jason Merrill <jason@redhat.com>
764 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
765 with the same type, call mark_lvalue_use on both.
767 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
769 * class.c (struct vtbl_init_data_s): Remove last_init field.
770 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
772 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
774 (build_vtt): Likewise.
775 (initialize_vtable): Take a VEC instead of a tree.
776 (build_vtt_inits): Change return type to void. Take a VEC **
777 instead of a tree *; accumulate results into said VEC.
778 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
779 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
780 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
782 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
783 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
785 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
786 rather than tree_cons.
787 (build_vbase_offset_vtbl_entries): Likewise.
788 (add_vcall_offset): Likewise.
789 (build_rtti_vtbl_entries): Likewise.
790 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
791 * decl.c (initialize_artificial_var): Use build_constructor instead
792 of build_constructor_from_list.
794 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
797 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
800 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
802 * parser.c (cp_parser_mem_initializer_list): Change error text.
804 2010-06-02 Jakub Jelinek <jakub@redhat.com>
806 * cp-objcp-common.c (shadowed_var_for_decl): Change into
807 tree_decl_map hashtab from tree_map.
808 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
809 (init_shadowed_var_for_decl): Adjust initialization.
812 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
813 instead of calling mark_exp_read only when not an assignment.
816 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
817 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
818 Set DECL_VALUE_EXPR on var.
820 2010-06-02 Jason Merrill <jason@redhat.com>
822 * error.c (dump_type): Improve typedef handling.
827 * name-lookup.c (same_entity_p): New.
828 (ambiguous_decl): Multiple declarations of the same entity
831 2010-06-01 Jason Merrill <jason@redhat.com>
834 * call.c (add_list_candidates): Prefer the default constructor.
835 (build_aggr_conv): Treat missing initializers like { }.
836 * typeck2.c (process_init_constructor_record): Likewise.
837 * init.c (expand_default_init): Use digest_init for
838 direct aggregate initialization, too.
840 * call.c (add_list_candidates): Split out...
841 (build_user_type_conversion_1): ...from here.
842 (build_new_method_call): And here.
843 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
846 * call.c (build_list_conv): Set list-initialization flags properly.
848 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
850 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
852 2010-06-01 Arnaud Charlet <charlet@adacore.com>
853 Matthew Gingell <gingell@adacore.com>
855 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
856 * decl2.c: Include langhooks.h and c-ada-spec.h.
857 (cpp_check, collect_source_refs, collect_ada_namespace,
858 collect_all_refs): New functions.
859 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
860 * lang-specs.h: Ditto.
862 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
864 * cp-tree.h (cp_build_function_call_nary): Declare.
865 * typeck.c (cp_build_function_call_nary): Define.
866 * decl.c (register_dtor_fn): Use it instead of
867 cp_build_function_call.
868 (cxx_maybe_build_cleanup): Likewise.
869 * decl2.c (generate_ctor_or_dtor_function): Likewise.
870 * except.c (do_get_exception_ptr): Likewise.
871 (do_begin_catch): Likewise.
872 (do_allocate_exception): Likewise.
873 (do_free_exception): Likewise.
874 (build_throw): Likewise. Use cp_build_function_call_vec instead
875 of cp_build_function_call.
876 (do_end_catch): Likewise.
878 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
880 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
881 (struct cp_declarator): Move id_loc field up.
883 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
885 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
886 this file is included before c-common.h. Define GCC_DIAG_STYLE
887 before including diagnostic-core.h and toplev.h.
888 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
889 * pt.c: Include cp-tree.h before c-common.h.
891 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
893 * tree.c (c_register_addr_space): Add stub.
895 2010-05-28 Joseph Myers <joseph@codesourcery.com>
897 * g++spec.c (lang_specific_driver): Use fatal_error instead of
900 2010-05-28 Dodji Seketeli <dodji@redhat.com>
902 Revert fix of PR c++/44188
903 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
905 * tree.c (typedef_variant_p): Revert moving this definition to
907 * decl.c (grokdeclarator): Revert naming typedef handling.
909 2010-05-27 Joseph Myers <joseph@codesourcery.com>
911 * call.c: Include diagnostic-core.h instead of diagnostic.h.
912 * cp-lang.c: Don't include diagnostic.h
913 * name-lookup.c: Include diagnostic-core.h instead of
915 (cp_emit_debug_info_for_using): Use seen_error.
916 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
917 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
918 * pt.c (iterative_hash_template_arg): Use seen_error.
919 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
920 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
921 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
922 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
925 2010-05-25 Dodji Seketeli <dodji@redhat.com>
928 * cp-tree.h (typedef_variant_p): Move this declaration to
930 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
931 * decl.c (grokdeclarator): Do not rename debug info of an
932 anonymous tagged type named by a typedef.
934 2010-05-27 Jason Merrill <jason@redhat.com>
937 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
940 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
943 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
944 * class.c (layout_class_type): Likewise.
945 * decl.c (finish_enum): Likewise.
946 * mangle.c (write_builitin_type): Likewise.
948 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
950 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
952 * decl.c (grokdeclarator): Handle __int128.
953 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
954 (cp_parser_simple_type_specifier): Likewise.
955 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
956 * typeck.c (cp_common_type): Handle __int128.
957 * mangle.c (integer_type_codes): Add itk_int128 and
960 2010-05-26 Jason Merrill <jason@redhat.com>
963 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
966 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
968 * cp-lang.c: Do not include expr.h.
970 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
972 * decl.c: Do not include rtl.h
973 * semantics.c: Likewise.
975 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
977 * cp-tree.h: Do not include splay-tree.h.
978 (struct prtmem_cst): Remove unused field and false comment.
979 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
980 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
981 * init.c: Do not include rtl.h and expr.h.
982 * class.c: Do not include rtl.h. Include splay-tree.h.
983 (build_clone): Use plain NULL instead of NULL_RTX.
984 * decl.c: Do not include expr.h. Explain why rtl.h has to be
985 included. Include splay-tree.h.
986 * method.c: Do not include rtl.h and expr.h.
987 (use_thunk): Use plain NULL instead of NULL_RTX.
988 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
989 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
990 and target.h. Include splay-tree.h.
991 * expr.c: Do not include rtl.h and expr.h.
992 * pt.c: Do not include obstack.h and rtl.h.
993 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
994 (tsubst_decl): Likewise.
995 (instantiate_decl): Likewise.
996 * semantics.c: Do not include exprt.h and debug.h. Explain why
997 rtl.h has to be included.
998 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
999 * call.c: Do not include rtl.h and expr.h.
1000 * search.c: Do not include obstack.h and rtl.h.
1001 * friend.c: Do not include rtl.h and expr.h.
1002 * Make-lang.in: Update dependencies.
1004 2010-05-25 Jakub Jelinek <jakub@redhat.com>
1007 * parser.c (non_integral_constant): Add NIC_NONE.
1008 (required_token): Add RT_NONE.
1009 (cp_parser_unary_expression): Initialize non_constant_p
1011 (cp_parser_asm_definition): Initialize missing to RT_NONE.
1012 (cp_parser_primary_expression, cp_parser_postfix_expression,
1013 cp_parser_cast_expression, cp_parser_binary_expression,
1014 cp_parser_functional_cast): Fix formatting.
1016 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
1019 * parser.c: Remove inclusion of dyn-string.h.
1020 (non_integral_constant): New enum.
1021 (name_lookup_error): New enum.
1022 (required_token): New enum.
1023 (cp_parser_required_error): New function.
1024 (cp_parser_require): Change the type of variable token_desc to
1025 required_token and use cp_parser_required_error.
1026 (cp_parser_require_keyword): Likewise.
1027 (cp_parser_error): Use gmsgid as parameter.
1028 (cp_parser_name_lookup_error): Change the type of variable desired to
1029 name_lookup_error and put the diagnostic in the full sentences. Change
1031 (cp_parser_non_integral_constant_expression): Change the type of the
1032 variable thing to non_integral_constant and put the diagnostics in
1033 full sentences. Change caller.
1035 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
1038 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
1040 2010-05-24 Joseph Myers <joseph@codesourcery.com>
1042 * error.c (cp_diagnostic_starter): Update call to
1043 diagnostic_build_prefix.
1044 (cp_print_error_function,
1045 print_instantiation_partial_context_line): Check show_column flag
1048 2010-05-24 Jason Merrill <jason@redhat.com>
1051 * decl.c (check_initializer): Don't wrap an init-list in a
1053 * init.c (build_aggr_init): Don't assume copy-initialization if
1054 init has CONSTRUCTOR_IS_DIRECT_INIT.
1055 * call.c (build_new_method_call): Sanity check.
1057 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
1059 * rtti.c (tinfo_base_init): Use build_constructor instead of
1060 build_constructor_from_list. Don't cons a tree node for
1062 (generic_initializer): Use build_constructor_single instead of
1063 build_constructor_from_list.
1064 (ptr_initializer): Use build_constructor instead of
1065 build_constructor_from_list
1066 (ptm_initializer): Likewise.
1067 (class_initializer): Likewise. Take varargs instead of TRAIL.
1068 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
1069 build_constructor instead of build_constructor_from_list.
1071 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
1073 * semantics.c: Include bitmap.h.
1074 * Make-lang.in: Update dependencies.
1076 2010-05-22 Jan Hubicka <jh@suse.cz>
1078 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
1080 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
1082 2010-05-21 Joseph Myers <joseph@codesourcery.com>
1084 * cxx-pretty-print.c: Correct merge error.
1086 2010-05-21 Joseph Myers <joseph@codesourcery.com>
1088 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
1089 (cp_print_error_function): Use diagnostic_abstract_origin macro.
1090 (cp_printer): Handle %K here using percent_K_format.
1091 * cxx-pretty-print.c: Include tree-pretty-print.h.
1092 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
1095 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
1097 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
1098 Clean up redundant includes.
1100 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1103 * decl.c (xref_basetypes): Return false in case of ill-formed
1106 2010-05-19 Jason Merrill <jason@redhat.com>
1108 * call.c (reference_binding): Use cp_build_qualified_type_real
1109 and cp_type_quals consistently.
1110 (add_function_candidate): Likewise.
1111 (build_conditional_expr): Likewise.
1112 (convert_like_real): Likewise.
1113 (type_passed_as): Likewise.
1114 * class.c (add_method): Likewise.
1115 (same_signature_p): Likewise.
1116 (layout_class_type): Likewise.
1117 * decl.c (cxx_init_decl_processing): Likewise.
1118 (cp_fname_init): Likewise.
1119 (grokdeclarator): Likewise.
1120 * decl2.c (cp_reconstruct_complex_type): Likewise.
1121 * init.c (build_new_1): Likewise.
1122 * method.c (do_build_copy_constructor): Likewise.
1123 (implicitly_declare_fn): Likewise.
1124 * pt.c (tsubst_aggr_type): Likewise.
1126 * rtti.c (init_rtti_processing): Likewise.
1127 (build_headof): Likewise.
1128 (build_dynamic_cast_1): Likewise.
1129 (tinfo_base_init): Likewise.
1130 (emit_support_tinfos): Likewise.
1131 * semantics.c (capture_decltype): Likewise.
1132 * tree.c (cv_unqualified): Likewise.
1133 * typeck.c (composite_pointer_type): Likewise.
1134 (string_conv_p): Likewise.
1136 * mangle.c (write_CV_qualifiers_for_type): Tweak.
1138 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
1139 * decl.c (start_decl): Likewise.
1140 * semantics.c (finish_compound_literal): Likewise.
1141 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
1142 (cp_type_readonly): Remove.
1143 * cp-tree.h: Remove declaration.
1145 * typeck.c (merge_types): Preserve memfn quals.
1147 * decl.c (grokdeclarator): Don't check quals on fn type.
1148 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
1149 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
1152 * typeck.c (type_memfn_quals): New fn.
1153 (apply_memfn_quals): New fn.
1154 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
1155 (cp_type_readonly): Use cp_type_quals.
1156 * cp-tree.h: Add declarations.
1157 * tree.c (cp_build_qualified_type_real): Don't set, but do
1158 preserve, quals on FUNCTION_TYPE.
1159 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
1160 * decl.c (build_ptrmem_type): Likewise.
1161 (grokdeclarator): Likewise.
1162 (static_fn_type): Likewise.
1163 * decl2.c (change_return_type): Likewise.
1164 (cp_reconstruct_complex_type): Likewise.
1165 * pt.c (tsubst_function_type): Likewise.
1167 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
1169 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
1171 * tree.c (build_min_non_dep_call_vec): Update comment.
1173 2010-05-17 Jason Merrill <jason@redhat.com>
1175 * call.c (struct z_candidate): Add explicit_targs field.
1176 (add_template_candidate_real): Set it.
1177 (build_over_call): Use it to control init-list warning.
1180 * call.c (build_over_call): Limit init-list deduction warning to
1181 cases where the argument is actually an init-list.
1184 * call.c (build_over_call): Don't do bitwise copy for move ctor.
1186 2010-05-17 Dodji Seketeli <dodji@redhat.com>
1187 Jason Merrill <jason@redhat.com>
1190 * decl.c (compute_array_index_type): Call mark_rvalue_use.
1192 2010-05-15 Jason Merrill <jason@redhat.com>
1194 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
1195 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
1197 (finish_eh_spec_block): Adjust.
1199 2010-05-15 Jakub Jelinek <jakub@redhat.com>
1202 * pt.c (tsubst): Unshare template argument.
1204 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
1206 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
1207 * Make-lang.in: Fix dependencies accordingly.
1209 2010-05-14 Jason Merrill <jason@redhat.com>
1212 * except.c (build_throw): Simplify, adjust for DR 475.
1215 * except.c (dtor_nothrow): Return nonzero for type with
1219 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
1220 gimple_build_eh_must_not_throw.
1222 2010-05-14 Martin Jambor <mjambor@suse.cz>
1224 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
1227 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
1229 * call.c (build_new_method_call): Change warning text.
1230 * typeck2.c (build_functional_cast): Change error text.
1232 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
1235 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
1236 shadowing the outer parameter or variables by the declaration of
1237 nested function in nested structure or class. Warn the shadowing by
1238 the declaration of nested lambda expression.
1240 2010-05-13 Jason Merrill <jason@redhat.com>
1242 * typeck.c (cp_build_array_ref): Factor out from...
1243 (build_array_ref): ...here. Drop complain parm.
1244 (build_new_op): Adjust.
1245 * class.c (build_vtbl_ref_1): Adjust.
1246 * decl2.c (grok_array_decl): Adjust.
1247 * cp-tree.h: Adjust prototypes.
1249 2010-05-13 Jan Hubicka <jh@suse.cz>
1251 * decl.c (cp_finish_decl): Do not worry about used attribute.
1253 2010-05-12 Jason Merrill <jason@redhat.com>
1255 * typeck.c (build_array_ref): Take complain parm.
1256 * cp-tree.h: Add it to prototype.
1257 * call.c (build_new_op): Pass it.
1258 * class.c (build_vtbl_ref): Pass it.
1259 * decl2.c (grok_array_decl): Pass it.
1263 * cp-tree.def (NULLPTR_TYPE): Remove.
1264 * cp-tree.h (NULLPTR_TYPE_P): New.
1265 (SCALAR_TYPE_P): Use it.
1266 (nullptr_type_node): New.
1267 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
1268 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
1270 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
1271 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1272 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
1273 * mangle.c (write_type): Likewise.
1274 * name-lookup.c (arg_assoc_type): Likewise.
1275 * typeck.c (build_reinterpret_cast_1): Likewise.
1276 * rtti.c (typeinfo_in_lib_p): Likewise.
1277 (emit_support_tinfos): Remove local nullptr_type_node.
1279 * cp-tree.h (UNKNOWN_TYPE): Remove.
1280 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
1281 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
1282 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
1283 * class.c (instantiate_type): Check unknown_type_node rather than
1285 * name-lookup.c (maybe_push_decl): Likewise.
1286 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1287 (get_typeid): Likewise.
1288 * semantics.c (finish_offsetof): Likewise.
1291 * call.c (add_template_candidate_real): If deduction fails, still
1292 add the template as a non-viable candidate.
1293 (equal_functions): Handle template candidates.
1294 (print_z_candidate): Likewise.
1295 (print_z_candidates): Likewise.
1296 (build_new_function_call): Likewise.
1298 * cp-tree.h (LOOKUP_LIST_ONLY): New.
1299 * call.c (add_candidates): Enforce it.
1300 (build_new_method_call): Try non-list ctor if no viable list ctor.
1301 (build_user_type_conversion_1): Likewise.
1303 * call.c (add_candidates): Distinguish between type(x) and
1305 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
1306 (build_new_method_call): Give better error for conversion op.
1308 * call.c (add_candidates): Add first_arg and return_type parms.
1309 Add special constructor/conversion op handling.
1310 (convert_class_to_reference): Use it.
1311 (build_user_type_conversion_1): Likewise.
1312 (build_op_call): Likewise.
1313 (build_new_method_call): Likewise.
1314 (build_new_op): Adjust.
1315 (perform_overload_resolution): Adjust.
1317 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
1322 * pt.c (process_partial_specialization): Return error_mark_node
1323 in case of unused template parameters in partial specialization.
1325 2010-05-11 Jakub Jelinek <jakub@redhat.com>
1328 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
1329 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
1330 look at its second operand.
1332 2010-05-10 Jason Merrill <jason@redhat.com>
1335 * semantics.c (baselink_for_fns): Revert earlier change.
1338 * typeck.c (cp_build_modify_expr): Complain about assignment to
1339 array from init list.
1341 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
1344 * decl.c (check_initializer): strip array type before checking for
1345 uninitialized const or ref members.
1347 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
1350 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
1351 error count. Emit errors only if compain is true.
1352 (build_new_1): Do not return error_mark_node if
1353 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
1354 errors. Delay the check for user-provided constructor.
1355 (perform_member_init): Adjust.
1356 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
1359 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
1360 Jason Merrill <jason@redhat.com>
1362 Add support for C++0x nullptr.
1363 * cp-tree.def: Add NULLPTR_TYPE.
1364 * cp-tree.h: Add nullptr_node.
1365 (cp_tree_index): Add CPTI_NULLPTR.
1366 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
1367 * call.c (null_ptr_cst_p): Handle nullptr.
1368 (standard_conversion): Likewise.
1369 (convert_arg_to_ellipsis): Likewise.
1370 * mangle.c (write_type): Likewise.
1371 * name-lookup.c (arg_assoc_type): Likewise.
1372 * parser.c (cp_parser_primary_expression): Likewise.
1373 * typeck.c (cp_build_binary_op): Likewise.
1374 (build_reinterpret_cast_1): Likewise.
1375 * error.c (dump_type): Likewise.
1376 (dump_type_prefix, dump_type_suffix): Likewise.
1377 * decl.c (cxx_init_decl_processing): Likewise.
1378 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1379 * cvt.c (ocp_convert): Likewise.
1380 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
1381 nullptr_t tinfo in libsupc++.
1383 2010-05-06 Jason Merrill <jason@redhat.com>
1385 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
1387 2010-04-22 Jakub Jelinek <jakub@redhat.com>
1388 Dodji Seketeli <dodji@redhat.com>
1391 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
1393 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
1394 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
1395 (decay_conversion, perform_integral_promotions): Call rvalue_use.
1396 (cp_build_unary_op): Call lvalue_use.
1397 * decl.c (unused_but_set_errorcount): New variable.
1398 (poplevel): Issue -Wunused-but-set-variable diagnostics.
1399 (duplicate_decls): Merge DECL_READ_P flags.
1400 (start_cleanup_fn): Set DECL_READ_P flag.
1401 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
1402 * tree.c (rvalue): Call rvalue_use.
1403 * pt.c (convert_nontype_argument): Likewise.
1404 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
1405 finish_decltype_type): Likewise.
1406 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
1407 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
1408 or rvalue_use depending on the expr.
1409 * init.c (build_new, build_delete): Likewise.
1410 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
1412 2010-05-05 Jason Merrill <jason@redhat.com>
1415 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
1416 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
1418 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1421 * pt.c (unify): Check each elt for error_mark_node.
1423 2010-05-04 Jason Merrill <jason@redhat.com>
1426 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
1428 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
1431 * call.c (build_new_method_call): Return error_mark_node if fns is
1434 2010-05-03 Dodji Seketeli <dodji@redhat.com>
1437 * pt.c (most_specialized_class): Pretend we are processing
1438 a template decl during the call to coerce_template_parms.
1440 2010-05-03 Jason Merrill <jason@redhat.com>
1444 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
1445 from the selected underlying type unless -fstrict-enums. Set
1446 ENUM_UNDERLYING_TYPE to have the restricted range.
1447 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
1448 * class.c (check_bitfield_decl): Likewise.
1450 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
1453 * init.c (build_new_1): Revert the accidental checkin in
1456 2010-04-30 Jason Merrill <jason@redhat.com>
1459 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
1460 (pp_cxx_type_specifier_seq): ...here.
1462 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
1464 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
1465 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
1467 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
1470 * typeck.c (warn_args_num): New function.
1471 (convert_arguments): Use warn_args_num to print the diagnostic
1474 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
1477 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
1478 user-provided constructor while recursing.
1480 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
1483 * error.c (print_instantiation_partial_context_line): Handle
1484 recursive instantiation.
1485 (print_instantiation_partial_context): Likewise.
1487 2010-04-27 Jason Merrill <jason@redhat.com>
1489 * init.c (perform_member_init): Check CLASS_TYPE_P.
1491 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
1494 * init.c (perform_member_init): check for uninitialized const or
1495 reference members, including array types.
1497 2010-04-24 Jason Merrill <jason@redhat.com>
1499 * tree.c (get_fns): Split out from get_first_fn.
1500 * cp-tree.h: Declare it.
1501 * search.c (shared_member_p): Use it.
1502 * semantics.c (finish_qualified_id_expr): Simplify.
1503 (finish_id_expression): Simplify.
1505 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
1506 whenever object is NULL_TREE. Don't do 'this' capture here.
1507 (finish_qualified_id_expr): Pass NULL_TREE.
1508 (finish_id_expression): Likewise.
1509 (lambda_expr_this_capture): Likewise.
1511 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
1512 rather than checking current_class_ref directly.
1513 (finish_call_expr): Likewise.
1516 * name-lookup.c (qualify_lookup): Disqualify lambda op().
1517 * class.c (current_nonlambda_class_type): New fn.
1518 * semantics.c (nonlambda_method_basetype): New.
1519 * cp-tree.h: Declare them.
1520 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
1522 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
1525 * semantics.c (lambda_return_type): Complain about
1529 * tree.c (cv_unqualified): Handle error_mark_node.
1532 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
1533 if we don't want errors.
1536 * class.c (convert_to_base): Add complain parameter. Pass
1537 ba_quiet to lookup_base if we don't want errors.
1538 (build_vfield_ref): Pass complain to convert_to_base.
1539 * call.c (convert_like_real): Likewise.
1540 (initialize_reference): Likewise.
1541 (perform_direct_initialization_if_possible): Pass complain to
1543 * cp-tree.h: Adjust.
1545 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
1546 Jason Merrill <jason@redhat.com>
1549 * decl.c (check_for_uninitialized_const_var): Handle classes that need
1551 (check_initializer): Call it for classes that need constructing, too.
1552 * class.c (in_class_defaulted_default_constructor): New.
1553 * cp-tree.h: Declare it.
1555 2010-04-20 Jason Merrill <jason@redhat.com>
1558 * init.c (constant_value_1): Treat error_mark_node as a constant
1559 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
1560 * cvt.c (ocp_convert): Handle getting error_mark_node from
1561 integral_constant_value.
1562 * decl.c (compute_array_index_type): Likewise.
1564 2010-04-20 Dodji Seketeli <dodji@redhat.com>
1568 * typeck.c (incompatible_dependent_types_p): If one of the
1569 compared types if not a typedef then honour their main variant
1572 2010-04-20 Jakub Jelinek <jakub@redhat.com>
1574 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
1576 2010-04-19 Dodji Seketeli <dodji@redhat.com>
1579 * typeck.c (structural_comptypes): Test dependent typedefs
1580 incompatibility before testing for their main variant based
1583 2010-04-19 Jakub Jelinek <jakub@redhat.com>
1585 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
1586 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
1588 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1590 * decl.c (cxx_init_decl_processing): Remove second argument in call to
1591 build_common_tree_nodes.
1593 2010-04-14 Jason Merrill <jason@redhat.com>
1596 * parser.c (cp_parser_parenthesized_expression_list): Change
1597 is_attribute_list parm to int to indicate whether or not to
1598 handle initial identifier specially.
1599 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
1601 2010-04-13 Jason Merrill <jason@redhat.com>
1603 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
1605 * parser.c (cp_parser_lambda_expression): Complain about lambda in
1606 unevaluated context.
1607 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
1609 2010-04-12 Jason Merrill <jason@redhat.com>
1612 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
1613 return value directly.
1615 * call.c (type_decays_to): Call cv_unqualified for non-class type.
1617 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
1620 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
1621 * init.c (build_new_1): Check for uninitialized const members and
1622 uninitialized reference members, when using new without
1623 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
1624 (diagnose_uninitialized_cst_or_ref_member): Define, call
1625 diagnose_uninitialized_cst_or_ref_member_1.
1626 (diagnose_uninitialized_cst_or_ref_member_1): New function.
1628 2010-04-12 Richard Guenther <rguenther@suse.de>
1631 * semantics.c (expand_or_defer_fn_1): Do not keep extern
1632 template inline functions.
1634 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
1637 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
1640 2010-04-07 Jason Merrill <jason@redhat.com>
1643 * decl.c (start_preparsed_function): Do defer nested functions.
1645 PR c++/11094, DR 408
1646 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
1647 * decl2.c (finish_static_data_member_decl): Set it.
1648 * decl.c (duplicate_decls): Propagate it.
1649 * pt.c (tsubst_decl): Don't substitute the domain of an array
1650 VAR_DECL if it's set.
1651 (regenerate_decl_from_template): Substitute it here.
1652 (type_dependent_expression_p): Return true if it's set.
1653 * semantics.c (finish_decltype_type): Instantiate such a variable.
1654 * typeck.c (cxx_sizeof_expr): Likewise.
1655 (strip_array_domain): New.
1658 * name-lookup.c (current_decl_namespace): Non-static.
1659 (pop_nested_namespace): Sanity check.
1660 * cp-tree.h: Declare current_decl_namespace.
1661 * decl.c (grokvardecl): Use it instead of current_namespace.
1662 (grokfndecl): Likewise.
1665 * pt.c (tsubst_friend_function): Instatiate a friend that has already
1668 * pt.c (print_template_statistics): New.
1669 * cp-tree.h: Declare it.
1670 * tree.c (cxx_print_statistics): Call it.
1673 * decl.c (grokvardecl): Tweak warning message.
1674 (grokfndecl): Likewise.
1676 2010-04-07 Dodji Seketeli <dodji@redhat.com>
1679 *pt.c (tsubst_decl): Get the arguments of a specialization from
1680 the specialization template, not from the most general template.
1682 2010-04-07 Dodji Seketeli <dodji@redhat.com>
1685 * typeck2.c (process_init_constructor_record):
1686 value-initialize members that are are not explicitely
1689 2010-04-07 Jie Zhang <jie@codesourcery.com>
1692 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
1693 when all of its elements are non-constant and have been split out.
1695 2010-04-06 Taras Glek <taras@mozilla.com>
1696 Jason Merrill <jason@redhat.com>
1698 * parser.c (cp_parser_class_specifier): Set class location to that
1699 of IDENTIFIER_NODE instead of '{' when possible.
1700 * semantics.c (begin_class_definition): Do not overide locations
1701 with less precise ones.
1703 2010-04-06 Jason Merrill <jason@redhat.com>
1706 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
1709 * pt.c (maybe_update_decl_type): Check the return value from
1712 2010-04-01 Jason Merrill <jason@redhat.com>
1714 * decl.c (next_initializable_field): No longer static.
1715 * cp-tree.h: Declare it.
1716 * call.c (build_aggr_conv): Fail if there are more initializers
1717 than initializable fields.
1719 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
1720 instead of void_zero_node.
1722 2010-03-31 Dodji Seketeli <dodji@redhat.com>
1725 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
1726 * pt.c (end_template_parm_list): Store sibling template parms of
1727 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
1728 (push_template_decl_real): Don't store the containing template decl
1729 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
1730 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
1731 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
1734 2010-03-30 Jason Merrill <jason@redhat.com>
1737 * pt.c (push_template_decl_real): Deal better with running out of
1738 scopes before running out of template parms.
1742 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
1743 function parameter context. Don't print an error if parsing
1747 * pt.c (more_specialized_fn): Don't control cv-qualifier check
1750 2010-03-26 Jason Merrill <jason@redhat.com>
1753 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
1754 c++0x mode, but not other type-names.
1756 2010-03-26 Dodji Seketeli <dodji@redhat.com>
1759 * pt.c (add_to_template_args): Support NULL ARGS;
1760 (most_specialized_class): call coerce_template_parms on
1761 template arguments passed to get_class_bindings. Use
1762 add_to_template_args.
1763 (unify): Handle VAR_DECLs.
1765 2010-03-26 Dodji Seketeli <dodji@redhat.com>
1767 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
1769 * pt.c (get_template_parms_at_level): Adjust.
1771 2010-03-25 Dodji Seketeli <dodji@redhat.com>
1774 * cp-tree.h (get_template_parms_at_level): Declare ...
1775 * pt.c (get_template_parms_at_level): ... new function.
1776 * typeck.c (get_template_parms_of_dependent_type): If a template
1777 type parm's DECL_CONTEXT isn't yet set, get its siblings from
1778 current_template_parms. Use get_template_parms_at_level. Remove
1780 (incompatible_dependent_types_p): If we get empty parms from just one
1781 of the template type parms we are comparing then the template parms are
1784 2010-03-24 Jason Merrill <jason@redhat.com>
1787 * parser.c (make_declarator): Initialize id_loc.
1788 (cp_parser_lambda_declarator_opt): And set it.
1790 2010-03-23 Jason Merrill <jason@redhat.com>
1792 Make lambda conversion op and op() non-static.
1793 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
1794 Also add the thunk function returned by the conversion op.
1795 Mark the conversion deleted if the op() is variadic.
1796 * decl2.c (mark_used): Give helpful message about deleted conversion.
1797 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
1798 * semantics.c (finish_this_expr): Adjust.
1799 * mangle.c (write_closure_type_name): Adjust.
1800 * decl.c (grok_op_properties): Don't allow it.
1801 * call.c (build_user_type_conversion_1): No static conversion ops.
1802 (build_op_call): Or op().
1804 * decl2.c (change_return_type): Fix 'this' quals.
1806 2010-03-22 Jason Merrill <jason@redhat.com>
1809 * tree.c (pod_type_p): Use old meaning in C++98 mode.
1812 * pt.c (contains_auto_r): New fn.
1813 (do_auto_deduction): Use it.
1814 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
1816 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
1819 * decl2.c (grokfield): Handle invalid initializers for member
1822 2010-03-20 Dodji Seketeli <dodji@redhat.com>
1825 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
1827 * decl2.c (vague_linkage_p): Likewise.
1829 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
1832 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
1833 false, in the cp_parser_expression_statement call.
1835 2010-03-05 Jason Merrill <jason@redhat.com>
1837 * mangle.c (mangle_decl): Give name collision error even without
1840 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
1842 * pt.c (process_partial_specialization): Use error_n instead of
1845 2010-03-03 Jason Merrill <jason@redhat.com>
1848 * mangle.c (mangle_decl): Handle VAR_DECL, too.
1850 2010-03-03 Jason Merrill <jason@redhat.com>
1853 * mangle.c: Include cgraph.h.
1854 (mangle_decl): If the mangled name will change in a later
1855 ABI version, make the later mangled name an alias.
1856 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
1857 * Make-lang.in (mangle.o): Depend on cgraph.h.
1858 * method.c (make_alias_for): Handle VAR_DECL, too.
1859 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
1860 * tree.c (no_linkage_check): Adjust.
1861 * decl.c (maybe_commonize_var): Adjust.
1862 * cp-tree.h: Adjust.
1864 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
1866 * pt.c (redeclare_class_template): Use error_n and inform_n.
1868 2010-02-27 Mark Mitchell <mark@codesourcery.com>
1871 * cp-tree.h (push_tinst_level): Declare.
1872 (pop_tinst_level): Likewise.
1873 * pt.c (push_tinst_level): Give it external linkage.
1874 (pop_tinst_level): Likewise.
1875 * mangle.c (mangle_decl_string): Set the source location to that
1876 of the decl while mangling.
1878 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
1881 * pt.c (redeclare_class_template): Return false if there are erroneous
1882 template parameters.
1884 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
1886 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
1889 2010-02-24 Jason Merrill <jason@redhat.com>
1892 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
1894 * class.c (layout_class_type): Don't give -Wabi warning for a bug
1895 in a previous ABI version.
1897 2010-02-23 Jason Merrill <jason@redhat.com>
1900 * typeck2.c (digest_init_r): Accept value init of array.
1902 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
1905 * typeck.c (convert_arguments): Update error message.
1907 2010-02-22 Mike Stump <mikestump@comcast.net>
1910 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
1912 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
1915 * error.c (print_instantiation_partial_context_line): New.
1916 (print_instantiation_partial_context): Print at most 12 contexts,
1917 skip the rest with a message.
1919 2010-02-21 Dodji Seketeli <dodji@redhat.com>
1922 * pt.c (lookup_template_class): Better support of specialization
1923 of member of class template implicit instantiation.
1925 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
1928 * call.c (conversion_null_warnings): Replace -Wconversion with
1930 * cvt.c (build_expr_type_conversion): Likewise.
1932 2010-02-18 Jason Merrill <jason@redhat.com>
1935 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
1938 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
1940 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
1941 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
1944 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
1948 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
1949 (maybe_update_decl_type): New fn.
1950 * parser.c (cp_parser_init_declarator): Use it.
1953 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
1955 2010-02-17 Jason Merrill <jason@redhat.com>
1958 * call.c (build_over_call): Don't create zero-sized assignments.
1959 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
1960 * cp-objcp-common.c (cp_expr_size): Remove.
1961 * cp-tree.h: Remove prototype.
1964 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
1965 decl we looked up doesn't match.
1968 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
1969 have an INIT_EXPR anymore.
1972 * pt.c (convert_nontype_argument): Change assert to test.
1974 2010-02-16 Jason Merrill <jason@redhat.com>
1976 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
1979 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
1980 VIEW_CONVERT_EXPR for conversions between structural equality types
1981 that the back end can't tell are the same.
1984 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
1985 cv-quals from element here.
1986 (cp_build_qualified_type_real): Not here. Preserve typedef name.
1988 2010-02-14 Jason Merrill <jason@redhat.com>
1991 * semantics.c (finish_compound_literal): Use
1992 cp_apply_type_quals_to_decl when creating a static variable.
1994 2010-02-12 Jason Merrill <jason@redhat.com>
1997 * name-lookup.h (current_binding_level): Check for null
2000 2010-02-12 Jason Merrill <jason@redhat.com>
2003 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
2005 2010-02-12 Jakub Jelinek <jakub@redhat.com>
2008 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
2011 2010-02-10 Jason Merrill <jason@redhat.com>
2014 * semantics.c (outer_lambda_capture_p): Revert.
2015 (add_capture): Only finish_member_declaration if
2016 we're in the lambda class.
2017 (register_capture_members): New.
2018 * cp-tree.h: Declare it.
2019 * parser.c (cp_parser_lambda_expression): Call it.
2021 2010-02-10 Jason Merrill <jason@redhat.com>
2024 * semantics.c (outer_lambda_capture_p): Use current_function_decl
2025 instead of current_class_type.
2027 2010-02-10 Jason Merrill <jason@redhat.com>
2029 PR c++/42983, core issue 906
2030 * method.c (defaultable_fn_check): Check virtualness.
2032 2010-02-10 Jason Merrill <jason@redhat.com>
2035 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
2037 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
2039 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
2040 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
2042 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
2043 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
2044 (cp_parser_parameter_declaration)
2045 (cp_parser_exception_specification_opt)
2046 (cp_parser_exception_declaration): Likewise.
2047 * pt.c (check_default_tmpl_args): Likewise.
2048 * search.c (lookup_field_r): Likewise.
2050 2010-02-09 Jason Merrill <jason@redhat.com>
2053 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
2055 2010-02-09 Jason Merrill <jason@redhat.com>
2058 * decl2.c (change_return_type): New fn.
2059 * semantics.c (apply_lambda_return_type): Use it.
2060 * cp-tree.h: Declare it.
2062 2010-02-05 Richard Guenther <rguenther@suse.de>
2064 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
2065 * cp-lang.c: Include gt-cp-cp-lang.h.
2066 * config-lang.in (gtfiles): Add cp/cp-lang.c.
2068 2010-02-05 Dodji Seketeli <dodji@redhat.com>
2071 * typeck.c (get_template_parms_of_dependent_type): Try getting
2072 the template parameters fromt the type itself first.
2074 2010-02-03 Jason Merrill <jason@redhat.com>
2078 * mangle.c (write_unqualified_id): Split out from write_expression.
2079 (write_unqualified_name): Call it.
2080 (write_member_name): Likewise.
2081 (write_expression): Support TEMPLATE_ID_EXPR.
2082 Disambiguate operator names.
2085 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
2088 2010-02-02 Jason Merrill <jason@redhat.com>
2091 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
2092 * optimize.c (clone_body): Remap their initializers when making base
2094 (maybe_clone_body): Complain if multiple clones aren't safe.
2096 2010-01-29 Dodji Seketeli <dodji@redhat.com>
2103 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
2104 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
2105 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
2106 * pt.c (coerce_template_parms, type_unification_real,
2107 expand_template_argument_pack, coerce_template_parameter_pack):
2108 Set the non default template args count.
2109 (current_template_args): Always set non defaulted
2110 template args count when compiled with --enable-checking
2111 (tsubst_template_args, type_unification_real): Propagate the non
2112 defaulted template args count.
2113 * error.c (get_non_default_template_args_count): Renamed
2114 count_non_default_template_args into this. Don't calculate the
2115 non default template argument count anymore. Use the new
2116 accessor macros above to get it.
2117 (dump_template_argument_list, dump_type, dump_decl,
2118 dump_template_parms): Adjust.
2119 * parser.c (cp_parser_template_argument_list): Always set defaulted
2120 template args count when compiled with --enable-checking.
2122 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
2124 * decl.c (redeclaration_error_message): Wrap the return messages into
2125 G_() for easy translation.
2127 2010-01-28 Jason Merrill <jason@redhat.com>
2130 * semantics.c (begin_class_definition): Don't use type_as_string.
2132 2010-01-28 Dodji Seketeli <dodji@redhat.com>
2136 * typeck.c (get_template_parms_of_dependent_type): Factorized
2137 this out of incompatible_template_type_parms_p
2138 (incompatible_dependent_types_p): Renamed
2139 incompatible_template_type_parms_p into this. Make it detect
2140 two incompatible dependent typedefs too.
2141 (structural_comptypes): Use incompatible_dependent_types_p.
2142 * pt.c (get_template_info):
2143 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
2145 2010-01-20 Janis Johnson <janis187@us.ibm.com>
2146 Jason Merrill <jason@redhat.com>
2148 * mangle.c (write_type): Mangle transparent record as member type.
2149 * semantics.c (begin_class_definition): Recognize decimal classes
2150 and set TYPE_TRANSPARENT_AGGR.
2152 2010-01-20 Jason Merrill <jason@redhat.com>
2155 * mangle.c (write_expression): Handle tree codes that have extra
2156 arguments in the middle-end.
2158 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
2161 * except.c (expand_start_catch_block): Deal correctly with
2162 do_begin_catch returning error_mark_node.
2164 2010-01-20 Jason Merrill <jason@redhat.com>
2167 * class.c (layout_class_type): Set packed_maybe_necessary for packed
2171 * semantics.c (build_lambda_object): Call mark_used on captured
2175 * decl.c (grokdeclarator): Clear type_quals for a member function
2176 declared using a typedef. Don't complain about adding cv-quals
2177 to a function typedef in C++0x mode.
2179 2010-01-20 Jakub Jelinek <jakub@redhat.com>
2181 * decl.c (create_array_type_for_decl): Remove set but not used
2182 variable error_msg. Remove break stmts after return stmts.
2184 2010-01-19 Dodji Seketeli <dodji@redhat.com>
2186 * error.c (dump_template_parms, count_non_default_template_args):
2187 Revert fix of PR c++/42634.
2189 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2192 * error.c (dump_template_parms): Use innermost template
2193 arguments before calling count_non_default_template_args.
2194 (count_non_default_template_args): We are being called with
2195 template innermost arguments now. There is no need to ensure
2198 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2201 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
2203 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2206 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
2208 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2211 *pt.c (tsubst_decl): Get the arguments of a specialization from
2212 the specialization template, not from the most general template.
2214 2010-01-16 Jason Merrill <jason@redhat.com>
2217 * semantics.c (finish_decltype_type): Within a template, treat
2218 unresolved CALL_EXPR as dependent.
2220 2010-01-15 Dodji Seketeli <dodji@redhat.com>
2222 * error.c (dump_template_parms,count_non_default_template_args):
2223 Revert changes of PR c++/42634.
2225 2010-01-14 Jakub Jelinek <jakub@redhat.com>
2228 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
2229 functions with noreturn attribute.
2231 2010-01-14 Jason Merrill <jason@redhat.com>
2234 * call.c (build_new_method_call): Don't free the vec here.
2237 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
2239 2010-01-13 Dodji Seketeli <dodji@redhat.com>
2242 * error.c (dump_template_parms): Use innermost template
2243 arguments before calling count_non_default_template_args.
2244 (count_non_default_template_args): We are being called with
2245 template innermost arguments now. There is no need to ensure
2248 2010-01-07 Dodji Seketeli <dodji@redhat.com>
2251 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
2252 arguments that were previously deduced.
2254 2010-01-05 Jason Merrill <jason@redhat.com>
2256 * pt.c (unify_pack_expansion): Handle deduction from init-list.
2257 * call.c (build_over_call): Don't complain about it.
2259 2010-01-04 Jason Merrill <jason@redhat.com>
2262 * pt.c (tsubst_decl): Don't apply type attributes in place.
2265 * semantics.c (describable_type): Remove decltype comment and
2270 Copyright (C) 2010 Free Software Foundation, Inc.
2272 Copying and distribution of this file, with or without modification,
2273 are permitted in any medium without royalty provided the copyright
2274 notice and this notice are preserved.