1 2007-11-18 Jakub Jelinek <jakub@redhat.com>
4 semantics.c (finish_call_expr): Set current_function_returns_abnormally
5 if fn is noreturn FUNCTION_DECL or OVERLOAD with all noreturn
8 2007-11-16 Jakub Jelinek <jakub@redhat.com>
11 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
14 2007-11-13 Jakub Jelinek <jakub@redhat.com>
21 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
22 set to error_mark_node the outermost POINTER_TYPE to the pack if
23 it is seen in a POINTER_TYPE.
24 (push_template_decl_real): If check_for_bare_parameter_packs
25 fails for function return type, set the return type to
26 integer_type_node. If check_for_bare_parameter_packs failed
27 for non-function, return error_mark_node.
30 * call.c (build_new_op): Call resolve_args before calling
33 2007-11-11 Tom Tromey <tromey@redhat.com>
36 * lex.c (handle_pragma_implementation): Use cpp_included_before.
38 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
41 * pt.c (redeclare_class_template): Update error message. Use a
42 note to show the previous declaration.
43 (tsubst_friend_class): Use the location of the friend template as
44 the input location before calling redeclare_class_template.
46 2007-11-11 Jakub Jelinek <jakub@redhat.com>
49 * semantics.c (finish_pseudo_destructor_expr): Handle
50 object == error_mark_node.
52 2007-11-10 Jakub Jelinek <jakub@redhat.com>
55 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
56 is not scalar type, let finish_class_member_access_expr handle
57 diagnostics. Pass BIT_NOT_EXPR argument to
58 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
60 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
63 * decl.c (cp_complete_array_type): If any of the initializer
64 elements are pack expansions, don't compute the array size yet.
66 2007-11-08 Andrew Pinski <pinskia@gmail.com>
69 * tree.c (decl_linkage): Fields have no linkage.
71 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
73 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
75 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
80 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
81 Be careful with ERROR_MARK_NODEs.
82 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
85 2007-11-07 Jakub Jelinek <jakub@redhat.com>
88 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
91 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
95 * tree.c (c_build_qualified_type): Define bridge to
96 cp_build_qualified_type.
98 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
109 * typeck.c (check_return_expr): Pass address of retval to
110 check_for_bare_parameter_packs.
111 * class.c (build_base_field): Tolerate bases that have no layout
113 (end_of_base): Ditto.
114 * tree.c (canonical_type_variant): Be careful with
116 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
118 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
119 which states whether parameter packs should be replaced with
121 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
122 possible. If set_packs_to_error is set true, replace the parameter
123 pack with ERROR_MARK_NODE. Manage our own pointer sets.
124 (uses_parameter_packs): Don't set parameter packs to
126 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
127 which may be modified (if it is a parameter pack). Instructs
128 find_parameter_packs_r to replace parameter packs with
129 ERROR_MARK_NODE (so that they won't cause errors later on).
130 (process_template_parm): Pass pointer to
131 check_for_bare_parameter_packs.
132 (process_partial_specialization): Replace pack expansions before
133 the end of the template argument list with ERROR_MARK_NODE.
134 (push_template_decl_real): Pass pointer to
135 check_for_bare_parameter_packs. Replace parameter packs not at the
136 end of the template parameter list with ERROR_MARK_NODE.
137 (convert_template_argument): Be more careful about using DECL_NAME
138 on only declarations.
139 (unify): Can't unify against ERROR_MARK_NODE.
140 * semantics.c (finish_cond): Pass pointer to
141 check_for_bare_parameter_packs.
142 (finish_expr_stmt): Ditto.
143 (finish_for_expr): Ditto.
144 (finish_switch_cond): Pass pointer to
145 check_for_bare_parameter_packs, and call it before we put the
146 condition into the statement.
147 (finish_mem_initializers): Pass pointer to
148 check_for_bare_parameter_packs.
149 (finish_member_declaration): Ditto.
150 * parser.c (cp_parser_base_clause): Ditto.
152 2007-11-06 Jakub Jelinek <jakub@redhat.com>
155 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
156 with the final TREE_READONLY flag in place. processing_template_decl
157 is known to be 0 in this part of function.
160 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
161 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
162 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
163 * semantics.c (finish_omp_atomic): Revert most of the
164 2007-02-05 changes, just keep the new representation of
165 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
167 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
170 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
173 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
178 * typeck.c (merge_types): Don't lose rvalue references when
180 * call.c (build_over_call): Don't elide move constructors just
181 because the copy constructor is trivial (!).
182 (compare_ics): If comparing cv-qualifiers fails, we can still order
183 based on binding lvalues vs. rvalues.
185 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
188 * pt.c (unify_pack_expansion): bring handling of function call
189 arguments into line with type_unification_real.
191 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
193 * typeck.c (build_binary_op): Use pedwarn instead of error for
196 2007-11-05 Jakub Jelinek <jakub@redhat.com>
199 * parser.c (cp_parser_unary_expression): For &&label call
200 cp_parser_non_integral_constant_expression and return error_mark_node
204 * decl.c (grokdeclarator): Don't call build_memfn_type if type
205 is neither FUNCTION_TYPE nor METHOD_TYPE.
207 2007-11-02 Jakub Jelinek <jakub@redhat.com>
210 * parser.c (cp_parser_nested_name_specifier_opt): Use
211 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
212 typedef of currently open class.
214 2007-11-02 Paolo Carlini <pcarlini@suse.de>
217 * error.c (dump_expr): Deal specially with statements.
219 2007-11-01 Jason Merrill <jason@redhat.com>
222 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
224 (lookup_template_class): Use it to get the outer template args
225 for instantiating one.
228 * pt.c (reduce_template_parm_level): tsubst the parameters
229 of a template template parm.
231 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
234 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
236 2007-11-01 Jakub Jelinek <jakub@redhat.com>
239 * parser.c (cp_parser_postfix_dot_deref_expression): If
240 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
241 first and if that succeeds and type is SCALAR_TYPE_P, create
245 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
246 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
247 as for std::type_info.
249 2007-10-31 Paolo Carlini <pcarlini@suse.de>
252 * cxx-pretty-print.c (pp_cxx_typeid_expression,
253 pp_cxx_delete_expression): Change to static linkage.
254 * cxx-pretty-print.h: Adjust declarations.
255 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
256 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
257 MODOP_EXPR): Forward to pp_expression.
259 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
262 2007-10-31 Christian Bruel <christian.bruel@st.com>
263 Mark Mitchell <mark@codesourcery.com>
266 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
267 if retval is volatile.
269 2007-10-30 Jakub Jelinek <jakub@redhat.com>
272 * decl2.c (build_offset_ref_call_from_tree): Call
273 build_non_dependent_expr on object prior to building ADDR_EXPR from it
274 if FN is DOTSTAR_EXPR.
276 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
280 * pt.c (find_parameter_packs_r): Fix typo in comment.
281 (convert_template_argument): Look at the pattern of a pack
282 expansion to determine what kind of entity we're converting.
283 (coerce_template_parameter_pack): When we have coerced a non-type
284 template parameter pack, substitute into the type of that pack.
285 (tsubst_pack_expansion): When our substitution of a parameter pack
286 is a "trivial" substitution of itself, just substitute into the
287 pack expansion rather than actually expanding.
289 2007-10-29 Jakub Jelinek <jakub@redhat.com>
292 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
293 for non-integral type bitfields. Return true if bitfield is correct, false
294 error has been diagnosed.
295 (check_field_decls): If check_bitfield_decl returned false, call also
298 2007-10-28 Paolo Carlini <pcarlini@suse.de>
299 Mark Mitchell <mark@codesourcery.com>
302 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
303 class member error out and return.
305 2007-10-27 Jakub Jelinek <jakub@redhat.com>
307 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
308 to current_function_decl rather than 0.
311 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
313 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
315 2007-10-27 Jason Merrill <jason@redhat.com>
318 * call.c (convert_default_arg): Detect recursion.
320 2007-10-27 Jakub Jelinek <jakub@redhat.com>
323 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
324 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
326 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
328 * error.c (dump_expr): Handle OFFSETOF_EXPR.
330 2007-10-26 Jason Merrill <jason@redhat.com>
333 * pt.c (get_template_info): New fn.
334 (template_class_depth): Use it.
335 (push_template_decl_real): Check that the template args of the
336 definition match the args of the previous declaration.
338 2007-10-26 Paolo Carlini <pcarlini@suse.de>
341 * decl2.c (coerce_new_type): Do not allow a default argument for
344 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
347 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
348 don't see the leading '('. Only lookup names if we get an
351 2007-10-26 Jakub Jelinek <jakub@redhat.com>
354 * parser.c (cp_parser_parenthesized_expression_list): Set
355 greater_than_is_operator_p to true in between the parens.
357 2007-10-26 Paolo Carlini <pcarlini@suse.de>
360 * decl.c (grokdeclarator): In case of conflicting specifiers
361 just return error_mark_node.
363 2007-10-26 Ollie Wild <aaw@google.com>
365 * expr.c (cxx_expand_expr): Removed.
366 * cp-tree.h (exx_expand_expr): Removed.
367 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
370 2007-10-25 Paolo Carlini <pcarlini@suse.de>
373 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
375 2007-10-23 Jason Merrill <jason@redhat.com>
377 PR c++/25950 (DR 391)
378 * call.c (struct conversion): Remove check_copy_constructor_p.
379 (reference_binding): Always bind a reference directly to a
380 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
382 (check_constructor_callable): Remove.
383 (convert_like_real): Don't call it.
384 (initialize_reference): Don't call check_constructor_callable.
385 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
386 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
387 conversions if LOOKUP_NO_TEMP_BIND.
388 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
389 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
391 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
393 2007-10-22 Jakub Jelinek <jakub@redhat.com>
396 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
397 before checking if its type is integral.
399 2007-10-22 Jason Merrill <jason@redhat.com>
402 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
403 * pt.c (apply_late_template_attributes): Splice out dependent
404 attributes from DECL_ATTRIBUTES.
406 * decl.c (cxx_maybe_build_cleanup): Use build_address.
408 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
410 * typeck.c (build_binary_op) : Use appropriate warning option
411 instead of unnamed warning.
413 2007-10-16 Paolo Carlini <pcarlini@suse.de>
416 * pt.c (current_template_args): Do not change TREE_LIST elements
417 with a TREE_VALUE of error_mark_node.
419 2007-10-16 Mark Mitchell <mark@codesourcery.com>
421 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
422 * decl.c (start_decl): Tidy.
423 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
425 (grokdeclarator): Clarify comment.
427 2007-10-14 Andrew Pinski <pinskia@gmail.com>
430 * decl.c (grokfndecl): Return NULL after the "definition of
431 implicitly-declared" error happened.
433 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
436 * call.c (build_user_type_conversion_1): Do not consider conversion
437 functions to convert a (possibly cv-qualified) object to the (possibly
438 cv-qualified) same object type (or a reference to it), to a (possibly
439 cv-qualified) base class of that type (or a reference to it).
441 2007-10-12 Paolo Carlini <pcarlini@suse.de>
443 * pt.c (tsubst): Use template_parm_level_and_index.
445 2007-10-12 Jakub Jelinek <jakub@redhat.com>
448 * parser.c (cp_parser_compound_statement): Handle label-declarations
449 at the beginning of the compound statement.
450 (cp_parser_block_declaration): Issue diagnostics about __label__
451 not at the beginning of a block.
453 2007-10-11 Paolo Carlini <pcarlini@suse.de>
456 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
457 to convert_template_argument.
458 (coerce_template_parms): Return error_mark_node after fixed-length
460 (tsubst_decl): Check for error_mark_node the return value of the
461 first tsubst in 'case VAR_DECL'.
463 2007-10-08 Ollie Wild <aaw@google.com>
465 * typeck2.c (digest_init): Call cplus_expand_constant after
466 convert_for_initialization.
467 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
468 * expr.c (cplus_expand_constant): Updated function description.
470 2007-10-04 Jason Merrill <jason@redhat.com>
473 * call.c (initialize_reference): Handle local static reference
476 2007-10-03 Jason Merrill <jason@redhat.com>
479 * name-lookup.c (push_namespace_with_attrs): Fold back into...
480 (push_namespace): Here.
481 (handle_namespace_attrs): New fn for the attr code.
482 (leave_scope): Don't pop_visibility.
483 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
484 * parser.c (cp_parser_namespace_definition): Call
485 handle_namespace_attrs and pop_visibility as appropriate.
488 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
490 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
492 * decl.c (duplicate_decls): Preserve linkage flags for mere
493 redeclarations of gnu_inline definitions.
495 2007-10-03 Jason Merrill <jason@redhat.com>
498 * decl.c (wrap_cleanups_r): New fn.
499 (wrap_temporary_cleanups): New fn.
500 (initialize_local_var): Call it.
502 2007-09-29 Jason Merrill <jason@redhat.com>
505 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
506 constant to not have DECL_EXTERNAL if it's file-local.
508 2007-09-28 Ollie Wild <aaw@google.com>
511 2007-09-27 Ollie Wild <aaw@google.com>
513 * typeck2.c (digest_init): Call cplus_expand_constant after
514 convert_for_initialization.
515 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
516 * expr.c (cplus_expand_constant): Updated function description.
518 2007-09-28 Jason Merrill <jason@redhat.com>
521 * class.c (layout_empty_base): Take rli parameter, update
522 rli->record_align if empty base has user-specified alignment.
523 (build_base_field): Pass rli to it.
525 2007-09-28 Paolo Carlini <pcarlini@suse.de>
528 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
530 2007-09-28 Paolo Carlini <pcarlini@suse.de>
533 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
534 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
535 (dump_parameters): Just call dump_type for argument packs too.
537 2007-09-28 Jakub Jelinek <jakub@redhat.com>
540 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
541 qualification by creating qualified PACK_EXPANSION_PATTERN and
542 then calling make_pack_expansion on it.
544 2007-09-27 Ollie Wild <aaw@google.com>
546 * typeck2.c (digest_init): Call cplus_expand_constant after
547 convert_for_initialization.
548 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
549 * expr.c (cplus_expand_constant): Updated function description.
551 2007-09-27 Jason Merrill <jason@redhat.com>
554 * decl2.c (is_late_template_attribute): Don't crash on unknown
557 2007-09-27 Paolo Carlini <pcarlini@suse.de>
560 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
561 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
562 spaces in the formatting.
563 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
565 2007-09-27 Jakub Jelinek <jakub@redhat.com>
567 * error.c (cxx_print_error_function): Add third argument, pass
568 it over to lhd_print_error_function.
569 (cp_print_error_function): If diagnostic->abstract_origin, print
571 * cp-tree.h (struct diagnostic_info): New forward decl.
572 (cxx_print_error_function): Add third argument.
574 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
577 * name-lookup.c (pushtag): Do not create an implicit typedef before
578 the associated type declaration is known to be valid.
580 2007-09-25 Jakub Jelinek <jakub@redhat.com>
582 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
583 rather than pointers.
585 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
588 * search.c (check_final_overrider): Fail if
589 targetm.comp_type_attributes returns 0.
591 2007-09-24 Jason Merrill <jason@redhat.com>
594 * pt.c (resolve_typename_type): Don't look things up in the original
595 template if it would mean losing template arguments.
597 2007-09-24 Jakub Jelinek <jakub@redhat.com>
600 * cp-tree.h (cxx_type_hash_eq): New prototype.
601 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
602 * tree.c (cxx_type_hash_eq): New function.
604 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
607 * tree.c (cp_build_qualified_type_real): Build a canonical
608 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
610 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
614 * tree.c (cplus_array_compare): Compare pointers, not types.
615 (build_cplus_array_type_1): Store new array type into the hash
616 table before building the canonical type; build the canonical type
618 (cp_build_qualified_type_real): Put all of the array types with
619 cv-qualified element types into the C++ array hash table, built as
620 variants of the unqualified versions.
622 2007-09-23 Jason Merrill <jason@redhat.com>
625 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
626 for deprecation warnings.
628 2007-09-22 Jason Merrill <jason@redhat.com>
631 * call.c (build_over_call): Warn about deprecated virtuals.
634 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
635 (MAYBE_TAGGED_TYPE_P): Remove.
636 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
637 instead of calling is_late_template_attribute again.
638 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
639 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
640 Don't crash on typedefs from non-template classes.
641 * decl2.c (grokfield): Don't sorry about attrs on template parms.
642 (is_late_template_attribute): All attributes applied to template
643 parms or typename types are dependent. Static.
644 (splice_template_attributes): Pass decl through.
645 (save_template_attributes): Likewise.
647 2007-09-20 Jakub Jelinek <jakub@redhat.com>
650 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
651 returned from tsubst_pack_expansion.
652 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
653 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
655 2007-09-20 Paolo Carlini <pcarlini@suse.de>
658 * semantics.c (finish_id_expression): Use consistently
659 context_for_name_lookup.
660 * decl.c (fixup_anonymous_aggr): Fix error message for
661 anonymous struct (vs union).
663 2007-09-19 Jason Merrill <jason@redhat.com>
666 * pt.c (tsubst): Handle typedefs by looking for the specialization.
667 (retrieve_specialization): Only tagged types use
668 DECL_TEMPLATE_INSTANTIATIONS.
669 (instantiate_class_template): Push nested classes too.
670 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
672 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
673 * init.c (is_aggr_type): Remove redundant tests.
674 * class.c (push_nested_class): Use CLASS_TYPE_P.
676 2007-09-20 Paolo Carlini <pcarlini@suse.de>
679 * init.c (build_zero_init): If, recursively, build_zero_init
680 returns a NULL_TREE, do not append it to the VEC of constructors.
682 2007-09-18 Jason Merrill <jason@redhat.com>
685 * pt.c (apply_late_template_attributes): Set processing_template_decl.
686 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
687 ATTR_FLAG_TYPE_IN_PLACE.
688 (tsubst): Do unqualified lookup to find typedefs from current class.
689 [ARRAY_TYPE]: Propagate alignment info.
690 * decl2.c (is_late_template_attribute): Only defer handling of
691 attribute aligned if the expression is dependent.
692 (save_template_attributes): If we're deferring any attributes,
693 make this a naming typedef.
695 2007-09-18 Paolo Carlini <pcarlini@suse.de>
698 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
699 va_arg instead of __builtin_va_arg.
701 2007-09-18 Paolo Carlini <pcarlini@suse.de>
704 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
705 (pp_cxx_primary_expression): Use it.
706 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
707 * error.c (dump_expr): Use it.
709 2007-09-18 Paolo Carlini <pcarlini@suse.de>
712 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
713 out case TYPEID_EXPR to...
714 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
715 and pp_cxx_right_paren.
716 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
717 * error.c (dump_expr): Use it.
719 2007-09-18 Paolo Carlini <pcarlini@suse.de>
722 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
723 (pp_cxx_primary_expression): Use it.
724 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
725 * error.c (dump_expr): Use it.
727 2007-09-16 Paolo Carlini <pcarlini@suse.de>
730 * init.c (build_new): Remove warning for zero-element
733 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
736 * call.c (maybe_handle_implicit_object): Set this_p, clear
737 rvaluedness_matches_p.
738 (compare_ics): Do not compare rvaluedness matching when one of the
739 operands is an implicit object.
741 2007-09-14 Jason Merrill <jason@redhat.com>
743 PR c++/17743, c++/19163
744 * decl2.c (is_late_template_attribute): New fn.
745 (splice_template_attributes, save_template_attributes): New fns.
746 (cplus_decl_attributes): Call save_template_attributes.
747 * pt.c (apply_late_template_attributes): New fn.
748 (instantiate_class_template, tsubst_decl): Use it.
749 * cp-tree.h: Declare is_late_template_attribute.
751 2007-09-13 Tom Tromey <tromey@redhat.com>
753 * parser.c (cp_lexer_new_main): Don't use
754 c_lex_return_raw_strings.
755 (cp_lexer_get_preprocessor_token): Update. Add special case when
758 2007-09-11 Jan Hubicka <jh@suse.cz>
760 * method.c (use_thunk): Use tree_rest_of_compilation
761 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
762 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
763 * cp-tree.h (expand_body): Kill.
764 (emit_associated_thunks): Declare.
765 * semantics.c (emit_associated_thunks): Export.
768 2007-09-09 David Daney <ddaney@avtrex.com>
771 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
772 to calculate cookie_ptr.
774 2007-09-08 Jason Merrill <jason@redhat.com>
777 * pt.c (most_specialized_class): Set processing_template_decl
778 while tsubsting partial spec args.
780 2007-09-06 Jason Merrill <jason@redhat.com>
782 * decl2.c (get_guard): Copy visibility from the guarded variable.
784 2007-09-06 Jan Hubicka <jh@suse.cz>
786 * semantics.c (expand_body): Do not mark arguments of clones used.
788 2007-09-06 Paolo Carlini <pcarlini@suse.de>
791 * decl.c (cp_finish_decl): When processing_template_decl,
792 deal correctly with init as TREE_LIST.
794 2007-09-06 Tom Tromey <tromey@redhat.com>
796 * decl.c (finish_function): Put return's location on line zero of
799 2007-09-05 Jason Merrill <jason@redhat.com>
802 * except.c (prepare_eh_type): Use type_decays_to.
805 * init.c (build_delete): Use build_headof to get the address of the
806 complete object if we aren't using the deleting destructor.
807 * rtti.c (build_headof): No longer static.
808 * cp-tree.h: Declare it.
810 2007-09-06 Jakub Jelinek <jakub@redhat.com>
812 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
813 decl if a prototype for XX is provided with throw().
816 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
817 on __*_chk non-__builtin_* decls.
819 2007-09-05 Paolo Carlini <pcarlini@suse.de>
822 * semantics.c (finish_id_expression): Use context_for_name_lookup
823 insted of DECL_CONTEXT, to see through anonymous structs and unions.
824 * class.c (finish_struct_anon): Deal correctly with anonymous
825 structs (vs unions, as GNU extension) in error messages.
827 2007-09-05 Jan Hubicka <jh@suse.cz>
829 * cp/sematics.c (expand_body): Remove unnecesary import_export_decl
830 call, DECL_EXTERNAL checks and current_function_decl saving.
832 2007-09-05 Paolo Carlini <pcarlini@suse.de>
835 * parser.c (cp_parser_primary_expression): Return error_mark_node
836 when a statement-expression is found in a template-argument list.
838 2007-09-04 Jason Merrill <jason@redhat.com>
840 * except.c (initialize_handler_parm): Use
841 fold_build_cleanup_point_expr.
844 * call.c (reference_binding): Don't look for user-defined conversions
848 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
849 the MUST_NOT_THROW_EXPR.
851 2007-09-04 Richard Sandiford <richard@codesourcery.com>
853 * decl.c (cp_finish_decl): Call determine_visibility before
854 make_rtl_for_nonlocal_decl.
856 2007-09-04 Jason Merrill <jason@redhat.com>
859 * pt.c (most_specialized_class): Substitute outer template
860 arguments into the arguments of a member template partial
862 (strip_innermost_template_args): New fn.
864 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
866 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
868 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
870 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
871 * decl.c (cp_make_fname_decl): Likewise,
872 * parser.c (cp_parser_string_literal): Likewise,
873 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
874 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
877 2007-09-02 Paolo Carlini <pcarlini@suse.de>
880 * typeck.c (build_unary_op): Fix error message for
881 Boolean expression as operand to operator--.
883 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
885 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
886 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
889 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
892 * init.c (build_default_init): Make extern.
893 * cp-tree.h (build_default_init): Declare here.
894 * pt.c (tsubst_expr): When the instantiation of the initializer of
895 a variable results in an empty list, default-initialize the
897 (tsubst_copy_and_build): When the instantiation of the initializer
898 in a new expression results in an empty initializer list,
899 default-initialize it.
901 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
903 * mangle.c (write_type): Change mangling of rvalue reference from
906 2007-08-31 Jakub Jelinek <jakub@redhat.com>
908 * decl.c (duplicate_decls): Remove duplicated line.
910 2007-08-31 Paolo Carlini <pcarlini@suse.de>
913 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
914 BOUND_TEMPLATE_TEMPLATE_PARM.
916 2007-08-31 Paolo Carlini <pcarlini@suse.de>
919 * search.c (lookup_member): Check the name argument for
922 2007-08-31 Paolo Carlini <pcarlini@suse.de>
925 * parser.c (cp_parser_trait_expr): Check rerurn value of
928 2007-08-30 Ollie Wild <aaw@google.com>
930 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
931 convert_ptrmem for pointer to member conversions.
932 (convert_to_pointer_force): Update cp_convert_to_pointer call.
933 (ocp_convert): Update cp_convert_to_pointer call.
934 * typeck.c (convert_ptrmem): Add conditional for null pointers to
936 (build_static_cast_1): Check can_convert for conversions in either
938 (get_delta_difference_1): New function.
939 (get_delta_difference): Refactor to call get_delta_difference_1.
941 2007-08-30 Jakub Jelinek <jakub@redhat.com>
943 * decl.c (start_preparsed_function): Set
944 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
946 2007-08-28 Paolo Carlini <pcarlini@suse.de>
949 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
950 BOUND_TEMPLATE_TEMPLATE_PARM.
952 2007-08-28 Jakub Jelinek <jakub@redhat.com>
956 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
957 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
959 2007-08-27 Jason Merrill <jason@redhat.com>
962 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
963 Look inside STMT_EXPR.
964 * semantics.c (stmt_expr_value_expr): New fn.
965 * cp-tree.h: Declare it.
968 * decl.c (groktypename): Ignore attributes applied to class type.
970 2007-08-28 Richard Guenther <rguenther@suse.de>
972 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
974 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
976 * error.c (dump_expr): Handle COMPLEX_CST.
977 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
978 (pp_cxx_expression): Likewise.
980 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
982 * decl.c (GNU_INLINE_P): New.
983 (duplicate_decls): Handle gnu_inline. Merge attributes and
984 some flags in overriding definitions.
985 (redeclaration_error_message): Handle gnu_inline.
986 (start_preparsed_function): Likewise.
988 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
990 * call.c (sufficient_parms_p): Constify.
991 * class.c (same_signature_p): Likewise.
992 * cp-gimplify.c (is_invisiref_parm,
993 cxx_omp_privatize_by_reference): Likewise.
994 * cp-objcp-common.c (has_c_linkage): Likewise.
995 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
996 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
997 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
998 num_artificial_parms_for, comp_template_parms,
999 template_parameter_pack_p, any_dependent_template_arguments_p,
1000 any_type_dependent_arguments_p, any_value_dependent_elements_p,
1001 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
1002 zero_init_p, member_p, cp_lvalue_kind,
1003 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
1004 varargs_function_p, is_dummy_object, special_function_kind,
1005 string_conv_p, type_unknown_p, comp_except_specs, compparms,
1006 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
1007 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
1008 cp_has_mutable_p, at_least_as_qualified_p,
1009 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
1010 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
1011 * except.c (nothrow_libfn_p): Likewise.
1012 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
1014 * pt.c (comp_template_parms, template_parameter_pack_p,
1015 any_type_dependent_arguments_p, any_value_dependent_elements_p,
1016 any_dependent_template_arguments_p): Likewise.
1017 * repo.c (repo_export_class_p): Likewise.
1018 * semantics.c (anon_aggr_type_p): Likewise.
1019 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
1020 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
1021 varargs_function_p, member_p, is_dummy_object, pod_type_p,
1022 zero_init_p, special_function_p): Likewise.
1023 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
1024 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
1025 compparms, invalid_nonstatic_memfn_p,
1026 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
1027 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
1028 cp_has_mutable_p, lvalue_or_else): Likewise.
1030 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
1032 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
1033 * cp-objcp-common.c (cp_tree_size): Ditto.
1034 * tree.c (cp_walk_subtrees): Ditto
1035 * cp-tree.def (TINST_LEVEL): Go away.
1036 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
1037 move together with other non-tree structs.
1038 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
1039 (union lang_tree_node): Eliminate tinst_level field.
1040 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
1041 (current_instantiation, outermost_tinst_level): Return
1042 a "struct tinst_level *".
1044 * error.c (print_instantiation_partial_context): Change second
1045 parameter to a "struct tinst_level *". Replace accessor macros
1047 (print_instantiation_full_context): Likewise.
1048 * lex.c (in_main_input_context): Likewise.
1050 * pt.c (struct pending_templates): New.
1051 (pending_templates, last_pending_template): Use it as a type.
1052 (current_tinst_level): Change typo to "struct tinst_level *"
1053 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
1054 (add_pending_template): Construct a "struct pending_template".
1055 Replace TINST_LEVEL accessor macros with field access.
1056 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
1057 (pop_tinst_level): Likewise.
1058 (instantiate_pending_templates): Likewise. Factor common code used
1059 when an instantiation has been done.
1060 (outermost_tinst_level): Replace tree_last with loop.
1061 (current_instantiation): Return a "struct tinst_level *".
1063 2007-08-24 Ollie Wild <aaw@google.com>
1065 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
1066 * name-lookup.h (cp_binding_level): Remove vtables member.
1068 2007-08-24 Richard Guenther <rguenther@suse.de>
1070 * tree.c (cp_cannot_inline_tree_fn): Remove.
1071 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
1072 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
1075 2007-08-24 Jakub Jelinek <jakub@redhat.com>
1078 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
1079 error_mark_node right away if build_expr_type_conversion
1083 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
1084 is error_mark_node rather than NULL_TREE.
1085 * pt.c (check_explicit_specialization): Likewise.
1088 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
1089 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
1091 2007-08-22 Jason Merrill <jason@redhat.com>
1094 * pt.c (outermost_tinst_level): New function.
1095 * lex.c (in_main_input_context): New function.
1096 * cp-tree.h: Declare it.
1097 * decl2.c (constrain_class_visibility): Use it to avoid warning
1098 about uses of the anonymous namespace in the main input file.
1100 2007-08-21 Jakub Jelinek <jakub@redhat.com>
1102 * init.c (build_new_1): Use get_target_expr instead of save_expr.
1104 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
1107 * class.c (finish_struct_1): Warn when a class has virtual
1108 functions and accessible non-virtual destructor.
1110 2007-08-20 Richard Guenther <rguenther@suse.de>
1114 * call.c (build_new_method_call): Convert initializer to
1116 * init.c (build_aggr_init): Do not fiddle with types.
1117 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
1118 * except.c (build_throw): Do not drop qualifiers for the
1120 * typeck.c (get_member_function_from_ptrfunc): Do not
1121 fiddle with types, instead convert.
1122 (build_ptrmemfunc1): Convert to the target type for
1124 (gfc_trans_allocate): Convert result to target type.
1125 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
1126 pointer-to-member structures shall have alias set zero as well.
1128 2007-08-20 Richard Guenther <rguenther@suse.de>
1130 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
1132 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
1133 (nonstatic_local_decl_p): Likewise.
1134 * tree.c (cp_auto_var_in_fn_p): Remove.
1135 * decl.c (nonstatic_local_decl_p): Remove.
1137 2007-08-20 Richard Guenther <rguenther@suse.de>
1139 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
1141 * tree.h (cp_walk_tree): New define to walk_tree_1 with
1142 cp_walk_subtrees lh parameter.
1143 (cp_walk_tree_without_duplicates): New define to
1144 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
1145 * tree.c (count_trees): Call
1146 cp_walk_tree_without_duplicates.
1147 (verify_stmt_tree): Call cp_walk_tree.
1148 (break_out_target_exprs): Likewise.
1149 (WALK_SUBTREE): Likewise.
1150 * cp-gimplify.c (cp_genericize): Likewise.
1151 * cp-pt.c (find_parameter_packs_r): Likewise.
1152 (uses_parameter_packs): Likewise.
1153 (make_pack_expansion): Likewise.
1154 (check_for_bare_parameter_packs): Likewise.
1155 (for_each_template_parm): Likewise.
1156 * decl.c (check_default_argument): Call
1157 cp_walk_tree_without_duplicates.
1158 * except.c (build_throw): Likewise.
1159 * decl2.c (type_visibility): Likewise.
1160 * semantics.c (expand_or_defer_fn): Likewise.
1161 (finalize_nrv): Call cp_walk_tree.
1163 2007-08-20 Jakub Jelinek <jakub@redhat.com>
1166 * init.c (build_new_1): Rename placement_var variable to placement_expr.
1167 Initialize it with save_expr rather than get_temp_regvar.
1169 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
1172 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
1175 2007-08-17 Ollie Wild <aaw@google.com>
1178 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
1179 declarations into appropriate slots for comparison. Fix type
1182 2007-08-17 Paolo Carlini <pcarlini@suse.de>
1185 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
1186 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
1188 2007-08-17 Paolo Carlini <pcarlini@suse.de>
1191 * parser.c (cp_parser_class_head): Improve error message.
1193 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
1195 * pt.c (instantiate_decl): Set input_location
1196 for the function end.
1198 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1200 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
1202 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
1203 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
1204 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
1205 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
1206 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
1207 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
1208 * typeck.c (cp_type_quals): Likewise.
1209 * typeck2.c (cxx_incomplete_type_diagnostic,
1210 cxx_incomplete_type_error): Likewise.
1212 2007-08-16 Paolo Carlini <pcarlini@suse.de>
1215 * pt.c (tsubst_friend_function): When check_classfn
1216 returns error_mark_node likewise return it.
1218 2007-08-15 Jakub Jelinek <jakub@redhat.com>
1221 * typeck.c (check_return_expr): Don't NRV optimize vars in
1223 * decl.c (finish_function): Comment fix.
1225 2007-08-15 Paolo Carlini <pcarlini@suse.de>
1228 * pt.c (push_template_decl_real): Depending on TYPE_P
1229 use either TYPE_CONTEXT or DECL_CONTEXT.
1231 2007-08-14 Mark Mitchell <mark@codesourcery.com>
1233 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
1234 constructors and destructors return this.
1236 2007-08-14 Paolo Carlini <pcarlini@suse.de>
1239 * decl2.c (check_classfn): Return error_mark_node in case of error;
1240 in that case, do not call add_method.
1241 * decl.c (start_decl): Deal with check_classfn returning
1243 (grokfndecl): Likewise.
1244 * pt.c (tsubst_friend_function): Likewise.
1246 2007-08-14 Andrew Pinski <pinskia@gmail.com>
1249 * typeck.c (build_binary_op): Disallow vector float types with
1250 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
1252 2007-08-11 Ian Lance Taylor <iant@google.com>
1254 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
1256 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
1258 2007-08-10 Ollie Wild <aaw@google.com>
1260 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
1262 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
1264 (unqualified_namespace_lookup): Fix ambiguous_decl call.
1265 (lookup_using_namespace): Fix ambiguous_decl call.
1266 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
1268 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1270 * call.c (name_as_c_string): Use CONST_CAST.
1271 * decl.c (build_decl): Likewise.
1272 * parser.c (cp_parser_string_literal): Likewise.
1274 2007-08-10 Paolo Carlini <pcarlini@suse.de>
1277 * error.c (dump_expr): Consistently use the *_cxx_*
1278 variants of the pretty-print functions.
1280 2007-08-10 Paolo Carlini <pcarlini@suse.de>
1283 * decl.c (check_special_function_return_type): Just error
1284 on return type specified for conversion operator.
1286 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
1288 * typeck2.c (readonly_error): Handle general expressions.
1289 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
1291 2007-08-06 Dan Hipschman <dsh@google.com>
1293 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
1294 access function name.
1296 2007-08-04 Alfred Minarik <a.minarik@aon.at>
1299 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
1300 * g++spec.c (lang_specific_driver): Check them.
1302 2007-08-06 Paolo Carlini <pcarlini@suse.de>
1305 * pt.c (inline_needs_template_parms): Fix comment; change return type
1308 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
1311 2007-03-26 Dirk Mueller <dmueller@suse.de>
1313 * parser.c (cp_parser_member_declaration): Pedwarn
1314 about stray semicolons after member declarations.
1316 2007-08-02 Lee Millward <lee.millward@gmail.com>
1321 * parser.c (cp_parser_asm_definition): Detect and discard asm
1322 statements with invalid inputs or outputs.
1323 (cp_parser_asm_operand_list): Return error mark node if any
1324 of the operands are invalid. Adjust documentation.
1326 2007-08-02 Nick Clifton <nickc@redhat.com>
1328 * typeck.c: Change copyright header to refer to version 3 of the
1329 GNU General Public License and to point readers at the COPYING3
1330 file and the FSF's license web page.
1331 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
1332 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
1333 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
1334 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
1335 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
1336 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
1337 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
1338 name-lookup.h, parser.c: Likewise.
1340 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1343 * call.c (magic_varargs_p): Honor the "type generic" attribute.
1345 2007-07-30 Paolo Carlini <pcarlini@suse.de>
1348 * semantics.c (finish_label_stmt): Reject the __label__
1349 extension outside function scopes.
1351 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1353 * parser.c (eof_token): Un-constify.
1354 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
1355 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
1358 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
1360 * pt.c, tree.c, typeck2.c: Fix comment typos.
1362 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
1363 Mark Mitchell <mark@codesourcery.com>
1366 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
1367 hidden due to friend declarations in local classes.
1369 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
1371 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
1372 * cp-tree.def (DECLTYPE_TYPE): New.
1373 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
1374 (dump_type_prefix): Ditto.
1375 (dump_type_suffix): Ditto.
1376 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
1377 * mangle.c (write_type): Handle DECLTYPE_TYPE.
1378 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
1380 (DECLTYPE_TYPE_EXPR): New.
1381 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
1382 (finish_declared_type): Declare.
1383 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
1384 DECLTYPE_TYPE nodes.
1385 (pp_cxx_type_id): Ditto.
1386 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
1387 (tsubst): Substitute into a DECLTYPE_TYPE node.
1388 (tsubst_copy): Ditto.
1389 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
1391 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
1392 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
1393 structural equality (because we can't hash the expressions).
1394 (finish_declared_type): New.
1395 * lex.c (reswords): Add "decltype" keyword.
1396 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
1397 (cp_parser_postfix_expression): Add member_access_only_p to
1398 restrict postfix expression to member access expressions.
1399 (cp_parser_unary_expression): Update call to
1400 cp_parser_postfix_expression to reflect new parameter.
1401 (cp_parser_declared_type): New.
1402 (cp_parser_simple_type_specifier): Parse decltype types.
1404 2007-07-27 Mark Mitchell <mark@codesourcery.com>
1407 * call.c (convert_for_arg_passing): Only widen bitfields to their
1408 declared types if necessary.
1410 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1412 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
1415 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1417 * decl.c (typename_hash, typename_compare): Constify.
1418 * mangle.c (hash_type, compare_type): Likewise.
1419 * pt.c (eq_local_specializations, hash_local_specialization):
1421 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
1422 list_hash): Likewise.
1423 * typeck2.c (pat_compare): Likewise.
1425 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
1427 * method.c (implicitly_declare_fn): Increase alignment if member
1428 function pointer format requires it.
1430 2007-07-24 Paolo Carlini <pcarlini@suse.de>
1433 * typeck.c (check_return_expr): Do not pass a null argument
1436 2007-07-24 Paolo Carlini <pcarlini@suse.de>
1439 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
1442 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
1445 * typeck.c (convert_arguments): Only use default args if we have
1449 * typeck.c (structural_comptypes): No need to check
1450 resolve_typename_type return value here.
1451 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
1452 * pt.c (resolve_typename_type): Follow typename typedefs. Return
1453 original type rather than error_mark_node in case of failure.
1454 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
1455 resolve_typename_type result check.
1456 (cp_parser_direct_declarator, cp_parser_head,
1457 cp_parser_constructor_declarator_p): Likewise.
1459 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
1461 * pt.c (template_parms_variadic_p): Remove.
1462 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
1464 2007-07-12 Jakub Jelinek <jakub@redhat.com>
1467 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
1468 argument to dump_aggr_init_expr_args instead of false.
1470 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
1472 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
1473 canonical types; otherwise, fall back to structural type
1474 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
1475 internal compiler error if the canonical types are wrong.
1477 2007-07-11 Paolo Carlini <pcarlini@suse.de>
1480 * parser.c (cp_parser_make_indirect_declarator): When the
1481 the code argument is ERROR_MARK return cp_error_declarator.
1483 2007-07-09 Geoffrey Keating <geoffk@apple.com>
1486 * decl.c (cxx_init_decl_processing): Don't set
1487 force_align_functions_log.
1488 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
1489 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
1490 FUNCTION_DECL, return its alignment.
1492 2007-07-09 Richard Guenther <rguenther@suse.de>
1494 * decl.c (start_preparsed_function): Do not promote return type.
1496 2007-07-08 Paolo Carlini <pcarlini@suse.de>
1499 * pt.c (unify): Never pass error_mark_node to template_decl_level.
1501 2007-07-07 Mark Mitchell <mark@codesourcery.com>
1504 * pt.c (resolve_overloaded_unification): Robustify. Return a
1506 (type_unification_real): Adjust accordingly.
1508 2007-07-06 Richard Guenther <rguenther@suse.de>
1510 * init.c (build_new_1): Use the correct pointer type.
1511 * typeck2.c (build_m_component_ref): Likewise.
1513 2007-07-05 Mark Mitchell <mark@codesourcery.com>
1516 * init.c (build_zero_init): Always build an initializer for
1518 * typeck2.c (build_functional_cast): Use build_zero_init.
1521 * init.c (build_new_1): Always pass the allocation function to
1522 build_op_delete_call.
1523 * call.c (build_op_delete_call): Handle operator delete with a
1524 variable-argument list. Do not issue an error when no matching
1525 deallocation function is available for a new operator.
1528 * cp-tree.h (any_value_dependent_elements_p): Declare it.
1529 * decl.c (value_dependent_init_p): New function.
1530 (cp_finish_decl): Use it.
1531 * pt.c (value_dependent_expression_p): Use
1532 any_value_dependent_elements_p.
1533 * parser.c (cp_parser_primary_expression): Add comment about
1534 treating dependent qualified names as integral
1535 constant-expressions.
1537 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
1539 * decl.c (build_ptrmemfunc_type): Always use structural equality
1540 tests when comparing pointer-to-member-function types, because the
1541 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
1544 2007-07-03 Mark Mitchell <mark@codesourcery.com>
1546 * init.c (build_new): Tweak comment.
1548 2007-06-29 Dave Brolley <brolley@redhat.com>
1551 * parser.c (cp_parser_new_type_id): Don't reduce a named array
1552 type to its base type and number of elements here.
1553 * init.c (build_new): Call complete_type_or_else to ensure that the
1554 type is complete and to issue a diagnostic if it is not.
1555 (build_new_1): Don't call complete_type_or_else here.
1557 2007-07-03 Richard Guenther <rguenther@suse.de>
1560 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
1563 2007-07-02 Simon Baldwin <simonb@google.com>
1565 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
1566 for inner-style nested forward declarations that don't declare
1569 2007-07-02 Jakub Jelinek <jakub@redhat.com>
1572 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
1573 DECL_P in not a variable and appears more than once error messages.
1575 2007-07-01 Ollie Wild <aaw@google.com>
1577 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
1578 (select_decl): Remove function.
1579 (unqualified_namespace_lookup): Populate binding by calling
1580 ambiguous_decl. Remove select_decl call.
1581 (lookup_qualified_name): Remove select_decl call.
1582 * decl.c (lookup_and_check_tag): Check for ambiguous references.
1583 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
1584 generation when name lookup is ambiguous.
1586 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
1589 * init.c (build_new_1): Use structural equality on the copy of the
1592 2007-06-28 Geoffrey Keating <geoffk@apple.com>
1594 * decl2.c (determine_visibility): Implement
1595 flag_visibility_ms_compat effect on type info.
1596 * decl.c (cxx_init_decl_processing): Implement
1597 global effect of flag_visibility_ms_compat.
1599 2007-06-28 Geoffrey Keating <geoffk@apple.com>
1601 * decl2.c (start_objects): Mark constructor-running function
1604 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
1607 * decl.c (grokdeclarator): Reset friendp for member functions declared
1608 friend of their own class.
1610 2007-06-23 Mark Mitchell <mark@codesourcery.com>
1612 * decl2.c (determine_visibility): Don't look for dllexport here.
1613 (determine_visibility_from_class): Tidy.
1615 2007-06-18 Simon Baldwin <simonb@google.com>
1618 * parser.c (cp_parser_single_declaration): Added check for storage
1619 class other than sc_none in parsed declaration, and a flag to indicate
1620 if the call is part of an explicit template specialization parse.
1621 * (cp_parser_explicit_specialization): Specialization check flag added
1622 to call to cp_parser_single_declaration(), set true.
1623 * (cp_parser_template_declaration_after_export): Specialization check
1624 flag added to call to cp_parser_single_declaration(), set false.
1625 * pt.c (check_explicit_specialization): Added code to copy visiblity
1626 and linkage from the templated function to the explicit specialization.
1628 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1630 * typeck.c (build_binary_op): For templates build the
1631 expression in pieces to avoid the assert in build2_stat.
1632 (get_member_function_from_ptrfunc):
1633 Change over to using POINTER_PLUS_EXPR and convert
1634 the second operand to sizetype.
1635 * typeck2.c (build_m_component_ref): Likewise.
1636 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
1637 instead of PLUS_EXPR for pointers.
1638 (build_new_1): Likewise.
1639 (build_vec_delete_1): Likewise.
1640 (build_vec_delete): Likewise.
1641 * class.c (build_base_path): Likewise.
1642 (build_base_path): Likewise.
1643 (convert_to_base_statically): Likewise.
1644 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
1645 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
1646 instead of PLUS_EXPR.
1647 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
1648 instead of PLUS_EXPR for pointers.
1649 * call.c (build_special_member_call): Likewise.
1650 * rtti.c (build_headof): Likewise.
1651 Use sizetype instead of ptrdiff_type_node.
1652 (tinfo_base_init): Create a POINTER_PLUS_EXPR
1653 instead of PLUS_EXPR for pointers.
1654 * except.c (expand_start_catch_block): Do a
1655 NEGATIVE and then a POINTER_PLUS_EXPR instead
1657 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
1658 PLUS_EXPR on pointer types over to use
1659 POINTER_PLUS_EXPR and remove the conversion
1660 to the pointer types.
1661 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
1662 adding to a pointer type. Use size_int instead of
1663 ssize_int. Convert the index to sizetype before
1664 adding it to the pointer.
1666 2007-06-15 Mark Mitchell <mark@codesourcery.com>
1668 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
1669 (DECL_ANON_UNION_VAR_P): New macro.
1670 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
1671 than DECL_VAR_MARKED_P, to keep track of which variables we have
1673 * decl.c (redeclaration_error_message): Complain about redeclaring
1674 anonymous union members at namespace scope.
1675 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
1677 2007-06-14 Geoff Keating <geoffk@apple.com>
1679 * decl2.c (determine_visibility): Ensure that functions with
1680 hidden types as parameters are hidden.
1683 * decl2.c (determine_visibility): Remove duplicate code for
1686 2007-06-12 Ian Lance Taylor <iant@google.com>
1689 * init.c (avoid_placement_new_aliasing): New static function.
1690 (build_new_1): Call it.
1692 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
1694 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
1695 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
1697 2007-06-08 Jakub Jelinek <jakub@redhat.com>
1700 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
1701 on init, the non-decl cond operand and increment value.
1703 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
1706 * decl.c (check_initializer): Report an error when a brace enclosed
1707 initializer is used for a non-aggregate type in C++98.
1708 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
1710 (grokdeclarator): Likewise.
1711 (move_fn_p): Likewise.
1712 * typeck.c (check_return_expr): Likewise.
1713 * call.c (reference_binding): Likewise.
1714 * error.c (cp_cpp_error): Likewise.
1715 * pt.c (check_default_tmpl_args): Likewise.
1717 * lex.c (init_reswords): Likewise.
1718 * parser.c (p_parser_primary_expression): Likewise.
1719 (TOKEN_PRECEDENCE): Likewise.
1720 (cp_parser_init_declarator): Likewise.
1721 (cp_parser_ptr_operator): Likewise.
1722 (cp_parser_parameter_declaration): Likewise.
1723 (cp_parser_enclosed_template_argument_list): Likewise.
1724 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
1725 (cp_parser_next_token_ends_template_argument_p): Likewise.
1727 2007-06-04 Simon Baldwin <simonb@google.com>
1729 * decl.c (grokdeclarator): Readability change. Moved case labels
1730 into direct switch statement scope.
1732 2007-06-04 Paolo Carlini <pcarlini@suse.de>
1734 * call.c (convert_like_real): Remove pointless code.
1736 2007-05-31 Mark Mitchell <mark@codesourcery.com>
1738 * decl.c (get_atexit_fn_ptr_type): New function.
1739 (get_atexit_node): Use it.
1740 (start_cleanup_fn): Likewise.
1741 (register_dtor_fn): Use the object's destructor, instead of a
1742 separate cleanup function, where possible.
1743 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
1744 (atexit_fn_ptr_type_node): New macro.
1745 * decl2.c (build_cleanup): Use build_address.
1747 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
1749 * typeck.c (build_binary_op): Include types in error.
1751 2007-05-31 Jakub Jelinek <jakub@redhat.com>
1754 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
1755 needs runtime initialization.
1757 2007-05-31 Paolo Carlini <pcarlini@suse.de>
1760 * semantics.c (finish_trait_expr): Complete the types.
1762 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
1763 Douglas Gregor <doug.gregor@gmail.com>
1764 Pedro Lamarao <pedro.lamarao@mndfck.org>
1765 Howard Hinnant <howard.hinnant@gmail.com>
1769 * typeck.c (comptypes): Don't consider rvalue and lvalue
1770 reference types to be equivalent.
1771 (check_return_expr): Move from certain lvalues when returning
1773 * decl.c (grokdeclarator): Implement reference collapsing.
1774 (copy_fn_p): Don't consider constructors taking rvalue references
1775 to be copy constructors.
1777 * call.c (conversion): New "rvaluedness_matches_p" member.
1778 (convert_class_to_reference): Require reference type as first
1779 parameter instead of base type.
1780 (reference_binding): Add logic to handle rvalue references.
1781 (implicit_conversion): Update inaccurate comment.
1782 (convert_like_real): Disable creation of temporaries that are
1783 impossible to initialize for types with move constructors.
1784 (build_over_call): Elide move constructors when possible.
1785 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
1786 (maybe_handle_ref_bind): Return conversion instead of type node.
1787 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
1788 determine preferred conversion sequences.
1789 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
1790 (LOOKUP_PREFER_RVALUE): New.
1791 (DECL_MOVE_CONSTRUCTOR_P): New.
1792 (struct cp_declarator): Add "reference" member for reference
1793 types, with new "rvalue_ref" flag.
1794 (cp_build_reference_type): Declare.
1795 (move_fn_p): Declare.
1796 * error.c (dump_type_prefix): Format rvalue reference types
1797 correctly in error messages.
1798 * except.c (build_throw): Move from certain lvalues when
1800 * mangle.c (write_type): Mangle rvalue references differently
1801 than regular references.
1802 * parser.c (make_reference_declarator): Add boolean parameter for
1804 (cp_parser_make_indirect_declarator): New.
1805 (cp_parser_new_declarator_opt): Call
1806 cp_parser_make_indirect_declarator.
1807 (cp_parser_conversion_declarator_opt): Ditto.
1808 (cp_parser_declarator): Ditto.
1809 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
1811 * pt.c (tsubst): Implement reference collapsing.
1812 (maybe_adjust_types_for_deduction): Implement special template
1813 parameter deduction rule for rvalue references.
1814 (type_unification_real): Update calls to
1815 maybe_adjust_types_for_deduction.
1816 (try_one_overload): Ditto.
1817 (unify_pack_expansion): Ditto.
1818 * tree.c (lvalue_p_1): Handle rvalue reference types.
1819 (cp_build_reference_type): New.
1821 2007-05-30 Jakub Jelinek <jakub@redhat.com>
1824 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
1825 variables that need runtime initialization.
1827 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
1830 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
1831 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
1832 case POSTDECREMENT_EXPR>): Return the error_mark_node
1833 if either the real or imaginary parts would an
1836 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
1837 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1840 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
1841 token is a closing brace, false if there are no tokens left.
1842 (cp_parser_namespace_alias_definition): Only consume the next token if
1843 it is a closing brace.
1845 * parser.c (cp_parser_class_specifier): Likewise.
1847 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
1849 * semantics.c (finish_member_declaration): Fix a typo in the
1852 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
1864 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
1865 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
1866 * pt.c (check_for_bare_parameter_packs): Return bool indicated
1867 whether everything was okay. Fix indentation.
1868 (push_template_decl_real): Check for bare parameter packs in
1869 function parameters; where errors occur, mark the parameter types
1870 with ERROR_MARK_NODEs to avert ICEs.
1871 (coerce_template_parameter_pack): New.
1872 (coerce_template_parms): Moved parameter pack coercion into
1873 coerce_template_parameter_pack, and permit it anywhere in the
1874 template parameter list (not just at the end). Parameter and
1875 argument indices can vary (somewhat) separately now, so add
1876 PARM_IDX and ARG_IDX.
1877 (fn_type_unification): Don't set an argument pack as incomplete if
1878 no argument pack was deduced.
1879 (type_unification_real): If a type parameter is a parameter pack
1880 and has not otherwise been deduced, it will be deduced to an empty
1882 (more_specialized_fn): Use the actual lengths of the argument
1883 lists when comparing against expansions.
1884 * semantics.c (finish_member_declaration): If a field's type has
1885 bare parameter packs, error and set its type to ERROR_MARK_NODE.
1887 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
1890 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
1892 2007-05-22 Ollie Wild <aaw@google.com>
1894 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
1895 (unqualified_namespace_lookup): Adds check for hidden types.
1897 2007-05-22 Ollie Wild <aaw@google.com>
1899 * decl.c (duplicate_decls): Verify namespace names are unique.
1901 2007-05-21 Mark Mitchell <mark@codesourcery.com>
1903 * decl.c (cxx_maybe_build_cleanup): Handle
1904 __attribute__((cleanup)).
1906 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1908 * cvt.c (cp_convert_and_check): Don't check warnings if the
1911 2007-05-18 Geoffrey Keating <geoffk@apple.com>
1913 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
1915 2007-05-14 Paolo Carlini <pcarlini@suse.de>
1918 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
1919 type only if is a class type (5.2.8/4).
1921 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
1923 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1924 * decl.c (grokdeclarator): Use unsigned_type_for instead of
1925 c_common_unsigned_type.
1927 2007-05-11 Silvius Rus <rus@google.com>
1929 * cp/typeck.c (build_indirect_ref): Add call to
1930 strict_aliasing_warning.
1931 (build_reinterpret_cast_1): Condition call to
1932 strict_aliasing_warning.
1934 2007-05-11 Jan Hubicka <jh@suse.cz>
1936 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
1937 * decl2.c (start_objects): ctors and dtors are no longer public.
1938 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
1940 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
1942 * typeck.c (build_unary_op): Remove code that used to
1943 handle non lvalue increments/decrements.
1945 2007-05-07 Mike Stump <mrs@apple.com>
1947 * parser.c (check_empty_body): Add.
1948 (cp_parser_iteration_statement): Add call to check_empty_body.
1950 2007-05-05 Geoffrey Keating <geoffk@apple.com>
1953 * mangle.c (write_mangled_name): Mangle static variable names.
1954 (write_unqualified_name): Use local-source-name for
1955 namespace-scope static variables.
1957 2007-05-04 Dirk Mueller <dmueller@suse.de>
1959 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
1962 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
1965 * decl2.c (constrain_class_visibility):
1966 Use strip_pointer_or_array_types instead of strip_array_types.
1968 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
1971 * decl.c (reshape_init_r): Don't reshape the first element if it
1972 is a pointer to member function.
1974 2007-04-27 Simon Baldwin <simonb@google.com>
1976 * decl.c (grokparms): Changed message format from %qD to %qE.
1978 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
1980 * error.c (maybe_warn_variadic_templates): Variadic templates are
1981 now in C++0x, so only warn about them in C++98 mode.
1983 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
1986 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
1987 integeral types from vectors types.
1989 2007-04-26 Jakub Jelinek <jakub@redhat.com>
1992 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
1993 for type dependent OMP_CLAUSE_DECLs.
1995 2007-04-24 Mark Mitchell <mark@codesourcery.com>
1998 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
1999 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
2000 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
2001 * init.c (build_zero_init): Adjust, as
2002 COMPLEX_TYPE is now a SCALAR_TYPE.
2003 * typeck2.c (digest_init): Allow brace-enclosed initializers for
2004 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
2006 2007-04-25 Paolo Carlini <pcarlini@suse.de>
2008 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
2009 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
2010 (trait_expr_value): Adjust.
2012 2007-04-23 Simon Baldwin <simonb@google.com>
2014 * decl.c (grokparms): Added new error for duplicate function
2015 parameters names in function prototypes, to match gcc behavior.
2017 2007-04-23 Jan Hubicka <jh@suse.cz>
2019 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
2022 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
2024 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
2025 instead of checking GIMPLE_STMT_P in chain_next.
2027 2007-04-17 Mark Mitchell <mark@codesourcery.com>
2030 * call.c (convert_for_arg_passing): Convert bitfields to their
2033 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
2036 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
2038 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
2041 * cp/decl2.c (constrain_class_visibility):
2042 Do not warn about the use of anonymous namespace in the main input file.
2044 2007-04-15 Mark Mitchell <mark@codesourcery.com>
2046 * cp-tree.h (current_template_parms): Fix typo in comment.
2048 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
2050 * cp-tree.h, error.c: Fix comment typos.
2052 2007-04-13 Jason Merrill <jason@redhat.com>
2055 * call.c (reference_binding): Add c_cast_p parm. If true,
2056 add quals to TO as needed to make it reference-compatible.
2058 2007-04-11 Jan Hubicka <jh@suse.cz>
2060 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
2061 that we are not processing template_decl.
2063 2007-04-09 Mark Mitchell <mark@codesourcery.com>
2066 * class.c (build_base_path): Ensure that the converted pointer has
2067 the same cv-qualification as the input.
2069 2007-04-09 Paolo Carlini <pcarlini@suse.de>
2071 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
2073 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
2075 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
2077 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
2078 * tree.c (cp_add_pending_fn_decls): Remove.
2079 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
2081 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
2083 Revert change removing staticp.
2085 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
2087 * cp-objcp-common.c (cxx_staticp): Remove.
2088 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
2089 * cp-tree.h (cxx_staticp):
2091 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
2093 * class.c (check_for_override): Don't remove dllmport attribute
2096 2007-04-03 Jakub Jelinek <jakub@redhat.com>
2099 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
2100 type issue error and return early.
2102 2007-03-30 Jason Merrill <jason@redhat.com>
2105 * typeck.c (cp_type_readonly): New fn.
2106 * cp-tree.h: Declare it.
2107 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
2108 (cp_finish_decl): Not here.
2110 2007-03-31 Richard Guenther <rguenther@suse.de>
2112 * optimize.c (maybe_clone_body): Replace splay-tree usage by
2115 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
2120 * parser.c (declarator_can_be_parameter_pack): New.
2121 (cp_parser_template_parameter): Only parse the `...' if the
2122 declarator can be a parameter pack.
2123 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
2125 * pt.c (find_parameter_packs_r): Look into the bounds on integer
2126 types (they could be used as array bounds).
2127 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
2128 (tsubst_pack_expansion): Handle failure to expand parameter
2131 2007-03-30 Paolo Carlini <pcarlini@suse.de>
2134 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
2135 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
2136 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
2137 (CLASS_TYPE_NON_UNION_P): Add.
2138 (struct lang_type_class): Add has_complex_dflt.
2139 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
2140 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
2141 * cp-tree.def: Add TRAIT_EXPR.
2142 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
2143 * lex.c (struct resword): Add __has_nothrow_assign,
2144 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
2145 __has_trivial_constructor, __has_trivial_copy,
2146 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
2147 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
2148 __is_pod, __is_polymorphic, __is_union.
2149 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
2150 (cp_parser_trait_expr): New.
2151 * semantics.c (finish_trait_expr, trait_expr_value
2152 classtype_has_nothrow_copy_or_assign_p): New.
2153 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
2155 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
2156 * class.c (check_bases, check_field_decl, check_bases_and_members):
2157 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
2158 * pt.c (uses_template_parms, tsubst_copy_and_build,
2159 value_dependent_expression_p, type_dependent_expression_p): Deal with
2161 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
2163 2007-03-29 Richard Guenther <rguenther@suse.de>
2165 * tree.c (cp_walk_subtrees): Do not set input_location.
2167 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
2170 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
2173 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
2175 * parser.c (struct cp_parser): Update comment for
2176 greater_than_is_operator_p.
2177 (cp_parser_primary_expression): In C++0x mode, a cast operator can
2178 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
2179 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
2180 !GREATER_THAN_IS_OPERATOR_P.
2181 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
2182 `>>' operators that will become two `>' tokens in C++0x.
2183 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
2184 mode, allowing it to terminate default arguments.
2185 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
2186 `>>' like two consecutive `>' tokens.
2187 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
2188 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
2189 ends a template argument.
2191 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
2193 * decl.c (redeclaration_error_message): Complain when redeclaring
2194 a friend function with default template arguments (C++0x mode only).
2195 * cp-tree.h (check_default_tmpl_args): Declare.
2196 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
2197 template arguments in function templates. Add support for checking
2198 the default template arguments of friend templates.
2199 (push_template_decl_real): Fix call to check_default_tmpl_args.
2200 (type_unification_real): If a template parameter has not been
2201 deduced but provides a default template argument, substitute into
2202 that default template argument.
2203 * parser.c (cp_parser_init_declarator): When declaring (but not
2204 defining!) a function template in C++0x mode, check for default
2207 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
2210 * decl.c (grokdeclarator): Deal with cv-qualified function type
2211 typedefs in the same way for member and non-member functions.
2213 2007-03-26 Dirk Mueller <dmueller@suse.de>
2215 * parser.c (cp_parser_member_declaration): Pedwarn
2216 about stray semicolons after member declarations.
2218 2007-03-26 Paolo Carlini <pcarlini@suse.de>
2221 * pt.c (instantiate_decl): Set in_system_header.
2223 2007-03-22 Mark Mitchell <mark@codesourcery.com>
2225 * cp-tree.h (current_tempalte_parms): Improve documentation.
2226 * pt.c (current_template_args): Likewise.
2229 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
2230 not consume tokens when failing.
2232 2007-03-22 Jim Wilson <wilson@specifix.com>
2233 Mark Mitchell <mark@codesourcery.com>
2236 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
2237 consistent with FROM.
2239 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2241 * error.c (dump_expr): Handle dependent names that designate types.
2242 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
2244 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
2246 * cp-tree.def, parser.c, pt.c: Fix comment typos.
2248 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2250 * cvt.c (cp_convert_and_check) : Define.
2251 * cp-tree.h (cp_convert_and_check): Declare.
2252 * call.c (convert_conversion_warnings): Rename to
2253 conversion_null_warnings. The warning for floating-point to
2254 integer is handled by convert_and_check in convert_like_real.
2255 (convert_like_real): convert_conversion_warnings was renamed as
2256 conversion_null_warnings.
2257 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
2258 overflow and changes of value during conversion.
2260 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2263 * parser.c (cp_parser_statement): If 'namespace' is found, this
2264 only can be a namespace alias definition, so parse it now.
2265 (cp_parser_namespace_alias_definition): if we find an open brace
2266 instead of '=', then this is actually a misplaced namespace
2269 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2272 * decl.c (cxx_init_decl_processing): Move command-line options
2273 processing to c-opts.c.
2275 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
2277 * ptree.c (cxx_print_type): Use formatting markup for integers
2278 when printing template parameter index/level/orig level.
2279 (cxx_print_xnode): Ditto.
2280 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
2281 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
2282 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
2284 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
2285 rather than a HOST_WIDE_INT.
2286 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
2287 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
2289 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
2290 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
2291 IN_BASE_INITIALIZER bool bitfields.
2292 (struct cp_declarator): Make KIND a 4-bit field. Make
2293 PARAMETER_PACK_P a bool bitfield just after KIND.
2294 * pt.c (uses_parameter_packs): Destroy the pointer set.
2295 (make_pack_expansion): Ditto.
2296 (check_for_bare_parameter_packs): Ditto.
2297 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
2299 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
2302 * call.c (convert_default_arg): Instead of copying the node,
2305 2007-03-15 Dirk Mueller <dmueller@suse.de>
2308 * call.c (convert_conversion_warnings): New..
2309 (convert_like_real): .. factored out from here.
2310 (convert_conversion_warnings): Add warning about
2311 false being converted to NULL in argument passing.
2313 2007-03-14 Dirk Mueller <dmueller@suse.de>
2315 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
2316 (finish_do_body): Warn about empty body in do/while statement.
2318 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2320 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
2322 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2325 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
2328 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
2330 * cp/repo.c (init_repo): Initialize random_seed saved options.
2331 (finish_repo): Adjust.
2333 2007-03-13 Mark Mitchell <mark@codesourcery.com>
2336 * Make-lang.in (doc/g++.1): Use $< to specify the location from
2339 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
2341 * decl.c (compute_array_index_type): New warning flag warn_vla.
2343 2007-03-12 Mark Mitchell <mark@codesourcery.com>
2346 * call.c (convert_default_arg): Copy non-constant arguments.
2348 2007-03-11 Mark Mitchell <mark@codesourcery.com>
2351 * parser.c (cp_parser_postfix_expression): Disallow compound
2352 literals in constant expressions.
2355 * semantics.c (finish_typeof): Use unlowered_expr_type.
2357 2007-03-10 Mark Mitchell <mark@codesourcery.com>
2360 * cp-tree.h (unlowered_expr_type): New function.
2361 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
2362 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
2363 (unlowered_expr_type): New function.
2364 (build_unary_op): Disallow predecrements of bool bitfields.
2365 * call.c (build_conditional_expr): Use unlowered_expr_type.
2366 * pt.c (type_unification_real): Likewise.
2368 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
2371 * typeck.c (check_return_expr): Check for bare parameter packs.
2372 (comptypes): Compare template parameter packs and
2373 type pack expansions.
2374 * decl.c (grokdeclarator): Deal with the declaration of function
2376 (grokparms): Verify that the (optional) function parameter pack is
2377 at the end of the parameter list.
2378 (xref_basetypes): Handle pack expansions in the base class.
2379 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
2380 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
2381 (NONTYPE_ARGUMENT_PACK): New.
2382 (TYPE_PACK_EXPANSION): New.
2383 (EXPR_PACK_EXPANSION): New.
2384 (ARGUMENT_PACK_SELECT): New.
2385 * cp-objcp-common.c (cp_tree_size): Compute size of
2386 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
2387 ARGUMENT_PACK_SELECT.
2388 * error.c (dump_template_argument): Print template argument packs.
2389 (dump_template_argument_list): Ditto.
2390 (dump_template_parameter): Dump `...' for template type parameter
2392 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
2393 (dump_parameters): Print function parameter packs.
2394 (dump_template_parms): Print template argument packs.
2395 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
2396 (maybe_warn_variadic_templates): New.
2397 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
2398 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
2399 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
2401 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
2402 (write_template_arg): Write argument packs as separate arguments.
2403 * cp-tree.h (struct template_parm_index_s): Add flag that
2404 indicates that the template parameter is actually a parameter
2406 (struct tree_argument_pack_select): New.
2407 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
2408 (union lang_tree_node): Add argument_pack_select.
2409 (FUNCTION_PARAMETER_PACK_P): New.
2410 (PACK_EXPANSION_P): New.
2411 (PACK_EXPANSION_PATTERN): New.
2412 (SET_PACK_EXPANSION_PATTERN): New.
2413 (PACK_EXPANSION_PARAMETER_PACKS): New.
2414 (ARGUMENT_PACK_P): New.
2415 (ARGUMENT_PACK_ARGS): New.
2416 (SET_ARGUMENT_PACK_ARGS): New.
2417 (ARGUMENT_PACK_INCOMPLETE_P): New.
2418 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
2419 (TEMPLATE_PARM_PARAMETER_PACK): New.
2420 (TEMPLATE_TYPE_PARAMETER_PACK): New.
2421 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
2422 (ARGUMENT_PACK_SELECT_INDEX): New.
2423 (ARGUMENT_PACK_SELECT_ARG): New.
2424 (struct cp_declarator): Add parameter_pack_p flag.
2425 (maybe_warn_variadic_templates): Declare.
2426 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
2427 indicate a template parameter pack.
2428 (uses_parameter_packs): Declare.
2429 (template_parameter_pack_p): Declare.
2430 (template_parms_variadic_p): Declare.
2431 (make_pack_expansion): Declare.
2432 (check_for_bare_parameter_packs): Declare.
2433 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
2434 sizeof... expressions.
2435 (pp_cxx_expression): Print pack expansions and non-type argument
2437 (pp_cxx_exception_specification): Print pack expansions.
2438 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
2439 (pp_cxx_ctor_initializer): Print pack expansions.
2440 (pp_cxx_type_id): Print pack expansions.
2441 (pp_cxx_template_argument_list): Print argument packs.
2442 (pp_cxx_template_parameter): Print ellipsis for template parameter
2444 * pt.c (comp_template_parms): Compare template parameter packs.
2445 (template_parameter_pack_p): New.
2446 (template_parms_variadic_p): New.
2447 (template_args_variadic_p): New.
2448 (make_ith_pack_parameter_name): New.
2449 (struct find_parameter_pack_data): New.
2450 (find_parameter_packs_r): New.
2451 (uses_parameter_packs): New.
2452 (make_pack_expansion): New.
2453 (check_for_bare_parameter_packs): New.
2454 (expand_template_argument_pack): New.
2455 (reduce_template_parm_level): Propagate parameter pack flag.
2456 (process_template_parm): Add is_parameter_pack parameter to state
2457 when the parameter is actually a parameter pack. Create template
2458 parameter packs when is_parameter_pack is true.
2459 (current_template_args): The argument for a template parameter
2460 pack is an argument pack containing a single pack expansion.
2461 (process_partial_specialization): When checking that non-type
2462 argument expressions do not involve template parameters, loop over
2463 the arguments in argument packs separately.
2464 (push_template_decl_real): Check that the type of the declaration
2465 does not have any bare parameter packs. Check that primary
2466 templates have no more than one parameter pack, and that it comes
2467 at the end of the template parameter list.
2468 (convert_template_argument): Handle coercions for pack expansion
2469 expressions by coercing the pattern then rebuilding the expansion.
2470 (coerce_template_parms): When coercing the arguments for a
2471 variadic template, pack "extra" arguments into an argument pack.
2472 (coerce_template_template_parms): Cannot coerce between parameter
2473 packs and non-pack parameters.
2474 (template_args_equal): Compare PACK_EXPANSION_P expressions.
2475 (comp_template_args): Expand all template arguments packs before
2476 comparing template argument lists.
2477 (mangle_class_name_for_template): Make argument packs as separate
2479 (for_each_template_parm_r): No need to handle BASELINK.
2480 (instantiate_class_template): Handle pack expansions in the base
2482 (tsubst_pack_expansion): New.
2483 (tsubst_template_args): Handle substitutions of argument packs and
2484 pack expansion into template argument lists.
2485 (tsubst_decl): Expand function parameter packs into separate
2486 function parameters.
2487 (tsubst_arg_types): Expand a type pack expansion into separate
2489 (tsubst_exception_specification): Handle pack expansions in
2490 exception specifiers.
2491 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
2492 replacing a template parameter with its argument. If we encounter
2493 a substitution for an argument pack, just return the parameter
2495 (tsubst_copy): sizeof(X...) returns the number of elements in
2496 parameter pack X. See through ARGUMENT_PACK_SELECT when the
2497 PARM_DECL is a parameter pack.
2498 (tsubst_expr): Expression pack expansions and argument packs
2499 cannot show up here; they will all be handled through function
2500 calls, sizeof, and template argument lists.
2501 (tsubst_copy_and_build): sizeof(X...) returns the number of
2502 elements in parameter pack X. Handle pack expansions in TREE_LIST
2503 and CONSTRUCTOR nodes.
2504 (fn_type_unification): Handle "incomplete" explicit template
2505 argument lists that specify some of the arguments for a template
2507 (type_unification_real): Unify arguments against pack expansions.
2508 (template_parm_level_and_index): New, helper function.
2509 (unify_pack_expansion): New.
2510 (unify): Unify argument packs on an argument-by-argument basis,
2511 handling variadic argument packs as well.
2512 (more_specialized_fn): Handle unification of function parameter
2513 packs. All things being equal, prefer non-variadic function
2514 templates to variadic function templates.
2515 (more_specialized_class): Prefer the variadic class template
2516 partial specialization that binds fewer arguments to a parameter
2518 (regenerate_decl_from_template): Expand function parameter packs
2519 into separate parameters.
2520 (instantiate_decl): Ditto.
2521 (tsubst_initializer_list): Handle pack expansions for base-class
2523 (dependent_type_p_r): Determine dependent types in argument packs
2524 and pack expansions.
2525 (value_dependent_expression_p): Determine value-dependence of
2526 non-type argument packs.
2527 (dependent_template_arg_p): Handle argument packs.
2528 * semantics.c (finish_cond): Check for bare parameter packs.
2529 (finish_expr_stmt): Ditto.
2530 (finish_for_expr): Ditto.
2531 (finish_switch_cond): Ditto.
2532 (finish_mem_initializers): Ditto.
2533 * name-lookup.c (arg_assoc_type): Handle pack expansions and
2535 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
2536 * parser.c (make_declarator): Declarator is not an expansion.
2537 (make_pointer_declarator): Transfer parameter pack flag to outer
2539 (make_reference_declarator): Ditto.
2540 (make_ptrmem_declarator): Ditto.
2541 (make_call_declarator): Ditto.
2542 (make_array_declarator): Ditto.
2543 (cp_parser_postfix_expression): Allow pack expansion expressions
2544 in the argument list for a call expression.
2545 (cp_parser_parenthesized_expression_list): Add new parameter
2546 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
2547 into separate arguments."
2548 (cp_parser_new_placement): Allow pack expansion expressions.
2549 (cp_parser_new_initializer): Ditto.
2550 (cp_parser_mem_initializer_list): Allow ellipsis to create a
2551 base-class initializer expansion.
2552 (cp_parser_mem_initializer): Ditto.
2553 (cp_parser_template_parameter_list): Keep track of whether the
2554 template parameter is a template parameter pack.
2555 (cp_parser_template_parameter): Parse the ellipsis to indicate a
2556 template parameter pack.
2557 (cp_parser_type_parameter): Ditto.
2558 (cp_parser_template_argument_list): Parse the ellipsis to indicate
2560 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
2561 this declarator is a parameter pack.
2562 (cp_parser_parameter_declaration): The ellipsis does not end the
2563 parameter declaration, because it might be a parameter pack. Parse
2564 the ellipsis to indicate a parameter pack.
2565 (cp_parser_initializer): Allow pack expansions.
2566 (cp_parser_initializer_list): Allow ellipsis to create an
2567 initializer expansion.
2568 (cp_parser_base_clause): Allow ellipsis to create a base specifier
2570 (cp_parser_type_id_list): Allow ellipsis to create an exception
2571 specifier expansion.
2572 (cp_parser_attribute_list): Don't allow pack expansions.
2573 (cp_parser_functional_cast): Allow pack expansions.
2574 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
2575 compute the length of a parameter pack.
2576 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
2577 end a template argument.
2578 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
2579 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
2582 2007-03-09 Dirk Mueller <dmueller@suse.de>
2584 * cp/call.c (build_new_op): Call warn_logical_operator.
2586 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
2589 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
2592 * pt.c (any_template_arguments_need_structural_equality_p):
2595 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
2597 * decl.c (grokdeclarator): Disable warnings for anonymous
2600 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
2602 * typeck2.c (readonly_error): Always emit a hard error.
2603 Remove last argument.
2604 * cp-tree.h (readonly_error): Adjust prototype.
2605 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
2606 * typeck.c (build_unary_op): Likewise.
2607 (build_modify_expr): Likewise.
2609 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
2612 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
2614 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2617 * parser.c (struct cp_parser): New IN_IF_STMT.
2618 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
2619 returning if parsing the body of an 'if' statement or issuing an
2620 error and continuing.
2621 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
2623 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
2625 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
2628 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
2631 2007-03-02 Geoffrey Keating <geoffk@apple.com>
2633 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
2634 Objective-C++. Don't exit early if -shared-libgcc needs to be
2637 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2639 * typeck.c (common_base_type): Delete unused function.
2641 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2643 * Make-lang.in: Add dummy lang.install-pdf target.
2645 2007-03-01 Simon Baldwin <simonb@google.com>
2648 * decl.c (check_tag_decl): Added new warning for typedef ignored
2649 when it precedes an otherwise valid non-typedef declaration.
2651 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
2653 * typeck.c (build_function_call): Store converted arguments
2654 in a stack-allocated array instead of building a list.
2655 (convert_arguments): Store arguments in the array passed in as an
2656 argument, and return the actual number of arguments.
2657 * call.c (build_call): Delete, and replace with...
2658 (build_call_n, build_call_a): New.
2659 (build_op_delete_call): Rewrite to avoid constructing argument lists.
2660 (build_over_call): Store converted arguments in a stack-allocated
2661 array instead of building a list.
2662 (build_cxx_call): Pass arguments in an array instead of as a list.
2663 (build_java_interface_fn_ref): Rewrite to avoid constructing
2665 * tree.h: Update declarations to reflect above changes.
2666 * method.c (use_thunk): Use a stack-allocated array to hold
2667 the arguments instead of a list.
2668 * rtti.c (throw_bad_cast): Update call to cxx_call.
2669 (throw_bad_typeid): Likewise.
2670 (build_dynamic_cast_1): Likewise.
2671 * init.c (build_builtin_delete_call): Use build_call_n.
2672 * decl.c (expand_static_init): Likewise.
2673 * except.c (cp_protect_cleanup_actions): Likewise.
2674 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
2675 (gimplify_must_not_throw_expr): Likewise.
2676 (cxx_omp_apply_fn): Use build_call_a.
2678 2007-02-26 Mark Mitchell <mark@codesourcery.com>
2680 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
2681 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
2683 2007-02-25 Mark Mitchell <mark@codesourcery.com>
2685 * cp-tree.h (static_ctors): Remove.
2686 * cp-tree.h (static_dtors): Likewise.
2687 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
2688 refactoring of tree_map hierarchy.
2689 (decl_shadowed_for_var_insert): Likewise.
2690 * semantics.c (expand_body): Use c_expand_body.
2691 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
2692 * decl2.c (static_ctors): Remove.
2693 (static_dtors): Likewise.
2694 (generate_ctor_or_dtor_function): Pass NULL_TREE to
2695 objc_generate_static_init_call. Do not call static_[cd]tors.
2696 (generate_ctor_and_dtor_functions_for_priority): Do not check for
2698 (cp_write_global_declarations): Likewise.
2700 2007-02-23 Richard Guenther <rguenther@suse.de>
2702 * class.c (note_name_declared_in_class): Make declaration
2703 changes meaning a pedwarn.
2705 2007-02-22 Michael Matz <matz@suse.de>
2708 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
2709 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
2710 dump_function_decl): Guard emitting outer scopes by new flag.
2711 * cp-lang.c (cxx_dwarf_name): New function.
2712 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
2713 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
2715 (push_template_decl_real, lookup_template_class): Remove calls
2718 2007-02-19 Mark Mitchell <mark@codesourcery.com>
2720 * call.c (build_new_method_call): Ensure that explicit calls of
2721 destructors have type "void".
2723 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2725 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
2726 and -Walways-true with -Waddress.
2727 * cvt.c (convert_to_void): Replace unconditional warning with
2730 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
2732 * decl.c, tree.c: Fix comment typos.
2734 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
2737 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
2738 statement expression if we had an error mark node.
2740 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
2741 Brooks Moses <brooks.moses@codesourcery.com>
2742 Lee Millward <lee.millward@codesourcery.com>
2744 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
2745 Change class to tcc_vl_exp.
2747 * call.c (build_call): Use build_call_list instead
2749 (build_over_call): Likewise.
2750 (build_new_method_call): Use build_min_non_dep_call_list
2751 instead of build_min_non_dep.
2753 * error.c (dump_call_expr_args): New function.
2754 (dump_aggr_init_expr_args): New function.
2755 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
2756 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
2758 * cvt.c (convert_to_void): Use build_call_array instead
2759 of build3; use new AGGR_INIT_EXPR accessor macros.
2761 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
2762 instead of TREE_CODE_LENGTH.
2764 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
2765 AGGR_INIT_EXPR accessor macros.
2767 * cp-gimplify.c (cp_gimplify_init_expr): Use
2768 AGGR_INIT_EXPR_SLOT to set the slot operand.
2770 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
2771 (AGGR_INIT_EXPR_SLOT): New macro.
2772 (AGGR_INIT_EXPR_ARG): New macro.
2773 (aggr_init_expr_nargs): New macro.
2774 (AGGR_INIT_EXPR_ARGP): New macro.
2775 (aggr_init_expr_arg_iterator): New.
2776 (init_aggr_init_expr_arg_iterator): New.
2777 (next_aggr_init_expr_arg): New.
2778 (first_aggr_init_expr_arg): New.
2779 (more_aggr_init_expr_args_p): New.
2780 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
2781 (stabilize_aggr_init): New declaration.
2782 (build_min_non_dep_call_list): Likewise.
2784 * tree.c (process_aggr_init_operands): New function.
2785 (build_aggr_init_array) New function.
2786 (build_cplus_new): Update to use new CALL_EXPR and
2787 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
2788 build_aggr_init_array.
2789 (build_min_non_dep_call_list) New function.
2790 (build_min_nt): Assert input code parameter is not a variable
2791 length expression class.
2792 (build_min, build_min_non_dep): Likewise.
2793 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
2794 to check for equality instead of recursing. Handle tcc_vl_exp
2796 (stabilize_call): Update to only handle CALL_EXPRs, not
2797 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
2798 (stabilize_aggr_init): New function.
2799 (stabilize_init): Use it.
2801 * cxx-pretty-print.c (pp_cxx_postfix_expression)
2802 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
2803 AGGR_INIT_EXPR accessor macros and argument iterators.
2805 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
2806 build_vl_exp. Iterate through the operands, recursively
2807 processing each one.
2808 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
2809 CALL_EXPR accessor macros.
2810 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
2811 tree code classes. Use TREE_OPERAND_LENGTH instead of
2814 * semantics.c (finish_call_expr): Use build_nt_call_list
2815 instead of build_nt.
2816 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
2817 accessor macros. Use build_call_array to construct the
2818 CALL_EXPR node instead of build3
2820 * decl2.c (build_offset_ref_call_from_tree): Use
2821 build_nt_call_list and build_min_non_dep_call_list instead
2822 of build_min_nt and build_min_non_dep.
2824 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
2825 Use build_nt_call_list instead of build_min_nt.
2827 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2830 * call.c (build_conditional_expr): Improve error message.
2832 2007-02-13 Dirk Mueller <dmueller@suse.de>
2834 * friend.c (do_friend): Annotate warning about friend
2835 declarations in templates with OPT_Wnon_template_friend.
2836 Convert informal message from warning() to inform().
2838 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
2839 Mark Mitchell <mark@codesourcery.com>
2842 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
2843 instantiations for variables.
2845 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2848 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
2849 Check warn_unused_value just once.
2851 2007-02-11 Mark Mitchell <mark@codesourcery.com>
2854 * pt.c (determine_specialization): Use skip_artificial_parms_for.
2855 (fn_type_unificiation): Likewise.
2856 (get_bindings): Likewise.
2858 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
2861 * decl.c (finish_function): Use DECL_REPLACEABLE.
2862 * tree.c (cp_cannot_inline_tree_fn): Likewise.
2864 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
2866 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
2868 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
2870 * decl.c (grokvardecl): Don't error if !have_tls.
2871 (grokdeclarator): Likewise.
2872 * parser.c (cp_parser_omp_threadprivate): Likewise.
2874 2007-02-07 Jakub Jelinek <jakub@redhat.com>
2877 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
2878 parameters and result decls in omp clauses.
2879 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
2882 2007-02-05 Dirk Mueller <dmueller@suse.de>
2885 * parser.c (cp_parser_class_specifier): Always initialize bases.
2887 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
2889 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
2890 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
2891 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
2893 * semantics.c (finish_omp_atomic): Store a whole expression node
2894 in operand 1, and integer_zero_node in operand 0, for dependent
2895 OMP_ATOMIC. Rewrite to make flow easier to understand.
2897 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2899 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
2901 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
2903 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
2904 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
2906 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
2908 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
2909 keyword warning to -Wc++0x-compat.
2911 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2913 * decl.c (grokdeclarator): Update documentation.
2915 2007-02-02 Jakub Jelinek <jakub@redhat.com>
2918 * decl.c (grokdeclarator): If __thread is used together with
2919 a storage class other than extern and static, clear thread_p
2920 after issuing diagnostics and fall through to checking the
2923 2007-01-30 Roger Sayle <roger@eyesopen.com>
2925 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
2926 calculating the size of an array (to avoid recursive errors).
2928 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2931 * typeck.c (build_binary_op): Fix logic for warning. Move warning
2933 * call.c (convert_like_real): Don't warn when converting to
2936 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2938 * decl.c (pop_label): Replace warning with call to
2939 warn_for_unused_label.
2941 2007-01-28 Andrew Pinski <pinskia@gmail.com>
2944 * semantics.c (finish_pseudo_destructor_expr): Check the
2945 destrutor name by calling check_dtor_name.
2947 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
2949 * lex.c (D_CPP0X): Rename.
2951 (reswords): D_CPP0X -> D_CXX0X.
2952 (init_reswords): Ditto.
2953 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
2954 of C++0x keywords as identifiers.
2956 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
2959 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
2962 2007-01-23 Ian Lance Taylor <iant@google.com>
2964 * typeck.c (convert_for_assignment): Only warn about a = b = c
2965 when converting to bool.
2967 2007-01-23 Roger Sayle <roger@eyesopen.com>
2969 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
2971 * typeck.c (ignore_overflows): Remove the remaining uses of
2972 TREE_CONSTANT_OVERFLOW.
2974 2007-01-20 Jan Hubicka <jh@suse.cz>
2976 * decl2.c (start_objects, start_static_storage_duration_function):
2977 Do not make the functions uninlinable.
2979 2007-01-17 Ian Lance Taylor <iant@google.com>
2981 * class.c (add_method): Call VEC_reserve_exact rather than passing
2982 a negative size to VEC_reserve.
2984 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
2987 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
2989 2007-01-10 Mark Mitchell <mark@codesourcery.com>
2992 * decl.c (make_typename_type): If the qualified name is not a
2993 type, issue an error.
2994 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
2997 2007-01-08 Geoffrey Keating <geoffk@apple.com>
2999 * rtti.c: Include target.h.
3000 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
3001 don't emit typeinfo for fundamental types as weak.
3002 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
3004 2007-01-08 Richard Guenther <rguenther@suse.de>
3006 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
3008 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
3010 * call.c (standard_conversion): Pass flag to
3011 vector_types_convertible_p to disallow emission of note.
3012 * typeck.c (convert_for_assignment): Pass flag to
3013 vector_types_convertible_p to allow emission of note.
3014 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
3015 to disallow emission of note.
3017 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3020 * typeck.c (build_binary_op): Call overflow_warning if
3021 TREE_OVERFLOW_P is true for the result and not for any of the
3024 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
3027 * class.c (add_method): Don't wait until template
3028 instantiation time to complain about duplicate methods.
3030 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3033 * semantics.c (finish_unary_op_expr): Warn only if result
3034 overflowed and operands did not.
3036 2007-01-05 Ian Lance Taylor <iant@google.com>
3038 * typeck.c (build_binary_op): Warn about comparing a non-weak
3041 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
3043 * pt.c (tsubst): Propagate the need for structural equality checks
3044 when reducing the level of template parameters.
3046 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
3048 * pt.c: Fix a comment typo.
3050 2007-01-02 Ian Lance Taylor <iant@google.com>
3052 * semantics.c (maybe_convert_cond): Optionally warn when using an
3053 assignment as a condition.
3054 * typeck.c (convert_for_assignment): Optionally warn about
3055 assigning the result of an assignment to a bool.
3057 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
3059 * pt.c (canonical_template_parms): Correct typo in comment.
3061 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
3063 * typeck.c (structural_comptypes): Renamed from "comptypes".
3064 (comptypes): Use canonical type information to perform fast type
3065 comparison. When VERIFY_CANONICAL_TYPES, verify that the
3066 canonical type comparison returns the same results as we would see
3067 from the current, structural check. Support COMPARE_STRUCTURAL
3068 when we need structural checks.
3069 * decl.c (typename_compare): Fix comment.
3070 (build_typename_type): TYPENAME_TYPE nodes require structural
3071 equality checks, because they resolve different based on the
3073 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
3074 require structural equality checks (for now).
3075 (build_ptrmemfunc_type): Build the canonical pointer to member
3077 (compute_array_index_type): Whenever we build a new index type
3078 to represent the size of an array in a template, we need to mark
3079 this index type as requiring structural equality. This goes for
3080 arrays with value-dependent sizes with the current ABI, or all
3082 * tree.c (cplus_array_hash): New.
3083 (struct cplus_array_info): New.
3084 (cplus_array_compare): New.
3085 (cplus_array_htab): New.
3086 (build_cplus_array_type_1): Use a hash table to cache the array
3087 types we build. Build the canonical array type for each array
3089 (cp_build_qualified_type_real): When building a cv-qualified array
3090 type, use the hash table of array types and build canonical array
3092 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
3093 use structural equality (for now).
3094 * cp-tree.h (COMPARE_STRUCTURAL): New.
3095 * pt.c (canonical_template_parms): New.
3096 (canonical_type_parameter): New.
3097 (process_template_parm): Find the canonical type parameter.
3098 (lookup_template_class): When we have named the primary template
3099 type, set the canonical type for our template class to the primary
3100 template type. If any of the template arguments need structural
3101 equality checks, the template class needs structural equality
3103 (tsubst): When reducing the level of a template template
3104 parameter, we require structural equality tests for the resulting
3105 parameter because its template parameters have not had their types
3106 canonicalized. When reducing a template type parameter, find the
3107 canonical reduced type parameter.
3108 (any_template_arguments_need_structural_equality_p): New.