1 2007-09-20 Paolo Carlini <pcarlini@suse.de>
4 * semantics.c (finish_id_expression): Use consistently
5 context_for_name_lookup.
6 * decl.c (fixup_anonymous_aggr): Fix error message for
7 anonymous struct (vs union).
9 2007-09-19 Jason Merrill <jason@redhat.com>
12 * pt.c (tsubst): Handle typedefs by looking for the specialization.
13 (retrieve_specialization): Only tagged types use
14 DECL_TEMPLATE_INSTANTIATIONS.
15 (instantiate_class_template): Push nested classes too.
16 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
18 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
19 * init.c (is_aggr_type): Remove redundant tests.
20 * class.c (push_nested_class): Use CLASS_TYPE_P.
22 2007-09-20 Paolo Carlini <pcarlini@suse.de>
25 * init.c (build_zero_init): If, recursively, build_zero_init
26 returns a NULL_TREE, do not append it to the VEC of constructors.
28 2007-09-18 Jason Merrill <jason@redhat.com>
31 * pt.c (apply_late_template_attributes): Set processing_template_decl.
32 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
33 ATTR_FLAG_TYPE_IN_PLACE.
34 (tsubst): Do unqualified lookup to find typedefs from current class.
35 [ARRAY_TYPE]: Propagate alignment info.
36 * decl2.c (is_late_template_attribute): Only defer handling of
37 attribute aligned if the expression is dependent.
38 (save_template_attributes): If we're deferring any attributes,
39 make this a naming typedef.
41 2007-09-18 Paolo Carlini <pcarlini@suse.de>
44 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
45 va_arg instead of __builtin_va_arg.
47 2007-09-18 Paolo Carlini <pcarlini@suse.de>
50 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
51 (pp_cxx_primary_expression): Use it.
52 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
53 * error.c (dump_expr): Use it.
55 2007-09-18 Paolo Carlini <pcarlini@suse.de>
58 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
59 out case TYPEID_EXPR to...
60 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
61 and pp_cxx_right_paren.
62 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
63 * error.c (dump_expr): Use it.
65 2007-09-18 Paolo Carlini <pcarlini@suse.de>
68 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
69 (pp_cxx_primary_expression): Use it.
70 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
71 * error.c (dump_expr): Use it.
73 2007-09-16 Paolo Carlini <pcarlini@suse.de>
76 * init.c (build_new): Remove warning for zero-element
79 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
82 * call.c (maybe_handle_implicit_object): Set this_p, clear
83 rvaluedness_matches_p.
84 (compare_ics): Do not compare rvaluedness matching when one of the
85 operands is an implicit object.
87 2007-09-14 Jason Merrill <jason@redhat.com>
89 PR c++/17743, c++/19163
90 * decl2.c (is_late_template_attribute): New fn.
91 (splice_template_attributes, save_template_attributes): New fns.
92 (cplus_decl_attributes): Call save_template_attributes.
93 * pt.c (apply_late_template_attributes): New fn.
94 (instantiate_class_template, tsubst_decl): Use it.
95 * cp-tree.h: Declare is_late_template_attribute.
97 2007-09-13 Tom Tromey <tromey@redhat.com>
99 * parser.c (cp_lexer_new_main): Don't use
100 c_lex_return_raw_strings.
101 (cp_lexer_get_preprocessor_token): Update. Add special case when
104 2007-09-11 Jan Hubicka <jh@suse.cz>
106 * method.c (use_thunk): Use tree_rest_of_compilation
107 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
108 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
109 * cp-tree.h (expand_body): Kill.
110 (emit_associated_thunks): Declare.
111 * semantics.c (emit_associated_thunks): Export.
114 2007-09-09 David Daney <ddaney@avtrex.com>
117 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
118 to calculate cookie_ptr.
120 2007-09-08 Jason Merrill <jason@redhat.com>
123 * pt.c (most_specialized_class): Set processing_template_decl
124 while tsubsting partial spec args.
126 2007-09-06 Jason Merrill <jason@redhat.com>
128 * decl2.c (get_guard): Copy visibility from the guarded variable.
130 2007-09-06 Jan Hubicka <jh@suse.cz>
132 * semantics.c (expand_body): Do not mark arguments of clones used.
134 2007-09-06 Paolo Carlini <pcarlini@suse.de>
137 * decl.c (cp_finish_decl): When processing_template_decl,
138 deal correctly with init as TREE_LIST.
140 2007-09-06 Tom Tromey <tromey@redhat.com>
142 * decl.c (finish_function): Put return's location on line zero of
145 2007-09-05 Jason Merrill <jason@redhat.com>
148 * except.c (prepare_eh_type): Use type_decays_to.
151 * init.c (build_delete): Use build_headof to get the address of the
152 complete object if we aren't using the deleting destructor.
153 * rtti.c (build_headof): No longer static.
154 * cp-tree.h: Declare it.
156 2007-09-06 Jakub Jelinek <jakub@redhat.com>
158 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
159 decl if a prototype for XX is provided with throw().
162 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
163 on __*_chk non-__builtin_* decls.
165 2007-09-05 Paolo Carlini <pcarlini@suse.de>
168 * semantics.c (finish_id_expression): Use context_for_name_lookup
169 insted of DECL_CONTEXT, to see through anonymous structs and unions.
170 * class.c (finish_struct_anon): Deal correctly with anonymous
171 structs (vs unions, as GNU extension) in error messages.
173 2007-09-05 Jan Hubicka <jh@suse.cz>
175 * cp/sematics.c (expand_body): Remove unnecesary import_export_decl
176 call, DECL_EXTERNAL checks and current_function_decl saving.
178 2007-09-05 Paolo Carlini <pcarlini@suse.de>
181 * parser.c (cp_parser_primary_expression): Return error_mark_node
182 when a statement-expression is found in a template-argument list.
184 2007-09-04 Jason Merrill <jason@redhat.com>
186 * except.c (initialize_handler_parm): Use
187 fold_build_cleanup_point_expr.
190 * call.c (reference_binding): Don't look for user-defined conversions
194 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
195 the MUST_NOT_THROW_EXPR.
197 2007-09-04 Richard Sandiford <richard@codesourcery.com>
199 * decl.c (cp_finish_decl): Call determine_visibility before
200 make_rtl_for_nonlocal_decl.
202 2007-09-04 Jason Merrill <jason@redhat.com>
205 * pt.c (most_specialized_class): Substitute outer template
206 arguments into the arguments of a member template partial
208 (strip_innermost_template_args): New fn.
210 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
212 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
214 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
216 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
217 * decl.c (cp_make_fname_decl): Likewise,
218 * parser.c (cp_parser_string_literal): Likewise,
219 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
220 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
223 2007-09-02 Paolo Carlini <pcarlini@suse.de>
226 * typeck.c (build_unary_op): Fix error message for
227 Boolean expression as operand to operator--.
229 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
231 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
232 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
235 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
238 * init.c (build_default_init): Make extern.
239 * cp-tree.h (build_default_init): Declare here.
240 * pt.c (tsubst_expr): When the instantiation of the initializer of
241 a variable results in an empty list, default-initialize the
243 (tsubst_copy_and_build): When the instantiation of the initializer
244 in a new expression results in an empty initializer list,
245 default-initialize it.
247 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
249 * mangle.c (write_type): Change mangling of rvalue reference from
252 2007-08-31 Jakub Jelinek <jakub@redhat.com>
254 * decl.c (duplicate_decls): Remove duplicated line.
256 2007-08-31 Paolo Carlini <pcarlini@suse.de>
259 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
260 BOUND_TEMPLATE_TEMPLATE_PARM.
262 2007-08-31 Paolo Carlini <pcarlini@suse.de>
265 * search.c (lookup_member): Check the name argument for
268 2007-08-31 Paolo Carlini <pcarlini@suse.de>
271 * parser.c (cp_parser_trait_expr): Check rerurn value of
274 2007-08-30 Ollie Wild <aaw@google.com>
276 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
277 convert_ptrmem for pointer to member conversions.
278 (convert_to_pointer_force): Update cp_convert_to_pointer call.
279 (ocp_convert): Update cp_convert_to_pointer call.
280 * typeck.c (convert_ptrmem): Add conditional for null pointers to
282 (build_static_cast_1): Check can_convert for conversions in either
284 (get_delta_difference_1): New function.
285 (get_delta_difference): Refactor to call get_delta_difference_1.
287 2007-08-30 Jakub Jelinek <jakub@redhat.com>
289 * decl.c (start_preparsed_function): Set
290 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
292 2007-08-28 Paolo Carlini <pcarlini@suse.de>
295 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
296 BOUND_TEMPLATE_TEMPLATE_PARM.
298 2007-08-28 Jakub Jelinek <jakub@redhat.com>
302 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
303 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
305 2007-08-27 Jason Merrill <jason@redhat.com>
308 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
309 Look inside STMT_EXPR.
310 * semantics.c (stmt_expr_value_expr): New fn.
311 * cp-tree.h: Declare it.
314 * decl.c (groktypename): Ignore attributes applied to class type.
316 2007-08-28 Richard Guenther <rguenther@suse.de>
318 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
320 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
322 * error.c (dump_expr): Handle COMPLEX_CST.
323 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
324 (pp_cxx_expression): Likewise.
326 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
328 * decl.c (GNU_INLINE_P): New.
329 (duplicate_decls): Handle gnu_inline. Merge attributes and
330 some flags in overriding definitions.
331 (redeclaration_error_message): Handle gnu_inline.
332 (start_preparsed_function): Likewise.
334 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
336 * call.c (sufficient_parms_p): Constify.
337 * class.c (same_signature_p): Likewise.
338 * cp-gimplify.c (is_invisiref_parm,
339 cxx_omp_privatize_by_reference): Likewise.
340 * cp-objcp-common.c (has_c_linkage): Likewise.
341 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
342 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
343 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
344 num_artificial_parms_for, comp_template_parms,
345 template_parameter_pack_p, any_dependent_template_arguments_p,
346 any_type_dependent_arguments_p, any_value_dependent_elements_p,
347 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
348 zero_init_p, member_p, cp_lvalue_kind,
349 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
350 varargs_function_p, is_dummy_object, special_function_kind,
351 string_conv_p, type_unknown_p, comp_except_specs, compparms,
352 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
353 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
354 cp_has_mutable_p, at_least_as_qualified_p,
355 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
356 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
357 * except.c (nothrow_libfn_p): Likewise.
358 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
360 * pt.c (comp_template_parms, template_parameter_pack_p,
361 any_type_dependent_arguments_p, any_value_dependent_elements_p,
362 any_dependent_template_arguments_p): Likewise.
363 * repo.c (repo_export_class_p): Likewise.
364 * semantics.c (anon_aggr_type_p): Likewise.
365 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
366 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
367 varargs_function_p, member_p, is_dummy_object, pod_type_p,
368 zero_init_p, special_function_p): Likewise.
369 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
370 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
371 compparms, invalid_nonstatic_memfn_p,
372 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
373 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
374 cp_has_mutable_p, lvalue_or_else): Likewise.
376 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
378 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
379 * cp-objcp-common.c (cp_tree_size): Ditto.
380 * tree.c (cp_walk_subtrees): Ditto
381 * cp-tree.def (TINST_LEVEL): Go away.
382 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
383 move together with other non-tree structs.
384 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
385 (union lang_tree_node): Eliminate tinst_level field.
386 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
387 (current_instantiation, outermost_tinst_level): Return
388 a "struct tinst_level *".
390 * error.c (print_instantiation_partial_context): Change second
391 parameter to a "struct tinst_level *". Replace accessor macros
393 (print_instantiation_full_context): Likewise.
394 * lex.c (in_main_input_context): Likewise.
396 * pt.c (struct pending_templates): New.
397 (pending_templates, last_pending_template): Use it as a type.
398 (current_tinst_level): Change typo to "struct tinst_level *"
399 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
400 (add_pending_template): Construct a "struct pending_template".
401 Replace TINST_LEVEL accessor macros with field access.
402 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
403 (pop_tinst_level): Likewise.
404 (instantiate_pending_templates): Likewise. Factor common code used
405 when an instantiation has been done.
406 (outermost_tinst_level): Replace tree_last with loop.
407 (current_instantiation): Return a "struct tinst_level *".
409 2007-08-24 Ollie Wild <aaw@google.com>
411 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
412 * name-lookup.h (cp_binding_level): Remove vtables member.
414 2007-08-24 Richard Guenther <rguenther@suse.de>
416 * tree.c (cp_cannot_inline_tree_fn): Remove.
417 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
418 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
421 2007-08-24 Jakub Jelinek <jakub@redhat.com>
424 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
425 error_mark_node right away if build_expr_type_conversion
429 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
430 is error_mark_node rather than NULL_TREE.
431 * pt.c (check_explicit_specialization): Likewise.
434 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
435 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
437 2007-08-22 Jason Merrill <jason@redhat.com>
440 * pt.c (outermost_tinst_level): New function.
441 * lex.c (in_main_input_context): New function.
442 * cp-tree.h: Declare it.
443 * decl2.c (constrain_class_visibility): Use it to avoid warning
444 about uses of the anonymous namespace in the main input file.
446 2007-08-21 Jakub Jelinek <jakub@redhat.com>
448 * init.c (build_new_1): Use get_target_expr instead of save_expr.
450 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
453 * class.c (finish_struct_1): Warn when a class has virtual
454 functions and accessible non-virtual destructor.
456 2007-08-20 Richard Guenther <rguenther@suse.de>
460 * call.c (build_new_method_call): Convert initializer to
462 * init.c (build_aggr_init): Do not fiddle with types.
463 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
464 * except.c (build_throw): Do not drop qualifiers for the
466 * typeck.c (get_member_function_from_ptrfunc): Do not
467 fiddle with types, instead convert.
468 (build_ptrmemfunc1): Convert to the target type for
470 (gfc_trans_allocate): Convert result to target type.
471 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
472 pointer-to-member structures shall have alias set zero as well.
474 2007-08-20 Richard Guenther <rguenther@suse.de>
476 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
478 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
479 (nonstatic_local_decl_p): Likewise.
480 * tree.c (cp_auto_var_in_fn_p): Remove.
481 * decl.c (nonstatic_local_decl_p): Remove.
483 2007-08-20 Richard Guenther <rguenther@suse.de>
485 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
487 * tree.h (cp_walk_tree): New define to walk_tree_1 with
488 cp_walk_subtrees lh parameter.
489 (cp_walk_tree_without_duplicates): New define to
490 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
491 * tree.c (count_trees): Call
492 cp_walk_tree_without_duplicates.
493 (verify_stmt_tree): Call cp_walk_tree.
494 (break_out_target_exprs): Likewise.
495 (WALK_SUBTREE): Likewise.
496 * cp-gimplify.c (cp_genericize): Likewise.
497 * cp-pt.c (find_parameter_packs_r): Likewise.
498 (uses_parameter_packs): Likewise.
499 (make_pack_expansion): Likewise.
500 (check_for_bare_parameter_packs): Likewise.
501 (for_each_template_parm): Likewise.
502 * decl.c (check_default_argument): Call
503 cp_walk_tree_without_duplicates.
504 * except.c (build_throw): Likewise.
505 * decl2.c (type_visibility): Likewise.
506 * semantics.c (expand_or_defer_fn): Likewise.
507 (finalize_nrv): Call cp_walk_tree.
509 2007-08-20 Jakub Jelinek <jakub@redhat.com>
512 * init.c (build_new_1): Rename placement_var variable to placement_expr.
513 Initialize it with save_expr rather than get_temp_regvar.
515 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
518 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
521 2007-08-17 Ollie Wild <aaw@google.com>
524 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
525 declarations into appropriate slots for comparison. Fix type
528 2007-08-17 Paolo Carlini <pcarlini@suse.de>
531 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
532 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
534 2007-08-17 Paolo Carlini <pcarlini@suse.de>
537 * parser.c (cp_parser_class_head): Improve error message.
539 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
541 * pt.c (instantiate_decl): Set input_location
542 for the function end.
544 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
546 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
548 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
549 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
550 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
551 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
552 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
553 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
554 * typeck.c (cp_type_quals): Likewise.
555 * typeck2.c (cxx_incomplete_type_diagnostic,
556 cxx_incomplete_type_error): Likewise.
558 2007-08-16 Paolo Carlini <pcarlini@suse.de>
561 * pt.c (tsubst_friend_function): When check_classfn
562 returns error_mark_node likewise return it.
564 2007-08-15 Jakub Jelinek <jakub@redhat.com>
567 * typeck.c (check_return_expr): Don't NRV optimize vars in
569 * decl.c (finish_function): Comment fix.
571 2007-08-15 Paolo Carlini <pcarlini@suse.de>
574 * pt.c (push_template_decl_real): Depending on TYPE_P
575 use either TYPE_CONTEXT or DECL_CONTEXT.
577 2007-08-14 Mark Mitchell <mark@codesourcery.com>
579 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
580 constructors and destructors return this.
582 2007-08-14 Paolo Carlini <pcarlini@suse.de>
585 * decl2.c (check_classfn): Return error_mark_node in case of error;
586 in that case, do not call add_method.
587 * decl.c (start_decl): Deal with check_classfn returning
589 (grokfndecl): Likewise.
590 * pt.c (tsubst_friend_function): Likewise.
592 2007-08-14 Andrew Pinski <pinskia@gmail.com>
595 * typeck.c (build_binary_op): Disallow vector float types with
596 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
598 2007-08-11 Ian Lance Taylor <iant@google.com>
600 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
602 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
604 2007-08-10 Ollie Wild <aaw@google.com>
606 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
608 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
610 (unqualified_namespace_lookup): Fix ambiguous_decl call.
611 (lookup_using_namespace): Fix ambiguous_decl call.
612 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
614 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
616 * call.c (name_as_c_string): Use CONST_CAST.
617 * decl.c (build_decl): Likewise.
618 * parser.c (cp_parser_string_literal): Likewise.
620 2007-08-10 Paolo Carlini <pcarlini@suse.de>
623 * error.c (dump_expr): Consistently use the *_cxx_*
624 variants of the pretty-print functions.
626 2007-08-10 Paolo Carlini <pcarlini@suse.de>
629 * decl.c (check_special_function_return_type): Just error
630 on return type specified for conversion operator.
632 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
634 * typeck2.c (readonly_error): Handle general expressions.
635 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
637 2007-08-06 Dan Hipschman <dsh@google.com>
639 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
640 access function name.
642 2007-08-04 Alfred Minarik <a.minarik@aon.at>
645 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
646 * g++spec.c (lang_specific_driver): Check them.
648 2007-08-06 Paolo Carlini <pcarlini@suse.de>
651 * pt.c (inline_needs_template_parms): Fix comment; change return type
654 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
657 2007-03-26 Dirk Mueller <dmueller@suse.de>
659 * parser.c (cp_parser_member_declaration): Pedwarn
660 about stray semicolons after member declarations.
662 2007-08-02 Lee Millward <lee.millward@gmail.com>
667 * parser.c (cp_parser_asm_definition): Detect and discard asm
668 statements with invalid inputs or outputs.
669 (cp_parser_asm_operand_list): Return error mark node if any
670 of the operands are invalid. Adjust documentation.
672 2007-08-02 Nick Clifton <nickc@redhat.com>
674 * typeck.c: Change copyright header to refer to version 3 of the
675 GNU General Public License and to point readers at the COPYING3
676 file and the FSF's license web page.
677 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
678 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
679 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
680 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
681 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
682 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
683 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
684 name-lookup.h, parser.c: Likewise.
686 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
689 * call.c (magic_varargs_p): Honor the "type generic" attribute.
691 2007-07-30 Paolo Carlini <pcarlini@suse.de>
694 * semantics.c (finish_label_stmt): Reject the __label__
695 extension outside function scopes.
697 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
699 * parser.c (eof_token): Un-constify.
700 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
701 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
704 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
706 * pt.c, tree.c, typeck2.c: Fix comment typos.
708 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
709 Mark Mitchell <mark@codesourcery.com>
712 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
713 hidden due to friend declarations in local classes.
715 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
717 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
718 * cp-tree.def (DECLTYPE_TYPE): New.
719 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
720 (dump_type_prefix): Ditto.
721 (dump_type_suffix): Ditto.
722 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
723 * mangle.c (write_type): Handle DECLTYPE_TYPE.
724 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
726 (DECLTYPE_TYPE_EXPR): New.
727 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
728 (finish_declared_type): Declare.
729 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
731 (pp_cxx_type_id): Ditto.
732 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
733 (tsubst): Substitute into a DECLTYPE_TYPE node.
734 (tsubst_copy): Ditto.
735 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
737 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
738 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
739 structural equality (because we can't hash the expressions).
740 (finish_declared_type): New.
741 * lex.c (reswords): Add "decltype" keyword.
742 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
743 (cp_parser_postfix_expression): Add member_access_only_p to
744 restrict postfix expression to member access expressions.
745 (cp_parser_unary_expression): Update call to
746 cp_parser_postfix_expression to reflect new parameter.
747 (cp_parser_declared_type): New.
748 (cp_parser_simple_type_specifier): Parse decltype types.
750 2007-07-27 Mark Mitchell <mark@codesourcery.com>
753 * call.c (convert_for_arg_passing): Only widen bitfields to their
754 declared types if necessary.
756 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
758 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
761 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
763 * decl.c (typename_hash, typename_compare): Constify.
764 * mangle.c (hash_type, compare_type): Likewise.
765 * pt.c (eq_local_specializations, hash_local_specialization):
767 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
768 list_hash): Likewise.
769 * typeck2.c (pat_compare): Likewise.
771 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
773 * method.c (implicitly_declare_fn): Increase alignment if member
774 function pointer format requires it.
776 2007-07-24 Paolo Carlini <pcarlini@suse.de>
779 * typeck.c (check_return_expr): Do not pass a null argument
782 2007-07-24 Paolo Carlini <pcarlini@suse.de>
785 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
788 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
791 * typeck.c (convert_arguments): Only use default args if we have
795 * typeck.c (structural_comptypes): No need to check
796 resolve_typename_type return value here.
797 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
798 * pt.c (resolve_typename_type): Follow typename typedefs. Return
799 original type rather than error_mark_node in case of failure.
800 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
801 resolve_typename_type result check.
802 (cp_parser_direct_declarator, cp_parser_head,
803 cp_parser_constructor_declarator_p): Likewise.
805 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
807 * pt.c (template_parms_variadic_p): Remove.
808 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
810 2007-07-12 Jakub Jelinek <jakub@redhat.com>
813 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
814 argument to dump_aggr_init_expr_args instead of false.
816 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
818 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
819 canonical types; otherwise, fall back to structural type
820 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
821 internal compiler error if the canonical types are wrong.
823 2007-07-11 Paolo Carlini <pcarlini@suse.de>
826 * parser.c (cp_parser_make_indirect_declarator): When the
827 the code argument is ERROR_MARK return cp_error_declarator.
829 2007-07-09 Geoffrey Keating <geoffk@apple.com>
832 * decl.c (cxx_init_decl_processing): Don't set
833 force_align_functions_log.
834 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
835 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
836 FUNCTION_DECL, return its alignment.
838 2007-07-09 Richard Guenther <rguenther@suse.de>
840 * decl.c (start_preparsed_function): Do not promote return type.
842 2007-07-08 Paolo Carlini <pcarlini@suse.de>
845 * pt.c (unify): Never pass error_mark_node to template_decl_level.
847 2007-07-07 Mark Mitchell <mark@codesourcery.com>
850 * pt.c (resolve_overloaded_unification): Robustify. Return a
852 (type_unification_real): Adjust accordingly.
854 2007-07-06 Richard Guenther <rguenther@suse.de>
856 * init.c (build_new_1): Use the correct pointer type.
857 * typeck2.c (build_m_component_ref): Likewise.
859 2007-07-05 Mark Mitchell <mark@codesourcery.com>
862 * init.c (build_zero_init): Always build an initializer for
864 * typeck2.c (build_functional_cast): Use build_zero_init.
867 * init.c (build_new_1): Always pass the allocation function to
868 build_op_delete_call.
869 * call.c (build_op_delete_call): Handle operator delete with a
870 variable-argument list. Do not issue an error when no matching
871 deallocation function is available for a new operator.
874 * cp-tree.h (any_value_dependent_elements_p): Declare it.
875 * decl.c (value_dependent_init_p): New function.
876 (cp_finish_decl): Use it.
877 * pt.c (value_dependent_expression_p): Use
878 any_value_dependent_elements_p.
879 * parser.c (cp_parser_primary_expression): Add comment about
880 treating dependent qualified names as integral
881 constant-expressions.
883 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
885 * decl.c (build_ptrmemfunc_type): Always use structural equality
886 tests when comparing pointer-to-member-function types, because the
887 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
890 2007-07-03 Mark Mitchell <mark@codesourcery.com>
892 * init.c (build_new): Tweak comment.
894 2007-06-29 Dave Brolley <brolley@redhat.com>
897 * parser.c (cp_parser_new_type_id): Don't reduce a named array
898 type to its base type and number of elements here.
899 * init.c (build_new): Call complete_type_or_else to ensure that the
900 type is complete and to issue a diagnostic if it is not.
901 (build_new_1): Don't call complete_type_or_else here.
903 2007-07-03 Richard Guenther <rguenther@suse.de>
906 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
909 2007-07-02 Simon Baldwin <simonb@google.com>
911 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
912 for inner-style nested forward declarations that don't declare
915 2007-07-02 Jakub Jelinek <jakub@redhat.com>
918 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
919 DECL_P in not a variable and appears more than once error messages.
921 2007-07-01 Ollie Wild <aaw@google.com>
923 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
924 (select_decl): Remove function.
925 (unqualified_namespace_lookup): Populate binding by calling
926 ambiguous_decl. Remove select_decl call.
927 (lookup_qualified_name): Remove select_decl call.
928 * decl.c (lookup_and_check_tag): Check for ambiguous references.
929 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
930 generation when name lookup is ambiguous.
932 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
935 * init.c (build_new_1): Use structural equality on the copy of the
938 2007-06-28 Geoffrey Keating <geoffk@apple.com>
940 * decl2.c (determine_visibility): Implement
941 flag_visibility_ms_compat effect on type info.
942 * decl.c (cxx_init_decl_processing): Implement
943 global effect of flag_visibility_ms_compat.
945 2007-06-28 Geoffrey Keating <geoffk@apple.com>
947 * decl2.c (start_objects): Mark constructor-running function
950 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
953 * decl.c (grokdeclarator): Reset friendp for member functions declared
954 friend of their own class.
956 2007-06-23 Mark Mitchell <mark@codesourcery.com>
958 * decl2.c (determine_visibility): Don't look for dllexport here.
959 (determine_visibility_from_class): Tidy.
961 2007-06-18 Simon Baldwin <simonb@google.com>
964 * parser.c (cp_parser_single_declaration): Added check for storage
965 class other than sc_none in parsed declaration, and a flag to indicate
966 if the call is part of an explicit template specialization parse.
967 * (cp_parser_explicit_specialization): Specialization check flag added
968 to call to cp_parser_single_declaration(), set true.
969 * (cp_parser_template_declaration_after_export): Specialization check
970 flag added to call to cp_parser_single_declaration(), set false.
971 * pt.c (check_explicit_specialization): Added code to copy visiblity
972 and linkage from the templated function to the explicit specialization.
974 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
976 * typeck.c (build_binary_op): For templates build the
977 expression in pieces to avoid the assert in build2_stat.
978 (get_member_function_from_ptrfunc):
979 Change over to using POINTER_PLUS_EXPR and convert
980 the second operand to sizetype.
981 * typeck2.c (build_m_component_ref): Likewise.
982 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
983 instead of PLUS_EXPR for pointers.
984 (build_new_1): Likewise.
985 (build_vec_delete_1): Likewise.
986 (build_vec_delete): Likewise.
987 * class.c (build_base_path): Likewise.
988 (build_base_path): Likewise.
989 (convert_to_base_statically): Likewise.
990 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
991 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
992 instead of PLUS_EXPR.
993 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
994 instead of PLUS_EXPR for pointers.
995 * call.c (build_special_member_call): Likewise.
996 * rtti.c (build_headof): Likewise.
997 Use sizetype instead of ptrdiff_type_node.
998 (tinfo_base_init): Create a POINTER_PLUS_EXPR
999 instead of PLUS_EXPR for pointers.
1000 * except.c (expand_start_catch_block): Do a
1001 NEGATIVE and then a POINTER_PLUS_EXPR instead
1003 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
1004 PLUS_EXPR on pointer types over to use
1005 POINTER_PLUS_EXPR and remove the conversion
1006 to the pointer types.
1007 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
1008 adding to a pointer type. Use size_int instead of
1009 ssize_int. Convert the index to sizetype before
1010 adding it to the pointer.
1012 2007-06-15 Mark Mitchell <mark@codesourcery.com>
1014 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
1015 (DECL_ANON_UNION_VAR_P): New macro.
1016 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
1017 than DECL_VAR_MARKED_P, to keep track of which variables we have
1019 * decl.c (redeclaration_error_message): Complain about redeclaring
1020 anonymous union members at namespace scope.
1021 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
1023 2007-06-14 Geoff Keating <geoffk@apple.com>
1025 * decl2.c (determine_visibility): Ensure that functions with
1026 hidden types as parameters are hidden.
1029 * decl2.c (determine_visibility): Remove duplicate code for
1032 2007-06-12 Ian Lance Taylor <iant@google.com>
1035 * init.c (avoid_placement_new_aliasing): New static function.
1036 (build_new_1): Call it.
1038 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
1040 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
1041 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
1043 2007-06-08 Jakub Jelinek <jakub@redhat.com>
1046 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
1047 on init, the non-decl cond operand and increment value.
1049 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
1052 * decl.c (check_initializer): Report an error when a brace enclosed
1053 initializer is used for a non-aggregate type in C++98.
1054 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
1056 (grokdeclarator): Likewise.
1057 (move_fn_p): Likewise.
1058 * typeck.c (check_return_expr): Likewise.
1059 * call.c (reference_binding): Likewise.
1060 * error.c (cp_cpp_error): Likewise.
1061 * pt.c (check_default_tmpl_args): Likewise.
1063 * lex.c (init_reswords): Likewise.
1064 * parser.c (p_parser_primary_expression): Likewise.
1065 (TOKEN_PRECEDENCE): Likewise.
1066 (cp_parser_init_declarator): Likewise.
1067 (cp_parser_ptr_operator): Likewise.
1068 (cp_parser_parameter_declaration): Likewise.
1069 (cp_parser_enclosed_template_argument_list): Likewise.
1070 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
1071 (cp_parser_next_token_ends_template_argument_p): Likewise.
1073 2007-06-04 Simon Baldwin <simonb@google.com>
1075 * decl.c (grokdeclarator): Readability change. Moved case labels
1076 into direct switch statement scope.
1078 2007-06-04 Paolo Carlini <pcarlini@suse.de>
1080 * call.c (convert_like_real): Remove pointless code.
1082 2007-05-31 Mark Mitchell <mark@codesourcery.com>
1084 * decl.c (get_atexit_fn_ptr_type): New function.
1085 (get_atexit_node): Use it.
1086 (start_cleanup_fn): Likewise.
1087 (register_dtor_fn): Use the object's destructor, instead of a
1088 separate cleanup function, where possible.
1089 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
1090 (atexit_fn_ptr_type_node): New macro.
1091 * decl2.c (build_cleanup): Use build_address.
1093 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
1095 * typeck.c (build_binary_op): Include types in error.
1097 2007-05-31 Jakub Jelinek <jakub@redhat.com>
1100 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
1101 needs runtime initialization.
1103 2007-05-31 Paolo Carlini <pcarlini@suse.de>
1106 * semantics.c (finish_trait_expr): Complete the types.
1108 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
1109 Douglas Gregor <doug.gregor@gmail.com>
1110 Pedro Lamarao <pedro.lamarao@mndfck.org>
1111 Howard Hinnant <howard.hinnant@gmail.com>
1115 * typeck.c (comptypes): Don't consider rvalue and lvalue
1116 reference types to be equivalent.
1117 (check_return_expr): Move from certain lvalues when returning
1119 * decl.c (grokdeclarator): Implement reference collapsing.
1120 (copy_fn_p): Don't consider constructors taking rvalue references
1121 to be copy constructors.
1123 * call.c (conversion): New "rvaluedness_matches_p" member.
1124 (convert_class_to_reference): Require reference type as first
1125 parameter instead of base type.
1126 (reference_binding): Add logic to handle rvalue references.
1127 (implicit_conversion): Update inaccurate comment.
1128 (convert_like_real): Disable creation of temporaries that are
1129 impossible to initialize for types with move constructors.
1130 (build_over_call): Elide move constructors when possible.
1131 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
1132 (maybe_handle_ref_bind): Return conversion instead of type node.
1133 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
1134 determine preferred conversion sequences.
1135 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
1136 (LOOKUP_PREFER_RVALUE): New.
1137 (DECL_MOVE_CONSTRUCTOR_P): New.
1138 (struct cp_declarator): Add "reference" member for reference
1139 types, with new "rvalue_ref" flag.
1140 (cp_build_reference_type): Declare.
1141 (move_fn_p): Declare.
1142 * error.c (dump_type_prefix): Format rvalue reference types
1143 correctly in error messages.
1144 * except.c (build_throw): Move from certain lvalues when
1146 * mangle.c (write_type): Mangle rvalue references differently
1147 than regular references.
1148 * parser.c (make_reference_declarator): Add boolean parameter for
1150 (cp_parser_make_indirect_declarator): New.
1151 (cp_parser_new_declarator_opt): Call
1152 cp_parser_make_indirect_declarator.
1153 (cp_parser_conversion_declarator_opt): Ditto.
1154 (cp_parser_declarator): Ditto.
1155 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
1157 * pt.c (tsubst): Implement reference collapsing.
1158 (maybe_adjust_types_for_deduction): Implement special template
1159 parameter deduction rule for rvalue references.
1160 (type_unification_real): Update calls to
1161 maybe_adjust_types_for_deduction.
1162 (try_one_overload): Ditto.
1163 (unify_pack_expansion): Ditto.
1164 * tree.c (lvalue_p_1): Handle rvalue reference types.
1165 (cp_build_reference_type): New.
1167 2007-05-30 Jakub Jelinek <jakub@redhat.com>
1170 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
1171 variables that need runtime initialization.
1173 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
1176 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
1177 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
1178 case POSTDECREMENT_EXPR>): Return the error_mark_node
1179 if either the real or imaginary parts would an
1182 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
1183 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1186 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
1187 token is a closing brace, false if there are no tokens left.
1188 (cp_parser_namespace_alias_definition): Only consume the next token if
1189 it is a closing brace.
1191 * parser.c (cp_parser_class_specifier): Likewise.
1193 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
1195 * semantics.c (finish_member_declaration): Fix a typo in the
1198 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
1210 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
1211 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
1212 * pt.c (check_for_bare_parameter_packs): Return bool indicated
1213 whether everything was okay. Fix indentation.
1214 (push_template_decl_real): Check for bare parameter packs in
1215 function parameters; where errors occur, mark the parameter types
1216 with ERROR_MARK_NODEs to avert ICEs.
1217 (coerce_template_parameter_pack): New.
1218 (coerce_template_parms): Moved parameter pack coercion into
1219 coerce_template_parameter_pack, and permit it anywhere in the
1220 template parameter list (not just at the end). Parameter and
1221 argument indices can vary (somewhat) separately now, so add
1222 PARM_IDX and ARG_IDX.
1223 (fn_type_unification): Don't set an argument pack as incomplete if
1224 no argument pack was deduced.
1225 (type_unification_real): If a type parameter is a parameter pack
1226 and has not otherwise been deduced, it will be deduced to an empty
1228 (more_specialized_fn): Use the actual lengths of the argument
1229 lists when comparing against expansions.
1230 * semantics.c (finish_member_declaration): If a field's type has
1231 bare parameter packs, error and set its type to ERROR_MARK_NODE.
1233 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
1236 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
1238 2007-05-22 Ollie Wild <aaw@google.com>
1240 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
1241 (unqualified_namespace_lookup): Adds check for hidden types.
1243 2007-05-22 Ollie Wild <aaw@google.com>
1245 * decl.c (duplicate_decls): Verify namespace names are unique.
1247 2007-05-21 Mark Mitchell <mark@codesourcery.com>
1249 * decl.c (cxx_maybe_build_cleanup): Handle
1250 __attribute__((cleanup)).
1252 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1254 * cvt.c (cp_convert_and_check): Don't check warnings if the
1257 2007-05-18 Geoffrey Keating <geoffk@apple.com>
1259 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
1261 2007-05-14 Paolo Carlini <pcarlini@suse.de>
1264 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
1265 type only if is a class type (5.2.8/4).
1267 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
1269 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1270 * decl.c (grokdeclarator): Use unsigned_type_for instead of
1271 c_common_unsigned_type.
1273 2007-05-11 Silvius Rus <rus@google.com>
1275 * cp/typeck.c (build_indirect_ref): Add call to
1276 strict_aliasing_warning.
1277 (build_reinterpret_cast_1): Condition call to
1278 strict_aliasing_warning.
1280 2007-05-11 Jan Hubicka <jh@suse.cz>
1282 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
1283 * decl2.c (start_objects): ctors and dtors are no longer public.
1284 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
1286 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
1288 * typeck.c (build_unary_op): Remove code that used to
1289 handle non lvalue increments/decrements.
1291 2007-05-07 Mike Stump <mrs@apple.com>
1293 * parser.c (check_empty_body): Add.
1294 (cp_parser_iteration_statement): Add call to check_empty_body.
1296 2007-05-05 Geoffrey Keating <geoffk@apple.com>
1299 * mangle.c (write_mangled_name): Mangle static variable names.
1300 (write_unqualified_name): Use local-source-name for
1301 namespace-scope static variables.
1303 2007-05-04 Dirk Mueller <dmueller@suse.de>
1305 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
1308 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
1311 * decl2.c (constrain_class_visibility):
1312 Use strip_pointer_or_array_types instead of strip_array_types.
1314 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
1317 * decl.c (reshape_init_r): Don't reshape the first element if it
1318 is a pointer to member function.
1320 2007-04-27 Simon Baldwin <simonb@google.com>
1322 * decl.c (grokparms): Changed message format from %qD to %qE.
1324 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
1326 * error.c (maybe_warn_variadic_templates): Variadic templates are
1327 now in C++0x, so only warn about them in C++98 mode.
1329 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
1332 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
1333 integeral types from vectors types.
1335 2007-04-26 Jakub Jelinek <jakub@redhat.com>
1338 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
1339 for type dependent OMP_CLAUSE_DECLs.
1341 2007-04-24 Mark Mitchell <mark@codesourcery.com>
1344 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
1345 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
1346 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
1347 * init.c (build_zero_init): Adjust, as
1348 COMPLEX_TYPE is now a SCALAR_TYPE.
1349 * typeck2.c (digest_init): Allow brace-enclosed initializers for
1350 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
1352 2007-04-25 Paolo Carlini <pcarlini@suse.de>
1354 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
1355 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
1356 (trait_expr_value): Adjust.
1358 2007-04-23 Simon Baldwin <simonb@google.com>
1360 * decl.c (grokparms): Added new error for duplicate function
1361 parameters names in function prototypes, to match gcc behavior.
1363 2007-04-23 Jan Hubicka <jh@suse.cz>
1365 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
1368 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
1370 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
1371 instead of checking GIMPLE_STMT_P in chain_next.
1373 2007-04-17 Mark Mitchell <mark@codesourcery.com>
1376 * call.c (convert_for_arg_passing): Convert bitfields to their
1379 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
1382 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
1384 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
1387 * cp/decl2.c (constrain_class_visibility):
1388 Do not warn about the use of anonymous namespace in the main input file.
1390 2007-04-15 Mark Mitchell <mark@codesourcery.com>
1392 * cp-tree.h (current_template_parms): Fix typo in comment.
1394 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
1396 * cp-tree.h, error.c: Fix comment typos.
1398 2007-04-13 Jason Merrill <jason@redhat.com>
1401 * call.c (reference_binding): Add c_cast_p parm. If true,
1402 add quals to TO as needed to make it reference-compatible.
1404 2007-04-11 Jan Hubicka <jh@suse.cz>
1406 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
1407 that we are not processing template_decl.
1409 2007-04-09 Mark Mitchell <mark@codesourcery.com>
1412 * class.c (build_base_path): Ensure that the converted pointer has
1413 the same cv-qualification as the input.
1415 2007-04-09 Paolo Carlini <pcarlini@suse.de>
1417 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
1419 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
1421 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
1423 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
1424 * tree.c (cp_add_pending_fn_decls): Remove.
1425 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
1427 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
1429 Revert change removing staticp.
1431 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
1433 * cp-objcp-common.c (cxx_staticp): Remove.
1434 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
1435 * cp-tree.h (cxx_staticp):
1437 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
1439 * class.c (check_for_override): Don't remove dllmport attribute
1442 2007-04-03 Jakub Jelinek <jakub@redhat.com>
1445 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
1446 type issue error and return early.
1448 2007-03-30 Jason Merrill <jason@redhat.com>
1451 * typeck.c (cp_type_readonly): New fn.
1452 * cp-tree.h: Declare it.
1453 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
1454 (cp_finish_decl): Not here.
1456 2007-03-31 Richard Guenther <rguenther@suse.de>
1458 * optimize.c (maybe_clone_body): Replace splay-tree usage by
1461 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
1466 * parser.c (declarator_can_be_parameter_pack): New.
1467 (cp_parser_template_parameter): Only parse the `...' if the
1468 declarator can be a parameter pack.
1469 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
1471 * pt.c (find_parameter_packs_r): Look into the bounds on integer
1472 types (they could be used as array bounds).
1473 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
1474 (tsubst_pack_expansion): Handle failure to expand parameter
1477 2007-03-30 Paolo Carlini <pcarlini@suse.de>
1480 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
1481 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
1482 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
1483 (CLASS_TYPE_NON_UNION_P): Add.
1484 (struct lang_type_class): Add has_complex_dflt.
1485 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
1486 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
1487 * cp-tree.def: Add TRAIT_EXPR.
1488 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
1489 * lex.c (struct resword): Add __has_nothrow_assign,
1490 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
1491 __has_trivial_constructor, __has_trivial_copy,
1492 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
1493 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
1494 __is_pod, __is_polymorphic, __is_union.
1495 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
1496 (cp_parser_trait_expr): New.
1497 * semantics.c (finish_trait_expr, trait_expr_value
1498 classtype_has_nothrow_copy_or_assign_p): New.
1499 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
1501 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
1502 * class.c (check_bases, check_field_decl, check_bases_and_members):
1503 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
1504 * pt.c (uses_template_parms, tsubst_copy_and_build,
1505 value_dependent_expression_p, type_dependent_expression_p): Deal with
1507 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
1509 2007-03-29 Richard Guenther <rguenther@suse.de>
1511 * tree.c (cp_walk_subtrees): Do not set input_location.
1513 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
1516 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
1519 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1521 * parser.c (struct cp_parser): Update comment for
1522 greater_than_is_operator_p.
1523 (cp_parser_primary_expression): In C++0x mode, a cast operator can
1524 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
1525 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
1526 !GREATER_THAN_IS_OPERATOR_P.
1527 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
1528 `>>' operators that will become two `>' tokens in C++0x.
1529 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
1530 mode, allowing it to terminate default arguments.
1531 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
1532 `>>' like two consecutive `>' tokens.
1533 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
1534 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
1535 ends a template argument.
1537 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1539 * decl.c (redeclaration_error_message): Complain when redeclaring
1540 a friend function with default template arguments (C++0x mode only).
1541 * cp-tree.h (check_default_tmpl_args): Declare.
1542 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1543 template arguments in function templates. Add support for checking
1544 the default template arguments of friend templates.
1545 (push_template_decl_real): Fix call to check_default_tmpl_args.
1546 (type_unification_real): If a template parameter has not been
1547 deduced but provides a default template argument, substitute into
1548 that default template argument.
1549 * parser.c (cp_parser_init_declarator): When declaring (but not
1550 defining!) a function template in C++0x mode, check for default
1553 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1556 * decl.c (grokdeclarator): Deal with cv-qualified function type
1557 typedefs in the same way for member and non-member functions.
1559 2007-03-26 Dirk Mueller <dmueller@suse.de>
1561 * parser.c (cp_parser_member_declaration): Pedwarn
1562 about stray semicolons after member declarations.
1564 2007-03-26 Paolo Carlini <pcarlini@suse.de>
1567 * pt.c (instantiate_decl): Set in_system_header.
1569 2007-03-22 Mark Mitchell <mark@codesourcery.com>
1571 * cp-tree.h (current_tempalte_parms): Improve documentation.
1572 * pt.c (current_template_args): Likewise.
1575 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1576 not consume tokens when failing.
1578 2007-03-22 Jim Wilson <wilson@specifix.com>
1579 Mark Mitchell <mark@codesourcery.com>
1582 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
1583 consistent with FROM.
1585 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1587 * error.c (dump_expr): Handle dependent names that designate types.
1588 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1590 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
1592 * cp-tree.def, parser.c, pt.c: Fix comment typos.
1594 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1596 * cvt.c (cp_convert_and_check) : Define.
1597 * cp-tree.h (cp_convert_and_check): Declare.
1598 * call.c (convert_conversion_warnings): Rename to
1599 conversion_null_warnings. The warning for floating-point to
1600 integer is handled by convert_and_check in convert_like_real.
1601 (convert_like_real): convert_conversion_warnings was renamed as
1602 conversion_null_warnings.
1603 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1604 overflow and changes of value during conversion.
1606 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1609 * parser.c (cp_parser_statement): If 'namespace' is found, this
1610 only can be a namespace alias definition, so parse it now.
1611 (cp_parser_namespace_alias_definition): if we find an open brace
1612 instead of '=', then this is actually a misplaced namespace
1615 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1618 * decl.c (cxx_init_decl_processing): Move command-line options
1619 processing to c-opts.c.
1621 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
1623 * ptree.c (cxx_print_type): Use formatting markup for integers
1624 when printing template parameter index/level/orig level.
1625 (cxx_print_xnode): Ditto.
1626 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1627 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1628 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1630 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1631 rather than a HOST_WIDE_INT.
1632 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1633 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1635 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1636 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1637 IN_BASE_INITIALIZER bool bitfields.
1638 (struct cp_declarator): Make KIND a 4-bit field. Make
1639 PARAMETER_PACK_P a bool bitfield just after KIND.
1640 * pt.c (uses_parameter_packs): Destroy the pointer set.
1641 (make_pack_expansion): Ditto.
1642 (check_for_bare_parameter_packs): Ditto.
1643 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1645 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
1648 * call.c (convert_default_arg): Instead of copying the node,
1651 2007-03-15 Dirk Mueller <dmueller@suse.de>
1654 * call.c (convert_conversion_warnings): New..
1655 (convert_like_real): .. factored out from here.
1656 (convert_conversion_warnings): Add warning about
1657 false being converted to NULL in argument passing.
1659 2007-03-14 Dirk Mueller <dmueller@suse.de>
1661 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1662 (finish_do_body): Warn about empty body in do/while statement.
1664 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1666 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1668 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1671 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1674 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
1676 * cp/repo.c (init_repo): Initialize random_seed saved options.
1677 (finish_repo): Adjust.
1679 2007-03-13 Mark Mitchell <mark@codesourcery.com>
1682 * Make-lang.in (doc/g++.1): Use $< to specify the location from
1685 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
1687 * decl.c (compute_array_index_type): New warning flag warn_vla.
1689 2007-03-12 Mark Mitchell <mark@codesourcery.com>
1692 * call.c (convert_default_arg): Copy non-constant arguments.
1694 2007-03-11 Mark Mitchell <mark@codesourcery.com>
1697 * parser.c (cp_parser_postfix_expression): Disallow compound
1698 literals in constant expressions.
1701 * semantics.c (finish_typeof): Use unlowered_expr_type.
1703 2007-03-10 Mark Mitchell <mark@codesourcery.com>
1706 * cp-tree.h (unlowered_expr_type): New function.
1707 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1708 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1709 (unlowered_expr_type): New function.
1710 (build_unary_op): Disallow predecrements of bool bitfields.
1711 * call.c (build_conditional_expr): Use unlowered_expr_type.
1712 * pt.c (type_unification_real): Likewise.
1714 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
1717 * typeck.c (check_return_expr): Check for bare parameter packs.
1718 (comptypes): Compare template parameter packs and
1719 type pack expansions.
1720 * decl.c (grokdeclarator): Deal with the declaration of function
1722 (grokparms): Verify that the (optional) function parameter pack is
1723 at the end of the parameter list.
1724 (xref_basetypes): Handle pack expansions in the base class.
1725 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1726 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1727 (NONTYPE_ARGUMENT_PACK): New.
1728 (TYPE_PACK_EXPANSION): New.
1729 (EXPR_PACK_EXPANSION): New.
1730 (ARGUMENT_PACK_SELECT): New.
1731 * cp-objcp-common.c (cp_tree_size): Compute size of
1732 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1733 ARGUMENT_PACK_SELECT.
1734 * error.c (dump_template_argument): Print template argument packs.
1735 (dump_template_argument_list): Ditto.
1736 (dump_template_parameter): Dump `...' for template type parameter
1738 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1739 (dump_parameters): Print function parameter packs.
1740 (dump_template_parms): Print template argument packs.
1741 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1742 (maybe_warn_variadic_templates): New.
1743 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1744 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1745 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1747 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1748 (write_template_arg): Write argument packs as separate arguments.
1749 * cp-tree.h (struct template_parm_index_s): Add flag that
1750 indicates that the template parameter is actually a parameter
1752 (struct tree_argument_pack_select): New.
1753 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1754 (union lang_tree_node): Add argument_pack_select.
1755 (FUNCTION_PARAMETER_PACK_P): New.
1756 (PACK_EXPANSION_P): New.
1757 (PACK_EXPANSION_PATTERN): New.
1758 (SET_PACK_EXPANSION_PATTERN): New.
1759 (PACK_EXPANSION_PARAMETER_PACKS): New.
1760 (ARGUMENT_PACK_P): New.
1761 (ARGUMENT_PACK_ARGS): New.
1762 (SET_ARGUMENT_PACK_ARGS): New.
1763 (ARGUMENT_PACK_INCOMPLETE_P): New.
1764 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1765 (TEMPLATE_PARM_PARAMETER_PACK): New.
1766 (TEMPLATE_TYPE_PARAMETER_PACK): New.
1767 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1768 (ARGUMENT_PACK_SELECT_INDEX): New.
1769 (ARGUMENT_PACK_SELECT_ARG): New.
1770 (struct cp_declarator): Add parameter_pack_p flag.
1771 (maybe_warn_variadic_templates): Declare.
1772 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1773 indicate a template parameter pack.
1774 (uses_parameter_packs): Declare.
1775 (template_parameter_pack_p): Declare.
1776 (template_parms_variadic_p): Declare.
1777 (make_pack_expansion): Declare.
1778 (check_for_bare_parameter_packs): Declare.
1779 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1780 sizeof... expressions.
1781 (pp_cxx_expression): Print pack expansions and non-type argument
1783 (pp_cxx_exception_specification): Print pack expansions.
1784 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1785 (pp_cxx_ctor_initializer): Print pack expansions.
1786 (pp_cxx_type_id): Print pack expansions.
1787 (pp_cxx_template_argument_list): Print argument packs.
1788 (pp_cxx_template_parameter): Print ellipsis for template parameter
1790 * pt.c (comp_template_parms): Compare template parameter packs.
1791 (template_parameter_pack_p): New.
1792 (template_parms_variadic_p): New.
1793 (template_args_variadic_p): New.
1794 (make_ith_pack_parameter_name): New.
1795 (struct find_parameter_pack_data): New.
1796 (find_parameter_packs_r): New.
1797 (uses_parameter_packs): New.
1798 (make_pack_expansion): New.
1799 (check_for_bare_parameter_packs): New.
1800 (expand_template_argument_pack): New.
1801 (reduce_template_parm_level): Propagate parameter pack flag.
1802 (process_template_parm): Add is_parameter_pack parameter to state
1803 when the parameter is actually a parameter pack. Create template
1804 parameter packs when is_parameter_pack is true.
1805 (current_template_args): The argument for a template parameter
1806 pack is an argument pack containing a single pack expansion.
1807 (process_partial_specialization): When checking that non-type
1808 argument expressions do not involve template parameters, loop over
1809 the arguments in argument packs separately.
1810 (push_template_decl_real): Check that the type of the declaration
1811 does not have any bare parameter packs. Check that primary
1812 templates have no more than one parameter pack, and that it comes
1813 at the end of the template parameter list.
1814 (convert_template_argument): Handle coercions for pack expansion
1815 expressions by coercing the pattern then rebuilding the expansion.
1816 (coerce_template_parms): When coercing the arguments for a
1817 variadic template, pack "extra" arguments into an argument pack.
1818 (coerce_template_template_parms): Cannot coerce between parameter
1819 packs and non-pack parameters.
1820 (template_args_equal): Compare PACK_EXPANSION_P expressions.
1821 (comp_template_args): Expand all template arguments packs before
1822 comparing template argument lists.
1823 (mangle_class_name_for_template): Make argument packs as separate
1825 (for_each_template_parm_r): No need to handle BASELINK.
1826 (instantiate_class_template): Handle pack expansions in the base
1828 (tsubst_pack_expansion): New.
1829 (tsubst_template_args): Handle substitutions of argument packs and
1830 pack expansion into template argument lists.
1831 (tsubst_decl): Expand function parameter packs into separate
1832 function parameters.
1833 (tsubst_arg_types): Expand a type pack expansion into separate
1835 (tsubst_exception_specification): Handle pack expansions in
1836 exception specifiers.
1837 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
1838 replacing a template parameter with its argument. If we encounter
1839 a substitution for an argument pack, just return the parameter
1841 (tsubst_copy): sizeof(X...) returns the number of elements in
1842 parameter pack X. See through ARGUMENT_PACK_SELECT when the
1843 PARM_DECL is a parameter pack.
1844 (tsubst_expr): Expression pack expansions and argument packs
1845 cannot show up here; they will all be handled through function
1846 calls, sizeof, and template argument lists.
1847 (tsubst_copy_and_build): sizeof(X...) returns the number of
1848 elements in parameter pack X. Handle pack expansions in TREE_LIST
1849 and CONSTRUCTOR nodes.
1850 (fn_type_unification): Handle "incomplete" explicit template
1851 argument lists that specify some of the arguments for a template
1853 (type_unification_real): Unify arguments against pack expansions.
1854 (template_parm_level_and_index): New, helper function.
1855 (unify_pack_expansion): New.
1856 (unify): Unify argument packs on an argument-by-argument basis,
1857 handling variadic argument packs as well.
1858 (more_specialized_fn): Handle unification of function parameter
1859 packs. All things being equal, prefer non-variadic function
1860 templates to variadic function templates.
1861 (more_specialized_class): Prefer the variadic class template
1862 partial specialization that binds fewer arguments to a parameter
1864 (regenerate_decl_from_template): Expand function parameter packs
1865 into separate parameters.
1866 (instantiate_decl): Ditto.
1867 (tsubst_initializer_list): Handle pack expansions for base-class
1869 (dependent_type_p_r): Determine dependent types in argument packs
1870 and pack expansions.
1871 (value_dependent_expression_p): Determine value-dependence of
1872 non-type argument packs.
1873 (dependent_template_arg_p): Handle argument packs.
1874 * semantics.c (finish_cond): Check for bare parameter packs.
1875 (finish_expr_stmt): Ditto.
1876 (finish_for_expr): Ditto.
1877 (finish_switch_cond): Ditto.
1878 (finish_mem_initializers): Ditto.
1879 * name-lookup.c (arg_assoc_type): Handle pack expansions and
1881 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1882 * parser.c (make_declarator): Declarator is not an expansion.
1883 (make_pointer_declarator): Transfer parameter pack flag to outer
1885 (make_reference_declarator): Ditto.
1886 (make_ptrmem_declarator): Ditto.
1887 (make_call_declarator): Ditto.
1888 (make_array_declarator): Ditto.
1889 (cp_parser_postfix_expression): Allow pack expansion expressions
1890 in the argument list for a call expression.
1891 (cp_parser_parenthesized_expression_list): Add new parameter
1892 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1893 into separate arguments."
1894 (cp_parser_new_placement): Allow pack expansion expressions.
1895 (cp_parser_new_initializer): Ditto.
1896 (cp_parser_mem_initializer_list): Allow ellipsis to create a
1897 base-class initializer expansion.
1898 (cp_parser_mem_initializer): Ditto.
1899 (cp_parser_template_parameter_list): Keep track of whether the
1900 template parameter is a template parameter pack.
1901 (cp_parser_template_parameter): Parse the ellipsis to indicate a
1902 template parameter pack.
1903 (cp_parser_type_parameter): Ditto.
1904 (cp_parser_template_argument_list): Parse the ellipsis to indicate
1906 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1907 this declarator is a parameter pack.
1908 (cp_parser_parameter_declaration): The ellipsis does not end the
1909 parameter declaration, because it might be a parameter pack. Parse
1910 the ellipsis to indicate a parameter pack.
1911 (cp_parser_initializer): Allow pack expansions.
1912 (cp_parser_initializer_list): Allow ellipsis to create an
1913 initializer expansion.
1914 (cp_parser_base_clause): Allow ellipsis to create a base specifier
1916 (cp_parser_type_id_list): Allow ellipsis to create an exception
1917 specifier expansion.
1918 (cp_parser_attribute_list): Don't allow pack expansions.
1919 (cp_parser_functional_cast): Allow pack expansions.
1920 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1921 compute the length of a parameter pack.
1922 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1923 end a template argument.
1924 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1925 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1928 2007-03-09 Dirk Mueller <dmueller@suse.de>
1930 * cp/call.c (build_new_op): Call warn_logical_operator.
1932 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
1935 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1938 * pt.c (any_template_arguments_need_structural_equality_p):
1941 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
1943 * decl.c (grokdeclarator): Disable warnings for anonymous
1946 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
1948 * typeck2.c (readonly_error): Always emit a hard error.
1949 Remove last argument.
1950 * cp-tree.h (readonly_error): Adjust prototype.
1951 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1952 * typeck.c (build_unary_op): Likewise.
1953 (build_modify_expr): Likewise.
1955 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
1958 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1960 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1963 * parser.c (struct cp_parser): New IN_IF_STMT.
1964 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1965 returning if parsing the body of an 'if' statement or issuing an
1966 error and continuing.
1967 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1969 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1971 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
1974 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
1977 2007-03-02 Geoffrey Keating <geoffk@apple.com>
1979 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
1980 Objective-C++. Don't exit early if -shared-libgcc needs to be
1983 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1985 * typeck.c (common_base_type): Delete unused function.
1987 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1989 * Make-lang.in: Add dummy lang.install-pdf target.
1991 2007-03-01 Simon Baldwin <simonb@google.com>
1994 * decl.c (check_tag_decl): Added new warning for typedef ignored
1995 when it precedes an otherwise valid non-typedef declaration.
1997 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
1999 * typeck.c (build_function_call): Store converted arguments
2000 in a stack-allocated array instead of building a list.
2001 (convert_arguments): Store arguments in the array passed in as an
2002 argument, and return the actual number of arguments.
2003 * call.c (build_call): Delete, and replace with...
2004 (build_call_n, build_call_a): New.
2005 (build_op_delete_call): Rewrite to avoid constructing argument lists.
2006 (build_over_call): Store converted arguments in a stack-allocated
2007 array instead of building a list.
2008 (build_cxx_call): Pass arguments in an array instead of as a list.
2009 (build_java_interface_fn_ref): Rewrite to avoid constructing
2011 * tree.h: Update declarations to reflect above changes.
2012 * method.c (use_thunk): Use a stack-allocated array to hold
2013 the arguments instead of a list.
2014 * rtti.c (throw_bad_cast): Update call to cxx_call.
2015 (throw_bad_typeid): Likewise.
2016 (build_dynamic_cast_1): Likewise.
2017 * init.c (build_builtin_delete_call): Use build_call_n.
2018 * decl.c (expand_static_init): Likewise.
2019 * except.c (cp_protect_cleanup_actions): Likewise.
2020 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
2021 (gimplify_must_not_throw_expr): Likewise.
2022 (cxx_omp_apply_fn): Use build_call_a.
2024 2007-02-26 Mark Mitchell <mark@codesourcery.com>
2026 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
2027 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
2029 2007-02-25 Mark Mitchell <mark@codesourcery.com>
2031 * cp-tree.h (static_ctors): Remove.
2032 * cp-tree.h (static_dtors): Likewise.
2033 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
2034 refactoring of tree_map hierarchy.
2035 (decl_shadowed_for_var_insert): Likewise.
2036 * semantics.c (expand_body): Use c_expand_body.
2037 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
2038 * decl2.c (static_ctors): Remove.
2039 (static_dtors): Likewise.
2040 (generate_ctor_or_dtor_function): Pass NULL_TREE to
2041 objc_generate_static_init_call. Do not call static_[cd]tors.
2042 (generate_ctor_and_dtor_functions_for_priority): Do not check for
2044 (cp_write_global_declarations): Likewise.
2046 2007-02-23 Richard Guenther <rguenther@suse.de>
2048 * class.c (note_name_declared_in_class): Make declaration
2049 changes meaning a pedwarn.
2051 2007-02-22 Michael Matz <matz@suse.de>
2054 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
2055 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
2056 dump_function_decl): Guard emitting outer scopes by new flag.
2057 * cp-lang.c (cxx_dwarf_name): New function.
2058 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
2059 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
2061 (push_template_decl_real, lookup_template_class): Remove calls
2064 2007-02-19 Mark Mitchell <mark@codesourcery.com>
2066 * call.c (build_new_method_call): Ensure that explicit calls of
2067 destructors have type "void".
2069 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2071 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
2072 and -Walways-true with -Waddress.
2073 * cvt.c (convert_to_void): Replace unconditional warning with
2076 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
2078 * decl.c, tree.c: Fix comment typos.
2080 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
2083 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
2084 statement expression if we had an error mark node.
2086 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
2087 Brooks Moses <brooks.moses@codesourcery.com>
2088 Lee Millward <lee.millward@codesourcery.com>
2090 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
2091 Change class to tcc_vl_exp.
2093 * call.c (build_call): Use build_call_list instead
2095 (build_over_call): Likewise.
2096 (build_new_method_call): Use build_min_non_dep_call_list
2097 instead of build_min_non_dep.
2099 * error.c (dump_call_expr_args): New function.
2100 (dump_aggr_init_expr_args): New function.
2101 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
2102 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
2104 * cvt.c (convert_to_void): Use build_call_array instead
2105 of build3; use new AGGR_INIT_EXPR accessor macros.
2107 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
2108 instead of TREE_CODE_LENGTH.
2110 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
2111 AGGR_INIT_EXPR accessor macros.
2113 * cp-gimplify.c (cp_gimplify_init_expr): Use
2114 AGGR_INIT_EXPR_SLOT to set the slot operand.
2116 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
2117 (AGGR_INIT_EXPR_SLOT): New macro.
2118 (AGGR_INIT_EXPR_ARG): New macro.
2119 (aggr_init_expr_nargs): New macro.
2120 (AGGR_INIT_EXPR_ARGP): New macro.
2121 (aggr_init_expr_arg_iterator): New.
2122 (init_aggr_init_expr_arg_iterator): New.
2123 (next_aggr_init_expr_arg): New.
2124 (first_aggr_init_expr_arg): New.
2125 (more_aggr_init_expr_args_p): New.
2126 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
2127 (stabilize_aggr_init): New declaration.
2128 (build_min_non_dep_call_list): Likewise.
2130 * tree.c (process_aggr_init_operands): New function.
2131 (build_aggr_init_array) New function.
2132 (build_cplus_new): Update to use new CALL_EXPR and
2133 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
2134 build_aggr_init_array.
2135 (build_min_non_dep_call_list) New function.
2136 (build_min_nt): Assert input code parameter is not a variable
2137 length expression class.
2138 (build_min, build_min_non_dep): Likewise.
2139 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
2140 to check for equality instead of recursing. Handle tcc_vl_exp
2142 (stabilize_call): Update to only handle CALL_EXPRs, not
2143 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
2144 (stabilize_aggr_init): New function.
2145 (stabilize_init): Use it.
2147 * cxx-pretty-print.c (pp_cxx_postfix_expression)
2148 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
2149 AGGR_INIT_EXPR accessor macros and argument iterators.
2151 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
2152 build_vl_exp. Iterate through the operands, recursively
2153 processing each one.
2154 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
2155 CALL_EXPR accessor macros.
2156 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
2157 tree code classes. Use TREE_OPERAND_LENGTH instead of
2160 * semantics.c (finish_call_expr): Use build_nt_call_list
2161 instead of build_nt.
2162 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
2163 accessor macros. Use build_call_array to construct the
2164 CALL_EXPR node instead of build3
2166 * decl2.c (build_offset_ref_call_from_tree): Use
2167 build_nt_call_list and build_min_non_dep_call_list instead
2168 of build_min_nt and build_min_non_dep.
2170 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
2171 Use build_nt_call_list instead of build_min_nt.
2173 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2176 * call.c (build_conditional_expr): Improve error message.
2178 2007-02-13 Dirk Mueller <dmueller@suse.de>
2180 * friend.c (do_friend): Annotate warning about friend
2181 declarations in templates with OPT_Wnon_template_friend.
2182 Convert informal message from warning() to inform().
2184 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
2185 Mark Mitchell <mark@codesourcery.com>
2188 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
2189 instantiations for variables.
2191 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2194 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
2195 Check warn_unused_value just once.
2197 2007-02-11 Mark Mitchell <mark@codesourcery.com>
2200 * pt.c (determine_specialization): Use skip_artificial_parms_for.
2201 (fn_type_unificiation): Likewise.
2202 (get_bindings): Likewise.
2204 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
2207 * decl.c (finish_function): Use DECL_REPLACEABLE.
2208 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2210 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
2212 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
2214 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
2216 * decl.c (grokvardecl): Don't error if !have_tls.
2217 (grokdeclarator): Likewise.
2218 * parser.c (cp_parser_omp_threadprivate): Likewise.
2220 2007-02-07 Jakub Jelinek <jakub@redhat.com>
2223 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
2224 parameters and result decls in omp clauses.
2225 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
2228 2007-02-05 Dirk Mueller <dmueller@suse.de>
2231 * parser.c (cp_parser_class_specifier): Always initialize bases.
2233 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
2235 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
2236 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
2237 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
2239 * semantics.c (finish_omp_atomic): Store a whole expression node
2240 in operand 1, and integer_zero_node in operand 0, for dependent
2241 OMP_ATOMIC. Rewrite to make flow easier to understand.
2243 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2245 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
2247 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
2249 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
2250 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
2252 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
2254 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
2255 keyword warning to -Wc++0x-compat.
2257 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2259 * decl.c (grokdeclarator): Update documentation.
2261 2007-02-02 Jakub Jelinek <jakub@redhat.com>
2264 * decl.c (grokdeclarator): If __thread is used together with
2265 a storage class other than extern and static, clear thread_p
2266 after issuing diagnostics and fall through to checking the
2269 2007-01-30 Roger Sayle <roger@eyesopen.com>
2271 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
2272 calculating the size of an array (to avoid recursive errors).
2274 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2277 * typeck.c (build_binary_op): Fix logic for warning. Move warning
2279 * call.c (convert_like_real): Don't warn when converting to
2282 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2284 * decl.c (pop_label): Replace warning with call to
2285 warn_for_unused_label.
2287 2007-01-28 Andrew Pinski <pinskia@gmail.com>
2290 * semantics.c (finish_pseudo_destructor_expr): Check the
2291 destrutor name by calling check_dtor_name.
2293 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
2295 * lex.c (D_CPP0X): Rename.
2297 (reswords): D_CPP0X -> D_CXX0X.
2298 (init_reswords): Ditto.
2299 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
2300 of C++0x keywords as identifiers.
2302 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
2305 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
2308 2007-01-23 Ian Lance Taylor <iant@google.com>
2310 * typeck.c (convert_for_assignment): Only warn about a = b = c
2311 when converting to bool.
2313 2007-01-23 Roger Sayle <roger@eyesopen.com>
2315 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
2317 * typeck.c (ignore_overflows): Remove the remaining uses of
2318 TREE_CONSTANT_OVERFLOW.
2320 2007-01-20 Jan Hubicka <jh@suse.cz>
2322 * decl2.c (start_objects, start_static_storage_duration_function):
2323 Do not make the functions uninlinable.
2325 2007-01-17 Ian Lance Taylor <iant@google.com>
2327 * class.c (add_method): Call VEC_reserve_exact rather than passing
2328 a negative size to VEC_reserve.
2330 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
2333 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
2335 2007-01-10 Mark Mitchell <mark@codesourcery.com>
2338 * decl.c (make_typename_type): If the qualified name is not a
2339 type, issue an error.
2340 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
2343 2007-01-08 Geoffrey Keating <geoffk@apple.com>
2345 * rtti.c: Include target.h.
2346 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
2347 don't emit typeinfo for fundamental types as weak.
2348 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
2350 2007-01-08 Richard Guenther <rguenther@suse.de>
2352 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
2354 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
2356 * call.c (standard_conversion): Pass flag to
2357 vector_types_convertible_p to disallow emission of note.
2358 * typeck.c (convert_for_assignment): Pass flag to
2359 vector_types_convertible_p to allow emission of note.
2360 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
2361 to disallow emission of note.
2363 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2366 * typeck.c (build_binary_op): Call overflow_warning if
2367 TREE_OVERFLOW_P is true for the result and not for any of the
2370 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
2373 * class.c (add_method): Don't wait until template
2374 instantiation time to complain about duplicate methods.
2376 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2379 * semantics.c (finish_unary_op_expr): Warn only if result
2380 overflowed and operands did not.
2382 2007-01-05 Ian Lance Taylor <iant@google.com>
2384 * typeck.c (build_binary_op): Warn about comparing a non-weak
2387 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
2389 * pt.c (tsubst): Propagate the need for structural equality checks
2390 when reducing the level of template parameters.
2392 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
2394 * pt.c: Fix a comment typo.
2396 2007-01-02 Ian Lance Taylor <iant@google.com>
2398 * semantics.c (maybe_convert_cond): Optionally warn when using an
2399 assignment as a condition.
2400 * typeck.c (convert_for_assignment): Optionally warn about
2401 assigning the result of an assignment to a bool.
2403 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
2405 * pt.c (canonical_template_parms): Correct typo in comment.
2407 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
2409 * typeck.c (structural_comptypes): Renamed from "comptypes".
2410 (comptypes): Use canonical type information to perform fast type
2411 comparison. When VERIFY_CANONICAL_TYPES, verify that the
2412 canonical type comparison returns the same results as we would see
2413 from the current, structural check. Support COMPARE_STRUCTURAL
2414 when we need structural checks.
2415 * decl.c (typename_compare): Fix comment.
2416 (build_typename_type): TYPENAME_TYPE nodes require structural
2417 equality checks, because they resolve different based on the
2419 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
2420 require structural equality checks (for now).
2421 (build_ptrmemfunc_type): Build the canonical pointer to member
2423 (compute_array_index_type): Whenever we build a new index type
2424 to represent the size of an array in a template, we need to mark
2425 this index type as requiring structural equality. This goes for
2426 arrays with value-dependent sizes with the current ABI, or all
2428 * tree.c (cplus_array_hash): New.
2429 (struct cplus_array_info): New.
2430 (cplus_array_compare): New.
2431 (cplus_array_htab): New.
2432 (build_cplus_array_type_1): Use a hash table to cache the array
2433 types we build. Build the canonical array type for each array
2435 (cp_build_qualified_type_real): When building a cv-qualified array
2436 type, use the hash table of array types and build canonical array
2438 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
2439 use structural equality (for now).
2440 * cp-tree.h (COMPARE_STRUCTURAL): New.
2441 * pt.c (canonical_template_parms): New.
2442 (canonical_type_parameter): New.
2443 (process_template_parm): Find the canonical type parameter.
2444 (lookup_template_class): When we have named the primary template
2445 type, set the canonical type for our template class to the primary
2446 template type. If any of the template arguments need structural
2447 equality checks, the template class needs structural equality
2449 (tsubst): When reducing the level of a template template
2450 parameter, we require structural equality tests for the resulting
2451 parameter because its template parameters have not had their types
2452 canonicalized. When reducing a template type parameter, find the
2453 canonical reduced type parameter.
2454 (any_template_arguments_need_structural_equality_p): New.