1 2007-09-22 Jason Merrill <jason@redhat.com>
4 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
5 (MAYBE_TAGGED_TYPE_P): Remove.
6 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
7 instead of calling is_late_template_attribute again.
8 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
9 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
10 Don't crash on typedefs from non-template classes.
11 * decl2.c (grokfield): Don't sorry about attrs on template parms.
12 (is_late_template_attribute): All attributes applied to template
13 parms or typename types are dependent. Static.
14 (splice_template_attributes): Pass decl through.
15 (save_template_attributes): Likewise.
17 2007-09-20 Jakub Jelinek <jakub@redhat.com>
20 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
21 returned from tsubst_pack_expansion.
22 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
23 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
25 2007-09-20 Paolo Carlini <pcarlini@suse.de>
28 * semantics.c (finish_id_expression): Use consistently
29 context_for_name_lookup.
30 * decl.c (fixup_anonymous_aggr): Fix error message for
31 anonymous struct (vs union).
33 2007-09-19 Jason Merrill <jason@redhat.com>
36 * pt.c (tsubst): Handle typedefs by looking for the specialization.
37 (retrieve_specialization): Only tagged types use
38 DECL_TEMPLATE_INSTANTIATIONS.
39 (instantiate_class_template): Push nested classes too.
40 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
42 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
43 * init.c (is_aggr_type): Remove redundant tests.
44 * class.c (push_nested_class): Use CLASS_TYPE_P.
46 2007-09-20 Paolo Carlini <pcarlini@suse.de>
49 * init.c (build_zero_init): If, recursively, build_zero_init
50 returns a NULL_TREE, do not append it to the VEC of constructors.
52 2007-09-18 Jason Merrill <jason@redhat.com>
55 * pt.c (apply_late_template_attributes): Set processing_template_decl.
56 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
57 ATTR_FLAG_TYPE_IN_PLACE.
58 (tsubst): Do unqualified lookup to find typedefs from current class.
59 [ARRAY_TYPE]: Propagate alignment info.
60 * decl2.c (is_late_template_attribute): Only defer handling of
61 attribute aligned if the expression is dependent.
62 (save_template_attributes): If we're deferring any attributes,
63 make this a naming typedef.
65 2007-09-18 Paolo Carlini <pcarlini@suse.de>
68 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
69 va_arg instead of __builtin_va_arg.
71 2007-09-18 Paolo Carlini <pcarlini@suse.de>
74 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
75 (pp_cxx_primary_expression): Use it.
76 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
77 * error.c (dump_expr): Use it.
79 2007-09-18 Paolo Carlini <pcarlini@suse.de>
82 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
83 out case TYPEID_EXPR to...
84 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
85 and pp_cxx_right_paren.
86 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
87 * error.c (dump_expr): Use it.
89 2007-09-18 Paolo Carlini <pcarlini@suse.de>
92 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
93 (pp_cxx_primary_expression): Use it.
94 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
95 * error.c (dump_expr): Use it.
97 2007-09-16 Paolo Carlini <pcarlini@suse.de>
100 * init.c (build_new): Remove warning for zero-element
103 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
106 * call.c (maybe_handle_implicit_object): Set this_p, clear
107 rvaluedness_matches_p.
108 (compare_ics): Do not compare rvaluedness matching when one of the
109 operands is an implicit object.
111 2007-09-14 Jason Merrill <jason@redhat.com>
113 PR c++/17743, c++/19163
114 * decl2.c (is_late_template_attribute): New fn.
115 (splice_template_attributes, save_template_attributes): New fns.
116 (cplus_decl_attributes): Call save_template_attributes.
117 * pt.c (apply_late_template_attributes): New fn.
118 (instantiate_class_template, tsubst_decl): Use it.
119 * cp-tree.h: Declare is_late_template_attribute.
121 2007-09-13 Tom Tromey <tromey@redhat.com>
123 * parser.c (cp_lexer_new_main): Don't use
124 c_lex_return_raw_strings.
125 (cp_lexer_get_preprocessor_token): Update. Add special case when
128 2007-09-11 Jan Hubicka <jh@suse.cz>
130 * method.c (use_thunk): Use tree_rest_of_compilation
131 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
132 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
133 * cp-tree.h (expand_body): Kill.
134 (emit_associated_thunks): Declare.
135 * semantics.c (emit_associated_thunks): Export.
138 2007-09-09 David Daney <ddaney@avtrex.com>
141 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
142 to calculate cookie_ptr.
144 2007-09-08 Jason Merrill <jason@redhat.com>
147 * pt.c (most_specialized_class): Set processing_template_decl
148 while tsubsting partial spec args.
150 2007-09-06 Jason Merrill <jason@redhat.com>
152 * decl2.c (get_guard): Copy visibility from the guarded variable.
154 2007-09-06 Jan Hubicka <jh@suse.cz>
156 * semantics.c (expand_body): Do not mark arguments of clones used.
158 2007-09-06 Paolo Carlini <pcarlini@suse.de>
161 * decl.c (cp_finish_decl): When processing_template_decl,
162 deal correctly with init as TREE_LIST.
164 2007-09-06 Tom Tromey <tromey@redhat.com>
166 * decl.c (finish_function): Put return's location on line zero of
169 2007-09-05 Jason Merrill <jason@redhat.com>
172 * except.c (prepare_eh_type): Use type_decays_to.
175 * init.c (build_delete): Use build_headof to get the address of the
176 complete object if we aren't using the deleting destructor.
177 * rtti.c (build_headof): No longer static.
178 * cp-tree.h: Declare it.
180 2007-09-06 Jakub Jelinek <jakub@redhat.com>
182 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
183 decl if a prototype for XX is provided with throw().
186 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
187 on __*_chk non-__builtin_* decls.
189 2007-09-05 Paolo Carlini <pcarlini@suse.de>
192 * semantics.c (finish_id_expression): Use context_for_name_lookup
193 insted of DECL_CONTEXT, to see through anonymous structs and unions.
194 * class.c (finish_struct_anon): Deal correctly with anonymous
195 structs (vs unions, as GNU extension) in error messages.
197 2007-09-05 Jan Hubicka <jh@suse.cz>
199 * cp/sematics.c (expand_body): Remove unnecesary import_export_decl
200 call, DECL_EXTERNAL checks and current_function_decl saving.
202 2007-09-05 Paolo Carlini <pcarlini@suse.de>
205 * parser.c (cp_parser_primary_expression): Return error_mark_node
206 when a statement-expression is found in a template-argument list.
208 2007-09-04 Jason Merrill <jason@redhat.com>
210 * except.c (initialize_handler_parm): Use
211 fold_build_cleanup_point_expr.
214 * call.c (reference_binding): Don't look for user-defined conversions
218 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
219 the MUST_NOT_THROW_EXPR.
221 2007-09-04 Richard Sandiford <richard@codesourcery.com>
223 * decl.c (cp_finish_decl): Call determine_visibility before
224 make_rtl_for_nonlocal_decl.
226 2007-09-04 Jason Merrill <jason@redhat.com>
229 * pt.c (most_specialized_class): Substitute outer template
230 arguments into the arguments of a member template partial
232 (strip_innermost_template_args): New fn.
234 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
236 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
238 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
240 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
241 * decl.c (cp_make_fname_decl): Likewise,
242 * parser.c (cp_parser_string_literal): Likewise,
243 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
244 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
247 2007-09-02 Paolo Carlini <pcarlini@suse.de>
250 * typeck.c (build_unary_op): Fix error message for
251 Boolean expression as operand to operator--.
253 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
255 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
256 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
259 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
262 * init.c (build_default_init): Make extern.
263 * cp-tree.h (build_default_init): Declare here.
264 * pt.c (tsubst_expr): When the instantiation of the initializer of
265 a variable results in an empty list, default-initialize the
267 (tsubst_copy_and_build): When the instantiation of the initializer
268 in a new expression results in an empty initializer list,
269 default-initialize it.
271 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
273 * mangle.c (write_type): Change mangling of rvalue reference from
276 2007-08-31 Jakub Jelinek <jakub@redhat.com>
278 * decl.c (duplicate_decls): Remove duplicated line.
280 2007-08-31 Paolo Carlini <pcarlini@suse.de>
283 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
284 BOUND_TEMPLATE_TEMPLATE_PARM.
286 2007-08-31 Paolo Carlini <pcarlini@suse.de>
289 * search.c (lookup_member): Check the name argument for
292 2007-08-31 Paolo Carlini <pcarlini@suse.de>
295 * parser.c (cp_parser_trait_expr): Check rerurn value of
298 2007-08-30 Ollie Wild <aaw@google.com>
300 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
301 convert_ptrmem for pointer to member conversions.
302 (convert_to_pointer_force): Update cp_convert_to_pointer call.
303 (ocp_convert): Update cp_convert_to_pointer call.
304 * typeck.c (convert_ptrmem): Add conditional for null pointers to
306 (build_static_cast_1): Check can_convert for conversions in either
308 (get_delta_difference_1): New function.
309 (get_delta_difference): Refactor to call get_delta_difference_1.
311 2007-08-30 Jakub Jelinek <jakub@redhat.com>
313 * decl.c (start_preparsed_function): Set
314 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
316 2007-08-28 Paolo Carlini <pcarlini@suse.de>
319 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
320 BOUND_TEMPLATE_TEMPLATE_PARM.
322 2007-08-28 Jakub Jelinek <jakub@redhat.com>
326 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
327 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
329 2007-08-27 Jason Merrill <jason@redhat.com>
332 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
333 Look inside STMT_EXPR.
334 * semantics.c (stmt_expr_value_expr): New fn.
335 * cp-tree.h: Declare it.
338 * decl.c (groktypename): Ignore attributes applied to class type.
340 2007-08-28 Richard Guenther <rguenther@suse.de>
342 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
344 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
346 * error.c (dump_expr): Handle COMPLEX_CST.
347 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
348 (pp_cxx_expression): Likewise.
350 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
352 * decl.c (GNU_INLINE_P): New.
353 (duplicate_decls): Handle gnu_inline. Merge attributes and
354 some flags in overriding definitions.
355 (redeclaration_error_message): Handle gnu_inline.
356 (start_preparsed_function): Likewise.
358 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
360 * call.c (sufficient_parms_p): Constify.
361 * class.c (same_signature_p): Likewise.
362 * cp-gimplify.c (is_invisiref_parm,
363 cxx_omp_privatize_by_reference): Likewise.
364 * cp-objcp-common.c (has_c_linkage): Likewise.
365 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
366 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
367 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
368 num_artificial_parms_for, comp_template_parms,
369 template_parameter_pack_p, any_dependent_template_arguments_p,
370 any_type_dependent_arguments_p, any_value_dependent_elements_p,
371 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
372 zero_init_p, member_p, cp_lvalue_kind,
373 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
374 varargs_function_p, is_dummy_object, special_function_kind,
375 string_conv_p, type_unknown_p, comp_except_specs, compparms,
376 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
377 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
378 cp_has_mutable_p, at_least_as_qualified_p,
379 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
380 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
381 * except.c (nothrow_libfn_p): Likewise.
382 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
384 * pt.c (comp_template_parms, template_parameter_pack_p,
385 any_type_dependent_arguments_p, any_value_dependent_elements_p,
386 any_dependent_template_arguments_p): Likewise.
387 * repo.c (repo_export_class_p): Likewise.
388 * semantics.c (anon_aggr_type_p): Likewise.
389 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
390 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
391 varargs_function_p, member_p, is_dummy_object, pod_type_p,
392 zero_init_p, special_function_p): Likewise.
393 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
394 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
395 compparms, invalid_nonstatic_memfn_p,
396 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
397 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
398 cp_has_mutable_p, lvalue_or_else): Likewise.
400 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
402 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
403 * cp-objcp-common.c (cp_tree_size): Ditto.
404 * tree.c (cp_walk_subtrees): Ditto
405 * cp-tree.def (TINST_LEVEL): Go away.
406 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
407 move together with other non-tree structs.
408 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
409 (union lang_tree_node): Eliminate tinst_level field.
410 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
411 (current_instantiation, outermost_tinst_level): Return
412 a "struct tinst_level *".
414 * error.c (print_instantiation_partial_context): Change second
415 parameter to a "struct tinst_level *". Replace accessor macros
417 (print_instantiation_full_context): Likewise.
418 * lex.c (in_main_input_context): Likewise.
420 * pt.c (struct pending_templates): New.
421 (pending_templates, last_pending_template): Use it as a type.
422 (current_tinst_level): Change typo to "struct tinst_level *"
423 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
424 (add_pending_template): Construct a "struct pending_template".
425 Replace TINST_LEVEL accessor macros with field access.
426 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
427 (pop_tinst_level): Likewise.
428 (instantiate_pending_templates): Likewise. Factor common code used
429 when an instantiation has been done.
430 (outermost_tinst_level): Replace tree_last with loop.
431 (current_instantiation): Return a "struct tinst_level *".
433 2007-08-24 Ollie Wild <aaw@google.com>
435 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
436 * name-lookup.h (cp_binding_level): Remove vtables member.
438 2007-08-24 Richard Guenther <rguenther@suse.de>
440 * tree.c (cp_cannot_inline_tree_fn): Remove.
441 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
442 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
445 2007-08-24 Jakub Jelinek <jakub@redhat.com>
448 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
449 error_mark_node right away if build_expr_type_conversion
453 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
454 is error_mark_node rather than NULL_TREE.
455 * pt.c (check_explicit_specialization): Likewise.
458 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
459 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
461 2007-08-22 Jason Merrill <jason@redhat.com>
464 * pt.c (outermost_tinst_level): New function.
465 * lex.c (in_main_input_context): New function.
466 * cp-tree.h: Declare it.
467 * decl2.c (constrain_class_visibility): Use it to avoid warning
468 about uses of the anonymous namespace in the main input file.
470 2007-08-21 Jakub Jelinek <jakub@redhat.com>
472 * init.c (build_new_1): Use get_target_expr instead of save_expr.
474 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
477 * class.c (finish_struct_1): Warn when a class has virtual
478 functions and accessible non-virtual destructor.
480 2007-08-20 Richard Guenther <rguenther@suse.de>
484 * call.c (build_new_method_call): Convert initializer to
486 * init.c (build_aggr_init): Do not fiddle with types.
487 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
488 * except.c (build_throw): Do not drop qualifiers for the
490 * typeck.c (get_member_function_from_ptrfunc): Do not
491 fiddle with types, instead convert.
492 (build_ptrmemfunc1): Convert to the target type for
494 (gfc_trans_allocate): Convert result to target type.
495 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
496 pointer-to-member structures shall have alias set zero as well.
498 2007-08-20 Richard Guenther <rguenther@suse.de>
500 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
502 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
503 (nonstatic_local_decl_p): Likewise.
504 * tree.c (cp_auto_var_in_fn_p): Remove.
505 * decl.c (nonstatic_local_decl_p): Remove.
507 2007-08-20 Richard Guenther <rguenther@suse.de>
509 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
511 * tree.h (cp_walk_tree): New define to walk_tree_1 with
512 cp_walk_subtrees lh parameter.
513 (cp_walk_tree_without_duplicates): New define to
514 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
515 * tree.c (count_trees): Call
516 cp_walk_tree_without_duplicates.
517 (verify_stmt_tree): Call cp_walk_tree.
518 (break_out_target_exprs): Likewise.
519 (WALK_SUBTREE): Likewise.
520 * cp-gimplify.c (cp_genericize): Likewise.
521 * cp-pt.c (find_parameter_packs_r): Likewise.
522 (uses_parameter_packs): Likewise.
523 (make_pack_expansion): Likewise.
524 (check_for_bare_parameter_packs): Likewise.
525 (for_each_template_parm): Likewise.
526 * decl.c (check_default_argument): Call
527 cp_walk_tree_without_duplicates.
528 * except.c (build_throw): Likewise.
529 * decl2.c (type_visibility): Likewise.
530 * semantics.c (expand_or_defer_fn): Likewise.
531 (finalize_nrv): Call cp_walk_tree.
533 2007-08-20 Jakub Jelinek <jakub@redhat.com>
536 * init.c (build_new_1): Rename placement_var variable to placement_expr.
537 Initialize it with save_expr rather than get_temp_regvar.
539 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
542 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
545 2007-08-17 Ollie Wild <aaw@google.com>
548 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
549 declarations into appropriate slots for comparison. Fix type
552 2007-08-17 Paolo Carlini <pcarlini@suse.de>
555 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
556 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
558 2007-08-17 Paolo Carlini <pcarlini@suse.de>
561 * parser.c (cp_parser_class_head): Improve error message.
563 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
565 * pt.c (instantiate_decl): Set input_location
566 for the function end.
568 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
570 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
572 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
573 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
574 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
575 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
576 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
577 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
578 * typeck.c (cp_type_quals): Likewise.
579 * typeck2.c (cxx_incomplete_type_diagnostic,
580 cxx_incomplete_type_error): Likewise.
582 2007-08-16 Paolo Carlini <pcarlini@suse.de>
585 * pt.c (tsubst_friend_function): When check_classfn
586 returns error_mark_node likewise return it.
588 2007-08-15 Jakub Jelinek <jakub@redhat.com>
591 * typeck.c (check_return_expr): Don't NRV optimize vars in
593 * decl.c (finish_function): Comment fix.
595 2007-08-15 Paolo Carlini <pcarlini@suse.de>
598 * pt.c (push_template_decl_real): Depending on TYPE_P
599 use either TYPE_CONTEXT or DECL_CONTEXT.
601 2007-08-14 Mark Mitchell <mark@codesourcery.com>
603 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
604 constructors and destructors return this.
606 2007-08-14 Paolo Carlini <pcarlini@suse.de>
609 * decl2.c (check_classfn): Return error_mark_node in case of error;
610 in that case, do not call add_method.
611 * decl.c (start_decl): Deal with check_classfn returning
613 (grokfndecl): Likewise.
614 * pt.c (tsubst_friend_function): Likewise.
616 2007-08-14 Andrew Pinski <pinskia@gmail.com>
619 * typeck.c (build_binary_op): Disallow vector float types with
620 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
622 2007-08-11 Ian Lance Taylor <iant@google.com>
624 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
626 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
628 2007-08-10 Ollie Wild <aaw@google.com>
630 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
632 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
634 (unqualified_namespace_lookup): Fix ambiguous_decl call.
635 (lookup_using_namespace): Fix ambiguous_decl call.
636 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
638 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
640 * call.c (name_as_c_string): Use CONST_CAST.
641 * decl.c (build_decl): Likewise.
642 * parser.c (cp_parser_string_literal): Likewise.
644 2007-08-10 Paolo Carlini <pcarlini@suse.de>
647 * error.c (dump_expr): Consistently use the *_cxx_*
648 variants of the pretty-print functions.
650 2007-08-10 Paolo Carlini <pcarlini@suse.de>
653 * decl.c (check_special_function_return_type): Just error
654 on return type specified for conversion operator.
656 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
658 * typeck2.c (readonly_error): Handle general expressions.
659 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
661 2007-08-06 Dan Hipschman <dsh@google.com>
663 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
664 access function name.
666 2007-08-04 Alfred Minarik <a.minarik@aon.at>
669 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
670 * g++spec.c (lang_specific_driver): Check them.
672 2007-08-06 Paolo Carlini <pcarlini@suse.de>
675 * pt.c (inline_needs_template_parms): Fix comment; change return type
678 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
681 2007-03-26 Dirk Mueller <dmueller@suse.de>
683 * parser.c (cp_parser_member_declaration): Pedwarn
684 about stray semicolons after member declarations.
686 2007-08-02 Lee Millward <lee.millward@gmail.com>
691 * parser.c (cp_parser_asm_definition): Detect and discard asm
692 statements with invalid inputs or outputs.
693 (cp_parser_asm_operand_list): Return error mark node if any
694 of the operands are invalid. Adjust documentation.
696 2007-08-02 Nick Clifton <nickc@redhat.com>
698 * typeck.c: Change copyright header to refer to version 3 of the
699 GNU General Public License and to point readers at the COPYING3
700 file and the FSF's license web page.
701 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
702 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
703 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
704 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
705 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
706 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
707 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
708 name-lookup.h, parser.c: Likewise.
710 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
713 * call.c (magic_varargs_p): Honor the "type generic" attribute.
715 2007-07-30 Paolo Carlini <pcarlini@suse.de>
718 * semantics.c (finish_label_stmt): Reject the __label__
719 extension outside function scopes.
721 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
723 * parser.c (eof_token): Un-constify.
724 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
725 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
728 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
730 * pt.c, tree.c, typeck2.c: Fix comment typos.
732 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
733 Mark Mitchell <mark@codesourcery.com>
736 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
737 hidden due to friend declarations in local classes.
739 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
741 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
742 * cp-tree.def (DECLTYPE_TYPE): New.
743 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
744 (dump_type_prefix): Ditto.
745 (dump_type_suffix): Ditto.
746 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
747 * mangle.c (write_type): Handle DECLTYPE_TYPE.
748 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
750 (DECLTYPE_TYPE_EXPR): New.
751 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
752 (finish_declared_type): Declare.
753 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
755 (pp_cxx_type_id): Ditto.
756 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
757 (tsubst): Substitute into a DECLTYPE_TYPE node.
758 (tsubst_copy): Ditto.
759 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
761 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
762 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
763 structural equality (because we can't hash the expressions).
764 (finish_declared_type): New.
765 * lex.c (reswords): Add "decltype" keyword.
766 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
767 (cp_parser_postfix_expression): Add member_access_only_p to
768 restrict postfix expression to member access expressions.
769 (cp_parser_unary_expression): Update call to
770 cp_parser_postfix_expression to reflect new parameter.
771 (cp_parser_declared_type): New.
772 (cp_parser_simple_type_specifier): Parse decltype types.
774 2007-07-27 Mark Mitchell <mark@codesourcery.com>
777 * call.c (convert_for_arg_passing): Only widen bitfields to their
778 declared types if necessary.
780 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
782 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
785 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
787 * decl.c (typename_hash, typename_compare): Constify.
788 * mangle.c (hash_type, compare_type): Likewise.
789 * pt.c (eq_local_specializations, hash_local_specialization):
791 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
792 list_hash): Likewise.
793 * typeck2.c (pat_compare): Likewise.
795 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
797 * method.c (implicitly_declare_fn): Increase alignment if member
798 function pointer format requires it.
800 2007-07-24 Paolo Carlini <pcarlini@suse.de>
803 * typeck.c (check_return_expr): Do not pass a null argument
806 2007-07-24 Paolo Carlini <pcarlini@suse.de>
809 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
812 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
815 * typeck.c (convert_arguments): Only use default args if we have
819 * typeck.c (structural_comptypes): No need to check
820 resolve_typename_type return value here.
821 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
822 * pt.c (resolve_typename_type): Follow typename typedefs. Return
823 original type rather than error_mark_node in case of failure.
824 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
825 resolve_typename_type result check.
826 (cp_parser_direct_declarator, cp_parser_head,
827 cp_parser_constructor_declarator_p): Likewise.
829 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
831 * pt.c (template_parms_variadic_p): Remove.
832 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
834 2007-07-12 Jakub Jelinek <jakub@redhat.com>
837 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
838 argument to dump_aggr_init_expr_args instead of false.
840 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
842 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
843 canonical types; otherwise, fall back to structural type
844 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
845 internal compiler error if the canonical types are wrong.
847 2007-07-11 Paolo Carlini <pcarlini@suse.de>
850 * parser.c (cp_parser_make_indirect_declarator): When the
851 the code argument is ERROR_MARK return cp_error_declarator.
853 2007-07-09 Geoffrey Keating <geoffk@apple.com>
856 * decl.c (cxx_init_decl_processing): Don't set
857 force_align_functions_log.
858 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
859 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
860 FUNCTION_DECL, return its alignment.
862 2007-07-09 Richard Guenther <rguenther@suse.de>
864 * decl.c (start_preparsed_function): Do not promote return type.
866 2007-07-08 Paolo Carlini <pcarlini@suse.de>
869 * pt.c (unify): Never pass error_mark_node to template_decl_level.
871 2007-07-07 Mark Mitchell <mark@codesourcery.com>
874 * pt.c (resolve_overloaded_unification): Robustify. Return a
876 (type_unification_real): Adjust accordingly.
878 2007-07-06 Richard Guenther <rguenther@suse.de>
880 * init.c (build_new_1): Use the correct pointer type.
881 * typeck2.c (build_m_component_ref): Likewise.
883 2007-07-05 Mark Mitchell <mark@codesourcery.com>
886 * init.c (build_zero_init): Always build an initializer for
888 * typeck2.c (build_functional_cast): Use build_zero_init.
891 * init.c (build_new_1): Always pass the allocation function to
892 build_op_delete_call.
893 * call.c (build_op_delete_call): Handle operator delete with a
894 variable-argument list. Do not issue an error when no matching
895 deallocation function is available for a new operator.
898 * cp-tree.h (any_value_dependent_elements_p): Declare it.
899 * decl.c (value_dependent_init_p): New function.
900 (cp_finish_decl): Use it.
901 * pt.c (value_dependent_expression_p): Use
902 any_value_dependent_elements_p.
903 * parser.c (cp_parser_primary_expression): Add comment about
904 treating dependent qualified names as integral
905 constant-expressions.
907 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
909 * decl.c (build_ptrmemfunc_type): Always use structural equality
910 tests when comparing pointer-to-member-function types, because the
911 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
914 2007-07-03 Mark Mitchell <mark@codesourcery.com>
916 * init.c (build_new): Tweak comment.
918 2007-06-29 Dave Brolley <brolley@redhat.com>
921 * parser.c (cp_parser_new_type_id): Don't reduce a named array
922 type to its base type and number of elements here.
923 * init.c (build_new): Call complete_type_or_else to ensure that the
924 type is complete and to issue a diagnostic if it is not.
925 (build_new_1): Don't call complete_type_or_else here.
927 2007-07-03 Richard Guenther <rguenther@suse.de>
930 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
933 2007-07-02 Simon Baldwin <simonb@google.com>
935 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
936 for inner-style nested forward declarations that don't declare
939 2007-07-02 Jakub Jelinek <jakub@redhat.com>
942 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
943 DECL_P in not a variable and appears more than once error messages.
945 2007-07-01 Ollie Wild <aaw@google.com>
947 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
948 (select_decl): Remove function.
949 (unqualified_namespace_lookup): Populate binding by calling
950 ambiguous_decl. Remove select_decl call.
951 (lookup_qualified_name): Remove select_decl call.
952 * decl.c (lookup_and_check_tag): Check for ambiguous references.
953 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
954 generation when name lookup is ambiguous.
956 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
959 * init.c (build_new_1): Use structural equality on the copy of the
962 2007-06-28 Geoffrey Keating <geoffk@apple.com>
964 * decl2.c (determine_visibility): Implement
965 flag_visibility_ms_compat effect on type info.
966 * decl.c (cxx_init_decl_processing): Implement
967 global effect of flag_visibility_ms_compat.
969 2007-06-28 Geoffrey Keating <geoffk@apple.com>
971 * decl2.c (start_objects): Mark constructor-running function
974 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
977 * decl.c (grokdeclarator): Reset friendp for member functions declared
978 friend of their own class.
980 2007-06-23 Mark Mitchell <mark@codesourcery.com>
982 * decl2.c (determine_visibility): Don't look for dllexport here.
983 (determine_visibility_from_class): Tidy.
985 2007-06-18 Simon Baldwin <simonb@google.com>
988 * parser.c (cp_parser_single_declaration): Added check for storage
989 class other than sc_none in parsed declaration, and a flag to indicate
990 if the call is part of an explicit template specialization parse.
991 * (cp_parser_explicit_specialization): Specialization check flag added
992 to call to cp_parser_single_declaration(), set true.
993 * (cp_parser_template_declaration_after_export): Specialization check
994 flag added to call to cp_parser_single_declaration(), set false.
995 * pt.c (check_explicit_specialization): Added code to copy visiblity
996 and linkage from the templated function to the explicit specialization.
998 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1000 * typeck.c (build_binary_op): For templates build the
1001 expression in pieces to avoid the assert in build2_stat.
1002 (get_member_function_from_ptrfunc):
1003 Change over to using POINTER_PLUS_EXPR and convert
1004 the second operand to sizetype.
1005 * typeck2.c (build_m_component_ref): Likewise.
1006 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
1007 instead of PLUS_EXPR for pointers.
1008 (build_new_1): Likewise.
1009 (build_vec_delete_1): Likewise.
1010 (build_vec_delete): Likewise.
1011 * class.c (build_base_path): Likewise.
1012 (build_base_path): Likewise.
1013 (convert_to_base_statically): Likewise.
1014 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
1015 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
1016 instead of PLUS_EXPR.
1017 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
1018 instead of PLUS_EXPR for pointers.
1019 * call.c (build_special_member_call): Likewise.
1020 * rtti.c (build_headof): Likewise.
1021 Use sizetype instead of ptrdiff_type_node.
1022 (tinfo_base_init): Create a POINTER_PLUS_EXPR
1023 instead of PLUS_EXPR for pointers.
1024 * except.c (expand_start_catch_block): Do a
1025 NEGATIVE and then a POINTER_PLUS_EXPR instead
1027 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
1028 PLUS_EXPR on pointer types over to use
1029 POINTER_PLUS_EXPR and remove the conversion
1030 to the pointer types.
1031 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
1032 adding to a pointer type. Use size_int instead of
1033 ssize_int. Convert the index to sizetype before
1034 adding it to the pointer.
1036 2007-06-15 Mark Mitchell <mark@codesourcery.com>
1038 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
1039 (DECL_ANON_UNION_VAR_P): New macro.
1040 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
1041 than DECL_VAR_MARKED_P, to keep track of which variables we have
1043 * decl.c (redeclaration_error_message): Complain about redeclaring
1044 anonymous union members at namespace scope.
1045 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
1047 2007-06-14 Geoff Keating <geoffk@apple.com>
1049 * decl2.c (determine_visibility): Ensure that functions with
1050 hidden types as parameters are hidden.
1053 * decl2.c (determine_visibility): Remove duplicate code for
1056 2007-06-12 Ian Lance Taylor <iant@google.com>
1059 * init.c (avoid_placement_new_aliasing): New static function.
1060 (build_new_1): Call it.
1062 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
1064 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
1065 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
1067 2007-06-08 Jakub Jelinek <jakub@redhat.com>
1070 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
1071 on init, the non-decl cond operand and increment value.
1073 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
1076 * decl.c (check_initializer): Report an error when a brace enclosed
1077 initializer is used for a non-aggregate type in C++98.
1078 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
1080 (grokdeclarator): Likewise.
1081 (move_fn_p): Likewise.
1082 * typeck.c (check_return_expr): Likewise.
1083 * call.c (reference_binding): Likewise.
1084 * error.c (cp_cpp_error): Likewise.
1085 * pt.c (check_default_tmpl_args): Likewise.
1087 * lex.c (init_reswords): Likewise.
1088 * parser.c (p_parser_primary_expression): Likewise.
1089 (TOKEN_PRECEDENCE): Likewise.
1090 (cp_parser_init_declarator): Likewise.
1091 (cp_parser_ptr_operator): Likewise.
1092 (cp_parser_parameter_declaration): Likewise.
1093 (cp_parser_enclosed_template_argument_list): Likewise.
1094 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
1095 (cp_parser_next_token_ends_template_argument_p): Likewise.
1097 2007-06-04 Simon Baldwin <simonb@google.com>
1099 * decl.c (grokdeclarator): Readability change. Moved case labels
1100 into direct switch statement scope.
1102 2007-06-04 Paolo Carlini <pcarlini@suse.de>
1104 * call.c (convert_like_real): Remove pointless code.
1106 2007-05-31 Mark Mitchell <mark@codesourcery.com>
1108 * decl.c (get_atexit_fn_ptr_type): New function.
1109 (get_atexit_node): Use it.
1110 (start_cleanup_fn): Likewise.
1111 (register_dtor_fn): Use the object's destructor, instead of a
1112 separate cleanup function, where possible.
1113 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
1114 (atexit_fn_ptr_type_node): New macro.
1115 * decl2.c (build_cleanup): Use build_address.
1117 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
1119 * typeck.c (build_binary_op): Include types in error.
1121 2007-05-31 Jakub Jelinek <jakub@redhat.com>
1124 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
1125 needs runtime initialization.
1127 2007-05-31 Paolo Carlini <pcarlini@suse.de>
1130 * semantics.c (finish_trait_expr): Complete the types.
1132 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
1133 Douglas Gregor <doug.gregor@gmail.com>
1134 Pedro Lamarao <pedro.lamarao@mndfck.org>
1135 Howard Hinnant <howard.hinnant@gmail.com>
1139 * typeck.c (comptypes): Don't consider rvalue and lvalue
1140 reference types to be equivalent.
1141 (check_return_expr): Move from certain lvalues when returning
1143 * decl.c (grokdeclarator): Implement reference collapsing.
1144 (copy_fn_p): Don't consider constructors taking rvalue references
1145 to be copy constructors.
1147 * call.c (conversion): New "rvaluedness_matches_p" member.
1148 (convert_class_to_reference): Require reference type as first
1149 parameter instead of base type.
1150 (reference_binding): Add logic to handle rvalue references.
1151 (implicit_conversion): Update inaccurate comment.
1152 (convert_like_real): Disable creation of temporaries that are
1153 impossible to initialize for types with move constructors.
1154 (build_over_call): Elide move constructors when possible.
1155 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
1156 (maybe_handle_ref_bind): Return conversion instead of type node.
1157 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
1158 determine preferred conversion sequences.
1159 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
1160 (LOOKUP_PREFER_RVALUE): New.
1161 (DECL_MOVE_CONSTRUCTOR_P): New.
1162 (struct cp_declarator): Add "reference" member for reference
1163 types, with new "rvalue_ref" flag.
1164 (cp_build_reference_type): Declare.
1165 (move_fn_p): Declare.
1166 * error.c (dump_type_prefix): Format rvalue reference types
1167 correctly in error messages.
1168 * except.c (build_throw): Move from certain lvalues when
1170 * mangle.c (write_type): Mangle rvalue references differently
1171 than regular references.
1172 * parser.c (make_reference_declarator): Add boolean parameter for
1174 (cp_parser_make_indirect_declarator): New.
1175 (cp_parser_new_declarator_opt): Call
1176 cp_parser_make_indirect_declarator.
1177 (cp_parser_conversion_declarator_opt): Ditto.
1178 (cp_parser_declarator): Ditto.
1179 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
1181 * pt.c (tsubst): Implement reference collapsing.
1182 (maybe_adjust_types_for_deduction): Implement special template
1183 parameter deduction rule for rvalue references.
1184 (type_unification_real): Update calls to
1185 maybe_adjust_types_for_deduction.
1186 (try_one_overload): Ditto.
1187 (unify_pack_expansion): Ditto.
1188 * tree.c (lvalue_p_1): Handle rvalue reference types.
1189 (cp_build_reference_type): New.
1191 2007-05-30 Jakub Jelinek <jakub@redhat.com>
1194 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
1195 variables that need runtime initialization.
1197 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
1200 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
1201 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
1202 case POSTDECREMENT_EXPR>): Return the error_mark_node
1203 if either the real or imaginary parts would an
1206 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
1207 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1210 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
1211 token is a closing brace, false if there are no tokens left.
1212 (cp_parser_namespace_alias_definition): Only consume the next token if
1213 it is a closing brace.
1215 * parser.c (cp_parser_class_specifier): Likewise.
1217 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
1219 * semantics.c (finish_member_declaration): Fix a typo in the
1222 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
1234 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
1235 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
1236 * pt.c (check_for_bare_parameter_packs): Return bool indicated
1237 whether everything was okay. Fix indentation.
1238 (push_template_decl_real): Check for bare parameter packs in
1239 function parameters; where errors occur, mark the parameter types
1240 with ERROR_MARK_NODEs to avert ICEs.
1241 (coerce_template_parameter_pack): New.
1242 (coerce_template_parms): Moved parameter pack coercion into
1243 coerce_template_parameter_pack, and permit it anywhere in the
1244 template parameter list (not just at the end). Parameter and
1245 argument indices can vary (somewhat) separately now, so add
1246 PARM_IDX and ARG_IDX.
1247 (fn_type_unification): Don't set an argument pack as incomplete if
1248 no argument pack was deduced.
1249 (type_unification_real): If a type parameter is a parameter pack
1250 and has not otherwise been deduced, it will be deduced to an empty
1252 (more_specialized_fn): Use the actual lengths of the argument
1253 lists when comparing against expansions.
1254 * semantics.c (finish_member_declaration): If a field's type has
1255 bare parameter packs, error and set its type to ERROR_MARK_NODE.
1257 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
1260 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
1262 2007-05-22 Ollie Wild <aaw@google.com>
1264 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
1265 (unqualified_namespace_lookup): Adds check for hidden types.
1267 2007-05-22 Ollie Wild <aaw@google.com>
1269 * decl.c (duplicate_decls): Verify namespace names are unique.
1271 2007-05-21 Mark Mitchell <mark@codesourcery.com>
1273 * decl.c (cxx_maybe_build_cleanup): Handle
1274 __attribute__((cleanup)).
1276 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1278 * cvt.c (cp_convert_and_check): Don't check warnings if the
1281 2007-05-18 Geoffrey Keating <geoffk@apple.com>
1283 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
1285 2007-05-14 Paolo Carlini <pcarlini@suse.de>
1288 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
1289 type only if is a class type (5.2.8/4).
1291 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
1293 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1294 * decl.c (grokdeclarator): Use unsigned_type_for instead of
1295 c_common_unsigned_type.
1297 2007-05-11 Silvius Rus <rus@google.com>
1299 * cp/typeck.c (build_indirect_ref): Add call to
1300 strict_aliasing_warning.
1301 (build_reinterpret_cast_1): Condition call to
1302 strict_aliasing_warning.
1304 2007-05-11 Jan Hubicka <jh@suse.cz>
1306 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
1307 * decl2.c (start_objects): ctors and dtors are no longer public.
1308 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
1310 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
1312 * typeck.c (build_unary_op): Remove code that used to
1313 handle non lvalue increments/decrements.
1315 2007-05-07 Mike Stump <mrs@apple.com>
1317 * parser.c (check_empty_body): Add.
1318 (cp_parser_iteration_statement): Add call to check_empty_body.
1320 2007-05-05 Geoffrey Keating <geoffk@apple.com>
1323 * mangle.c (write_mangled_name): Mangle static variable names.
1324 (write_unqualified_name): Use local-source-name for
1325 namespace-scope static variables.
1327 2007-05-04 Dirk Mueller <dmueller@suse.de>
1329 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
1332 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
1335 * decl2.c (constrain_class_visibility):
1336 Use strip_pointer_or_array_types instead of strip_array_types.
1338 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
1341 * decl.c (reshape_init_r): Don't reshape the first element if it
1342 is a pointer to member function.
1344 2007-04-27 Simon Baldwin <simonb@google.com>
1346 * decl.c (grokparms): Changed message format from %qD to %qE.
1348 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
1350 * error.c (maybe_warn_variadic_templates): Variadic templates are
1351 now in C++0x, so only warn about them in C++98 mode.
1353 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
1356 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
1357 integeral types from vectors types.
1359 2007-04-26 Jakub Jelinek <jakub@redhat.com>
1362 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
1363 for type dependent OMP_CLAUSE_DECLs.
1365 2007-04-24 Mark Mitchell <mark@codesourcery.com>
1368 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
1369 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
1370 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
1371 * init.c (build_zero_init): Adjust, as
1372 COMPLEX_TYPE is now a SCALAR_TYPE.
1373 * typeck2.c (digest_init): Allow brace-enclosed initializers for
1374 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
1376 2007-04-25 Paolo Carlini <pcarlini@suse.de>
1378 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
1379 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
1380 (trait_expr_value): Adjust.
1382 2007-04-23 Simon Baldwin <simonb@google.com>
1384 * decl.c (grokparms): Added new error for duplicate function
1385 parameters names in function prototypes, to match gcc behavior.
1387 2007-04-23 Jan Hubicka <jh@suse.cz>
1389 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
1392 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
1394 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
1395 instead of checking GIMPLE_STMT_P in chain_next.
1397 2007-04-17 Mark Mitchell <mark@codesourcery.com>
1400 * call.c (convert_for_arg_passing): Convert bitfields to their
1403 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
1406 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
1408 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
1411 * cp/decl2.c (constrain_class_visibility):
1412 Do not warn about the use of anonymous namespace in the main input file.
1414 2007-04-15 Mark Mitchell <mark@codesourcery.com>
1416 * cp-tree.h (current_template_parms): Fix typo in comment.
1418 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
1420 * cp-tree.h, error.c: Fix comment typos.
1422 2007-04-13 Jason Merrill <jason@redhat.com>
1425 * call.c (reference_binding): Add c_cast_p parm. If true,
1426 add quals to TO as needed to make it reference-compatible.
1428 2007-04-11 Jan Hubicka <jh@suse.cz>
1430 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
1431 that we are not processing template_decl.
1433 2007-04-09 Mark Mitchell <mark@codesourcery.com>
1436 * class.c (build_base_path): Ensure that the converted pointer has
1437 the same cv-qualification as the input.
1439 2007-04-09 Paolo Carlini <pcarlini@suse.de>
1441 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
1443 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
1445 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
1447 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
1448 * tree.c (cp_add_pending_fn_decls): Remove.
1449 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
1451 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
1453 Revert change removing staticp.
1455 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
1457 * cp-objcp-common.c (cxx_staticp): Remove.
1458 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
1459 * cp-tree.h (cxx_staticp):
1461 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
1463 * class.c (check_for_override): Don't remove dllmport attribute
1466 2007-04-03 Jakub Jelinek <jakub@redhat.com>
1469 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
1470 type issue error and return early.
1472 2007-03-30 Jason Merrill <jason@redhat.com>
1475 * typeck.c (cp_type_readonly): New fn.
1476 * cp-tree.h: Declare it.
1477 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
1478 (cp_finish_decl): Not here.
1480 2007-03-31 Richard Guenther <rguenther@suse.de>
1482 * optimize.c (maybe_clone_body): Replace splay-tree usage by
1485 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
1490 * parser.c (declarator_can_be_parameter_pack): New.
1491 (cp_parser_template_parameter): Only parse the `...' if the
1492 declarator can be a parameter pack.
1493 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
1495 * pt.c (find_parameter_packs_r): Look into the bounds on integer
1496 types (they could be used as array bounds).
1497 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
1498 (tsubst_pack_expansion): Handle failure to expand parameter
1501 2007-03-30 Paolo Carlini <pcarlini@suse.de>
1504 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
1505 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
1506 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
1507 (CLASS_TYPE_NON_UNION_P): Add.
1508 (struct lang_type_class): Add has_complex_dflt.
1509 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
1510 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
1511 * cp-tree.def: Add TRAIT_EXPR.
1512 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
1513 * lex.c (struct resword): Add __has_nothrow_assign,
1514 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
1515 __has_trivial_constructor, __has_trivial_copy,
1516 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
1517 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
1518 __is_pod, __is_polymorphic, __is_union.
1519 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
1520 (cp_parser_trait_expr): New.
1521 * semantics.c (finish_trait_expr, trait_expr_value
1522 classtype_has_nothrow_copy_or_assign_p): New.
1523 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
1525 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
1526 * class.c (check_bases, check_field_decl, check_bases_and_members):
1527 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
1528 * pt.c (uses_template_parms, tsubst_copy_and_build,
1529 value_dependent_expression_p, type_dependent_expression_p): Deal with
1531 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
1533 2007-03-29 Richard Guenther <rguenther@suse.de>
1535 * tree.c (cp_walk_subtrees): Do not set input_location.
1537 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
1540 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
1543 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1545 * parser.c (struct cp_parser): Update comment for
1546 greater_than_is_operator_p.
1547 (cp_parser_primary_expression): In C++0x mode, a cast operator can
1548 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
1549 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
1550 !GREATER_THAN_IS_OPERATOR_P.
1551 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
1552 `>>' operators that will become two `>' tokens in C++0x.
1553 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
1554 mode, allowing it to terminate default arguments.
1555 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
1556 `>>' like two consecutive `>' tokens.
1557 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
1558 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
1559 ends a template argument.
1561 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1563 * decl.c (redeclaration_error_message): Complain when redeclaring
1564 a friend function with default template arguments (C++0x mode only).
1565 * cp-tree.h (check_default_tmpl_args): Declare.
1566 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
1567 template arguments in function templates. Add support for checking
1568 the default template arguments of friend templates.
1569 (push_template_decl_real): Fix call to check_default_tmpl_args.
1570 (type_unification_real): If a template parameter has not been
1571 deduced but provides a default template argument, substitute into
1572 that default template argument.
1573 * parser.c (cp_parser_init_declarator): When declaring (but not
1574 defining!) a function template in C++0x mode, check for default
1577 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
1580 * decl.c (grokdeclarator): Deal with cv-qualified function type
1581 typedefs in the same way for member and non-member functions.
1583 2007-03-26 Dirk Mueller <dmueller@suse.de>
1585 * parser.c (cp_parser_member_declaration): Pedwarn
1586 about stray semicolons after member declarations.
1588 2007-03-26 Paolo Carlini <pcarlini@suse.de>
1591 * pt.c (instantiate_decl): Set in_system_header.
1593 2007-03-22 Mark Mitchell <mark@codesourcery.com>
1595 * cp-tree.h (current_tempalte_parms): Improve documentation.
1596 * pt.c (current_template_args): Likewise.
1599 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
1600 not consume tokens when failing.
1602 2007-03-22 Jim Wilson <wilson@specifix.com>
1603 Mark Mitchell <mark@codesourcery.com>
1606 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
1607 consistent with FROM.
1609 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1611 * error.c (dump_expr): Handle dependent names that designate types.
1612 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
1614 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
1616 * cp-tree.def, parser.c, pt.c: Fix comment typos.
1618 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1620 * cvt.c (cp_convert_and_check) : Define.
1621 * cp-tree.h (cp_convert_and_check): Declare.
1622 * call.c (convert_conversion_warnings): Rename to
1623 conversion_null_warnings. The warning for floating-point to
1624 integer is handled by convert_and_check in convert_like_real.
1625 (convert_like_real): convert_conversion_warnings was renamed as
1626 conversion_null_warnings.
1627 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
1628 overflow and changes of value during conversion.
1630 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1633 * parser.c (cp_parser_statement): If 'namespace' is found, this
1634 only can be a namespace alias definition, so parse it now.
1635 (cp_parser_namespace_alias_definition): if we find an open brace
1636 instead of '=', then this is actually a misplaced namespace
1639 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1642 * decl.c (cxx_init_decl_processing): Move command-line options
1643 processing to c-opts.c.
1645 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
1647 * ptree.c (cxx_print_type): Use formatting markup for integers
1648 when printing template parameter index/level/orig level.
1649 (cxx_print_xnode): Ditto.
1650 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
1651 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
1652 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
1654 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
1655 rather than a HOST_WIDE_INT.
1656 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
1657 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
1659 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
1660 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
1661 IN_BASE_INITIALIZER bool bitfields.
1662 (struct cp_declarator): Make KIND a 4-bit field. Make
1663 PARAMETER_PACK_P a bool bitfield just after KIND.
1664 * pt.c (uses_parameter_packs): Destroy the pointer set.
1665 (make_pack_expansion): Ditto.
1666 (check_for_bare_parameter_packs): Ditto.
1667 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
1669 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
1672 * call.c (convert_default_arg): Instead of copying the node,
1675 2007-03-15 Dirk Mueller <dmueller@suse.de>
1678 * call.c (convert_conversion_warnings): New..
1679 (convert_like_real): .. factored out from here.
1680 (convert_conversion_warnings): Add warning about
1681 false being converted to NULL in argument passing.
1683 2007-03-14 Dirk Mueller <dmueller@suse.de>
1685 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
1686 (finish_do_body): Warn about empty body in do/while statement.
1688 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1690 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
1692 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1695 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
1698 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
1700 * cp/repo.c (init_repo): Initialize random_seed saved options.
1701 (finish_repo): Adjust.
1703 2007-03-13 Mark Mitchell <mark@codesourcery.com>
1706 * Make-lang.in (doc/g++.1): Use $< to specify the location from
1709 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
1711 * decl.c (compute_array_index_type): New warning flag warn_vla.
1713 2007-03-12 Mark Mitchell <mark@codesourcery.com>
1716 * call.c (convert_default_arg): Copy non-constant arguments.
1718 2007-03-11 Mark Mitchell <mark@codesourcery.com>
1721 * parser.c (cp_parser_postfix_expression): Disallow compound
1722 literals in constant expressions.
1725 * semantics.c (finish_typeof): Use unlowered_expr_type.
1727 2007-03-10 Mark Mitchell <mark@codesourcery.com>
1730 * cp-tree.h (unlowered_expr_type): New function.
1731 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
1732 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
1733 (unlowered_expr_type): New function.
1734 (build_unary_op): Disallow predecrements of bool bitfields.
1735 * call.c (build_conditional_expr): Use unlowered_expr_type.
1736 * pt.c (type_unification_real): Likewise.
1738 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
1741 * typeck.c (check_return_expr): Check for bare parameter packs.
1742 (comptypes): Compare template parameter packs and
1743 type pack expansions.
1744 * decl.c (grokdeclarator): Deal with the declaration of function
1746 (grokparms): Verify that the (optional) function parameter pack is
1747 at the end of the parameter list.
1748 (xref_basetypes): Handle pack expansions in the base class.
1749 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
1750 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
1751 (NONTYPE_ARGUMENT_PACK): New.
1752 (TYPE_PACK_EXPANSION): New.
1753 (EXPR_PACK_EXPANSION): New.
1754 (ARGUMENT_PACK_SELECT): New.
1755 * cp-objcp-common.c (cp_tree_size): Compute size of
1756 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
1757 ARGUMENT_PACK_SELECT.
1758 * error.c (dump_template_argument): Print template argument packs.
1759 (dump_template_argument_list): Ditto.
1760 (dump_template_parameter): Dump `...' for template type parameter
1762 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
1763 (dump_parameters): Print function parameter packs.
1764 (dump_template_parms): Print template argument packs.
1765 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
1766 (maybe_warn_variadic_templates): New.
1767 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
1768 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1769 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1771 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
1772 (write_template_arg): Write argument packs as separate arguments.
1773 * cp-tree.h (struct template_parm_index_s): Add flag that
1774 indicates that the template parameter is actually a parameter
1776 (struct tree_argument_pack_select): New.
1777 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
1778 (union lang_tree_node): Add argument_pack_select.
1779 (FUNCTION_PARAMETER_PACK_P): New.
1780 (PACK_EXPANSION_P): New.
1781 (PACK_EXPANSION_PATTERN): New.
1782 (SET_PACK_EXPANSION_PATTERN): New.
1783 (PACK_EXPANSION_PARAMETER_PACKS): New.
1784 (ARGUMENT_PACK_P): New.
1785 (ARGUMENT_PACK_ARGS): New.
1786 (SET_ARGUMENT_PACK_ARGS): New.
1787 (ARGUMENT_PACK_INCOMPLETE_P): New.
1788 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
1789 (TEMPLATE_PARM_PARAMETER_PACK): New.
1790 (TEMPLATE_TYPE_PARAMETER_PACK): New.
1791 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
1792 (ARGUMENT_PACK_SELECT_INDEX): New.
1793 (ARGUMENT_PACK_SELECT_ARG): New.
1794 (struct cp_declarator): Add parameter_pack_p flag.
1795 (maybe_warn_variadic_templates): Declare.
1796 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
1797 indicate a template parameter pack.
1798 (uses_parameter_packs): Declare.
1799 (template_parameter_pack_p): Declare.
1800 (template_parms_variadic_p): Declare.
1801 (make_pack_expansion): Declare.
1802 (check_for_bare_parameter_packs): Declare.
1803 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
1804 sizeof... expressions.
1805 (pp_cxx_expression): Print pack expansions and non-type argument
1807 (pp_cxx_exception_specification): Print pack expansions.
1808 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
1809 (pp_cxx_ctor_initializer): Print pack expansions.
1810 (pp_cxx_type_id): Print pack expansions.
1811 (pp_cxx_template_argument_list): Print argument packs.
1812 (pp_cxx_template_parameter): Print ellipsis for template parameter
1814 * pt.c (comp_template_parms): Compare template parameter packs.
1815 (template_parameter_pack_p): New.
1816 (template_parms_variadic_p): New.
1817 (template_args_variadic_p): New.
1818 (make_ith_pack_parameter_name): New.
1819 (struct find_parameter_pack_data): New.
1820 (find_parameter_packs_r): New.
1821 (uses_parameter_packs): New.
1822 (make_pack_expansion): New.
1823 (check_for_bare_parameter_packs): New.
1824 (expand_template_argument_pack): New.
1825 (reduce_template_parm_level): Propagate parameter pack flag.
1826 (process_template_parm): Add is_parameter_pack parameter to state
1827 when the parameter is actually a parameter pack. Create template
1828 parameter packs when is_parameter_pack is true.
1829 (current_template_args): The argument for a template parameter
1830 pack is an argument pack containing a single pack expansion.
1831 (process_partial_specialization): When checking that non-type
1832 argument expressions do not involve template parameters, loop over
1833 the arguments in argument packs separately.
1834 (push_template_decl_real): Check that the type of the declaration
1835 does not have any bare parameter packs. Check that primary
1836 templates have no more than one parameter pack, and that it comes
1837 at the end of the template parameter list.
1838 (convert_template_argument): Handle coercions for pack expansion
1839 expressions by coercing the pattern then rebuilding the expansion.
1840 (coerce_template_parms): When coercing the arguments for a
1841 variadic template, pack "extra" arguments into an argument pack.
1842 (coerce_template_template_parms): Cannot coerce between parameter
1843 packs and non-pack parameters.
1844 (template_args_equal): Compare PACK_EXPANSION_P expressions.
1845 (comp_template_args): Expand all template arguments packs before
1846 comparing template argument lists.
1847 (mangle_class_name_for_template): Make argument packs as separate
1849 (for_each_template_parm_r): No need to handle BASELINK.
1850 (instantiate_class_template): Handle pack expansions in the base
1852 (tsubst_pack_expansion): New.
1853 (tsubst_template_args): Handle substitutions of argument packs and
1854 pack expansion into template argument lists.
1855 (tsubst_decl): Expand function parameter packs into separate
1856 function parameters.
1857 (tsubst_arg_types): Expand a type pack expansion into separate
1859 (tsubst_exception_specification): Handle pack expansions in
1860 exception specifiers.
1861 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
1862 replacing a template parameter with its argument. If we encounter
1863 a substitution for an argument pack, just return the parameter
1865 (tsubst_copy): sizeof(X...) returns the number of elements in
1866 parameter pack X. See through ARGUMENT_PACK_SELECT when the
1867 PARM_DECL is a parameter pack.
1868 (tsubst_expr): Expression pack expansions and argument packs
1869 cannot show up here; they will all be handled through function
1870 calls, sizeof, and template argument lists.
1871 (tsubst_copy_and_build): sizeof(X...) returns the number of
1872 elements in parameter pack X. Handle pack expansions in TREE_LIST
1873 and CONSTRUCTOR nodes.
1874 (fn_type_unification): Handle "incomplete" explicit template
1875 argument lists that specify some of the arguments for a template
1877 (type_unification_real): Unify arguments against pack expansions.
1878 (template_parm_level_and_index): New, helper function.
1879 (unify_pack_expansion): New.
1880 (unify): Unify argument packs on an argument-by-argument basis,
1881 handling variadic argument packs as well.
1882 (more_specialized_fn): Handle unification of function parameter
1883 packs. All things being equal, prefer non-variadic function
1884 templates to variadic function templates.
1885 (more_specialized_class): Prefer the variadic class template
1886 partial specialization that binds fewer arguments to a parameter
1888 (regenerate_decl_from_template): Expand function parameter packs
1889 into separate parameters.
1890 (instantiate_decl): Ditto.
1891 (tsubst_initializer_list): Handle pack expansions for base-class
1893 (dependent_type_p_r): Determine dependent types in argument packs
1894 and pack expansions.
1895 (value_dependent_expression_p): Determine value-dependence of
1896 non-type argument packs.
1897 (dependent_template_arg_p): Handle argument packs.
1898 * semantics.c (finish_cond): Check for bare parameter packs.
1899 (finish_expr_stmt): Ditto.
1900 (finish_for_expr): Ditto.
1901 (finish_switch_cond): Ditto.
1902 (finish_mem_initializers): Ditto.
1903 * name-lookup.c (arg_assoc_type): Handle pack expansions and
1905 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
1906 * parser.c (make_declarator): Declarator is not an expansion.
1907 (make_pointer_declarator): Transfer parameter pack flag to outer
1909 (make_reference_declarator): Ditto.
1910 (make_ptrmem_declarator): Ditto.
1911 (make_call_declarator): Ditto.
1912 (make_array_declarator): Ditto.
1913 (cp_parser_postfix_expression): Allow pack expansion expressions
1914 in the argument list for a call expression.
1915 (cp_parser_parenthesized_expression_list): Add new parameter
1916 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
1917 into separate arguments."
1918 (cp_parser_new_placement): Allow pack expansion expressions.
1919 (cp_parser_new_initializer): Ditto.
1920 (cp_parser_mem_initializer_list): Allow ellipsis to create a
1921 base-class initializer expansion.
1922 (cp_parser_mem_initializer): Ditto.
1923 (cp_parser_template_parameter_list): Keep track of whether the
1924 template parameter is a template parameter pack.
1925 (cp_parser_template_parameter): Parse the ellipsis to indicate a
1926 template parameter pack.
1927 (cp_parser_type_parameter): Ditto.
1928 (cp_parser_template_argument_list): Parse the ellipsis to indicate
1930 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
1931 this declarator is a parameter pack.
1932 (cp_parser_parameter_declaration): The ellipsis does not end the
1933 parameter declaration, because it might be a parameter pack. Parse
1934 the ellipsis to indicate a parameter pack.
1935 (cp_parser_initializer): Allow pack expansions.
1936 (cp_parser_initializer_list): Allow ellipsis to create an
1937 initializer expansion.
1938 (cp_parser_base_clause): Allow ellipsis to create a base specifier
1940 (cp_parser_type_id_list): Allow ellipsis to create an exception
1941 specifier expansion.
1942 (cp_parser_attribute_list): Don't allow pack expansions.
1943 (cp_parser_functional_cast): Allow pack expansions.
1944 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
1945 compute the length of a parameter pack.
1946 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
1947 end a template argument.
1948 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
1949 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
1952 2007-03-09 Dirk Mueller <dmueller@suse.de>
1954 * cp/call.c (build_new_op): Call warn_logical_operator.
1956 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
1959 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
1962 * pt.c (any_template_arguments_need_structural_equality_p):
1965 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
1967 * decl.c (grokdeclarator): Disable warnings for anonymous
1970 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
1972 * typeck2.c (readonly_error): Always emit a hard error.
1973 Remove last argument.
1974 * cp-tree.h (readonly_error): Adjust prototype.
1975 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
1976 * typeck.c (build_unary_op): Likewise.
1977 (build_modify_expr): Likewise.
1979 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
1982 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
1984 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1987 * parser.c (struct cp_parser): New IN_IF_STMT.
1988 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
1989 returning if parsing the body of an 'if' statement or issuing an
1990 error and continuing.
1991 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
1993 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
1995 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
1998 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
2001 2007-03-02 Geoffrey Keating <geoffk@apple.com>
2003 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
2004 Objective-C++. Don't exit early if -shared-libgcc needs to be
2007 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2009 * typeck.c (common_base_type): Delete unused function.
2011 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2013 * Make-lang.in: Add dummy lang.install-pdf target.
2015 2007-03-01 Simon Baldwin <simonb@google.com>
2018 * decl.c (check_tag_decl): Added new warning for typedef ignored
2019 when it precedes an otherwise valid non-typedef declaration.
2021 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
2023 * typeck.c (build_function_call): Store converted arguments
2024 in a stack-allocated array instead of building a list.
2025 (convert_arguments): Store arguments in the array passed in as an
2026 argument, and return the actual number of arguments.
2027 * call.c (build_call): Delete, and replace with...
2028 (build_call_n, build_call_a): New.
2029 (build_op_delete_call): Rewrite to avoid constructing argument lists.
2030 (build_over_call): Store converted arguments in a stack-allocated
2031 array instead of building a list.
2032 (build_cxx_call): Pass arguments in an array instead of as a list.
2033 (build_java_interface_fn_ref): Rewrite to avoid constructing
2035 * tree.h: Update declarations to reflect above changes.
2036 * method.c (use_thunk): Use a stack-allocated array to hold
2037 the arguments instead of a list.
2038 * rtti.c (throw_bad_cast): Update call to cxx_call.
2039 (throw_bad_typeid): Likewise.
2040 (build_dynamic_cast_1): Likewise.
2041 * init.c (build_builtin_delete_call): Use build_call_n.
2042 * decl.c (expand_static_init): Likewise.
2043 * except.c (cp_protect_cleanup_actions): Likewise.
2044 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
2045 (gimplify_must_not_throw_expr): Likewise.
2046 (cxx_omp_apply_fn): Use build_call_a.
2048 2007-02-26 Mark Mitchell <mark@codesourcery.com>
2050 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
2051 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
2053 2007-02-25 Mark Mitchell <mark@codesourcery.com>
2055 * cp-tree.h (static_ctors): Remove.
2056 * cp-tree.h (static_dtors): Likewise.
2057 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
2058 refactoring of tree_map hierarchy.
2059 (decl_shadowed_for_var_insert): Likewise.
2060 * semantics.c (expand_body): Use c_expand_body.
2061 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
2062 * decl2.c (static_ctors): Remove.
2063 (static_dtors): Likewise.
2064 (generate_ctor_or_dtor_function): Pass NULL_TREE to
2065 objc_generate_static_init_call. Do not call static_[cd]tors.
2066 (generate_ctor_and_dtor_functions_for_priority): Do not check for
2068 (cp_write_global_declarations): Likewise.
2070 2007-02-23 Richard Guenther <rguenther@suse.de>
2072 * class.c (note_name_declared_in_class): Make declaration
2073 changes meaning a pedwarn.
2075 2007-02-22 Michael Matz <matz@suse.de>
2078 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
2079 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
2080 dump_function_decl): Guard emitting outer scopes by new flag.
2081 * cp-lang.c (cxx_dwarf_name): New function.
2082 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
2083 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
2085 (push_template_decl_real, lookup_template_class): Remove calls
2088 2007-02-19 Mark Mitchell <mark@codesourcery.com>
2090 * call.c (build_new_method_call): Ensure that explicit calls of
2091 destructors have type "void".
2093 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2095 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
2096 and -Walways-true with -Waddress.
2097 * cvt.c (convert_to_void): Replace unconditional warning with
2100 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
2102 * decl.c, tree.c: Fix comment typos.
2104 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
2107 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
2108 statement expression if we had an error mark node.
2110 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
2111 Brooks Moses <brooks.moses@codesourcery.com>
2112 Lee Millward <lee.millward@codesourcery.com>
2114 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
2115 Change class to tcc_vl_exp.
2117 * call.c (build_call): Use build_call_list instead
2119 (build_over_call): Likewise.
2120 (build_new_method_call): Use build_min_non_dep_call_list
2121 instead of build_min_non_dep.
2123 * error.c (dump_call_expr_args): New function.
2124 (dump_aggr_init_expr_args): New function.
2125 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
2126 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
2128 * cvt.c (convert_to_void): Use build_call_array instead
2129 of build3; use new AGGR_INIT_EXPR accessor macros.
2131 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
2132 instead of TREE_CODE_LENGTH.
2134 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
2135 AGGR_INIT_EXPR accessor macros.
2137 * cp-gimplify.c (cp_gimplify_init_expr): Use
2138 AGGR_INIT_EXPR_SLOT to set the slot operand.
2140 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
2141 (AGGR_INIT_EXPR_SLOT): New macro.
2142 (AGGR_INIT_EXPR_ARG): New macro.
2143 (aggr_init_expr_nargs): New macro.
2144 (AGGR_INIT_EXPR_ARGP): New macro.
2145 (aggr_init_expr_arg_iterator): New.
2146 (init_aggr_init_expr_arg_iterator): New.
2147 (next_aggr_init_expr_arg): New.
2148 (first_aggr_init_expr_arg): New.
2149 (more_aggr_init_expr_args_p): New.
2150 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
2151 (stabilize_aggr_init): New declaration.
2152 (build_min_non_dep_call_list): Likewise.
2154 * tree.c (process_aggr_init_operands): New function.
2155 (build_aggr_init_array) New function.
2156 (build_cplus_new): Update to use new CALL_EXPR and
2157 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
2158 build_aggr_init_array.
2159 (build_min_non_dep_call_list) New function.
2160 (build_min_nt): Assert input code parameter is not a variable
2161 length expression class.
2162 (build_min, build_min_non_dep): Likewise.
2163 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
2164 to check for equality instead of recursing. Handle tcc_vl_exp
2166 (stabilize_call): Update to only handle CALL_EXPRs, not
2167 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
2168 (stabilize_aggr_init): New function.
2169 (stabilize_init): Use it.
2171 * cxx-pretty-print.c (pp_cxx_postfix_expression)
2172 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
2173 AGGR_INIT_EXPR accessor macros and argument iterators.
2175 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
2176 build_vl_exp. Iterate through the operands, recursively
2177 processing each one.
2178 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
2179 CALL_EXPR accessor macros.
2180 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
2181 tree code classes. Use TREE_OPERAND_LENGTH instead of
2184 * semantics.c (finish_call_expr): Use build_nt_call_list
2185 instead of build_nt.
2186 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
2187 accessor macros. Use build_call_array to construct the
2188 CALL_EXPR node instead of build3
2190 * decl2.c (build_offset_ref_call_from_tree): Use
2191 build_nt_call_list and build_min_non_dep_call_list instead
2192 of build_min_nt and build_min_non_dep.
2194 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
2195 Use build_nt_call_list instead of build_min_nt.
2197 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2200 * call.c (build_conditional_expr): Improve error message.
2202 2007-02-13 Dirk Mueller <dmueller@suse.de>
2204 * friend.c (do_friend): Annotate warning about friend
2205 declarations in templates with OPT_Wnon_template_friend.
2206 Convert informal message from warning() to inform().
2208 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
2209 Mark Mitchell <mark@codesourcery.com>
2212 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
2213 instantiations for variables.
2215 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2218 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
2219 Check warn_unused_value just once.
2221 2007-02-11 Mark Mitchell <mark@codesourcery.com>
2224 * pt.c (determine_specialization): Use skip_artificial_parms_for.
2225 (fn_type_unificiation): Likewise.
2226 (get_bindings): Likewise.
2228 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
2231 * decl.c (finish_function): Use DECL_REPLACEABLE.
2232 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2234 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
2236 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
2238 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
2240 * decl.c (grokvardecl): Don't error if !have_tls.
2241 (grokdeclarator): Likewise.
2242 * parser.c (cp_parser_omp_threadprivate): Likewise.
2244 2007-02-07 Jakub Jelinek <jakub@redhat.com>
2247 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
2248 parameters and result decls in omp clauses.
2249 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
2252 2007-02-05 Dirk Mueller <dmueller@suse.de>
2255 * parser.c (cp_parser_class_specifier): Always initialize bases.
2257 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
2259 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
2260 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
2261 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
2263 * semantics.c (finish_omp_atomic): Store a whole expression node
2264 in operand 1, and integer_zero_node in operand 0, for dependent
2265 OMP_ATOMIC. Rewrite to make flow easier to understand.
2267 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2269 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
2271 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
2273 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
2274 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
2276 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
2278 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
2279 keyword warning to -Wc++0x-compat.
2281 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2283 * decl.c (grokdeclarator): Update documentation.
2285 2007-02-02 Jakub Jelinek <jakub@redhat.com>
2288 * decl.c (grokdeclarator): If __thread is used together with
2289 a storage class other than extern and static, clear thread_p
2290 after issuing diagnostics and fall through to checking the
2293 2007-01-30 Roger Sayle <roger@eyesopen.com>
2295 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
2296 calculating the size of an array (to avoid recursive errors).
2298 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2301 * typeck.c (build_binary_op): Fix logic for warning. Move warning
2303 * call.c (convert_like_real): Don't warn when converting to
2306 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2308 * decl.c (pop_label): Replace warning with call to
2309 warn_for_unused_label.
2311 2007-01-28 Andrew Pinski <pinskia@gmail.com>
2314 * semantics.c (finish_pseudo_destructor_expr): Check the
2315 destrutor name by calling check_dtor_name.
2317 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
2319 * lex.c (D_CPP0X): Rename.
2321 (reswords): D_CPP0X -> D_CXX0X.
2322 (init_reswords): Ditto.
2323 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
2324 of C++0x keywords as identifiers.
2326 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
2329 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
2332 2007-01-23 Ian Lance Taylor <iant@google.com>
2334 * typeck.c (convert_for_assignment): Only warn about a = b = c
2335 when converting to bool.
2337 2007-01-23 Roger Sayle <roger@eyesopen.com>
2339 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
2341 * typeck.c (ignore_overflows): Remove the remaining uses of
2342 TREE_CONSTANT_OVERFLOW.
2344 2007-01-20 Jan Hubicka <jh@suse.cz>
2346 * decl2.c (start_objects, start_static_storage_duration_function):
2347 Do not make the functions uninlinable.
2349 2007-01-17 Ian Lance Taylor <iant@google.com>
2351 * class.c (add_method): Call VEC_reserve_exact rather than passing
2352 a negative size to VEC_reserve.
2354 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
2357 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
2359 2007-01-10 Mark Mitchell <mark@codesourcery.com>
2362 * decl.c (make_typename_type): If the qualified name is not a
2363 type, issue an error.
2364 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
2367 2007-01-08 Geoffrey Keating <geoffk@apple.com>
2369 * rtti.c: Include target.h.
2370 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
2371 don't emit typeinfo for fundamental types as weak.
2372 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
2374 2007-01-08 Richard Guenther <rguenther@suse.de>
2376 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
2378 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
2380 * call.c (standard_conversion): Pass flag to
2381 vector_types_convertible_p to disallow emission of note.
2382 * typeck.c (convert_for_assignment): Pass flag to
2383 vector_types_convertible_p to allow emission of note.
2384 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
2385 to disallow emission of note.
2387 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2390 * typeck.c (build_binary_op): Call overflow_warning if
2391 TREE_OVERFLOW_P is true for the result and not for any of the
2394 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
2397 * class.c (add_method): Don't wait until template
2398 instantiation time to complain about duplicate methods.
2400 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2403 * semantics.c (finish_unary_op_expr): Warn only if result
2404 overflowed and operands did not.
2406 2007-01-05 Ian Lance Taylor <iant@google.com>
2408 * typeck.c (build_binary_op): Warn about comparing a non-weak
2411 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
2413 * pt.c (tsubst): Propagate the need for structural equality checks
2414 when reducing the level of template parameters.
2416 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
2418 * pt.c: Fix a comment typo.
2420 2007-01-02 Ian Lance Taylor <iant@google.com>
2422 * semantics.c (maybe_convert_cond): Optionally warn when using an
2423 assignment as a condition.
2424 * typeck.c (convert_for_assignment): Optionally warn about
2425 assigning the result of an assignment to a bool.
2427 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
2429 * pt.c (canonical_template_parms): Correct typo in comment.
2431 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
2433 * typeck.c (structural_comptypes): Renamed from "comptypes".
2434 (comptypes): Use canonical type information to perform fast type
2435 comparison. When VERIFY_CANONICAL_TYPES, verify that the
2436 canonical type comparison returns the same results as we would see
2437 from the current, structural check. Support COMPARE_STRUCTURAL
2438 when we need structural checks.
2439 * decl.c (typename_compare): Fix comment.
2440 (build_typename_type): TYPENAME_TYPE nodes require structural
2441 equality checks, because they resolve different based on the
2443 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
2444 require structural equality checks (for now).
2445 (build_ptrmemfunc_type): Build the canonical pointer to member
2447 (compute_array_index_type): Whenever we build a new index type
2448 to represent the size of an array in a template, we need to mark
2449 this index type as requiring structural equality. This goes for
2450 arrays with value-dependent sizes with the current ABI, or all
2452 * tree.c (cplus_array_hash): New.
2453 (struct cplus_array_info): New.
2454 (cplus_array_compare): New.
2455 (cplus_array_htab): New.
2456 (build_cplus_array_type_1): Use a hash table to cache the array
2457 types we build. Build the canonical array type for each array
2459 (cp_build_qualified_type_real): When building a cv-qualified array
2460 type, use the hash table of array types and build canonical array
2462 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
2463 use structural equality (for now).
2464 * cp-tree.h (COMPARE_STRUCTURAL): New.
2465 * pt.c (canonical_template_parms): New.
2466 (canonical_type_parameter): New.
2467 (process_template_parm): Find the canonical type parameter.
2468 (lookup_template_class): When we have named the primary template
2469 type, set the canonical type for our template class to the primary
2470 template type. If any of the template arguments need structural
2471 equality checks, the template class needs structural equality
2473 (tsubst): When reducing the level of a template template
2474 parameter, we require structural equality tests for the resulting
2475 parameter because its template parameters have not had their types
2476 canonicalized. When reducing a template type parameter, find the
2477 canonical reduced type parameter.
2478 (any_template_arguments_need_structural_equality_p): New.