1 2008-09-04 Ian Lance Taylor <iant@google.com>
3 * parser.c (check_no_duplicate_clause): Change code parameter to
6 2008-09-03 Jakub Jelinek <jakub@redhat.com>
9 * decl.c (cp_finish_decl): Only set
10 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
13 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
15 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
16 deferred_mark_used_calls vector and exit early.
17 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
19 (finish_function): Set defer_mark_used_calls for the duration of the
20 function. Call mark_used on any queued decls.
22 2008-09-02 Jason Merrill <jason@redhat.com>
25 * call.c (build_over_call): Make =delete work with SFINAE.
26 * class.c (resolve_address_of_overloaded_function): Likewise.
28 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
29 threadprivate_or_deleted_p.
30 (CP_DECL_THREADPRIVATE_P): Adjust.
31 (DECL_DELETED_FN): Likewise.
32 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
33 (SD_DELETED): New macro.
34 * parser.c (cp_parser_init_declarator): Use them.
35 * decl.c (start_decl): Use them.
37 * decl2.c (mark_used): Give =deleted error even in sizeof.
39 * typeck2.c (check_narrowing): Downgrade narrowing error to
42 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
44 * typeck.c (build_array_ref): Use new location argument.
45 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
46 * call.c (build_new_op): Same.
47 * decl2.c (grok_array_decl): Same.
48 * cp-tree.h (build_array_ref): Add location argument to prototype.
50 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
52 * typeck.c (build_x_indirect_ref): Add location argument.
53 * class.c (build_base_path): Pass location to build_indirect_ref.
54 * pt.c (tsubst_copy_and_build): Pass location to
55 finish_label_address_expr.
56 * parser.c (cp_parser_unary_expression): Same.
58 2008-08-31 Jason Merrill <jason@redhat.com>
60 Implement late-specified return type using 'auto'.
61 * cp-tree.h (struct cp_declarator): Add late_return_type field to
63 * parser.c (cp_parser_late_return_type_opt): New fn.
64 (cp_parser_direct_declarator): Use it.
65 (make_call_declarator): Put it in the declarator.
66 * decl.c (grokdeclarator): Splice in late-specified return type.
67 * pt.c (splice_late_return_type): New fn.
69 2008-08-29 Michael Meissner <gnu@the-meissners.org>
71 * decl.c (builtin_function_1): Take a bool argument to decide
72 whether to use pushdecl or pushdecl_top_level.
73 (duplicate_decls): Copy function specific target and optimization
74 options on duplicate declarations.
75 (cxx_builtin_function): Update builtin_function_1 call.
76 (cxx_builtin_function_ext_scope): New function, guarantee that the
77 declaration is done at global scope.
79 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
80 macro, define builtin function hook for delayed machine specific
83 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
85 2008-08-30 Jason Merrill <jason@redhat.com>
88 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
90 2008-08-29 Jason Merrill <jason@redhat.com>
92 Implement C++0x 'auto' semantics.
93 * decl.c (start_decl_1): Don't complain about auto being incomplete.
94 (cp_finish_decl): Deduce auto.
95 * init.c (build_new): Handle 'new auto'.
96 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
97 message for auto than for normal template type parms.
98 * pt.c (type_dependent_expression_p): Handle { }.
99 (make_auto): New function.
100 (listify_autos): New function.
101 (do_auto_deduction): New function.
102 (is_auto): New function.
103 (type_uses_auto): New function.
104 * cp-tree.h: Declare them.
105 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
106 treat auto as a declspec.
107 (cp_parser_simple_type_specifier): It's a type-specifier.
109 2008-08-29 Mark Mitchell <mark@codesourcery.com>
111 * mangle.c (write_type): Add target-specific manglings for
112 non-fundamental types to the substitution table.
115 2008-08-29 Jakub Jelinek <jakub@redhat.com>
119 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
120 Adjust debug_hooks->imported_module_or_decl callers.
122 2008-08-29 Jan Hubicka <jh@suse.cz>
124 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
126 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
129 * decl.c (reshape_init_r): Check init for error_mark_node.
131 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
134 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
135 (finish_return_stmt): Likewise.
136 (finish_switch_condition): Likewise.
138 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
140 * cp-tree.h: Fix #error directive.
142 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
144 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
145 usual arithmetic conversions on scoped enumeration types.
146 (common_type): Ditto.
147 (default_conversion): Don't perform integral promotions on scoped
149 (build_array_ref): Scoped enumeration types can't be used as
151 * decl.c (start_enum): If building a C++0x scoped enumeration,
152 enter its scope. If provided with an underlying type, check that
153 underlying type and set up the enumeration type accordingly.
154 (finish_enum): Only compute an underlying type if the underlying
155 type isn't already fixed, and only convert the enumerator values
156 now if we've just computed the underlying type. Finish the scope
157 of C++0x scoped enumerations.
158 (build_enumerator): For enumerations with a fixed underlying type,
159 check the enumerator values when the enumerator is defined.
160 (lookup_enumerator): New.
161 * call.c (standard_conversion): Don't allow assignment from
162 integers to scoped enumeration types, even with -fpermissive.
163 Don't convert from scoped enumerations to bool or any arithmetic
165 (build_conditional_expr): Don't per the usual arithmetic
166 conversions for scoped enumeration types.
167 (convert_like_real): Check complain to see if we should
169 * error.c (class_key_or_enum_as_string): Print scoped enums.
170 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
172 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
173 (SCOPED_ENUM_P): New.
174 (UNSCOPED_ENUM_P): New.
175 (SET_SCOPED_ENUM_P): New.
176 (ENUM_UNDERLYING_TYPE): New.
177 * pt.c (lookup_template_class): Update the instantiation of enum
178 types to deal with C++0x scoped enumerations and underlying
180 * name-lookup.c (begin_scope): Deal with scoped enumeration
182 (lookup_qualified_name): Deal with lookup into enumeration types.
183 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
184 * parser.c (cp_parser_class_or_namespace_name): Rename to...
185 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
186 parse a type-name that can be an enumeration type.
187 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
188 (cp_parser_elaborated_type_specifier): Parse the
189 optional `struct' or `class' following enum (in C++0x).
190 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
193 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
195 * typeck.c: Update all calls to pedwarn.
200 * name-lookup.c: Likewise.
201 * parser.c: Likewise.
203 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
206 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
209 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
211 * parser.c: Update all calls to inform.
212 * typeck.c: Likewise.
216 * method.c: Likewise.
217 * friend.c: Likewise.
218 * typeck2.c: Likewise.
220 * name-lookup.c: Likewise.
223 2008-08-19 Jakub Jelinek <jakub@redhat.com>
226 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
228 2008-08-18 Tomas Bily <tbily@suse.cz>
230 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
232 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
234 * typeck.c: Update all callers of permerror.
239 * except.c: Likewise.
241 * typeck2.c: Likewise.
243 * semantics.c: Likewise.
244 * name-lookup.c: Likewise.
247 * parser.c: Likewise.
249 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
252 * pt.c (check_template_shadow): Change to return a bool.
253 * name-lookup.c (push_class_level_binding): Early return if
254 check_template_shadow returns false.
255 * cp-tree.h (check_template_shadow): Adjust declaration.
257 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
260 * decl.c (grokdeclarator): In case of extern and initializer, return
261 error_mark_node after the error.
263 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
266 * decl.c (grokfndecl): Call check_main_parameters_type only if
269 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
272 * parser.c (cp_parser_class_head): Early return error_mark_node in
273 case of global qualification of class name or qualified name that
274 does not name a class.
276 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
279 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
281 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
284 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
285 Delete forward declarations. Check that toplev.h has not been
286 included before this file. Include toplev.h and diagnostic.h.
287 * error.c (cp_cpp_error): Use DK_PEDWARN.
288 (cxx_incomplete_type_diagnostic): Update declaration.
289 (cxx_incomplete_type_error): Use DK_ERROR.
290 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
291 as argument. Use emit_diagnostic.
292 (cxx_incomplete_type_error): Use DK_ERROR.
293 (add_exception_specifier): Use diagnostic_t instead of custom
295 * typeck.c (complete_type_or_else): Update call to
296 cxx_incomplete_type_diagnostic.
297 * init.c (build_delete): Likewise.
298 * call.c (diagnostic_fn_t): Remove unused typedef.
299 (build_temp): Pass a pointer to diagnostic_t.
300 (convert_like_real): Use emit_diagnostic.
301 (joust): Check return value of warning before giving informative
303 * friend.c (do_friend): Check return value of warning
304 before giving informative note.
305 * parser.c (cp_parser_template_id): Likewise.
307 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
310 * class.c (check_bases_and_members): Warn with -Wuninitialized
313 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
316 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
317 and make sure it is not a union.
319 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
321 * semantics.c (finish_decltype_type): Initialize type.
323 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
325 * semantics.c (finish_decltype_type): Handle calls to function
326 pointers and references to functions properly.
328 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
331 * parser.c (cp_parser_template_argument): Don't assume that '>>'
332 following a type-id is an error when in C++0x mode.
334 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
337 * decl.c (grokdeclarator): Use explicit location with permerror_at.
339 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
342 * typeck.c (cp_build_binary_op): Move code to c-common.c.
344 2008-08-05 Jason Merrill <jason@redhat.com>
347 * decl.c (build_ptrmemfunc_type): Don't require structural
348 comparison of PMF types.
349 * tree.c (cp_build_qualified_type_real): Don't clear
350 a valid TYPE_PTRMEMFUNC_TYPE.
351 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
354 2008-08-04 Jason Merrill <jason@redhat.com>
357 * typeck2.c (check_narrowing): Allow narrowing conversion
358 from an explicit floating-point constant.
361 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
364 2008-08-04 Simon Baldwin <simonb@google.com>
367 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
368 the declaration's id is followed by a semicolon.
370 2008-07-31 Jakub Jelinek <jakub@redhat.com>
373 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
374 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
376 2008-07-31 Jason Merrill <jason@redhat.com>
379 * init.c (build_new_1): Don't convert pointer to the data type
380 until we're actually going to treat it as that type.
383 * tree.c (build_aggr_init_expr): Split out...
384 (build_cplus_new): ...from here.
385 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
386 * init.c (build_new_1): new T() means value-initialization,
387 not default-initialization.
388 (build_vec_init): Likewise.
389 (build_value_init_1): Use build_aggr_init_expr.
391 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
394 * decl2.c (fix_temporary_vars_context_r): New function.
395 (one_static_initialization_or_destruction): Make sure temporary
396 variables part of the initialiser have their DECL_CONTEXT()
399 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
402 * typeck.c (build_binary_op): Encapsulate code into
405 2008-07-29 Jakub Jelinek <jakub@redhat.com>
408 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
409 TYPE_UID instead of pointers.
411 2008-07-29 Jan Hubicka <jh@suse.cz>
413 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
414 * decl.c (duplicate_decls): Likewise.
415 (grokfndecl): Likewise.
416 (start_method): Likewise.
417 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
419 * pt.c (register_specialization, regenerate_decl_from_template):
421 * decl2.c (grokfield): Likewise.
423 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
426 * decl.c (duplicate_decls): Merge USED flags.
428 2008-07-27 Jason Merrill <jason@redhat.com>
431 * decl.c (reshape_init_r): Allow C++0x initializer lists.
433 2008-07-28 Richard Guenther <rguenther@suse.de>
435 Merge from gimple-tuples-branch.
437 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
439 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
442 2008-07-18 Jakub Jelinek <jakub@redhat.com>
444 * decl.c (finish_function): Call gimple_body after cp_genericize.
446 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
448 * optimize.c: Include gimple.h instead of tree-gimple.h.
449 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
450 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
453 2008-07-16 Jakub Jelinek <jakub@redhat.com>
455 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
457 2008-07-14 Jakub Jelinek <jakub@redhat.com>
459 * cp-gimplify.c (cp_gimplify_expr): Update comment.
461 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
463 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
465 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
466 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
467 (cxx_omp_clause_copy_ctor): Same.
468 (cxx_omp_clause_assign_op): Same.
470 2008-05-28 Jakub Jelinek <jakub@redhat.com>
472 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
473 (cp_gimplify_expr): Adjust caller.
475 2008-05-11 Doug Kwan <dougkwan@google.com>
477 * init.c (build_vec_delete): Add type conversion for argument
478 0 of POINTER_PLUS_EXPR.
480 2008-04-29 Doug Kwan <dougkwan@google.com>
482 * decl2 (File): Include "gimple.h"
483 (cp_write_global_declarations): Use gimple_body instead of
485 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
487 2008-04-10 Diego Novillo <dnovillo@google.com>
489 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
491 * optimize.c (maybe_clone_body): Re-enable call to
493 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
494 code with call to gimple_unreachable.
495 (cp_genericize): Fix handling of clone bodies.
497 2008-04-04 Diego Novillo <dnovillo@google.com>
499 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
501 * optimize.c (maybe_clone_body): Re-enable.
503 2008-02-19 Diego Novillo <dnovillo@google.com>
504 Oleg Ryjkov <olegr@google.com>
506 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
508 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
509 argument to gimple_seq *. Update all users.
510 (gimplify_must_not_throw_expr): Likewise.
512 2008-02-04 Oleg Ryjkov <olegr@google.com>
514 * except.c: Include gimple.h
515 (cp_protect_cleanup_actions): Convert to tuples.
516 * Make-lang.in (cp/except.o): Add dependency on gimple.h
518 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
520 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
521 instead of annotating each block manually.
523 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
525 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
526 (gimplify_for_stmt): Same.
527 (gimplify_switch_stmt): Same.
528 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
530 [WHILE_STMT]: Return GS_OK.
532 [CONTINUE_STMT]: Same.
534 (cp_genericize): Set gimple_body() of cloned functions when needed.
536 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
538 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
539 (cp_gimplify_init_expr): Convert to tuples.
540 (gimplify_must_not_throw_expr): Make function return a
541 gimplify_status and convert to tuples.
543 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
545 * cp-gimplify.c (genericize_try_block): Enable and do not call
547 (genericize_catch_block): Same.
548 (genericize_eh_spec_block): Same.
549 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
550 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
552 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
554 * optimize.c (maybe_clone_body): Comment out call to clone_body.
555 * decl.c (finish_function): Use gimple_body instead of
557 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
558 * cp-gimplify.c (genericize_try_block): Comment out.
559 (genericize_catch_block): Same.
560 (genericize_eh_spec_block): Same.
561 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
562 (gimplify_for_stmt): Comment out.
563 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
564 (cp_gimplify_omp_for): Same.
565 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
566 Comment out call to gimplify_stmt and append_to_statement_list.
567 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
568 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
569 (cp_gimplify_expr): Same.
570 Comment out calls to genericize_*_block. Comment out call to
573 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
576 * class.c (type_has_user_provided_default_constructor): Handle
579 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
581 * decl.c (push_library_fn): Add a parameter for the exceptions that
582 the function may throw.
583 (push_void_library_fn, push_throw_library_fn, expand_static_init):
585 (build_library_fn): Change to static.
586 * cp-tree.h: Adjust declarations.
587 * except.c (declare_nothrow_library_fn): New.
588 (do_get_exception_ptr, do_begin_catch, do_free_exception,
589 do_allocate_exception): Use the latter, adjust the declarations
590 (ie, add empty exception-specification), consistently with the
591 actual implementation in libsupc++.
593 2008-07-25 Jan Hubicka <jh@suse.cz>
595 * typeck.c (inline_conversion): Remove.
596 (cp_build_function_call): Do not use inline_conversion.
597 * decl.c (duplicate_decls): Do not insist on inline being declared
599 (start_cleanup_fn): Do not assume that INLINE flags prevent function
600 from being output. We now remove static functions always.
601 (finish_function): Do return warning on all static functions.
602 * call.c (build_over_call): Do not use inline_conversion.
603 * cp-tree.h (possibly_inlined_p): Declare.
604 (inline_conversion): Remove.
605 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
606 * decl2.c (cp_write_global_declarations): Likewise.
607 (mark_used): Likewise.
608 (possibly_inlined_p): New functions.
610 2008-07-25 Jason Merrill <jason@redhat.com>
612 * class.c (type_has_user_provided_default_constructor): Handle
615 2008-07-23 Jan Hubicka <jh@suse.cz>
617 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
618 (grogfndecl): Drop flag_inline_trees code.
619 * pt.c (instantiate_decl): Drop flag_iline_trees code.
620 * lex.c (cxx_init): Do not set unit-at-a-time.
622 2008-07-23 Jason Merrill <jason@redhat.com>
624 * mangle.c (write_unqualified_name): Avoid infinite recursion when
625 trying to mangle a decl with no name.
627 Implement defaulted/deleted functions as per N2346
628 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
629 (DECL_DELETED_FN): New macro.
630 (DECL_DEFAULTED_FN): New macro.
631 * class.c (user_provided_p): New fn.
632 (defaultable_fn_p): New fn.
633 (type_has_user_provided_constructor): New fn.
634 (type_has_user_provided_default_constructor): New fn.
635 (check_methods): A defaulted fn is still trivial.
636 (check_bases_and_members): Likewise.
637 * decl.c (grok_special_member_properties): Likewise.
638 (duplicate_decls): Complain about redeclaring a function as deleted.
639 (start_decl): initialized==2 means deleted.
640 (cp_finish_decl): Handle deleted/defaulted semantics.
641 * decl2.c (grokfield): Likewise.
642 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
643 Complain about using a deleted fn.
644 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
645 (perform_member_init): Check for a user-provided default constructor
646 even if TYPE_NEEDS_CONSTRUCTING.
647 (build_new_1): Likewise.
648 * call.c (build_over_call): Don't call mark_used twice.
649 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
650 * search.c (check_final_overrider): Check for deleted mismatch.
651 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
652 (cp_parser_pure_specifier): Handle =default and =delete.
654 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
656 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
659 * typeck.c: All calls to pedwarn changed.
660 * decl.c: All calls to pedwarn changed.
661 * call.c: All calls to pedwarn changed.
662 * error.c: All calls to pedwarn changed.
663 * typeck2.c: All calls to pedwarn changed.
664 * pt.c: All calls to pedwarn changed.
665 * name-lookup.c: All calls to pedwarn changed.
666 * parser.c: All calls to pedwarn changed.
668 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
670 * call.c: Fix comment typos.
672 * cp-tree.h: Likewise.
673 * cxx-pretty-print.c: Likewise.
676 * name-lookup.c: Likewise.
677 * operators.def: Likewise.
678 * parser.c: Likewise.
681 * typeck.c: Likewise.
683 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
687 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
688 copy constructors and copy assignment operators proper.
690 2008-07-21 Rafael Avila de Espindola <espindola@google.com>
692 * parser.c (cp_token): Remove in_system_header.
693 (eof_token): Remove in_system_header.
694 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
695 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
696 (cp_parser_member_declaration): Use in_system_header_at.
697 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
698 (pop_tinst_level): Don't set in_system_header.
699 (instantiate_class_template): Don't set in_system_header.
700 (instantiate_decl): Don't set in_system_header.
701 (instantiate_pending_templates): Don't set in_system_header.
703 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
706 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
707 TYPE_NOTHROW_P, not TREE_NOTHROW.
708 (trait_expr_value): Likewise.
710 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
713 * call.c (convert_like_real): Don't take the error code path
714 when a rvalue or base conversion has the bad_p field set.
716 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
718 * rtti.c (emit_support_tinfos): Add char16_type_node and
720 * typeck2.c (digest_init): Support char16_t and char32_t.
722 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
724 * cvt.c (convert_to_void): Avoid C++ keywords.
725 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
727 * friend.c (is_friend): Likewise.
728 * init.c (perform_member_init): Likewise.
729 * mangle.c (write_template_prefix, write_template_template_param):
731 * name-lookup.c (do_namespace_alias, do_using_directive,
732 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
733 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
734 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
736 * pt.c (is_specialization_of_friend, lookup_template_class,
737 push_tinst_level, instantiate_class_template,
738 tsubst_copy_and_build): Likewise.
739 * tree.c (add_stmt_to_compound): Likewise.
740 * typeck.c (finish_class_member_access_expr): Likewise.
742 2008-07-17 Julian Brown <julian@codesourcery.com>
743 Mark Mitchell <mark@codesourcery.com>
745 * decl2.c (determine_visibility): Allow target to override
746 visibility of class data.
748 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
751 * semantics.c (trait_expr_value): Update __has_trivial_destructor
752 semantics to the current WP (N2691).
754 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
757 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
758 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
759 complies with exception specification constraints.
761 2008-07-14 Jason Merrill <jason@redhat.com>
763 * lex.c (init_reswords): Always set D_OBJC.
765 2008-07-11 Tom Tromey <tromey@redhat.com>
766 Ian Lance Taylor <iant@google.com>
768 * lex.c (struct resword, reswords): Don't define.
769 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
770 (init_reswords): Clarify mask code. Use c_common_reswords rather
773 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
776 * decl.c (grokdeclarator): Warn about initializing variables
777 of storage class 'extern' only after the type of the declarator
778 has been properly computed.
780 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
783 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
784 carries the location of the primary type.
785 * parser.c (cp_parser_check_type_definition): Update documentation.
786 (cp_parser_check_for_definition_in_return_type,
787 cp_parser_check_for_invalid_template_id,
788 cp_parser_set_decl_spec_type,
789 cp_parser_check_for_definition_in_return_type,
790 cp_parser_diagnose_invalid_type_name,
791 cp_parser_new_expression, cp_parser_explicit_instantiation,
792 cp_parser_type_specifier, cp_parser_simple_type_specifier,
793 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
796 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
800 * semantic.c (qualified_name_lookup_error, finish_id_expression):
801 Add a location_t parameter so that
802 error message can have a more accurate location.
803 * cp-tree.h: Updated prototype
804 * pt.c (tsubst_qualified_id): Use location in error messages.
805 * parser.c (cp_parser_postfix_expression,
806 cp_parser_objc_statement, cp_parser_trait_expr,
807 cp_parser_token_is_class_key,
808 cp_parser_uncommitted_to_tentative_parse_p,
809 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
810 cp_parser_error, cp_parser_name_lookup_error,
811 cp_parser_simulate_error, cp_parser_check_decl_spec,
812 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
813 cp_parser_diagnose_invalid_type_name,
814 cp_parser_parse_and_diagnose_invalid_type_name,
815 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
816 cp_parser_string_literal, cp_parser_primary_expression,
817 cp_parser_primary_expression, cp_parser_unqualified_id,
818 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
819 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
820 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
821 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
822 cp_parser_jump_statement, cp_parser_block_declaration,
823 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
824 cp_parser_function_specifier_opt, cp_parser_decltype,
825 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
826 cp_parser_mem_initializer_id, cp_parser_template_parameter,
827 cp_parser_type_parameter, cp_parser_template_id,
828 cp_parser_template_name, cp_parser_template_argument): Likewise.
830 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
833 * pt.c (tsubst_function_type): Remove warning for type qualifiers
834 on function return type.
836 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
839 * pt.c (tsubst_function_type): Don't warn for type qualifiers
840 on function return type in case of system header.
842 2008-07-09 Raksit Ashok <raksit@google.com>
844 * parser.c (cp_parser_postfix_expression): New warning based on flag
845 warn_disallowed_functions.
847 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
850 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
851 functions declared with a storage class qualifier.
853 2008-07-03 Richard Guenther <rguenther@suse.de>
856 * typeck.c (cp_build_function_call): Move code to verify
857 builtin function arguments ...
858 * call.c (build_cxx_call): ... here.
860 2008-07-02 Jason Merrill <jason@redhat.com>
862 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
864 Implement WG21 N2672, Initializer List proposed wording
865 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
866 (struct lang_type_class): Add has_list_ctor bitfield.
867 (TYPE_HAS_LIST_CTOR): New macro.
868 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
869 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
870 (LOOKUP_NO_NARROWING): New macro.
871 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
872 * parser.c (cp_parse_braced_list): Split out from...
873 (cp_parser_initializer_clause): ...here.
874 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
876 (cp_lexer_next_token_is_not_keyword): New fn.
877 (cp_parser_parenthesized_expression_list): Handle { }.
878 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
879 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
880 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
881 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
882 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
883 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
884 (cp_parser_save_member_function_body): Likewise.
885 * call.c (conversion_kind): Add ck_list, ck_aggr.
886 (struct conversion): Add check_narrowing bitfield, conversion list.
887 (build_list_conv): New fn.
888 (build_aggr_conv): New fn.
889 (implicit_conversion): Call them.
890 (standard_conversion): Set check_narrowing if appropriate.
891 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
892 (build_user_type_conversion_1): When converting from an init list,
893 we allow additional conversions except when calling a copy ctor.
894 (convert_like_real): Calling an explicit ctor for an init list is
895 ill-formed. Handle ck_list and ck_addr. Check narrowing.
896 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
897 class doesn't have a list ctor, break the {} into a TREE_LIST.
898 (compare_ics): ck_list is better than other UDCs.
899 (set_up_extended_ref_temp): Split out from initialize_reference.
900 (is_std_init_list): New fn.
901 (is_list_ctor): New fn.
902 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
903 (reshape_init_array_1): Pass it to build_constructor.
904 (reshape_init_class): Ditto.
905 (initialize_artificial_var): Pass the appropriate type.
906 (build_aggr_init_full_exprs): Split out from...
907 (check_initializer): ...here. Handle new semantics.
908 (build_init_list_var_init): New subroutine of check_initializer.
909 (grokdeclarator): Converting constructors can have more than one parm.
910 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
911 * init.c (expand_default_init): Only do digest_init for aggregates.
912 * rtti.c (tinfo_base_init): Pass init_list_type_node to
913 build_constructor_from_list.
914 (generic_initializer, ptr_initializer): Ditto.
915 (ptm_initializer, class_initializer): Ditto.
916 (get_pseudo_ti_init): Ditto.
917 * error.c (dump_type): Handle init_list_type_node.
918 (maybe_warn_cpp0x): New fn.
919 (maybe_varn_variadic_templates): Call it.
920 * cvt.c (ocp_convert): Handle conversion from { }.
921 * tree.c (build_array_of_n_type): New fn.
922 * typeck2.c (store_init_value): Use init_list_type_node.
923 (digest_init): Likewise.
924 (check_narrowing): New fn.
925 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
926 of vector of constructor elts. Handle non-aggregate types. Make
927 constant literals static.
928 * pt.c: (tsubst_copy_and_build): Adjust.
930 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
932 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
934 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
935 (comp_ptr_ttypes_const): Likewise.
937 2008-07-01 Andrew Haley <aph@redhat.com>
939 * decl.c (finish_constructor_body): Don't set the return value of
940 the constructor if the constructor is that of a Java type.
942 2008-06-30 Jakub Jelinek <jakub@redhat.com>
945 * decl2.c (is_late_template_attribute): If the first attribute
946 argument is IDENTIFIER_NODE, don't consider it when checking
947 if arguments are value or type dependent.
949 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
952 * pt.c (do_type_instantiation): In c++0x mode do not warn for
955 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
957 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
959 2008-06-28 Jakub Jelinek <jakub@redhat.com>
962 * repo.c (repo_emit_p): Put const static data members initialized
963 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
966 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
969 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
972 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
975 * typeck.c (cp_build_function_call): Show example syntax in
978 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
980 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
981 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
982 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
983 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
984 pedwarn to permerror.
985 * init.c (perform_member_init, build_new_1, build_new): Likewise.
986 * decl.c (warn_extern_redeclared_static, duplicate_decls,
987 * identify_goto, check_previous_goto_1, check_goto, define_label,
988 check_tag_decl, start_decl, check_class_member_definition_namespace,
989 grokfndecl, grokdeclarator): Likewise.
990 * except.c (check_handlers): Likewise.
991 * typeck2.c (digest_init): Likewise.
992 * pt.c (check_specialization_namespace,
993 check_explicit_instantiation_namespace,
994 maybe_process_partial_specialization, check_explicit_specialization,
995 convert_template_argument, do_decl_instantiation,
996 do_type_instantiation, instantiate_decl): Likewise.
997 * semantics.c (finish_template_type_parm): Likewise.
998 * name-lookup.c (pushdecl_maybe_friend,
999 check_for_out_of_scope_variable): Likewise.
1000 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1001 coerce_new_type): Likewise.
1002 * parser.c (cp_parser_nested_name_specifier_opt,
1003 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1004 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1005 (cp_parser_parameter_declaration): Check flag_permissive instead of
1006 flag_pedantic_errors.
1007 * call.c (joust): Change pedwarn to warning.
1008 * friend.c (make_friend_class): Likewise.
1010 2008-06-16 Jan Hubicka <jh@suse.cz>
1012 * method.c: Include cgraph.h.
1013 (use_thunk): Use cgraph_add_new_function instead of calling backend
1016 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1018 * parser.c: Fix comment typo.
1020 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1023 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1024 grokdeclarator and apply it to the created declaration.
1025 * cp-tree.h (grokbitfield): Update prototype.
1026 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1027 since they are now applied in grokbitfield. Adjusted the call to
1029 (cp_parser_objc_class_ivars): Likewise.
1031 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1034 * class.c (type_requires_array_cookie): Do not consider delete[]
1035 operators with an ellipsis as second argument.
1037 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1040 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1043 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1046 * pt.c (maybe_process_partial_specialization): Check the tree
1047 returned by push_template_decl for error_mark_node.
1048 * parser.c (cp_parser_class_head): Likewise, check the tree
1049 returned by the latter.
1051 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1054 * decl.c (grokdeclarator): In case of wrong return type return
1055 immediately error_mark_node.
1057 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1059 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1060 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1061 finish_omp_taskwait): New prototypes.
1062 (cxx_omp_clause_default_ctor): Add outer argument.
1063 (finish_omp_for): Add new clauses argument.
1064 * cp-gimplify.c (cxx_omp_finish_clause): New function.
1065 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
1066 (cxx_omp_clause_default_ctor): Add outer argument.
1067 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1068 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1069 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1070 Add par_clauses argument. If decl is present in parallel's
1071 lastprivate clause, change that clause to shared and add
1072 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1073 Fix wording of error messages. Adjust finish_omp_for caller.
1074 Add clauses argument. Parse loops with random access iterators.
1075 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1077 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1078 cp_parser_omp_for_loop callers.
1079 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
1081 (cp_parser_omp_clause_name): Handle collapse and untied
1083 (cp_parser_omp_clause_schedule): Handle auto schedule.
1084 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
1085 and PRAGMA_OMP_CLAUSE_UNTIED.
1086 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
1087 (OMP_TASK_CLAUSE_MASK): Define.
1088 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
1089 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
1090 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
1091 PRAGMA_OMP_TASKWAIT.
1092 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
1093 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
1094 (tsubst_omp_for_iterator): New function.
1095 (dependent_omp_for_p): New function.
1096 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
1097 loops. Adjust finish_omp_for caller. Handle loops with random
1098 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
1099 (tsubst_expr): Handle OMP_TASK.
1100 * semantics.c (cxx_omp_create_clause_info): New function.
1101 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
1102 OMP_CLAUSE_COLLAPSE.
1103 (cxx_omp_predetermined_sharing): Removed.
1104 * semantics.c (finish_omp_for): Allow pointer iterators. Use
1105 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
1106 collapsed for loops. Adjust c_finish_omp_for caller. Add new
1107 clauses argument. Fix check for type dependent cond or incr.
1108 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
1109 fold_convert to convert incr amount to difference_type. Only
1110 fold if not in template. If decl is mentioned in lastprivate
1111 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
1112 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
1114 (finish_omp_threadprivate): Allow static class members of the
1116 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
1117 finish_omp_taskwait): New functions.
1119 * parser.c (cp_parser_binary_expression): Add prec argument.
1120 (cp_parser_assignment_expression): Adjust caller.
1121 * cp-tree.h (outer_curly_brace_block): New prototype.
1122 * decl.c (outer_curly_brace_block): No longer static.
1124 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1127 * pt.c (push_template_decl_real): Consistently return error_mark_node
1130 2008-06-02 Tomas Bily <tbily@suse.cz>
1132 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
1133 (cp_build_unary_op): Likewise.
1134 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
1135 (maybe_warn_about_returning_address_of_local): Likewise.
1137 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
1140 * pt.c (tsubst_initializer_list): Consistently check the tree
1141 returned by tsubst_pack_expansion for error_mark_node.
1143 2008-05-27 Michael Matz <matz@suse.de>
1146 * call.c (build_new_op): Make warning conditional on
1149 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
1152 * call.c (convert_like_real): Convert bitfield to desired type
1153 before creating temporary.
1155 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1157 * Makefile.in: Adjusted dependencies on c-incpath.o.
1159 2008-05-23 Jakub Jelinek <jakub@redhat.com>
1162 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
1163 fold_build_cleanup_point_expr on build_call_a results.
1166 * semantics.c (omp_clause_info_fndecl): New function.
1167 (finish_omp_clauses): Use it.
1169 2008-05-21 Jakub Jelinek <jakub@redhat.com>
1172 * cp-tree.h (check_array_initializer): New prototype.
1173 * decl.c (check_array_initializer): New function.
1174 (check_initializer): Call it.
1175 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
1177 2008-05-21 Tom Tromey <tromey@redhat.com>
1179 * mangle.c (save_partially_mangled_name): Remove.
1180 (restore_partially_mangled_name): Likewise.
1181 (write_encoding): Update.
1182 (write_unqualified_name): Likewise.
1183 (start_mangling): Always use name_obstack. Remove 'ident_p'
1185 (get_identifier_nocopy): Remove.
1186 (finish_mangling_internal): Rename from finish_mangling.
1187 (finish_mangling): New function.
1188 (finish_mangling_get_identifier): Likewise.
1189 (partially_mangled_name, partially_mangled_name_len): Remove.
1190 (mangle_decl_string): Change return type. Update.
1191 (mangle_decl, mangle_type_string, mangle_special_for_type,
1192 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
1193 mangle_ref_init_variable): Update.
1195 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1198 * semantics.c (begin_class_definition): Extend checks on the first
1201 2008-05-12 Tomas Bily <tbily@suse.cz>
1203 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
1204 * call.c (build_over_call): Likewise.
1205 * error.c (dump_expr): Use CASE_CONVERT.
1206 * class.c (fixed_type_or_null): Likewise.
1208 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
1210 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
1212 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
1215 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1217 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
1218 DECL_LOOPING_CONST_OR_PURE_P attributes.
1219 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
1222 2008-05-02 Simon Baldwin <simonb@google.com>
1225 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
1227 2008-05-01 Simon Baldwin <simonb@google.com>
1229 * typeck.c (build_array_ref): Call warn_array_subscript_range.
1231 2008-04-30 Jakub Jelinek <jakub@redhat.com>
1234 * pt.c (more_specialized_fn): Stop the loop even if there are no
1235 arguments before ellipsis.
1237 2008-04-29 Jakub Jelinek <jakub@redhat.com>
1240 * parser.c (cp_parser_lookup_name): Look through single function
1244 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
1245 COMPOUND_EXPR if the second argument would be error_mark_node.
1247 2008-04-28 Jason Merrill <jason@redhat.com>
1248 Liu Guanwei <liu_gw@163.com>
1251 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
1252 in default arguments.
1254 2008-04-25 Jan Hubicka <jh@suse.cz>
1256 * typeck.c (check_return_expr): Update.
1257 * decl.c (start_preparsed_function): Update.
1258 * method.c (use_thunk): Update.
1260 2008-04-24 Jakub Jelinek <jakub@redhat.com>
1263 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
1264 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
1265 * decl2.c (is_late_template_attribute): Only make vector_size
1266 late tmpl attribute if argument is type or value dependent.
1267 (cp_reconstruct_complex_type): New function.
1269 2008-04-24 Richard Guenther <rguenther@suse.de>
1271 * typeck.c (cp_build_function_call): Call
1272 check_builtin_function_arguments.
1274 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1276 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
1277 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
1278 * init.c (build_zero_init): Don't set TREE_INVARIANT.
1279 * class.c (build_base_path): Don't set TREE_INVARIANT.
1280 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
1281 (build_vtbl_initializer): Don't set TREE_INVARIANT.
1282 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
1283 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
1284 (generic_initializer): Don't set TREE_INVARIANT.
1285 (ptr_initializer): Don't set TREE_INVARIANT.
1286 (ptm_initializer): Don't set TREE_INVARIANT.
1287 (class_initializer): Don't set TREE_INVARIANT.
1288 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
1289 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
1290 (build_template_parm_index): Don't set TREE_INVARIANT.
1291 (reduce_template_parm_level): Don't set TREE_INVARIANT.
1292 (process_template_parm): Don't set TREE_INVARIANT.
1294 2008-04-22 Jason Merrill <jason@redhat.com>
1297 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
1298 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
1299 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
1301 2008-04-22 Jakub Jelinek <jakub@redhat.com>
1304 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
1305 expression is errorneous.
1307 2008-04-21 Jason Merrill <jason@redhat.com>
1310 * tree.c (cp_tree_equal): Handle FIXED_CST.
1313 * pt.c (template_template_parm_bindings_ok_p): Set
1314 processing_template_decl while in this function.
1316 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
1318 * cvt.c (type_promotes_to): Support char16_t and char32_t.
1319 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
1320 char16_t and char32_t.
1321 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
1322 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
1323 extended builtin type "u8char{16,32}_t".
1324 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
1326 (cp_lexer_print_token): Support CPP_STRING{16,32}.
1327 (cp_parser_is_string_literal): Idem.
1328 (cp_parser_string_literal): Idem.
1329 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
1331 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
1332 * tree.c (char_type_p): Support char16_t and char32_t as char types.
1333 * typeck.c (string_conv_p): Support char16_t and char32_t.
1335 2008-04-17 Jason Merrill <jason@redhat.com>
1338 * call.c (build_user_type_conversion_1): Represent second step of
1339 copy-init with an rvalue conversion.
1340 (convert_like_real) [ck_user]: Don't implicitly add it here.
1342 2008-04-15 Jakub Jelinek <jakub@redhat.com>
1345 * decl.c (layout_var_decl): If extern or static var has variable
1346 size, set TREE_TYPE (decl) to error_mark_node.
1348 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
1351 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
1354 2008-04-09 Jason Merrill <jason@redhat.com>
1357 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
1358 not a pushed variable.
1360 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
1362 * call.c (build_op_delete_call): Fix quotation in warning message.
1363 * decl.c (grokdeclarator): Quote keyword in error message.
1364 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
1367 * parser.c (cp_parser_check_type_definition): Print error string
1368 directly rather than using "%s".
1369 (cp_parser_postfix_expression): Fix quotation.
1370 (cp_parser_decltype): Likewise.
1371 (cp_parser_sizeof_operand): Fix quotation. Simplify.
1373 * parser.c (cp_parser_non_integral_constant_expression): Build error
1374 message with CONCAT rather than using "%s".
1375 (cp_parser_primary_expression): Fix quotation.
1376 (cp_parser_postfix_expression): Likewise.
1377 (cp_parser_postfix_dot_deref_expression): Likewise.
1378 (cp_parser_unary_expression): Likewise.
1379 (cp_parser_new_expression): Likewise.
1380 (cp_parser_delete_expression): Likewise.
1382 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
1383 as `)', not as `('. Fix quotation.
1384 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
1385 (cp_parser_primary_expression): Likewise.
1386 (cp_parser_nested_name_specifier_opt): Likewise.
1387 (cp_parser_postfix_expression): Likewise.
1388 (cp_parser_postfix_open_square_expression): Likewise.
1389 (cp_parser_parenthesized_expression_list): Likewise.
1390 (cp_parser_pseudo_destructor_name): Likewise.
1391 (cp_parser_new_expression): Likewise.
1392 (cp_parser_direct_new_declarator): Likewise.
1393 (cp_parser_delete_expression): Likewise.
1394 (cp_parser_cast_expression): Likewise.
1395 (cp_parser_question_colon_clause): Likewise.
1396 (cp_parser_builtin_offsetof): Likewise.
1397 (cp_parser_trait_expr): Likewise.
1398 (cp_parser_label_for_labeled_statement): Likewise.
1399 (cp_parser_compound_statement): Likewise.
1400 (cp_parser_selection_statement): Likewise.
1401 (cp_parser_condition): Likewise.
1402 (cp_parser_iteration_statement): Likewise.
1403 (cp_parser_already_scoped_statement): Likewise.
1404 (cp_parser_simple_declaration): Likewise.
1405 (cp_parser_linkage_specification): Likewise.
1406 (cp_parser_static_assert): Likewise.
1407 (cp_parser_decltype): Likewise.
1408 (cp_parser_conversion_function_id): Likewise.
1409 (cp_parser_operator_function_id): Likewise.
1410 (cp_parser_operator): Likewise.
1411 (cp_parser_type_parameter): Likewise.
1412 (cp_parser_template_id): Likewise.
1413 (cp_parser_explicit_instantiation): Likewise.
1414 (cp_parser_explicit_specialization): Likewise.
1415 (cp_parser_enum_specifier): Likewise.
1416 (cp_parser_namespace_definition): Likewise.
1417 (cp_parser_namespace_alias_definition): Likewise.
1418 (cp_parser_using_declaration): Likewise.
1419 (cp_parser_using_directive): Likewise.
1420 (cp_parser_asm_definition): Likewise.
1421 (cp_parser_direct_declarator): Likewise.
1422 (cp_parser_ptr_operator): Likewise.
1423 (cp_parser_parameter_declaration_clause): Likewise.
1424 (cp_parser_initializer_clause): Likewise.
1425 (cp_parser_class_specifier): Likewise.
1426 (cp_parser_member_specification_opt): Likewise.
1427 (cp_parser_member_declaration): Likewise.
1428 (cp_parser_pure_specifier): Likewise.
1429 (cp_parser_constant_initializer): Likewise.
1430 (cp_parser_base_clause): Likewise.
1431 (cp_parser_exception_specification_opt): Likewise.
1432 (cp_parser_try_block): Likewise.
1433 (cp_parser_function_try_block): Likewise.
1434 (cp_parser_handler): Likewise.
1435 (cp_parser_throw_expression): Likewise.
1436 (cp_parser_asm_operand_list): Likewise.
1437 (cp_parser_attributes_opt): Likewise.
1438 (cp_parser_label_declaration): Likewise.
1439 (cp_parser_constructor_declarator_p): Likewise.
1440 (cp_parser_template_declaration_after_export): Likewise.
1441 (cp_parser_single_declaration): Likewise.
1442 (cp_parser_objc_message_expression): Likewise.
1443 (cp_parser_objc_message_args): Likewise.
1444 (cp_parser_objc_encode_expression): Likewise.
1445 (cp_parser_objc_defs_expression): Likewise.
1446 (cp_parser_objc_protocol_expression): Likewise.
1447 (cp_parser_objc_selector_expression): Likewise.
1448 (cp_parser_objc_protocol_refs_opt): Likewise.
1449 (cp_parser_objc_typename): Likewise.
1450 (cp_parser_objc_method_keyword_params): Likewise.
1451 (cp_parser_objc_superclass_or_category): Likewise.
1452 (cp_parser_objc_try_catch_finally_statement): Likewise.
1453 (cp_parser_objc_synchronized_statement): Likewise.
1454 (cp_parser_objc_throw_statement): Likewise.
1455 (cp_parser_omp_var_list_no_open): Likewise.
1456 (cp_parser_omp_clause_default): Likewise.
1457 (cp_parser_omp_clause_if): Likewise.
1458 (cp_parser_omp_clause_num_threads): Likewise.
1459 (cp_parser_omp_clause_reduction): Likewise.
1460 (cp_parser_omp_clause_schedule): Likewise.
1461 (cp_parser_omp_critical): Likewise.
1462 (cp_parser_omp_for_loop): Likewise.
1463 (cp_parser_omp_sections_scope): Likewise.
1465 * parser.c (cp_parser_template_parameter_list): Simplify.
1467 2008-04-07 James E. Wilson <wilson@tuliptree.org>
1469 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
1471 2008-04-07 Jason Merrill <jason@redhat.com>
1474 * class.c (type_has_user_nondefault_constructor): A template
1475 counts as a nondefault constructor.
1477 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
1479 * decl.c (cxx_push_function_context): Delete.
1480 (cxx_pop_function_context): Delete.
1481 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
1483 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
1484 LANG_HOOKS_FUNCTION_FINAL): Delete.
1485 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
1486 LANG_HOOKS_MISSING_NORETURN_OK_P.
1487 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
1489 * semantics.c (current_stmt_tree): Fix comment.
1491 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1494 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
1495 before calling fold_offsetof.
1497 2008-04-03 Tom Tromey <tromey@redhat.com>
1499 * Make-lang.in (c++_OBJS): New variable.
1501 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1503 * optimize.c (clone_body): New, from tree-inline.c.
1505 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1507 * method.c (synthesize_method): Use {push,pop}_function_context.
1508 * name-lookup.c (push_to_top_level): Likewise.
1509 * parser.c (cp_parser_late_parsing_for_member): Likewise.
1511 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
1514 * parser.c (cp_parser_decl_specifier_seq): Add location to error
1517 2008-03-27 Tom Tromey <tromey@redhat.com>
1519 * Make-lang.in: Revert automatic dependency patch.
1521 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1524 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
1525 (build_compound_expr): New, for compatibility with C
1526 build_compound_expr.
1527 (cp_build_compound_expr): Renamed from build_compound_expr.
1528 (build_c_cast): New, for compatibility with C build_c_cast.
1529 (cp_build_c_cast): Renamed from build_c_cast.
1530 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
1531 * decl.c (cxx_maybe_build_cleanup): Ditto.
1532 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
1533 (cp_build_compound_expr): Renamed from build_compound_expr.
1534 (build_c_cast): Add C-compatible prototype.
1535 (cp_build_c_cast): Renamed from build_c_cast.
1536 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
1537 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
1539 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1541 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
1542 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
1543 ending in a pack expansion, both of which can occur when
1544 substituting into a nested template.
1545 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
1546 instantiating the sizeof...(X) form, make tsubst_copy do the work.
1547 * parser.c (cp_parser_template_parameter): Deal with unnamed
1548 non-type template parameter packs identified by pack expansions in
1551 2008-03-26 Jakub Jelinek <jakub@redhat.com>
1554 * pt.c (apply_late_template_attributes): Don't call tsubst on
1555 first attribute argument if it is IDENTIFIER_NODE.
1558 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
1559 and LTGT_EXPR to pp_expression.
1561 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
1563 * pt.c (coerce_template_template_parm): Moved the body of the loop
1564 of coerce_template_template_parms here, to make iteration over a
1565 template argument pack simpler.
1566 Also, allow matching of a template parameter pack in the template
1567 template parameter to a template parameter in the template
1569 (coerce_template_template_parms): Deal with variadic template
1570 template parameters. Use coerce_template_template_parm.
1571 (unify): Make sure we coerce the template template argument's
1572 template arguments to the template template parameter's template
1573 parameters, not the other way around.
1575 2008-03-25 Tom Tromey <tromey@redhat.com>
1577 * Make-lang.in: Remove .o targets.
1578 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
1580 (c++_OBJS): New variable.
1581 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
1583 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
1585 * typeck.c (composite_pointer_type_r): Add SFINAE support.
1586 (composite_pointer_type): Ditto.
1587 (common_type): Fix call to composite_pointer_type.
1588 (cxx_sizeof_nowarn): New; used to be a macro.
1589 (cxx_sizeof_expr): Add SFINAE support.
1590 (cxx_alignof_expr): Ditto.
1591 (decay_conversion): Fix calls for SFINAE support.
1592 (rationalize_conditional_expr): Add SFINAE support.
1593 (build_class_member_access_expr): Ditto.
1594 (finish_class_member_access_expr): Ditto.
1595 (build_x_indirect_ref): Ditto.
1596 (build_indirect_ref): Original version renamed to
1597 cp_build_indirect_ref; new version provides a bridge from
1599 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
1601 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
1602 (build_function_call): Original version renamed to
1603 cp_build_function_call; new version provides a bridge from
1605 (cp_build_function_call): Was build_function_call; added SFINAE
1607 (convert_arguments): Add SFINAE support.
1608 (build_x_binary_op): Ditto.
1609 (build_binary_op): Original version renamed to cp_build_binary_op;
1610 new version provides a bridge from c-common.
1611 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
1612 (pointer_diff): Fix calls for SFINAE.
1613 (build_x_unary_op): Add SFINAE support.
1614 (condition_conversion): Fix calls for SFINAE.
1615 (build_unary_op): Original version renamed to cp_build_unary_op;
1616 new version provides a bridge from c-common.
1617 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
1618 (unary_complex_lvalue): Fix calls for SFINAE.
1619 (build_x_conditional_expr): Add SFINAE support.
1620 (build_x_compound_expr_from_list): Fix calls for SFINAE.
1621 (build_x_compound_expr): Add SFINAE support.
1622 (convert_ptrmem): Fix calls for SFINAE.
1623 (build_static_cast_1): Add SFINAE support.
1624 (build_static_cast): Ditto.
1625 (build_reinterpret_cast_1): Ditto.
1626 (build_reinterpret_cast): Ditto.
1627 (build_const_cast_1): Ditto.
1628 (build_const_cast): Ditto.
1629 (build_c_cast): Ditto.
1630 (build_modify_expr): Original version renamed to
1631 cp_build_modify_expr; new version provides a bridge from c-common.
1632 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
1634 (build_x_modify_expr): Add SFINAE support.
1635 (build_ptrmemfunc): Fix calls for SFINAE.
1636 (convert_for_assignment): Add SFINAE support.
1637 (convert_for_initialization): Ditto.
1638 (check_return_expr): Fix calls for SFINAE.
1639 (lvalue_or_else): Add SFINAE support.
1640 * init.c (perform_member_init): Fix calls for SFINAE.
1641 (emit_mem_initializers): Ditto.
1642 (expand_virtual_init): Ditto.
1643 (expand_cleanup_for_base): Ditto.
1644 (build_aggr_init): Add SFINAE support.
1645 (expand_default_init): Ditto.
1646 (expand_aggr_init_1): Fix calls for SFINAE.
1647 (build_offset_ref): Ditto.
1648 (build_new_1): Add SFINAE support.
1650 (build_vec_delete_1): Fix calls for SFINAE.
1651 (get_temp_regvar): Ditto.
1652 (build_vec_init): Add SFINAE support.
1653 (build_dtor_call): Fix calls for SFINAE.
1654 (build_delete): Ditto.
1655 (push_base_cleanups): Ditto.
1656 (build_vec_delete_1): Ditto.
1657 * class.c (build_base_path): Fix calls for SFINAE.
1658 (build_simple_base_path): Ditto.
1659 (convert_to_base_statically): Ditto.
1660 (build_vfn_ref): Ditto.
1661 (resolve_address_of_overloaded_function): Ditto.
1662 * decl.c (check_initializer): Fix calls for SFINAE.
1663 (register_dtor_fn): Ditto.
1664 (compute_array_index_type): Ditto.
1665 (finish_enum): Ditto.
1666 (start_preparsed_function): Ditto.
1667 (cxx_maybe_build_cleanup): Ditto.
1668 * call.c (convert_like): Add COMPLAIN argument.
1669 (convert_like_with_context): Ditto.
1670 (build_this): Fix calls for SFINAE.
1671 (build_user_type_conversion): Ditto.
1672 (resolve_args): Ditto.
1673 (build_new_function_call): Add SFINAE support.
1674 (build_operator_new_call): Fix calls for SFINAE.
1675 (build_object_call): Add SFINAE support.
1676 (build_conditional_expr): Ditto.
1677 (build_new_op): Ditto.
1678 (build_op_delete_call): Fix calls for SFINAE.
1679 (build_temp): Ditto.
1680 (convert_like_real): Add SFINAE support.
1681 (build_x_va_arg): Fix calls for SFINAE.
1682 (convert_default_arg): Ditto.
1683 (build_over_call): Add SFINAE support.
1684 (build_java_interface_fn_ref): Fix calls for SFINAE.
1685 (build_special_member_call): Add SFINAE support.
1686 (build_new_method_call): Ditto.
1687 (perform_implicit_conversion): Ditto.
1688 (perform_direct_initialization_if_possible): Ditto.
1689 (initialize_reference): Fix calls for SFINAE.
1690 * method.c (do_build_assign_ref): Fix calls for SFINAE.
1691 * rtti.c (build_headof): Fix calls for SFINAE.
1692 (get_tinfo_decl_dynamic): Ditto.
1693 (get_typeid): Ditto.
1694 (build_dynamic_cast_1): Add SFINAE support.
1695 (build_dynamic_cast): Ditto.
1696 (tinfo_base_init): Fix calls for SFINAE.
1697 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
1698 (do_end_catch): Ditto.
1699 (initialize_handler_parm): Ditto.
1700 (expand_start_catch_block): Ditto.
1701 (do_allocate_exception): Ditto.
1702 (do_free_exception): Ditto.
1703 (build_throw): Ditto.
1704 * cvt.c (build_up_reference): Fix calls for SFINAE.
1705 (convert_to_reference): Ditto.
1706 (ocp_convert): Ditto.
1707 (convert_to_void): Add SFINAE support.
1708 * tree.c (build_dummy_object): Fix calls for SFINAE.
1709 (stabilize_expr): Ditto.
1710 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
1712 (build_new_method_call): Ditto.
1713 (build_special_member_call): Ditto.
1714 (build_new_op): Ditto.
1715 (perform_implicit_conversion): Ditto.
1716 (perform_direct_initialization_if_possible): Ditto.
1717 (convert_to_void): Ditto.
1718 (build_aggr_init): Ditto.
1720 (build_vec_init): Ditto.
1721 (build_dynamic_cast): Ditto.
1722 (finish_call_expr): Ditto
1723 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
1724 (cxx_sizeof_nowarn): Remove macro; add function declaration.
1725 (build_class_member_access_expr): Add tsubst_flags_t parameter.
1726 (finish_class_member_access_expr): Ditto.
1727 (build_x_indirect_ref): Ditto.
1728 (cp_build_indirect_ref): New.
1729 (cp_build_function_call): Add tsubst_flags_t parameter.
1730 (build_x_unary_op): Ditto.
1731 (cp_build_unary_op): New.
1732 (build_x_conditional_expr): Add tsubst_flags_t parameter.
1733 (build_x_compound_expr): Ditto.
1734 (build_compound_expr): Ditto.
1735 (build_static_cast): Ditto.
1736 (build_reinterpret_cast): Ditto.
1737 (build_const_cast): Ditto.
1738 (build_c_cast): Ditto.
1739 (build_x_modify_expr): Ditto.
1740 (cp_build_modify_expr): New.
1741 (convert_for_initialization): Add tsubst_flags_t parameter.
1742 (cp_build_binary_op): Remove macro; add function declaration.
1743 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
1744 (lvalue_or_else): Ditto.
1745 (build_functional_cast): Ditto.
1746 * typeck2.c (digest_init): Fix calls for SFINAE.
1747 (process_init_constructor_array): Ditto.
1748 (process_init_constructor_record): Ditto.
1749 (build_x_arrow): Ditto.
1750 (build_m_component_ref): Ditto.
1751 (build_functional_cast): Add SFINAE support.
1752 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
1753 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
1754 (finish_expr_stmt): Ditto.
1755 (finish_for_expr): Ditto.
1756 (finish_asm_stmt): Ditto.
1757 (finish_non_static_data_member): Ditto.
1758 (finish_qualified_id_expr): Ditto.
1759 (finish_call_expr): Add SFINAE support.
1760 (finish_increment_expr): Fix calls for SFINAE.
1761 (finish_unary_op_expr): Ditto.
1762 (simplify_aggr_init_expr): Ditto.
1763 (finish_omp_clauses): Ditto.
1764 (finish_omp_for): Ditto.
1765 (finish_omp_barrier): Ditto.
1766 (finish_omo_flush): Ditto.
1767 * decl2.c (grok_array_decl): Fix calls or SFINAE.
1768 (build_anon_union_vars): Ditto.
1769 (get_guard_cond): Ditto.
1771 (one_static_initialization_or_destruction): Ditto.
1772 (do_static_initialization_or_destruction): Ditto.
1773 (generate_ctor_or_dtor_function): Ditto.
1774 (build_offset_ref_call_from_tree): Ditto.
1775 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
1776 (cp_parser_postfix_dot_deref_expression): Ditto.
1777 (cp_parser_unary_expression): Ditto.
1778 (cp_parser_new_expression): Ditto.
1779 (cp_parser_cast_expression): Ditto.
1780 (cp_parser_binary_expression): Ditto.
1781 (cp_parser_question_colon_clause): Ditto.
1782 (cp_parser_assignment_expression): Ditto.
1783 (cp_parser_expression): Ditto.
1784 (cp_parser_builtin_offsetof): Ditto.
1785 (cp_parser_template_argument): Ditto.
1786 (cp_parser_functional_cast): Ditto.
1788 2008-03-24 Tom Tromey <tromey@redhat.com>
1790 * lex.c (handle_pragma_interface): Don't copy the filename.
1791 (handle_pragma_implementation): Copy filename using xstrdup.
1793 2008-03-21 Paolo Carlini <pcarlini@suse.de>
1795 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
1796 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
1797 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
1798 (PROMOTES_TO_AGGR_TYPE): Remove.
1799 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
1800 * typeck.c (unary_complex_lvalue, build_modify_expr,
1801 convert_for_initialization): Adjust.
1802 * init.c (is_aggr_type): Remove.
1803 (is_class_type): Add.
1804 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
1805 build_delete): Adjust.
1806 * lex.c (make_aggr_type): Remove.
1807 (make_class_type): Add.
1808 (cxx_make_type): Adjust.
1809 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
1811 * decl.c (build_typename_type, make_typename_type,
1812 make_unbound_class_template, cxx_init_decl_processing,
1813 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
1814 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
1815 grok_op_properties, xref_tag, check_function_type): Adjust.
1816 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
1817 add_builtin_candidate, add_builtin_candidates,
1818 build_user_type_conversion_1, convert_like_real, build_cxx_call,
1819 is_subseq, compare_ics): Adjust.
1820 * method.c (use_thunk): Adjust.
1821 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
1822 create_tinfo_types): Adjust.
1823 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1824 build_up_reference, convert_to_reference, convert_from_reference,
1825 ocp_convert, build_expr_type_conversion): Adjust.
1826 * tree.c (bind_template_template_parm, error_type): Adjust.
1827 * dump.c (cp_dump_tree): Adjust.
1828 * search.c (lookup_member): Adjust.
1829 * friend.c (make_friend_class, do_friend): Adjust.
1830 * typeck2.c (store_init_value, process_init_constructor_array,
1831 process_init_constructor_record, build_x_arrow, build_m_component_ref,
1832 build_functional_cast): Adjust.
1833 * pt.c (finish_member_template_decl, process_template_parm,
1834 lookup_template_class, tsubst_function_type, tsubst,
1835 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
1837 * semantics.c (begin_class_definition, finish_base_specifier,
1838 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
1840 * name-lookup.c (constructor_name_p, push_overloaded_decl,
1841 do_class_using_decl, lookup_qualified_name,
1842 maybe_process_template_type_declaration): Adjust.
1843 * decl2.c (grok_array_decl, check_member_template,
1844 constrain_class_visibility): Adjust.
1845 * parser.c (cp_parser_class_name): Adjust.
1847 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
1849 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
1851 2008-03-17 Jason Merrill <jason@redhat.com>
1854 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
1855 a temp directly to a reference as per DR391.
1857 2008-03-12 Richard Guenther <rguenther@suse.de>
1861 2008-02-04 Richard Guenther <rguenther@suse.de>
1864 * decl.c (record_builtin_java_type): Make jboolean a
1865 integer type again where its mode doesn't match that of bool.
1867 2008-01-25 Richard Guenther <rguenther@suse.de>
1870 * decl.c (record_builtin_java_type): Make __java_boolean
1872 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1873 after TYPE_MAIN_VARIANT check.
1875 2008-03-10 Jakub Jelinek <jakub@redhat.com>
1878 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
1882 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
1883 DECL_P in not a variable and appears more than once error messages.
1885 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
1889 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
1893 * typeck.c (structural_comptypes): Call cp_comptypes.
1894 (comptypes): New; called from the C/C++ common bits to perform
1896 (cp_comptypes): Renamed from comptypes, which is already used,
1897 with a different signature, by the C++ front end.
1898 (build_reinterpret_cast_1): Call cp_comptypes.
1899 (ptr_reasonably_similar): Ditto.
1900 * decl.c (decls_match): Ditto.
1901 * cvt.c (convert_to_reference): Ditto.
1902 * cp-tree.h (same_type_p): Ditto.
1903 (same_or_base_type_p): Ditto.
1904 (comptypes): Rename to cp_comptypes.
1905 * pt.c (canonical_type_parameter): Call cp_comptypes.
1907 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
1909 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
1910 test for equivalence between pointer and references.
1912 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1915 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
1916 (check_field_decls): Likewise.
1917 (note_name_declared_in_class): Likewise.
1918 * call.c (build_new_op): Likewise.
1919 (convert_like_real): Likewise.
1920 (build_over_call): Likewise.
1921 * lex.c (unqualified_fn_lookup_error): Likewise.
1922 * parser.c (cp_parser_template_id): Likewise.
1923 * cvt.c (warn_ref_binding): Likewise.
1924 (convert_to_reference): Likewise.
1925 (ocp_convert): Likewise.
1926 (convert_to_void): Use error instead of pedwarn.
1927 * error.c (cp_cpp_error): Use pedantic_warning_kind.
1928 * decl.c (compute_array_index_type): Use constant_expression_error.
1930 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
1932 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
1933 that auto is either a storage class or a simple type specifier,
1934 depending on the dialect.
1935 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
1936 specifier in C++98 mode, error in C++0x mode (since we don't
1937 support auto as a type specifier, yet).
1938 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
1939 storage specifier in C++0x mode.
1940 (cp_parser_simple_type_specifier): Parse `auto' as a
1941 simple-type-specifier, but error because we don't support it yet.
1943 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1945 * parser.c (cp_parser_nonclass_name): New.
1946 (cp_parser_pseudo_destructor_name): Use it instead of
1947 cp_parser_type_name.
1948 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
1950 2008-02-29 Tom Tromey <tromey@redhat.com>
1952 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
1953 (cp_lexer_get_preprocessor_token): Update.
1954 (cp_lexer_set_source_position_from_token): Don't call
1955 restore_input_file_stack.
1956 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
1958 2008-02-28 Richard Guenther <rguenther@suse.de>
1961 2008-02-26 Richard Guenther <rguenther@suse.de>
1963 * decl.c (duplicate_decls): Remove decl from global mapping
1964 before ggc_freeing it.
1966 2008-02-27 Jakub Jelinek <jakub@redhat.com>
1969 * rtti.c: Include c-pragma.h.
1970 (push_abi_namespace, pop_abi_namespace): New functions.
1971 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
1972 create_tinfo_types, emit_support_tinfos): Use them.
1973 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
1975 2008-02-26 Jason Merrill <jason@redhat.com>
1978 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
1979 to name the struct for linkage purposes even if it has attributes.
1980 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
1982 2008-02-26 Tom Tromey <tromey@redhat.com>
1984 * parser.c (eof_token): Remove old location code.
1985 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
1986 * decl2.c (generate_ctor_or_dtor_function): Remove old location
1988 (cp_write_global_declarations): Likewise.
1989 * lex.c (cxx_init): Remove old location code.
1990 (handle_pragma_implementation): Remove test of
1991 USE_MAPPED_LOCATION.
1992 * pt.c (tsubst): Remove old location code.
1993 * error.c (cp_print_error_function): Remove test of
1994 USE_MAPPED_LOCATION.
1995 * decl.c (pop_label): Remove old location code.
1996 (finish_function): Likewise.
1998 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2001 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2003 2008-02-26 Richard Guenther <rguenther@suse.de>
2005 * decl.c (duplicate_decls): Remove decl from global mapping
2006 before ggc_freeing it.
2008 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2011 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2013 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2015 * typeck.c (build_class_member_access_expr): Add appropriate
2016 OPT_W* parameter to warning.
2017 (build_reinterpret_cast_1): Likewise.
2018 * name-lookup.c (push_overloaded_decl): Likewise.
2020 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2023 * error.c (dump_expr): Handle CONJ_EXPR.
2025 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2028 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2029 (dump_expr): Handle FIXED_CST.
2031 2008-02-24 Jason Merrill <jason@redhat.com>
2033 * parser.c (cp_parser_declaration): Handle "inline namespace".
2034 (cp_parser_namespace_definition): Likewise.
2037 * name-lookup.c (arg_assoc_namespace): Look down into inline
2040 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2042 * typeck.c (check_for_casting_away_constness): Use 1 single
2043 argument, the type of cast, to decide what diagnostics generate.
2044 (build_static_cast_1): Remove unused code. Update call to
2045 check_for_casting_away_constness.
2046 (build_reinterpret_cast_1): Update call to
2047 check_for_casting_away_constness.
2048 (build_const_cast_1): Likewise.
2050 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2052 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2053 VEC_NEW_EXPR), forward to pp_expression.
2054 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2056 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2059 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2061 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2064 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
2065 template decls' function decl.
2067 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2071 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2074 * pt.c (determine_specialization): In case of function templates,
2075 when the type of DECL does not match FN there is no match.
2077 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2080 * typeck.c (build_binary_op): Warn about floating point
2081 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2083 2008-02-19 Jason Merrill <jason@redhat.com>
2086 * pt.c (resolve_overloaded_unification): Set processing_template_decl
2087 while we look for possible bindings.
2089 2008-02-19 Jakub Jelinek <jakub@redhat.com>
2092 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
2096 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
2097 vars. Afterwards ensure v is VAR_DECL.
2100 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
2101 call cp_finish_decl.
2102 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
2105 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
2110 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
2111 is error_mark_node, return an error early.
2112 (find_parameter_packs_r): Pass the pointer set along to recursive
2113 calls of cp_walk_subtrees; don't try to manage the pointer set
2115 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
2116 (make_pack_expansion): Ditto.
2117 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
2118 a second pass through the tree with find_parameter_packs_r; that
2119 second pass no longer does anything.
2120 (push_template_decl_real): If we have an erroneous declaration,
2121 set its type to error_mark_node before returning an error.
2123 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
2126 * pt.c (tsubst_initializer_list): Deal with the use of
2127 VOID_TYPE_NODE to indicate value-initialization of the bases.
2129 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2130 Jason Merrill <jason@redhat.com>
2134 * class.c (type_has_user_nondefault_constructor): New fn.
2135 * cp-tree.h: Declare it.
2136 * init.c (emit_mem_initializers): Use it for -W warning about
2137 missing base initializer.
2139 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2142 * pt.c (determine_specialization): In case of function templates,
2143 when the type of DECL does not match FN there is no match.
2145 2008-02-13 Jakub Jelinek <jakub@redhat.com>
2146 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2149 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
2150 are not identifier :: ~, return before calling cp_parser_type_name.
2152 2008-02-13 Jason Merrill <jason@redhat.com>
2154 PR c++/34962, c++/34937, c++/34939
2155 * decl2.c (is_late_template_attribute): Always defer attributes
2156 vector_size and weak.
2159 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
2160 of enumerators, too.
2162 2008-02-12 Jason Merrill <jason@redhat.com>
2165 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
2166 if we're doing conversions to call a user-defined conversion function.
2168 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
2171 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
2174 2008-02-12 Jakub Jelinek <jakub@redhat.com>
2177 * init.c (build_new_1): Don't create placement_expr before
2178 constructing alloc_call. Verify that the pointer is passed by
2179 value to operator new.
2181 2008-02-11 Jason Merrill <jason@redhat.com>
2184 * pt.c (tsubst): Don't look up a template typedef in an explicit
2187 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
2190 * tree.c (cp_build_qualified_type_real): When building a
2191 cv-qualified array type, build it as a unique type with
2192 build_cplus_array_type_1 and then adopt the unqualified type's
2195 2008-02-11 Paolo Carlini <pcarlini@suse.de>
2198 * decl.c (groktypename): Check grokdeclarator return.
2200 2008-02-10 Jason Merrill <jason@redhat.com>
2203 * decl2.c (cp_write_global_declarations): Don't write out static
2204 data members with DECL_IN_AGGR_P set.
2206 2008-02-08 Jason Merrill <jason@redhat.com>
2209 * tree.c (build_target_expr_with_type): Handle void initializer.
2210 (bot_manip): Remap slot before recursing.
2212 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2215 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
2217 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
2220 * tree.c: Include tree-flow.h.
2221 (build_target_expr): Check type compatibility.
2222 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
2223 * call.c (convert_like_real): Convert bitfield to expected type.
2225 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2229 * typeck.c (structural_comptypes): Call cp_comptypes.
2230 (comptypes): New; called from the C/C++ common bits to perform
2232 (cp_comptypes): Renamed from comptypes, which is already used,
2233 with a different signature, by the C++ front end.
2234 (build_reinterpret_cast_1): Call cp_comptypes.
2235 (ptr_reasonably_similar): Ditto.
2236 * decl.c (decls_match): Ditto.
2237 * cvt.c (convert_to_reference): Ditto.
2238 * cp-tree.h (same_type_p): Ditto.
2239 (same_or_base_type_p): Ditto.
2240 (comptypes): Rename to cp_comptypes.
2241 * pt.c (canonical_type_parameter): Call cp_comptypes.
2243 2008-02-05 Jakub Jelinek <jakub@redhat.com>
2246 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
2247 value dependent expression.
2249 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
2252 * decl2.c (save_template_attributes): When we're modifying the
2253 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
2254 all of the other variants to add those same attributes. Otherwise,
2255 the main variant will be inconsistent with those other variants.
2257 2008-02-04 Richard Guenther <rguenther@suse.de>
2260 * decl.c (record_builtin_java_type): Make jboolean a
2261 integer type again where its mode doesn't match that of bool.
2263 2008-02-02 Jason Merrill <jason@redhat.com>
2264 Mark Mitchell <mark@codesourcery.com>
2267 * init.c (build_value_init_1): New function.
2268 (build_value_init): New function.
2269 * typeck2.c (build_functional_cast): Call it.
2270 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
2272 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
2273 TYPE_HAS_CONSTRUCTOR.
2274 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
2275 add_implicitly_declared_members): Adjust.
2276 (check_field_decls): Adjust. Remove warnings about reference/const
2277 in class without constructor.
2278 (check_bases_and_members): Adjust. Give those warnings here instead.
2279 * decl.c (fixup_anonymous_aggr): Adjust.
2280 (check_initializer): Adjust, clarify logic slightly.
2281 (grok_special_member_properties): Adjust, only set if user-provided.
2282 * rtti.c (create_tinfo_types): Don't set.
2283 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
2284 Use same_type_ignoring_top_level_qualifiers_p.
2285 * pt.c (check_explicit_specialization): Adjust.
2286 (instantiate_class_template): Adjust.
2288 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
2289 Jakub Jelinek <jakub@redhat.com>
2293 * typeck.c (structural_comptypes): Handle comparisons of
2294 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
2296 * mangle.c (write_builtin_type): Map down to the canonical type,
2297 which will be one of the predefined type nodes.
2299 2008-01-29 Michael Meissner <michael.meissner@amd.com>
2302 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
2303 bits to allow for expansion of the number of middle end tree
2306 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
2317 * typeck.c (check_return_expr): Tweak call to
2318 check_for_bare_parameter_packs.
2319 * class.c (add_method): Be careful with error_mark_nodes.
2320 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
2322 * pt.c (struct find_parameter_pack_data): Remove
2324 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
2325 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
2326 (make_pack_expansion): Ditto.
2327 (check_for_bare_parameter_packs): Parameter is now a tree, not a
2329 (process_template_parm): Tweak call to
2330 check_for_bare_parameter_packs.
2331 (push_template_decl_real): Tweak calls to
2332 check_for_bare_parameter_packs. If bare parameter packs are found
2333 in the list of exceptions, clear out that list after giving an
2335 * semantics.c (finish_cond): Tweak call to
2336 check_for_bare_parameter_packs.
2337 (finish_expr_stmt): Ditto.
2338 (finish_for_expr): Ditto.
2339 (finish_switch_cond): Ditto.
2340 (finish_mem_initializers): Ditto.
2341 (finish_member_declaration): Ditto.
2342 (finish_static_assert): Check for bare parameter packs in the
2344 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
2345 attributes of a declaration.
2346 * parser.c (cp_parser_using_declaration): Tweak call to
2347 check_for_bare_parameter_packs.
2348 (cp_parser_base_clause): Ditto.
2350 2008-01-28 Jason Merrill <jason@redhat.com>
2353 * class.c (build_base_path): Fix !want_pointer case.
2355 2008-01-27 Jason Merrill <jason@redhat.com>
2358 * class.c (build_base_path): Fix previous change.
2360 2008-01-26 Jakub Jelinek <jakub@redhat.com>
2363 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
2366 2008-01-26 Richard Guenther <rguenther@suse.de>
2369 * typeck.c (build_binary_op): Remove code to shorten compares.
2371 2008-01-25 Richard Guenther <rguenther@suse.de>
2374 * decl.c (record_builtin_java_type): Make __java_boolean
2376 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2377 after TYPE_MAIN_VARIANT check.
2379 2008-01-25 Jason Merrill <jason@redhat.com>
2382 * class.c (build_base_path): Don't mess with virtual access if
2384 * call.c (standard_conversion): Don't check whether source type
2387 * decl2.c (is_late_template_attribute): Don't defer attribute
2388 visibility just because the type is dependent.
2390 2008-01-25 Jason Merrill <jason@redhat.com>
2391 Mark Mitchell <mark@codesourcery.com>
2394 * call.c (standard_conversion): Allow conversion from integer/real
2396 (compare_ics): Such a conversion is worse than a normal arithmetic
2399 2008-01-25 Richard Guenther <rguenther@suse.de>
2402 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
2405 2008-01-24 Paolo Carlini <pcarlini@suse.de>
2408 * pt.c (push_template_decl_real): Return error_mark_node in case
2409 of template definition of non-template.
2411 2008-01-24 Jason Merrill <jason@redhat.com>
2414 * decl2.c (is_late_template_attribute): Defer any attribute with
2415 dependent args. Also defer type attributes if the type is dependent.
2417 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2418 Alexandre Oliva <aoliva@redhat.com>
2421 * call.c (reference_binding): For bitfields use the declared bitfield
2423 (add_builtin_candidates): Likewise.
2424 * class.c (layout_class_type): For bitfields copy over the
2425 original type quals.
2427 2008-01-22 Jason Merrill <jason@redhat.com>
2430 * decl.c (groktypename): Also ignore attributes on dependent
2431 possibly-class types.
2434 * friend.c (do_friend): Check for prior declaration of a friend
2435 function of a local class.
2436 * name-lookup.c (lookup_name_innermost_nonclass_level):
2438 * name-lookup.h: Declare it.
2440 2008-01-22 Tom Tromey <tromey@redhat.com>
2443 * init.c (build_new_1): Only disallow Java aggregates.
2445 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2448 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
2449 if decl or init is error_mark_node.
2452 * error.c (dump_expr): Handle VECTOR_CST.
2454 2008-01-21 Jason Merrill <jason@redhat.com>
2457 * pt.c (tsubst_aggr_type): Make sure our context is complete.
2460 * pt.c (retrieve_local_specialization): Robustify.
2461 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
2464 * pt.c (tsubst): Only call retrieve_local_specialization if the
2465 original typedef was in a function template.
2468 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
2470 2008-01-21 Richard Guenther <rguenther@suse.de>
2473 * error.c (cp_print_error_function): Deal with recursive
2476 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2479 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
2481 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2485 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
2486 on non-IS_AGGR_TYPE scope.
2487 (constructor_name_p): Assert IS_AGGR_TYPE.
2489 2008-01-18 Ian Lance Taylor <iant@google.com>
2492 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
2493 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
2494 DECL_IS_OPERATOR_NEW flag.
2496 2008-01-16 Richard Guenther <rguenther@suse.de>
2499 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
2500 for conversions to type variants.
2502 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
2504 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
2505 declaration and code. Update copyright year.
2507 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2510 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
2511 know we have a class type.
2513 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2516 * pt.c (coerce_template_parameter_pack): When substituting into
2517 the type of a non-type template parameter pack. use the
2518 deduced/substituted arguments.
2519 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
2520 can be a parameter pack with the ellipsis following it. When we
2521 have an erroneous declaration, allow it to be a parameter pack.
2522 (cp_parser_template_parameter): Complain about default
2523 arguments on non-type template parameter packs, and parse them
2524 using the new cp_parser_default_argument.
2525 (cp_parser_parameter_declaration): Complain about parameter packs
2526 with default arguments. Move parsing of default arguments into a
2527 new function, cp_parser_default_argument.
2528 (cp_parser_default_argument): New; extracted from
2529 cp_parser_parameter_declaration.
2531 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2537 * typeck.c (check_return_expr): If there are bare parameter packs
2538 in the return value, set it to error_mark_node.
2539 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
2540 * pt.c (find_parameter_packs_r): Look at the type of
2541 IDENTIFIER_NODEs (e.g., for user-defined conversions).
2542 (check_for_bare_parameter_packs): Flip the result: now returns
2543 TRUE when there were bare parameter packs, FALSE otherwise.
2544 (push_template_decl_real): Deal with flipped result of
2545 check_for_bare_parameter_packs.
2546 * semantics.c (finish_cond): If there are bare parameter packs in
2547 the conditional, set it to error_mark_node.
2548 (finish_expr_stmt): If there are bare parameter packs in the
2549 expression, set it to error_mark_node.
2550 (finish_for_expr): Ditto.
2551 (finish_switch_cond): If there are bare parameter packs in
2552 the conditional, set it to error_mark_node.
2553 (finish_mem_initializers): If there are bare parameter packs in
2554 the member initializer, set it to error_mark_node.
2555 (finish_member_declaration): Check the attributes of the
2556 declaration for bare parameter packs, and remove the attributes if
2557 any have bare parameter packs.
2558 * parser.c (cp_parser_using_declaration): Check the using
2559 declaration for bare parameter packs.
2560 (cp_parser_base_clause): If there are bare parameter packs in a
2561 base specifier, don't add it to the chain.
2563 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2566 * error.c (dump_simple_decl): Display ellipsis for template
2567 non-type parameter packs.
2568 (dump_decl): Display ellipsis for template type parameter packs.
2569 (dump_template_decl): Display ellipsis for template template
2571 * pt.c (redeclare_class_template): When redeclaring a class
2572 template, check for collisions between template parameters and
2573 template parameter packs.
2575 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2578 * pt.c (process_partial_specialization): Don't mark template
2579 parameters that occur in non-deduced contexts.
2580 (struct pair_fn_data): Add include_nondeduced_p.
2581 (for_each_template_parm_r): Only visit non-deduced contexts if
2582 include_nondeduced_p is set.
2583 (for_each_template_parm): Added parameter include_nondeduced_p,
2584 which states whether template parameters found in non-deduced
2585 contexts should be visited.
2586 (uses_template_parms): Visit all template parameters, even those
2587 in non-deduced contexts.
2589 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2592 * pt.c (check_default_tmpl_args): Check for parameter packs that
2593 aren't at the end of a primary template.
2594 (push_template_decl_real): Remove check for parameter packs that
2595 aren't at the end of a primary template; that now happens in
2596 check_default_tmpl_args.
2597 * semantics.c (finish_template_template_parm): Use
2598 check_default_tmpl_args to check for errors in the template
2601 2008-01-12 Doug Kwan <dougkwan@google.com>
2603 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
2604 instead of OPT_Wreturn_type in warning due to ignored return type
2606 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
2607 instead of OPT_Wreturn_type in warning due to ignored return type
2610 2008-01-08 Jakub Jelinek <jakub@redhat.com>
2613 * semantics.c (finish_omp_for): Don't call
2614 fold_build_cleanup_point_expr if processing_template_decl.
2616 2008-01-04 Paolo Carlini <pcarlini@suse.de>
2617 Jakub Jelinek <jakub@redhat.com>
2620 * error.c (dump_template_argument): Deal with TREE_LIST.
2622 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
2624 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
2625 long" in C++0x mode; change the warning to note that "long long"
2626 is only unsupported in C++98 mode.
2628 2007-12-20 Jason Merrill <jason@redhat.com>
2631 * call.c (standard_conversion): Derived-to-base is considered a
2632 standard conversion.
2634 2007-12-19 Jakub Jelinek <jakub@redhat.com>
2637 * parser.c (cp_parser_omp_parallel): For non-combined parallel
2638 call cp_parser_statement rather than
2639 cp_parser_already_scoped_statement.
2641 2007-12-18 Jason Merrill <jason@redhat.com>
2644 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
2646 (dependent_type_p_r): Handle the domain of an array.
2648 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
2649 Jakub Jelinek <jakub@redhat.com>
2654 * pt.c (template_template_parm_bindings_ok_p): New; verifies
2655 bindings of template template parameters after all template
2656 arguments have been deduced.
2657 (coerce_template_parms): Don't complain when COMPLAIN doesn't
2659 (fn_type_unification): Use template_template_parm_bindings_ok_p.
2660 (unify): Deal with variadic, bound template template parameters.
2661 (get_class_bindings): Use template_template_parm_bindings_ok_p.
2663 2007-12-18 Jakub Jelinek <jakub@redhat.com>
2666 * decl.c (grokdeclarator): Reject friend sfk_constructor
2669 2007-12-17 Jakub Jelinek <jakub@redhat.com>
2672 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
2675 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
2678 * cp-lang.c (cp_classify_record): New.
2679 (LANG_HOOKS_CLASSIFY_RECORD): Override.
2681 2007-12-11 Jakub Jelinek <jakub@redhat.com>
2684 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
2687 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
2688 dynamic_cast in a template.
2690 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
2693 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
2694 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
2696 2007-12-10 Jakub Jelinek <jakub@redhat.com>
2699 * error.c (dump_type_prefix, dump_type_suffix): Handle
2700 TYPE_PACK_EXPANSION.
2703 * error.c (dump_expr): Handle ABS_EXPR.
2705 2007-12-09 Jakub Jelinek <jakub@redhat.com>
2709 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
2710 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2711 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
2712 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
2713 flag_use_repository and repo_emit_p returned 2.
2715 2007-12-06 Jakub Jelinek <jakub@redhat.com>
2718 * tree.c (stabilize_call, stabilize_init): Do nothing if
2719 processing_template_decl.
2721 2007-12-05 Jakub Jelinek <jakub@redhat.com>
2724 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
2725 error instead of assertion failure.
2726 * parser.c (cp_parser_decltype): If closing paren is not found,
2727 return error_mark_node.
2729 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2732 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
2734 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
2735 since arg_assoc_template_arg will deal with them (better).
2737 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2740 * pt.c (tsubst_exception_specification): Handle substitutions into
2741 member templates, where tsubst_pack_expansion returns a
2742 TYPE_PACK_EXPANSION.
2744 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2747 * pt.c (unify_pack_expansion): If we didn't deduce any actual
2748 bindings for the template parameter pack, don't try to keep the
2749 empty deduced arguments.
2750 (unify): If a parameter is a template-id whose template argument
2751 list contains a pack expansion that is not at the end, then we
2752 cannot unify against that template-id.
2754 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2757 * pt.c (current_template_args): Use error_operand_p.
2759 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2762 * error.c (dump_decl): Handle TREE_BINFO.
2764 2007-12-01 Ollie Wild <aaw@google.com>
2767 * typeck.c (build_binary_op): Add conversion of pointers to function
2768 members appearing as operands to the equality operators.
2770 2007-11-30 Jakub Jelinek <jakub@redhat.com>
2773 * error.c (dump_expr): Handle OBJ_TYPE_REF.
2775 2007-11-29 Jakub Jelinek <jakub@redhat.com>
2778 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
2780 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
2785 * parser.c (cp_parser_decltype): Don't call finish_id_expression
2787 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
2790 2007-11-27 Jakub Jelinek <jakub@redhat.com>
2792 PR tree-optimization/34181
2793 * method.c (use_thunk): Don't inline the call in the thunk.
2796 * tree.c (decl_linkage): Static data members and static member
2797 functions in anonymous ns classes are lk_external.
2799 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
2802 * decl.c (start_preparsed_function): Pass
2803 processing_template_decl for the new allocate_struct_function
2806 2007-11-25 Richard Guenther <rguenther@suse.de>
2808 * decl.c (poplevel): Use BLOCK_CHAIN.
2810 2007-11-24 Ollie Wild <aaw@google.com>
2812 * typeck.c (delta_from_ptrmemfunc): New function.
2813 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
2814 (build_binary_op): Call delta_from_ptrmemfunc.
2816 2007-11-23 Jakub Jelinek <jakub@redhat.com>
2820 * decl.c (cp_finish_decl): Disallow variable or field
2821 definitions if extern "Java" aggregates.
2822 (grokparms): Disallow parameters with extern "Java"
2824 (check_function_type): Disallow function return values
2825 with extern "Java" aggregates.
2826 * init.c (build_new_1): Disallow placement new with
2827 extern "Java" aggregates.
2829 2007-11-23 Mark Mitchell <mark@codesourcery.com>
2830 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2833 * call.c (convert_like_real): Build a zero constant when __null is
2834 converted to an integer type.
2836 2007-11-22 Jakub Jelinek <jakub@redhat.com>
2839 * decl2.c (cp_write_global_declarations): Issue error about static
2840 data members in anonymous namespace which are declared and used,
2843 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2846 * parser.c (cp_parser_class_head): Reject function template ids.
2849 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
2850 when processing_template_decl to build_array_type.
2853 * pt.c (more_specialized_fn): Don't segfault if one or
2854 both argument list end with ellipsis.
2856 2007-11-18 Jakub Jelinek <jakub@redhat.com>
2859 * semantics.c (finish_call_expr): Set
2860 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
2861 or OVERLOAD with all noreturn functions.
2863 2007-11-16 Jakub Jelinek <jakub@redhat.com>
2866 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
2869 2007-11-13 Jakub Jelinek <jakub@redhat.com>
2876 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
2877 set to error_mark_node the outermost POINTER_TYPE to the pack if
2878 it is seen in a POINTER_TYPE.
2879 (push_template_decl_real): If check_for_bare_parameter_packs
2880 fails for function return type, set the return type to
2881 integer_type_node. If check_for_bare_parameter_packs failed
2882 for non-function, return error_mark_node.
2885 * call.c (build_new_op): Call resolve_args before calling
2888 2007-11-11 Tom Tromey <tromey@redhat.com>
2891 * lex.c (handle_pragma_implementation): Use cpp_included_before.
2893 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2896 * pt.c (redeclare_class_template): Update error message. Use a
2897 note to show the previous declaration.
2898 (tsubst_friend_class): Use the location of the friend template as
2899 the input location before calling redeclare_class_template.
2901 2007-11-11 Jakub Jelinek <jakub@redhat.com>
2904 * semantics.c (finish_pseudo_destructor_expr): Handle
2905 object == error_mark_node.
2907 2007-11-10 Jakub Jelinek <jakub@redhat.com>
2910 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
2911 is not scalar type, let finish_class_member_access_expr handle
2912 diagnostics. Pass BIT_NOT_EXPR argument to
2913 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
2915 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
2918 * decl.c (cp_complete_array_type): If any of the initializer
2919 elements are pack expansions, don't compute the array size yet.
2921 2007-11-08 Andrew Pinski <pinskia@gmail.com>
2924 * tree.c (decl_linkage): Fields have no linkage.
2926 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
2928 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
2930 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
2935 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
2936 Be careful with ERROR_MARK_NODEs.
2937 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
2940 2007-11-07 Jakub Jelinek <jakub@redhat.com>
2943 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
2946 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
2950 * tree.c (c_build_qualified_type): Define bridge to
2951 cp_build_qualified_type.
2953 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
2964 * typeck.c (check_return_expr): Pass address of retval to
2965 check_for_bare_parameter_packs.
2966 * class.c (build_base_field): Tolerate bases that have no layout
2968 (end_of_base): Ditto.
2969 * tree.c (canonical_type_variant): Be careful with
2971 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
2973 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
2974 which states whether parameter packs should be replaced with
2976 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
2977 possible. If set_packs_to_error is set true, replace the parameter
2978 pack with ERROR_MARK_NODE. Manage our own pointer sets.
2979 (uses_parameter_packs): Don't set parameter packs to
2981 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
2982 which may be modified (if it is a parameter pack). Instructs
2983 find_parameter_packs_r to replace parameter packs with
2984 ERROR_MARK_NODE (so that they won't cause errors later on).
2985 (process_template_parm): Pass pointer to
2986 check_for_bare_parameter_packs.
2987 (process_partial_specialization): Replace pack expansions before
2988 the end of the template argument list with ERROR_MARK_NODE.
2989 (push_template_decl_real): Pass pointer to
2990 check_for_bare_parameter_packs. Replace parameter packs not at the
2991 end of the template parameter list with ERROR_MARK_NODE.
2992 (convert_template_argument): Be more careful about using DECL_NAME
2993 on only declarations.
2994 (unify): Can't unify against ERROR_MARK_NODE.
2995 * semantics.c (finish_cond): Pass pointer to
2996 check_for_bare_parameter_packs.
2997 (finish_expr_stmt): Ditto.
2998 (finish_for_expr): Ditto.
2999 (finish_switch_cond): Pass pointer to
3000 check_for_bare_parameter_packs, and call it before we put the
3001 condition into the statement.
3002 (finish_mem_initializers): Pass pointer to
3003 check_for_bare_parameter_packs.
3004 (finish_member_declaration): Ditto.
3005 * parser.c (cp_parser_base_clause): Ditto.
3007 2007-11-06 Jakub Jelinek <jakub@redhat.com>
3010 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
3011 with the final TREE_READONLY flag in place. processing_template_decl
3012 is known to be 0 in this part of function.
3015 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
3016 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
3017 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
3018 * semantics.c (finish_omp_atomic): Revert most of the
3019 2007-02-05 changes, just keep the new representation of
3020 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
3022 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
3025 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
3028 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3033 * typeck.c (merge_types): Don't lose rvalue references when
3035 * call.c (build_over_call): Don't elide move constructors just
3036 because the copy constructor is trivial (!).
3037 (compare_ics): If comparing cv-qualifiers fails, we can still order
3038 based on binding lvalues vs. rvalues.
3040 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3043 * pt.c (unify_pack_expansion): bring handling of function call
3044 arguments into line with type_unification_real.
3046 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3048 * typeck.c (build_binary_op): Use pedwarn instead of error for
3051 2007-11-05 Jakub Jelinek <jakub@redhat.com>
3054 * parser.c (cp_parser_unary_expression): For &&label call
3055 cp_parser_non_integral_constant_expression and return error_mark_node
3056 if it returned true.
3059 * decl.c (grokdeclarator): Don't call build_memfn_type if type
3060 is neither FUNCTION_TYPE nor METHOD_TYPE.
3062 2007-11-02 Jakub Jelinek <jakub@redhat.com>
3065 * parser.c (cp_parser_nested_name_specifier_opt): Use
3066 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
3067 typedef of currently open class.
3069 2007-11-02 Paolo Carlini <pcarlini@suse.de>
3072 * error.c (dump_expr): Deal specially with statements.
3074 2007-11-01 Jason Merrill <jason@redhat.com>
3077 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
3079 (lookup_template_class): Use it to get the outer template args
3080 for instantiating one.
3083 * pt.c (reduce_template_parm_level): tsubst the parameters
3084 of a template template parm.
3086 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
3089 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
3091 2007-11-01 Jakub Jelinek <jakub@redhat.com>
3094 * parser.c (cp_parser_postfix_dot_deref_expression): If
3095 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
3096 first and if that succeeds and type is SCALAR_TYPE_P, create
3100 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
3101 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
3102 as for std::type_info.
3104 2007-10-31 Paolo Carlini <pcarlini@suse.de>
3107 * cxx-pretty-print.c (pp_cxx_typeid_expression,
3108 pp_cxx_delete_expression): Change to static linkage.
3109 * cxx-pretty-print.h: Adjust declarations.
3110 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
3111 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
3112 MODOP_EXPR): Forward to pp_expression.
3114 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
3117 2007-10-31 Christian Bruel <christian.bruel@st.com>
3118 Mark Mitchell <mark@codesourcery.com>
3121 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
3122 if retval is volatile.
3124 2007-10-30 Jakub Jelinek <jakub@redhat.com>
3127 * decl2.c (build_offset_ref_call_from_tree): Call
3128 build_non_dependent_expr on object prior to building ADDR_EXPR from it
3129 if FN is DOTSTAR_EXPR.
3131 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
3135 * pt.c (find_parameter_packs_r): Fix typo in comment.
3136 (convert_template_argument): Look at the pattern of a pack
3137 expansion to determine what kind of entity we're converting.
3138 (coerce_template_parameter_pack): When we have coerced a non-type
3139 template parameter pack, substitute into the type of that pack.
3140 (tsubst_pack_expansion): When our substitution of a parameter pack
3141 is a "trivial" substitution of itself, just substitute into the
3142 pack expansion rather than actually expanding.
3144 2007-10-29 Jakub Jelinek <jakub@redhat.com>
3147 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
3148 for non-integral type bitfields. Return true if bitfield is correct, false
3149 error has been diagnosed.
3150 (check_field_decls): If check_bitfield_decl returned false, call also
3153 2007-10-28 Paolo Carlini <pcarlini@suse.de>
3154 Mark Mitchell <mark@codesourcery.com>
3157 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
3158 class member error out and return.
3160 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3162 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
3163 to current_function_decl rather than 0.
3166 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
3168 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
3170 2007-10-27 Jason Merrill <jason@redhat.com>
3173 * call.c (convert_default_arg): Detect recursion.
3175 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3178 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
3179 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
3181 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
3183 * error.c (dump_expr): Handle OFFSETOF_EXPR.
3185 2007-10-26 Jason Merrill <jason@redhat.com>
3188 * pt.c (get_template_info): New fn.
3189 (template_class_depth): Use it.
3190 (push_template_decl_real): Check that the template args of the
3191 definition match the args of the previous declaration.
3193 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3196 * decl2.c (coerce_new_type): Do not allow a default argument for
3197 the first parameter.
3199 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
3202 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
3203 don't see the leading '('. Only lookup names if we get an
3206 2007-10-26 Jakub Jelinek <jakub@redhat.com>
3209 * parser.c (cp_parser_parenthesized_expression_list): Set
3210 greater_than_is_operator_p to true in between the parens.
3212 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3215 * decl.c (grokdeclarator): In case of conflicting specifiers
3216 just return error_mark_node.
3218 2007-10-26 Ollie Wild <aaw@google.com>
3220 * expr.c (cxx_expand_expr): Removed.
3221 * cp-tree.h (exx_expand_expr): Removed.
3222 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
3225 2007-10-25 Paolo Carlini <pcarlini@suse.de>
3228 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
3230 2007-10-23 Jason Merrill <jason@redhat.com>
3232 PR c++/25950 (DR 391)
3233 * call.c (struct conversion): Remove check_copy_constructor_p.
3234 (reference_binding): Always bind a reference directly to a
3235 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
3237 (check_constructor_callable): Remove.
3238 (convert_like_real): Don't call it.
3239 (initialize_reference): Don't call check_constructor_callable.
3240 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
3241 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
3242 conversions if LOOKUP_NO_TEMP_BIND.
3243 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
3244 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
3246 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
3248 2007-10-22 Jakub Jelinek <jakub@redhat.com>
3251 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
3252 before checking if its type is integral.
3254 2007-10-22 Jason Merrill <jason@redhat.com>
3257 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
3258 * pt.c (apply_late_template_attributes): Splice out dependent
3259 attributes from DECL_ATTRIBUTES.
3261 * decl.c (cxx_maybe_build_cleanup): Use build_address.
3263 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3265 * typeck.c (build_binary_op) : Use appropriate warning option
3266 instead of unnamed warning.
3268 2007-10-16 Paolo Carlini <pcarlini@suse.de>
3271 * pt.c (current_template_args): Do not change TREE_LIST elements
3272 with a TREE_VALUE of error_mark_node.
3274 2007-10-16 Mark Mitchell <mark@codesourcery.com>
3276 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
3277 * decl.c (start_decl): Tidy.
3278 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
3280 (grokdeclarator): Clarify comment.
3282 2007-10-14 Andrew Pinski <pinskia@gmail.com>
3285 * decl.c (grokfndecl): Return NULL after the "definition of
3286 implicitly-declared" error happened.
3288 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
3291 * call.c (build_user_type_conversion_1): Do not consider conversion
3292 functions to convert a (possibly cv-qualified) object to the (possibly
3293 cv-qualified) same object type (or a reference to it), to a (possibly
3294 cv-qualified) base class of that type (or a reference to it).
3296 2007-10-12 Paolo Carlini <pcarlini@suse.de>
3298 * pt.c (tsubst): Use template_parm_level_and_index.
3300 2007-10-12 Jakub Jelinek <jakub@redhat.com>
3303 * parser.c (cp_parser_compound_statement): Handle label-declarations
3304 at the beginning of the compound statement.
3305 (cp_parser_block_declaration): Issue diagnostics about __label__
3306 not at the beginning of a block.
3308 2007-10-11 Paolo Carlini <pcarlini@suse.de>
3311 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
3312 to convert_template_argument.
3313 (coerce_template_parms): Return error_mark_node after fixed-length
3315 (tsubst_decl): Check for error_mark_node the return value of the
3316 first tsubst in 'case VAR_DECL'.
3318 2007-10-08 Ollie Wild <aaw@google.com>
3320 * typeck2.c (digest_init): Call cplus_expand_constant after
3321 convert_for_initialization.
3322 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3323 * expr.c (cplus_expand_constant): Updated function description.
3325 2007-10-04 Jason Merrill <jason@redhat.com>
3328 * call.c (initialize_reference): Handle local static reference
3331 2007-10-03 Jason Merrill <jason@redhat.com>
3334 * name-lookup.c (push_namespace_with_attrs): Fold back into...
3335 (push_namespace): Here.
3336 (handle_namespace_attrs): New fn for the attr code.
3337 (leave_scope): Don't pop_visibility.
3338 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
3339 * parser.c (cp_parser_namespace_definition): Call
3340 handle_namespace_attrs and pop_visibility as appropriate.
3343 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
3345 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
3347 * decl.c (duplicate_decls): Preserve linkage flags for mere
3348 redeclarations of gnu_inline definitions.
3350 2007-10-03 Jason Merrill <jason@redhat.com>
3353 * decl.c (wrap_cleanups_r): New fn.
3354 (wrap_temporary_cleanups): New fn.
3355 (initialize_local_var): Call it.
3357 2007-09-29 Jason Merrill <jason@redhat.com>
3360 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
3361 constant to not have DECL_EXTERNAL if it's file-local.
3363 2007-09-28 Ollie Wild <aaw@google.com>
3366 2007-09-27 Ollie Wild <aaw@google.com>
3368 * typeck2.c (digest_init): Call cplus_expand_constant after
3369 convert_for_initialization.
3370 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3371 * expr.c (cplus_expand_constant): Updated function description.
3373 2007-09-28 Jason Merrill <jason@redhat.com>
3376 * class.c (layout_empty_base): Take rli parameter, update
3377 rli->record_align if empty base has user-specified alignment.
3378 (build_base_field): Pass rli to it.
3380 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3383 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
3385 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3388 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
3389 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
3390 (dump_parameters): Just call dump_type for argument packs too.
3392 2007-09-28 Jakub Jelinek <jakub@redhat.com>
3395 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
3396 qualification by creating qualified PACK_EXPANSION_PATTERN and
3397 then calling make_pack_expansion on it.
3399 2007-09-27 Ollie Wild <aaw@google.com>
3401 * typeck2.c (digest_init): Call cplus_expand_constant after
3402 convert_for_initialization.
3403 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3404 * expr.c (cplus_expand_constant): Updated function description.
3406 2007-09-27 Jason Merrill <jason@redhat.com>
3409 * decl2.c (is_late_template_attribute): Don't crash on unknown
3412 2007-09-27 Paolo Carlini <pcarlini@suse.de>
3415 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
3416 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
3417 spaces in the formatting.
3418 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
3420 2007-09-27 Jakub Jelinek <jakub@redhat.com>
3422 * error.c (cxx_print_error_function): Add third argument, pass
3423 it over to lhd_print_error_function.
3424 (cp_print_error_function): If diagnostic->abstract_origin, print
3426 * cp-tree.h (struct diagnostic_info): New forward decl.
3427 (cxx_print_error_function): Add third argument.
3429 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
3432 * name-lookup.c (pushtag): Do not create an implicit typedef before
3433 the associated type declaration is known to be valid.
3435 2007-09-25 Jakub Jelinek <jakub@redhat.com>
3437 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
3438 rather than pointers.
3440 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
3443 * search.c (check_final_overrider): Fail if
3444 targetm.comp_type_attributes returns 0.
3446 2007-09-24 Jason Merrill <jason@redhat.com>
3449 * pt.c (resolve_typename_type): Don't look things up in the original
3450 template if it would mean losing template arguments.
3452 2007-09-24 Jakub Jelinek <jakub@redhat.com>
3455 * cp-tree.h (cxx_type_hash_eq): New prototype.
3456 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
3457 * tree.c (cxx_type_hash_eq): New function.
3459 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3462 * tree.c (cp_build_qualified_type_real): Build a canonical
3463 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
3465 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3469 * tree.c (cplus_array_compare): Compare pointers, not types.
3470 (build_cplus_array_type_1): Store new array type into the hash
3471 table before building the canonical type; build the canonical type
3473 (cp_build_qualified_type_real): Put all of the array types with
3474 cv-qualified element types into the C++ array hash table, built as
3475 variants of the unqualified versions.
3477 2007-09-23 Jason Merrill <jason@redhat.com>
3480 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
3481 for deprecation warnings.
3483 2007-09-22 Jason Merrill <jason@redhat.com>
3486 * call.c (build_over_call): Warn about deprecated virtuals.
3489 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
3490 (MAYBE_TAGGED_TYPE_P): Remove.
3491 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
3492 instead of calling is_late_template_attribute again.
3493 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
3494 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
3495 Don't crash on typedefs from non-template classes.
3496 * decl2.c (grokfield): Don't sorry about attrs on template parms.
3497 (is_late_template_attribute): All attributes applied to template
3498 parms or typename types are dependent. Static.
3499 (splice_template_attributes): Pass decl through.
3500 (save_template_attributes): Likewise.
3502 2007-09-20 Jakub Jelinek <jakub@redhat.com>
3505 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
3506 returned from tsubst_pack_expansion.
3507 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
3508 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
3510 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3513 * semantics.c (finish_id_expression): Use consistently
3514 context_for_name_lookup.
3515 * decl.c (fixup_anonymous_aggr): Fix error message for
3516 anonymous struct (vs union).
3518 2007-09-19 Jason Merrill <jason@redhat.com>
3521 * pt.c (tsubst): Handle typedefs by looking for the specialization.
3522 (retrieve_specialization): Only tagged types use
3523 DECL_TEMPLATE_INSTANTIATIONS.
3524 (instantiate_class_template): Push nested classes too.
3525 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
3527 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
3528 * init.c (is_aggr_type): Remove redundant tests.
3529 * class.c (push_nested_class): Use CLASS_TYPE_P.
3531 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3534 * init.c (build_zero_init): If, recursively, build_zero_init
3535 returns a NULL_TREE, do not append it to the VEC of constructors.
3537 2007-09-18 Jason Merrill <jason@redhat.com>
3540 * pt.c (apply_late_template_attributes): Set processing_template_decl.
3541 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
3542 ATTR_FLAG_TYPE_IN_PLACE.
3543 (tsubst): Do unqualified lookup to find typedefs from current class.
3544 [ARRAY_TYPE]: Propagate alignment info.
3545 * decl2.c (is_late_template_attribute): Only defer handling of
3546 attribute aligned if the expression is dependent.
3547 (save_template_attributes): If we're deferring any attributes,
3548 make this a naming typedef.
3550 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3552 PR c++/33462 (again)
3553 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
3554 va_arg instead of __builtin_va_arg.
3556 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3559 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
3560 (pp_cxx_primary_expression): Use it.
3561 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
3562 * error.c (dump_expr): Use it.
3564 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3567 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
3568 out case TYPEID_EXPR to...
3569 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
3570 and pp_cxx_right_paren.
3571 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
3572 * error.c (dump_expr): Use it.
3574 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3577 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
3578 (pp_cxx_primary_expression): Use it.
3579 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
3580 * error.c (dump_expr): Use it.
3582 2007-09-16 Paolo Carlini <pcarlini@suse.de>
3585 * init.c (build_new): Remove warning for zero-element
3588 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
3591 * call.c (maybe_handle_implicit_object): Set this_p, clear
3592 rvaluedness_matches_p.
3593 (compare_ics): Do not compare rvaluedness matching when one of the
3594 operands is an implicit object.
3596 2007-09-14 Jason Merrill <jason@redhat.com>
3598 PR c++/17743, c++/19163
3599 * decl2.c (is_late_template_attribute): New fn.
3600 (splice_template_attributes, save_template_attributes): New fns.
3601 (cplus_decl_attributes): Call save_template_attributes.
3602 * pt.c (apply_late_template_attributes): New fn.
3603 (instantiate_class_template, tsubst_decl): Use it.
3604 * cp-tree.h: Declare is_late_template_attribute.
3606 2007-09-13 Tom Tromey <tromey@redhat.com>
3608 * parser.c (cp_lexer_new_main): Don't use
3609 c_lex_return_raw_strings.
3610 (cp_lexer_get_preprocessor_token): Update. Add special case when
3613 2007-09-11 Jan Hubicka <jh@suse.cz>
3615 * method.c (use_thunk): Use tree_rest_of_compilation
3616 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
3617 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
3618 * cp-tree.h (expand_body): Kill.
3619 (emit_associated_thunks): Declare.
3620 * semantics.c (emit_associated_thunks): Export.
3621 (expand_body): Kill.
3623 2007-09-09 David Daney <ddaney@avtrex.com>
3626 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
3627 to calculate cookie_ptr.
3629 2007-09-08 Jason Merrill <jason@redhat.com>
3632 * pt.c (most_specialized_class): Set processing_template_decl
3633 while tsubsting partial spec args.
3635 2007-09-06 Jason Merrill <jason@redhat.com>
3637 * decl2.c (get_guard): Copy visibility from the guarded variable.
3639 2007-09-06 Jan Hubicka <jh@suse.cz>
3641 * semantics.c (expand_body): Do not mark arguments of clones used.
3643 2007-09-06 Paolo Carlini <pcarlini@suse.de>
3646 * decl.c (cp_finish_decl): When processing_template_decl,
3647 deal correctly with init as TREE_LIST.
3649 2007-09-06 Tom Tromey <tromey@redhat.com>
3651 * decl.c (finish_function): Put return's location on line zero of
3654 2007-09-05 Jason Merrill <jason@redhat.com>
3657 * except.c (prepare_eh_type): Use type_decays_to.
3660 * init.c (build_delete): Use build_headof to get the address of the
3661 complete object if we aren't using the deleting destructor.
3662 * rtti.c (build_headof): No longer static.
3663 * cp-tree.h: Declare it.
3665 2007-09-06 Jakub Jelinek <jakub@redhat.com>
3667 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
3668 decl if a prototype for XX is provided with throw().
3671 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
3672 on __*_chk non-__builtin_* decls.
3674 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3677 * semantics.c (finish_id_expression): Use context_for_name_lookup
3678 insted of DECL_CONTEXT, to see through anonymous structs and unions.
3679 * class.c (finish_struct_anon): Deal correctly with anonymous
3680 structs (vs unions, as GNU extension) in error messages.
3682 2007-09-05 Jan Hubicka <jh@suse.cz>
3684 * sematics.c (expand_body): Remove unnecesary import_export_decl
3685 call, DECL_EXTERNAL checks and current_function_decl saving.
3687 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3689 PR c++/29731 (again)
3690 * parser.c (cp_parser_primary_expression): Return error_mark_node
3691 when a statement-expression is found in a template-argument list.
3693 2007-09-04 Jason Merrill <jason@redhat.com>
3695 * except.c (initialize_handler_parm): Use
3696 fold_build_cleanup_point_expr.
3699 * call.c (reference_binding): Don't look for user-defined conversions
3703 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
3704 the MUST_NOT_THROW_EXPR.
3706 2007-09-04 Richard Sandiford <richard@codesourcery.com>
3708 * decl.c (cp_finish_decl): Call determine_visibility before
3709 make_rtl_for_nonlocal_decl.
3711 2007-09-04 Jason Merrill <jason@redhat.com>
3714 * pt.c (most_specialized_class): Substitute outer template
3715 arguments into the arguments of a member template partial
3717 (strip_innermost_template_args): New fn.
3719 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
3721 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
3723 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3725 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
3726 * decl.c (cp_make_fname_decl): Likewise,
3727 * parser.c (cp_parser_string_literal): Likewise,
3728 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
3729 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3732 2007-09-02 Paolo Carlini <pcarlini@suse.de>
3735 * typeck.c (build_unary_op): Fix error message for
3736 Boolean expression as operand to operator--.
3738 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3740 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
3741 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3744 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3747 * init.c (build_default_init): Make extern.
3748 * cp-tree.h (build_default_init): Declare here.
3749 * pt.c (tsubst_expr): When the instantiation of the initializer of
3750 a variable results in an empty list, default-initialize the
3752 (tsubst_copy_and_build): When the instantiation of the initializer
3753 in a new expression results in an empty initializer list,
3754 default-initialize it.
3756 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3758 * mangle.c (write_type): Change mangling of rvalue reference from
3761 2007-08-31 Jakub Jelinek <jakub@redhat.com>
3763 * decl.c (duplicate_decls): Remove duplicated line.
3765 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3768 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
3769 BOUND_TEMPLATE_TEMPLATE_PARM.
3771 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3774 * search.c (lookup_member): Check the name argument for
3777 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3780 * parser.c (cp_parser_trait_expr): Check rerurn value of
3783 2007-08-30 Ollie Wild <aaw@google.com>
3785 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
3786 convert_ptrmem for pointer to member conversions.
3787 (convert_to_pointer_force): Update cp_convert_to_pointer call.
3788 (ocp_convert): Update cp_convert_to_pointer call.
3789 * typeck.c (convert_ptrmem): Add conditional for null pointers to
3791 (build_static_cast_1): Check can_convert for conversions in either
3793 (get_delta_difference_1): New function.
3794 (get_delta_difference): Refactor to call get_delta_difference_1.
3796 2007-08-30 Jakub Jelinek <jakub@redhat.com>
3798 * decl.c (start_preparsed_function): Set
3799 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
3801 2007-08-28 Paolo Carlini <pcarlini@suse.de>
3804 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
3805 BOUND_TEMPLATE_TEMPLATE_PARM.
3807 2007-08-28 Jakub Jelinek <jakub@redhat.com>
3811 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
3812 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
3814 2007-08-27 Jason Merrill <jason@redhat.com>
3817 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
3818 Look inside STMT_EXPR.
3819 * semantics.c (stmt_expr_value_expr): New fn.
3820 * cp-tree.h: Declare it.
3823 * decl.c (groktypename): Ignore attributes applied to class type.
3825 2007-08-28 Richard Guenther <rguenther@suse.de>
3827 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
3829 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3831 * error.c (dump_expr): Handle COMPLEX_CST.
3832 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
3833 (pp_cxx_expression): Likewise.
3835 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
3837 * decl.c (GNU_INLINE_P): New.
3838 (duplicate_decls): Handle gnu_inline. Merge attributes and
3839 some flags in overriding definitions.
3840 (redeclaration_error_message): Handle gnu_inline.
3841 (start_preparsed_function): Likewise.
3843 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3845 * call.c (sufficient_parms_p): Constify.
3846 * class.c (same_signature_p): Likewise.
3847 * cp-gimplify.c (is_invisiref_parm,
3848 cxx_omp_privatize_by_reference): Likewise.
3849 * cp-objcp-common.c (has_c_linkage): Likewise.
3850 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
3851 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
3852 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
3853 num_artificial_parms_for, comp_template_parms,
3854 template_parameter_pack_p, any_dependent_template_arguments_p,
3855 any_type_dependent_arguments_p, any_value_dependent_elements_p,
3856 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
3857 zero_init_p, member_p, cp_lvalue_kind,
3858 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
3859 varargs_function_p, is_dummy_object, special_function_kind,
3860 string_conv_p, type_unknown_p, comp_except_specs, compparms,
3861 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
3862 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
3863 cp_has_mutable_p, at_least_as_qualified_p,
3864 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
3865 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
3866 * except.c (nothrow_libfn_p): Likewise.
3867 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
3869 * pt.c (comp_template_parms, template_parameter_pack_p,
3870 any_type_dependent_arguments_p, any_value_dependent_elements_p,
3871 any_dependent_template_arguments_p): Likewise.
3872 * repo.c (repo_export_class_p): Likewise.
3873 * semantics.c (anon_aggr_type_p): Likewise.
3874 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
3875 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
3876 varargs_function_p, member_p, is_dummy_object, pod_type_p,
3877 zero_init_p, special_function_p): Likewise.
3878 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
3879 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
3880 compparms, invalid_nonstatic_memfn_p,
3881 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
3882 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
3883 cp_has_mutable_p, lvalue_or_else): Likewise.
3885 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
3887 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
3888 * cp-objcp-common.c (cp_tree_size): Ditto.
3889 * tree.c (cp_walk_subtrees): Ditto
3890 * cp-tree.def (TINST_LEVEL): Go away.
3891 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
3892 move together with other non-tree structs.
3893 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
3894 (union lang_tree_node): Eliminate tinst_level field.
3895 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
3896 (current_instantiation, outermost_tinst_level): Return
3897 a "struct tinst_level *".
3899 * error.c (print_instantiation_partial_context): Change second
3900 parameter to a "struct tinst_level *". Replace accessor macros
3902 (print_instantiation_full_context): Likewise.
3903 * lex.c (in_main_input_context): Likewise.
3905 * pt.c (struct pending_templates): New.
3906 (pending_templates, last_pending_template): Use it as a type.
3907 (current_tinst_level): Change typo to "struct tinst_level *"
3908 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
3909 (add_pending_template): Construct a "struct pending_template".
3910 Replace TINST_LEVEL accessor macros with field access.
3911 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
3912 (pop_tinst_level): Likewise.
3913 (instantiate_pending_templates): Likewise. Factor common code used
3914 when an instantiation has been done.
3915 (outermost_tinst_level): Replace tree_last with loop.
3916 (current_instantiation): Return a "struct tinst_level *".
3918 2007-08-24 Ollie Wild <aaw@google.com>
3920 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
3921 * name-lookup.h (cp_binding_level): Remove vtables member.
3923 2007-08-24 Richard Guenther <rguenther@suse.de>
3925 * tree.c (cp_cannot_inline_tree_fn): Remove.
3926 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
3927 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
3930 2007-08-24 Jakub Jelinek <jakub@redhat.com>
3933 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
3934 error_mark_node right away if build_expr_type_conversion
3938 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
3939 is error_mark_node rather than NULL_TREE.
3940 * pt.c (check_explicit_specialization): Likewise.
3943 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
3944 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
3946 2007-08-22 Jason Merrill <jason@redhat.com>
3949 * pt.c (outermost_tinst_level): New function.
3950 * lex.c (in_main_input_context): New function.
3951 * cp-tree.h: Declare it.
3952 * decl2.c (constrain_class_visibility): Use it to avoid warning
3953 about uses of the anonymous namespace in the main input file.
3955 2007-08-21 Jakub Jelinek <jakub@redhat.com>
3957 * init.c (build_new_1): Use get_target_expr instead of save_expr.
3959 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
3962 * class.c (finish_struct_1): Warn when a class has virtual
3963 functions and accessible non-virtual destructor.
3965 2007-08-20 Richard Guenther <rguenther@suse.de>
3969 * call.c (build_new_method_call): Convert initializer to
3971 * init.c (build_aggr_init): Do not fiddle with types.
3972 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
3973 * except.c (build_throw): Do not drop qualifiers for the
3975 * typeck.c (get_member_function_from_ptrfunc): Do not
3976 fiddle with types, instead convert.
3977 (build_ptrmemfunc1): Convert to the target type for
3979 (gfc_trans_allocate): Convert result to target type.
3980 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
3981 pointer-to-member structures shall have alias set zero as well.
3983 2007-08-20 Richard Guenther <rguenther@suse.de>
3985 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
3987 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
3988 (nonstatic_local_decl_p): Likewise.
3989 * tree.c (cp_auto_var_in_fn_p): Remove.
3990 * decl.c (nonstatic_local_decl_p): Remove.
3992 2007-08-20 Richard Guenther <rguenther@suse.de>
3994 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
3996 * tree.h (cp_walk_tree): New define to walk_tree_1 with
3997 cp_walk_subtrees lh parameter.
3998 (cp_walk_tree_without_duplicates): New define to
3999 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
4000 * tree.c (count_trees): Call
4001 cp_walk_tree_without_duplicates.
4002 (verify_stmt_tree): Call cp_walk_tree.
4003 (break_out_target_exprs): Likewise.
4004 (WALK_SUBTREE): Likewise.
4005 * cp-gimplify.c (cp_genericize): Likewise.
4006 * cp-pt.c (find_parameter_packs_r): Likewise.
4007 (uses_parameter_packs): Likewise.
4008 (make_pack_expansion): Likewise.
4009 (check_for_bare_parameter_packs): Likewise.
4010 (for_each_template_parm): Likewise.
4011 * decl.c (check_default_argument): Call
4012 cp_walk_tree_without_duplicates.
4013 * except.c (build_throw): Likewise.
4014 * decl2.c (type_visibility): Likewise.
4015 * semantics.c (expand_or_defer_fn): Likewise.
4016 (finalize_nrv): Call cp_walk_tree.
4018 2007-08-20 Jakub Jelinek <jakub@redhat.com>
4021 * init.c (build_new_1): Rename placement_var variable to placement_expr.
4022 Initialize it with save_expr rather than get_temp_regvar.
4024 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
4027 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
4030 2007-08-17 Ollie Wild <aaw@google.com>
4033 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
4034 declarations into appropriate slots for comparison. Fix type
4037 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4040 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
4041 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
4043 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4046 * parser.c (cp_parser_class_head): Improve error message.
4048 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
4050 * pt.c (instantiate_decl): Set input_location
4051 for the function end.
4053 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4055 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
4057 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
4058 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
4059 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
4060 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4061 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
4062 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
4063 * typeck.c (cp_type_quals): Likewise.
4064 * typeck2.c (cxx_incomplete_type_diagnostic,
4065 cxx_incomplete_type_error): Likewise.
4067 2007-08-16 Paolo Carlini <pcarlini@suse.de>
4070 * pt.c (tsubst_friend_function): When check_classfn
4071 returns error_mark_node likewise return it.
4073 2007-08-15 Jakub Jelinek <jakub@redhat.com>
4076 * typeck.c (check_return_expr): Don't NRV optimize vars in
4078 * decl.c (finish_function): Comment fix.
4080 2007-08-15 Paolo Carlini <pcarlini@suse.de>
4083 * pt.c (push_template_decl_real): Depending on TYPE_P
4084 use either TYPE_CONTEXT or DECL_CONTEXT.
4086 2007-08-14 Mark Mitchell <mark@codesourcery.com>
4088 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
4089 constructors and destructors return this.
4091 2007-08-14 Paolo Carlini <pcarlini@suse.de>
4094 * decl2.c (check_classfn): Return error_mark_node in case of error;
4095 in that case, do not call add_method.
4096 * decl.c (start_decl): Deal with check_classfn returning
4098 (grokfndecl): Likewise.
4099 * pt.c (tsubst_friend_function): Likewise.
4101 2007-08-14 Andrew Pinski <pinskia@gmail.com>
4104 * typeck.c (build_binary_op): Disallow vector float types with
4105 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
4107 2007-08-11 Ian Lance Taylor <iant@google.com>
4109 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
4111 * cp-tree.h (cxx_get_alias_set): Update declaration.
4113 2007-08-10 Ollie Wild <aaw@google.com>
4115 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
4117 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
4119 (unqualified_namespace_lookup): Fix ambiguous_decl call.
4120 (lookup_using_namespace): Fix ambiguous_decl call.
4121 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
4123 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4125 * call.c (name_as_c_string): Use CONST_CAST.
4126 * decl.c (build_decl): Likewise.
4127 * parser.c (cp_parser_string_literal): Likewise.
4129 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4132 * error.c (dump_expr): Consistently use the *_cxx_*
4133 variants of the pretty-print functions.
4135 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4138 * decl.c (check_special_function_return_type): Just error
4139 on return type specified for conversion operator.
4141 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
4143 * typeck2.c (readonly_error): Handle general expressions.
4144 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
4146 2007-08-06 Dan Hipschman <dsh@google.com>
4148 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
4149 access function name.
4151 2007-08-04 Alfred Minarik <a.minarik@aon.at>
4154 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
4155 * g++spec.c (lang_specific_driver): Check them.
4157 2007-08-06 Paolo Carlini <pcarlini@suse.de>
4160 * pt.c (inline_needs_template_parms): Fix comment; change return type
4163 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
4166 2007-03-26 Dirk Mueller <dmueller@suse.de>
4168 * parser.c (cp_parser_member_declaration): Pedwarn
4169 about stray semicolons after member declarations.
4171 2007-08-02 Lee Millward <lee.millward@gmail.com>
4176 * parser.c (cp_parser_asm_definition): Detect and discard asm
4177 statements with invalid inputs or outputs.
4178 (cp_parser_asm_operand_list): Return error mark node if any
4179 of the operands are invalid. Adjust documentation.
4181 2007-08-02 Nick Clifton <nickc@redhat.com>
4183 * typeck.c: Change copyright header to refer to version 3 of the
4184 GNU General Public License and to point readers at the COPYING3
4185 file and the FSF's license web page.
4186 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
4187 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
4188 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
4189 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
4190 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
4191 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
4192 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
4193 name-lookup.h, parser.c: Likewise.
4195 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4198 * call.c (magic_varargs_p): Honor the "type generic" attribute.
4200 2007-07-30 Paolo Carlini <pcarlini@suse.de>
4203 * semantics.c (finish_label_stmt): Reject the __label__
4204 extension outside function scopes.
4206 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4208 * parser.c (eof_token): Un-constify.
4209 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
4210 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
4213 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
4215 * pt.c, tree.c, typeck2.c: Fix comment typos.
4217 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
4218 Mark Mitchell <mark@codesourcery.com>
4221 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
4222 hidden due to friend declarations in local classes.
4224 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
4226 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
4227 * cp-tree.def (DECLTYPE_TYPE): New.
4228 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
4229 (dump_type_prefix): Ditto.
4230 (dump_type_suffix): Ditto.
4231 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
4232 * mangle.c (write_type): Handle DECLTYPE_TYPE.
4233 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
4235 (DECLTYPE_TYPE_EXPR): New.
4236 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
4237 (finish_declared_type): Declare.
4238 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
4239 DECLTYPE_TYPE nodes.
4240 (pp_cxx_type_id): Ditto.
4241 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
4242 (tsubst): Substitute into a DECLTYPE_TYPE node.
4243 (tsubst_copy): Ditto.
4244 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
4246 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
4247 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
4248 structural equality (because we can't hash the expressions).
4249 (finish_declared_type): New.
4250 * lex.c (reswords): Add "decltype" keyword.
4251 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
4252 (cp_parser_postfix_expression): Add member_access_only_p to
4253 restrict postfix expression to member access expressions.
4254 (cp_parser_unary_expression): Update call to
4255 cp_parser_postfix_expression to reflect new parameter.
4256 (cp_parser_declared_type): New.
4257 (cp_parser_simple_type_specifier): Parse decltype types.
4259 2007-07-27 Mark Mitchell <mark@codesourcery.com>
4262 * call.c (convert_for_arg_passing): Only widen bitfields to their
4263 declared types if necessary.
4265 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4267 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
4270 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4272 * decl.c (typename_hash, typename_compare): Constify.
4273 * mangle.c (hash_type, compare_type): Likewise.
4274 * pt.c (eq_local_specializations, hash_local_specialization):
4276 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
4277 list_hash): Likewise.
4278 * typeck2.c (pat_compare): Likewise.
4280 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
4282 * method.c (implicitly_declare_fn): Increase alignment if member
4283 function pointer format requires it.
4285 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4288 * typeck.c (check_return_expr): Do not pass a null argument
4291 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4294 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
4297 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
4300 * typeck.c (convert_arguments): Only use default args if we have
4304 * typeck.c (structural_comptypes): No need to check
4305 resolve_typename_type return value here.
4306 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
4307 * pt.c (resolve_typename_type): Follow typename typedefs. Return
4308 original type rather than error_mark_node in case of failure.
4309 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
4310 resolve_typename_type result check.
4311 (cp_parser_direct_declarator, cp_parser_head,
4312 cp_parser_constructor_declarator_p): Likewise.
4314 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
4316 * pt.c (template_parms_variadic_p): Remove.
4317 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
4319 2007-07-12 Jakub Jelinek <jakub@redhat.com>
4322 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
4323 argument to dump_aggr_init_expr_args instead of false.
4325 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
4327 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
4328 canonical types; otherwise, fall back to structural type
4329 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
4330 internal compiler error if the canonical types are wrong.
4332 2007-07-11 Paolo Carlini <pcarlini@suse.de>
4335 * parser.c (cp_parser_make_indirect_declarator): When the
4336 the code argument is ERROR_MARK return cp_error_declarator.
4338 2007-07-09 Geoffrey Keating <geoffk@apple.com>
4341 * decl.c (cxx_init_decl_processing): Don't set
4342 force_align_functions_log.
4343 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
4344 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
4345 FUNCTION_DECL, return its alignment.
4347 2007-07-09 Richard Guenther <rguenther@suse.de>
4349 * decl.c (start_preparsed_function): Do not promote return type.
4351 2007-07-08 Paolo Carlini <pcarlini@suse.de>
4354 * pt.c (unify): Never pass error_mark_node to template_decl_level.
4356 2007-07-07 Mark Mitchell <mark@codesourcery.com>
4359 * pt.c (resolve_overloaded_unification): Robustify. Return a
4361 (type_unification_real): Adjust accordingly.
4363 2007-07-06 Richard Guenther <rguenther@suse.de>
4365 * init.c (build_new_1): Use the correct pointer type.
4366 * typeck2.c (build_m_component_ref): Likewise.
4368 2007-07-05 Mark Mitchell <mark@codesourcery.com>
4371 * init.c (build_zero_init): Always build an initializer for
4373 * typeck2.c (build_functional_cast): Use build_zero_init.
4376 * init.c (build_new_1): Always pass the allocation function to
4377 build_op_delete_call.
4378 * call.c (build_op_delete_call): Handle operator delete with a
4379 variable-argument list. Do not issue an error when no matching
4380 deallocation function is available for a new operator.
4383 * cp-tree.h (any_value_dependent_elements_p): Declare it.
4384 * decl.c (value_dependent_init_p): New function.
4385 (cp_finish_decl): Use it.
4386 * pt.c (value_dependent_expression_p): Use
4387 any_value_dependent_elements_p.
4388 * parser.c (cp_parser_primary_expression): Add comment about
4389 treating dependent qualified names as integral
4390 constant-expressions.
4392 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
4394 * decl.c (build_ptrmemfunc_type): Always use structural equality
4395 tests when comparing pointer-to-member-function types, because the
4396 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
4399 2007-07-03 Mark Mitchell <mark@codesourcery.com>
4401 * init.c (build_new): Tweak comment.
4403 2007-06-29 Dave Brolley <brolley@redhat.com>
4406 * parser.c (cp_parser_new_type_id): Don't reduce a named array
4407 type to its base type and number of elements here.
4408 * init.c (build_new): Call complete_type_or_else to ensure that the
4409 type is complete and to issue a diagnostic if it is not.
4410 (build_new_1): Don't call complete_type_or_else here.
4412 2007-07-03 Richard Guenther <rguenther@suse.de>
4415 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
4418 2007-07-02 Simon Baldwin <simonb@google.com>
4420 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
4421 for inner-style nested forward declarations that don't declare
4424 2007-07-02 Jakub Jelinek <jakub@redhat.com>
4427 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
4428 DECL_P in not a variable and appears more than once error messages.
4430 2007-07-01 Ollie Wild <aaw@google.com>
4432 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
4433 (select_decl): Remove function.
4434 (unqualified_namespace_lookup): Populate binding by calling
4435 ambiguous_decl. Remove select_decl call.
4436 (lookup_qualified_name): Remove select_decl call.
4437 * decl.c (lookup_and_check_tag): Check for ambiguous references.
4438 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
4439 generation when name lookup is ambiguous.
4441 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
4444 * init.c (build_new_1): Use structural equality on the copy of the
4447 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4449 * decl2.c (determine_visibility): Implement
4450 flag_visibility_ms_compat effect on type info.
4451 * decl.c (cxx_init_decl_processing): Implement
4452 global effect of flag_visibility_ms_compat.
4454 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4456 * decl2.c (start_objects): Mark constructor-running function
4459 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
4462 * decl.c (grokdeclarator): Reset friendp for member functions declared
4463 friend of their own class.
4465 2007-06-23 Mark Mitchell <mark@codesourcery.com>
4467 * decl2.c (determine_visibility): Don't look for dllexport here.
4468 (determine_visibility_from_class): Tidy.
4470 2007-06-18 Simon Baldwin <simonb@google.com>
4473 * parser.c (cp_parser_single_declaration): Added check for storage
4474 class other than sc_none in parsed declaration, and a flag to indicate
4475 if the call is part of an explicit template specialization parse.
4476 * (cp_parser_explicit_specialization): Specialization check flag added
4477 to call to cp_parser_single_declaration(), set true.
4478 * (cp_parser_template_declaration_after_export): Specialization check
4479 flag added to call to cp_parser_single_declaration(), set false.
4480 * pt.c (check_explicit_specialization): Added code to copy visiblity
4481 and linkage from the templated function to the explicit specialization.
4483 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
4485 * typeck.c (build_binary_op): For templates build the
4486 expression in pieces to avoid the assert in build2_stat.
4487 (get_member_function_from_ptrfunc):
4488 Change over to using POINTER_PLUS_EXPR and convert
4489 the second operand to sizetype.
4490 * typeck2.c (build_m_component_ref): Likewise.
4491 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
4492 instead of PLUS_EXPR for pointers.
4493 (build_new_1): Likewise.
4494 (build_vec_delete_1): Likewise.
4495 (build_vec_delete): Likewise.
4496 * class.c (build_base_path): Likewise.
4497 (build_base_path): Likewise.
4498 (convert_to_base_statically): Likewise.
4499 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
4500 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
4501 instead of PLUS_EXPR.
4502 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
4503 instead of PLUS_EXPR for pointers.
4504 * call.c (build_special_member_call): Likewise.
4505 * rtti.c (build_headof): Likewise.
4506 Use sizetype instead of ptrdiff_type_node.
4507 (tinfo_base_init): Create a POINTER_PLUS_EXPR
4508 instead of PLUS_EXPR for pointers.
4509 * except.c (expand_start_catch_block): Do a
4510 NEGATIVE and then a POINTER_PLUS_EXPR instead
4512 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
4513 PLUS_EXPR on pointer types over to use
4514 POINTER_PLUS_EXPR and remove the conversion
4515 to the pointer types.
4516 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
4517 adding to a pointer type. Use size_int instead of
4518 ssize_int. Convert the index to sizetype before
4519 adding it to the pointer.
4521 2007-06-15 Mark Mitchell <mark@codesourcery.com>
4523 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
4524 (DECL_ANON_UNION_VAR_P): New macro.
4525 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
4526 than DECL_VAR_MARKED_P, to keep track of which variables we have
4528 * decl.c (redeclaration_error_message): Complain about redeclaring
4529 anonymous union members at namespace scope.
4530 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
4532 2007-06-14 Geoff Keating <geoffk@apple.com>
4534 * decl2.c (determine_visibility): Ensure that functions with
4535 hidden types as parameters are hidden.
4538 * decl2.c (determine_visibility): Remove duplicate code for
4541 2007-06-12 Ian Lance Taylor <iant@google.com>
4544 * init.c (avoid_placement_new_aliasing): New static function.
4545 (build_new_1): Call it.
4547 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
4549 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
4550 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
4552 2007-06-08 Jakub Jelinek <jakub@redhat.com>
4555 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
4556 on init, the non-decl cond operand and increment value.
4558 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
4561 * decl.c (check_initializer): Report an error when a brace enclosed
4562 initializer is used for a non-aggregate type in C++98.
4563 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
4565 (grokdeclarator): Likewise.
4566 (move_fn_p): Likewise.
4567 * typeck.c (check_return_expr): Likewise.
4568 * call.c (reference_binding): Likewise.
4569 * error.c (cp_cpp_error): Likewise.
4570 * pt.c (check_default_tmpl_args): Likewise.
4572 * lex.c (init_reswords): Likewise.
4573 * parser.c (p_parser_primary_expression): Likewise.
4574 (TOKEN_PRECEDENCE): Likewise.
4575 (cp_parser_init_declarator): Likewise.
4576 (cp_parser_ptr_operator): Likewise.
4577 (cp_parser_parameter_declaration): Likewise.
4578 (cp_parser_enclosed_template_argument_list): Likewise.
4579 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
4580 (cp_parser_next_token_ends_template_argument_p): Likewise.
4582 2007-06-04 Simon Baldwin <simonb@google.com>
4584 * decl.c (grokdeclarator): Readability change. Moved case labels
4585 into direct switch statement scope.
4587 2007-06-04 Paolo Carlini <pcarlini@suse.de>
4589 * call.c (convert_like_real): Remove pointless code.
4591 2007-05-31 Mark Mitchell <mark@codesourcery.com>
4593 * decl.c (get_atexit_fn_ptr_type): New function.
4594 (get_atexit_node): Use it.
4595 (start_cleanup_fn): Likewise.
4596 (register_dtor_fn): Use the object's destructor, instead of a
4597 separate cleanup function, where possible.
4598 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
4599 (atexit_fn_ptr_type_node): New macro.
4600 * decl2.c (build_cleanup): Use build_address.
4602 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
4604 * typeck.c (build_binary_op): Include types in error.
4606 2007-05-31 Jakub Jelinek <jakub@redhat.com>
4609 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
4610 needs runtime initialization.
4612 2007-05-31 Paolo Carlini <pcarlini@suse.de>
4615 * semantics.c (finish_trait_expr): Complete the types.
4617 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
4618 Douglas Gregor <doug.gregor@gmail.com>
4619 Pedro Lamarao <pedro.lamarao@mndfck.org>
4620 Howard Hinnant <howard.hinnant@gmail.com>
4624 * typeck.c (comptypes): Don't consider rvalue and lvalue
4625 reference types to be equivalent.
4626 (check_return_expr): Move from certain lvalues when returning
4628 * decl.c (grokdeclarator): Implement reference collapsing.
4629 (copy_fn_p): Don't consider constructors taking rvalue references
4630 to be copy constructors.
4632 * call.c (conversion): New "rvaluedness_matches_p" member.
4633 (convert_class_to_reference): Require reference type as first
4634 parameter instead of base type.
4635 (reference_binding): Add logic to handle rvalue references.
4636 (implicit_conversion): Update inaccurate comment.
4637 (convert_like_real): Disable creation of temporaries that are
4638 impossible to initialize for types with move constructors.
4639 (build_over_call): Elide move constructors when possible.
4640 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
4641 (maybe_handle_ref_bind): Return conversion instead of type node.
4642 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
4643 determine preferred conversion sequences.
4644 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
4645 (LOOKUP_PREFER_RVALUE): New.
4646 (DECL_MOVE_CONSTRUCTOR_P): New.
4647 (struct cp_declarator): Add "reference" member for reference
4648 types, with new "rvalue_ref" flag.
4649 (cp_build_reference_type): Declare.
4650 (move_fn_p): Declare.
4651 * error.c (dump_type_prefix): Format rvalue reference types
4652 correctly in error messages.
4653 * except.c (build_throw): Move from certain lvalues when
4655 * mangle.c (write_type): Mangle rvalue references differently
4656 than regular references.
4657 * parser.c (make_reference_declarator): Add boolean parameter for
4659 (cp_parser_make_indirect_declarator): New.
4660 (cp_parser_new_declarator_opt): Call
4661 cp_parser_make_indirect_declarator.
4662 (cp_parser_conversion_declarator_opt): Ditto.
4663 (cp_parser_declarator): Ditto.
4664 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
4666 * pt.c (tsubst): Implement reference collapsing.
4667 (maybe_adjust_types_for_deduction): Implement special template
4668 parameter deduction rule for rvalue references.
4669 (type_unification_real): Update calls to
4670 maybe_adjust_types_for_deduction.
4671 (try_one_overload): Ditto.
4672 (unify_pack_expansion): Ditto.
4673 * tree.c (lvalue_p_1): Handle rvalue reference types.
4674 (cp_build_reference_type): New.
4676 2007-05-30 Jakub Jelinek <jakub@redhat.com>
4679 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
4680 variables that need runtime initialization.
4682 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
4685 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
4686 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
4687 case POSTDECREMENT_EXPR>): Return the error_mark_node
4688 if either the real or imaginary parts would an
4691 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
4692 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4695 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
4696 token is a closing brace, false if there are no tokens left.
4697 (cp_parser_namespace_alias_definition): Only consume the next token if
4698 it is a closing brace.
4700 * parser.c (cp_parser_class_specifier): Likewise.
4702 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
4704 * semantics.c (finish_member_declaration): Fix a typo in the
4707 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
4719 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
4720 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
4721 * pt.c (check_for_bare_parameter_packs): Return bool indicated
4722 whether everything was okay. Fix indentation.
4723 (push_template_decl_real): Check for bare parameter packs in
4724 function parameters; where errors occur, mark the parameter types
4725 with ERROR_MARK_NODEs to avert ICEs.
4726 (coerce_template_parameter_pack): New.
4727 (coerce_template_parms): Moved parameter pack coercion into
4728 coerce_template_parameter_pack, and permit it anywhere in the
4729 template parameter list (not just at the end). Parameter and
4730 argument indices can vary (somewhat) separately now, so add
4731 PARM_IDX and ARG_IDX.
4732 (fn_type_unification): Don't set an argument pack as incomplete if
4733 no argument pack was deduced.
4734 (type_unification_real): If a type parameter is a parameter pack
4735 and has not otherwise been deduced, it will be deduced to an empty
4737 (more_specialized_fn): Use the actual lengths of the argument
4738 lists when comparing against expansions.
4739 * semantics.c (finish_member_declaration): If a field's type has
4740 bare parameter packs, error and set its type to ERROR_MARK_NODE.
4742 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
4745 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
4747 2007-05-22 Ollie Wild <aaw@google.com>
4749 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
4750 (unqualified_namespace_lookup): Adds check for hidden types.
4752 2007-05-22 Ollie Wild <aaw@google.com>
4754 * decl.c (duplicate_decls): Verify namespace names are unique.
4756 2007-05-21 Mark Mitchell <mark@codesourcery.com>
4758 * decl.c (cxx_maybe_build_cleanup): Handle
4759 __attribute__((cleanup)).
4761 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4763 * cvt.c (cp_convert_and_check): Don't check warnings if the
4766 2007-05-18 Geoffrey Keating <geoffk@apple.com>
4768 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
4770 2007-05-14 Paolo Carlini <pcarlini@suse.de>
4773 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
4774 type only if is a class type (5.2.8/4).
4776 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
4778 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
4779 * decl.c (grokdeclarator): Use unsigned_type_for instead of
4780 c_common_unsigned_type.
4782 2007-05-11 Silvius Rus <rus@google.com>
4784 * typeck.c (build_indirect_ref): Add call to
4785 strict_aliasing_warning.
4786 (build_reinterpret_cast_1): Condition call to
4787 strict_aliasing_warning.
4789 2007-05-11 Jan Hubicka <jh@suse.cz>
4791 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
4792 * decl2.c (start_objects): ctors and dtors are no longer public.
4793 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
4795 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
4797 * typeck.c (build_unary_op): Remove code that used to
4798 handle non lvalue increments/decrements.
4800 2007-05-07 Mike Stump <mrs@apple.com>
4802 * parser.c (check_empty_body): Add.
4803 (cp_parser_iteration_statement): Add call to check_empty_body.
4805 2007-05-05 Geoffrey Keating <geoffk@apple.com>
4808 * mangle.c (write_mangled_name): Mangle static variable names.
4809 (write_unqualified_name): Use local-source-name for
4810 namespace-scope static variables.
4812 2007-05-04 Dirk Mueller <dmueller@suse.de>
4814 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
4817 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
4820 * decl2.c (constrain_class_visibility):
4821 Use strip_pointer_or_array_types instead of strip_array_types.
4823 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
4826 * decl.c (reshape_init_r): Don't reshape the first element if it
4827 is a pointer to member function.
4829 2007-04-27 Simon Baldwin <simonb@google.com>
4831 * decl.c (grokparms): Changed message format from %qD to %qE.
4833 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
4835 * error.c (maybe_warn_variadic_templates): Variadic templates are
4836 now in C++0x, so only warn about them in C++98 mode.
4838 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
4841 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
4842 integeral types from vectors types.
4844 2007-04-26 Jakub Jelinek <jakub@redhat.com>
4847 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
4848 for type dependent OMP_CLAUSE_DECLs.
4850 2007-04-24 Mark Mitchell <mark@codesourcery.com>
4853 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
4854 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
4855 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
4856 * init.c (build_zero_init): Adjust, as
4857 COMPLEX_TYPE is now a SCALAR_TYPE.
4858 * typeck2.c (digest_init): Allow brace-enclosed initializers for
4859 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
4861 2007-04-25 Paolo Carlini <pcarlini@suse.de>
4863 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
4864 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
4865 (trait_expr_value): Adjust.
4867 2007-04-23 Simon Baldwin <simonb@google.com>
4869 * decl.c (grokparms): Added new error for duplicate function
4870 parameters names in function prototypes, to match gcc behavior.
4872 2007-04-23 Jan Hubicka <jh@suse.cz>
4874 * decl2.c (finish_objects): Do not call target constructor/destructor
4877 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
4879 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
4880 instead of checking GIMPLE_STMT_P in chain_next.
4882 2007-04-17 Mark Mitchell <mark@codesourcery.com>
4885 * call.c (convert_for_arg_passing): Convert bitfields to their
4888 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
4891 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
4893 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
4896 * decl2.c (constrain_class_visibility):
4897 Do not warn about the use of anonymous namespace in the main input file.
4899 2007-04-15 Mark Mitchell <mark@codesourcery.com>
4901 * cp-tree.h (current_template_parms): Fix typo in comment.
4903 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
4905 * cp-tree.h, error.c: Fix comment typos.
4907 2007-04-13 Jason Merrill <jason@redhat.com>
4910 * call.c (reference_binding): Add c_cast_p parm. If true,
4911 add quals to TO as needed to make it reference-compatible.
4913 2007-04-11 Jan Hubicka <jh@suse.cz>
4915 * class.c (convert_to_base_statically): Fold produced tree; verify
4916 that we are not processing template_decl.
4918 2007-04-09 Mark Mitchell <mark@codesourcery.com>
4921 * class.c (build_base_path): Ensure that the converted pointer has
4922 the same cv-qualification as the input.
4924 2007-04-09 Paolo Carlini <pcarlini@suse.de>
4926 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
4928 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
4930 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
4932 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
4933 * tree.c (cp_add_pending_fn_decls): Remove.
4934 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
4936 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
4938 Revert change removing staticp.
4940 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
4942 * cp-objcp-common.c (cxx_staticp): Remove.
4943 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
4944 * cp-tree.h (cxx_staticp):
4946 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
4948 * class.c (check_for_override): Don't remove dllmport attribute
4951 2007-04-03 Jakub Jelinek <jakub@redhat.com>
4954 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
4955 type issue error and return early.
4957 2007-03-30 Jason Merrill <jason@redhat.com>
4960 * typeck.c (cp_type_readonly): New fn.
4961 * cp-tree.h: Declare it.
4962 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
4963 (cp_finish_decl): Not here.
4965 2007-03-31 Richard Guenther <rguenther@suse.de>
4967 * optimize.c (maybe_clone_body): Replace splay-tree usage by
4970 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
4975 * parser.c (declarator_can_be_parameter_pack): New.
4976 (cp_parser_template_parameter): Only parse the `...' if the
4977 declarator can be a parameter pack.
4978 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
4980 * pt.c (find_parameter_packs_r): Look into the bounds on integer
4981 types (they could be used as array bounds).
4982 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
4983 (tsubst_pack_expansion): Handle failure to expand parameter
4986 2007-03-30 Paolo Carlini <pcarlini@suse.de>
4989 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
4990 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
4991 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
4992 (CLASS_TYPE_NON_UNION_P): Add.
4993 (struct lang_type_class): Add has_complex_dflt.
4994 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
4995 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
4996 * cp-tree.def: Add TRAIT_EXPR.
4997 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
4998 * lex.c (struct resword): Add __has_nothrow_assign,
4999 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
5000 __has_trivial_constructor, __has_trivial_copy,
5001 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
5002 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
5003 __is_pod, __is_polymorphic, __is_union.
5004 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
5005 (cp_parser_trait_expr): New.
5006 * semantics.c (finish_trait_expr, trait_expr_value
5007 classtype_has_nothrow_copy_or_assign_p): New.
5008 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
5010 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
5011 * class.c (check_bases, check_field_decl, check_bases_and_members):
5012 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
5013 * pt.c (uses_template_parms, tsubst_copy_and_build,
5014 value_dependent_expression_p, type_dependent_expression_p): Deal with
5016 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
5018 2007-03-29 Richard Guenther <rguenther@suse.de>
5020 * tree.c (cp_walk_subtrees): Do not set input_location.
5022 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
5025 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
5028 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5030 * parser.c (struct cp_parser): Update comment for
5031 greater_than_is_operator_p.
5032 (cp_parser_primary_expression): In C++0x mode, a cast operator can
5033 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
5034 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
5035 !GREATER_THAN_IS_OPERATOR_P.
5036 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
5037 `>>' operators that will become two `>' tokens in C++0x.
5038 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
5039 mode, allowing it to terminate default arguments.
5040 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
5041 `>>' like two consecutive `>' tokens.
5042 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
5043 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
5044 ends a template argument.
5046 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5048 * decl.c (redeclaration_error_message): Complain when redeclaring
5049 a friend function with default template arguments (C++0x mode only).
5050 * cp-tree.h (check_default_tmpl_args): Declare.
5051 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
5052 template arguments in function templates. Add support for checking
5053 the default template arguments of friend templates.
5054 (push_template_decl_real): Fix call to check_default_tmpl_args.
5055 (type_unification_real): If a template parameter has not been
5056 deduced but provides a default template argument, substitute into
5057 that default template argument.
5058 * parser.c (cp_parser_init_declarator): When declaring (but not
5059 defining!) a function template in C++0x mode, check for default
5062 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5065 * decl.c (grokdeclarator): Deal with cv-qualified function type
5066 typedefs in the same way for member and non-member functions.
5068 2007-03-26 Dirk Mueller <dmueller@suse.de>
5070 * parser.c (cp_parser_member_declaration): Pedwarn
5071 about stray semicolons after member declarations.
5073 2007-03-26 Paolo Carlini <pcarlini@suse.de>
5076 * pt.c (instantiate_decl): Set in_system_header.
5078 2007-03-22 Mark Mitchell <mark@codesourcery.com>
5080 * cp-tree.h (current_tempalte_parms): Improve documentation.
5081 * pt.c (current_template_args): Likewise.
5084 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
5085 not consume tokens when failing.
5087 2007-03-22 Jim Wilson <wilson@specifix.com>
5088 Mark Mitchell <mark@codesourcery.com>
5091 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
5092 consistent with FROM.
5094 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5096 * error.c (dump_expr): Handle dependent names that designate types.
5097 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
5099 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
5101 * cp-tree.def, parser.c, pt.c: Fix comment typos.
5103 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5105 * cvt.c (cp_convert_and_check) : Define.
5106 * cp-tree.h (cp_convert_and_check): Declare.
5107 * call.c (convert_conversion_warnings): Rename to
5108 conversion_null_warnings. The warning for floating-point to
5109 integer is handled by convert_and_check in convert_like_real.
5110 (convert_like_real): convert_conversion_warnings was renamed as
5111 conversion_null_warnings.
5112 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
5113 overflow and changes of value during conversion.
5115 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5118 * parser.c (cp_parser_statement): If 'namespace' is found, this
5119 only can be a namespace alias definition, so parse it now.
5120 (cp_parser_namespace_alias_definition): if we find an open brace
5121 instead of '=', then this is actually a misplaced namespace
5124 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5127 * decl.c (cxx_init_decl_processing): Move command-line options
5128 processing to c-opts.c.
5130 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
5132 * ptree.c (cxx_print_type): Use formatting markup for integers
5133 when printing template parameter index/level/orig level.
5134 (cxx_print_xnode): Ditto.
5135 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
5136 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
5137 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
5139 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
5140 rather than a HOST_WIDE_INT.
5141 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
5142 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
5144 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
5145 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
5146 IN_BASE_INITIALIZER bool bitfields.
5147 (struct cp_declarator): Make KIND a 4-bit field. Make
5148 PARAMETER_PACK_P a bool bitfield just after KIND.
5149 * pt.c (uses_parameter_packs): Destroy the pointer set.
5150 (make_pack_expansion): Ditto.
5151 (check_for_bare_parameter_packs): Ditto.
5152 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
5154 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
5157 * call.c (convert_default_arg): Instead of copying the node,
5160 2007-03-15 Dirk Mueller <dmueller@suse.de>
5163 * call.c (convert_conversion_warnings): New..
5164 (convert_like_real): .. factored out from here.
5165 (convert_conversion_warnings): Add warning about
5166 false being converted to NULL in argument passing.
5168 2007-03-14 Dirk Mueller <dmueller@suse.de>
5170 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
5171 (finish_do_body): Warn about empty body in do/while statement.
5173 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5175 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
5177 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5180 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
5183 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
5185 * repo.c (init_repo): Initialize random_seed saved options.
5186 (finish_repo): Adjust.
5188 2007-03-13 Mark Mitchell <mark@codesourcery.com>
5191 * Make-lang.in (doc/g++.1): Use $< to specify the location from
5194 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
5196 * decl.c (compute_array_index_type): New warning flag warn_vla.
5198 2007-03-12 Mark Mitchell <mark@codesourcery.com>
5201 * call.c (convert_default_arg): Copy non-constant arguments.
5203 2007-03-11 Mark Mitchell <mark@codesourcery.com>
5206 * parser.c (cp_parser_postfix_expression): Disallow compound
5207 literals in constant expressions.
5210 * semantics.c (finish_typeof): Use unlowered_expr_type.
5212 2007-03-10 Mark Mitchell <mark@codesourcery.com>
5215 * cp-tree.h (unlowered_expr_type): New function.
5216 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
5217 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
5218 (unlowered_expr_type): New function.
5219 (build_unary_op): Disallow predecrements of bool bitfields.
5220 * call.c (build_conditional_expr): Use unlowered_expr_type.
5221 * pt.c (type_unification_real): Likewise.
5223 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
5226 * typeck.c (check_return_expr): Check for bare parameter packs.
5227 (comptypes): Compare template parameter packs and
5228 type pack expansions.
5229 * decl.c (grokdeclarator): Deal with the declaration of function
5231 (grokparms): Verify that the (optional) function parameter pack is
5232 at the end of the parameter list.
5233 (xref_basetypes): Handle pack expansions in the base class.
5234 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
5235 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
5236 (NONTYPE_ARGUMENT_PACK): New.
5237 (TYPE_PACK_EXPANSION): New.
5238 (EXPR_PACK_EXPANSION): New.
5239 (ARGUMENT_PACK_SELECT): New.
5240 * cp-objcp-common.c (cp_tree_size): Compute size of
5241 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
5242 ARGUMENT_PACK_SELECT.
5243 * error.c (dump_template_argument): Print template argument packs.
5244 (dump_template_argument_list): Ditto.
5245 (dump_template_parameter): Dump `...' for template type parameter
5247 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
5248 (dump_parameters): Print function parameter packs.
5249 (dump_template_parms): Print template argument packs.
5250 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
5251 (maybe_warn_variadic_templates): New.
5252 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
5253 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5254 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5256 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
5257 (write_template_arg): Write argument packs as separate arguments.
5258 * cp-tree.h (struct template_parm_index_s): Add flag that
5259 indicates that the template parameter is actually a parameter
5261 (struct tree_argument_pack_select): New.
5262 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
5263 (union lang_tree_node): Add argument_pack_select.
5264 (FUNCTION_PARAMETER_PACK_P): New.
5265 (PACK_EXPANSION_P): New.
5266 (PACK_EXPANSION_PATTERN): New.
5267 (SET_PACK_EXPANSION_PATTERN): New.
5268 (PACK_EXPANSION_PARAMETER_PACKS): New.
5269 (ARGUMENT_PACK_P): New.
5270 (ARGUMENT_PACK_ARGS): New.
5271 (SET_ARGUMENT_PACK_ARGS): New.
5272 (ARGUMENT_PACK_INCOMPLETE_P): New.
5273 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
5274 (TEMPLATE_PARM_PARAMETER_PACK): New.
5275 (TEMPLATE_TYPE_PARAMETER_PACK): New.
5276 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
5277 (ARGUMENT_PACK_SELECT_INDEX): New.
5278 (ARGUMENT_PACK_SELECT_ARG): New.
5279 (struct cp_declarator): Add parameter_pack_p flag.
5280 (maybe_warn_variadic_templates): Declare.
5281 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
5282 indicate a template parameter pack.
5283 (uses_parameter_packs): Declare.
5284 (template_parameter_pack_p): Declare.
5285 (template_parms_variadic_p): Declare.
5286 (make_pack_expansion): Declare.
5287 (check_for_bare_parameter_packs): Declare.
5288 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
5289 sizeof... expressions.
5290 (pp_cxx_expression): Print pack expansions and non-type argument
5292 (pp_cxx_exception_specification): Print pack expansions.
5293 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
5294 (pp_cxx_ctor_initializer): Print pack expansions.
5295 (pp_cxx_type_id): Print pack expansions.
5296 (pp_cxx_template_argument_list): Print argument packs.
5297 (pp_cxx_template_parameter): Print ellipsis for template parameter
5299 * pt.c (comp_template_parms): Compare template parameter packs.
5300 (template_parameter_pack_p): New.
5301 (template_parms_variadic_p): New.
5302 (template_args_variadic_p): New.
5303 (make_ith_pack_parameter_name): New.
5304 (struct find_parameter_pack_data): New.
5305 (find_parameter_packs_r): New.
5306 (uses_parameter_packs): New.
5307 (make_pack_expansion): New.
5308 (check_for_bare_parameter_packs): New.
5309 (expand_template_argument_pack): New.
5310 (reduce_template_parm_level): Propagate parameter pack flag.
5311 (process_template_parm): Add is_parameter_pack parameter to state
5312 when the parameter is actually a parameter pack. Create template
5313 parameter packs when is_parameter_pack is true.
5314 (current_template_args): The argument for a template parameter
5315 pack is an argument pack containing a single pack expansion.
5316 (process_partial_specialization): When checking that non-type
5317 argument expressions do not involve template parameters, loop over
5318 the arguments in argument packs separately.
5319 (push_template_decl_real): Check that the type of the declaration
5320 does not have any bare parameter packs. Check that primary
5321 templates have no more than one parameter pack, and that it comes
5322 at the end of the template parameter list.
5323 (convert_template_argument): Handle coercions for pack expansion
5324 expressions by coercing the pattern then rebuilding the expansion.
5325 (coerce_template_parms): When coercing the arguments for a
5326 variadic template, pack "extra" arguments into an argument pack.
5327 (coerce_template_template_parms): Cannot coerce between parameter
5328 packs and non-pack parameters.
5329 (template_args_equal): Compare PACK_EXPANSION_P expressions.
5330 (comp_template_args): Expand all template arguments packs before
5331 comparing template argument lists.
5332 (mangle_class_name_for_template): Make argument packs as separate
5334 (for_each_template_parm_r): No need to handle BASELINK.
5335 (instantiate_class_template): Handle pack expansions in the base
5337 (tsubst_pack_expansion): New.
5338 (tsubst_template_args): Handle substitutions of argument packs and
5339 pack expansion into template argument lists.
5340 (tsubst_decl): Expand function parameter packs into separate
5341 function parameters.
5342 (tsubst_arg_types): Expand a type pack expansion into separate
5344 (tsubst_exception_specification): Handle pack expansions in
5345 exception specifiers.
5346 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
5347 replacing a template parameter with its argument. If we encounter
5348 a substitution for an argument pack, just return the parameter
5350 (tsubst_copy): sizeof(X...) returns the number of elements in
5351 parameter pack X. See through ARGUMENT_PACK_SELECT when the
5352 PARM_DECL is a parameter pack.
5353 (tsubst_expr): Expression pack expansions and argument packs
5354 cannot show up here; they will all be handled through function
5355 calls, sizeof, and template argument lists.
5356 (tsubst_copy_and_build): sizeof(X...) returns the number of
5357 elements in parameter pack X. Handle pack expansions in TREE_LIST
5358 and CONSTRUCTOR nodes.
5359 (fn_type_unification): Handle "incomplete" explicit template
5360 argument lists that specify some of the arguments for a template
5362 (type_unification_real): Unify arguments against pack expansions.
5363 (template_parm_level_and_index): New, helper function.
5364 (unify_pack_expansion): New.
5365 (unify): Unify argument packs on an argument-by-argument basis,
5366 handling variadic argument packs as well.
5367 (more_specialized_fn): Handle unification of function parameter
5368 packs. All things being equal, prefer non-variadic function
5369 templates to variadic function templates.
5370 (more_specialized_class): Prefer the variadic class template
5371 partial specialization that binds fewer arguments to a parameter
5373 (regenerate_decl_from_template): Expand function parameter packs
5374 into separate parameters.
5375 (instantiate_decl): Ditto.
5376 (tsubst_initializer_list): Handle pack expansions for base-class
5378 (dependent_type_p_r): Determine dependent types in argument packs
5379 and pack expansions.
5380 (value_dependent_expression_p): Determine value-dependence of
5381 non-type argument packs.
5382 (dependent_template_arg_p): Handle argument packs.
5383 * semantics.c (finish_cond): Check for bare parameter packs.
5384 (finish_expr_stmt): Ditto.
5385 (finish_for_expr): Ditto.
5386 (finish_switch_cond): Ditto.
5387 (finish_mem_initializers): Ditto.
5388 * name-lookup.c (arg_assoc_type): Handle pack expansions and
5390 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
5391 * parser.c (make_declarator): Declarator is not an expansion.
5392 (make_pointer_declarator): Transfer parameter pack flag to outer
5394 (make_reference_declarator): Ditto.
5395 (make_ptrmem_declarator): Ditto.
5396 (make_call_declarator): Ditto.
5397 (make_array_declarator): Ditto.
5398 (cp_parser_postfix_expression): Allow pack expansion expressions
5399 in the argument list for a call expression.
5400 (cp_parser_parenthesized_expression_list): Add new parameter
5401 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
5402 into separate arguments."
5403 (cp_parser_new_placement): Allow pack expansion expressions.
5404 (cp_parser_new_initializer): Ditto.
5405 (cp_parser_mem_initializer_list): Allow ellipsis to create a
5406 base-class initializer expansion.
5407 (cp_parser_mem_initializer): Ditto.
5408 (cp_parser_template_parameter_list): Keep track of whether the
5409 template parameter is a template parameter pack.
5410 (cp_parser_template_parameter): Parse the ellipsis to indicate a
5411 template parameter pack.
5412 (cp_parser_type_parameter): Ditto.
5413 (cp_parser_template_argument_list): Parse the ellipsis to indicate
5415 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
5416 this declarator is a parameter pack.
5417 (cp_parser_parameter_declaration): The ellipsis does not end the
5418 parameter declaration, because it might be a parameter pack. Parse
5419 the ellipsis to indicate a parameter pack.
5420 (cp_parser_initializer): Allow pack expansions.
5421 (cp_parser_initializer_list): Allow ellipsis to create an
5422 initializer expansion.
5423 (cp_parser_base_clause): Allow ellipsis to create a base specifier
5425 (cp_parser_type_id_list): Allow ellipsis to create an exception
5426 specifier expansion.
5427 (cp_parser_attribute_list): Don't allow pack expansions.
5428 (cp_parser_functional_cast): Allow pack expansions.
5429 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
5430 compute the length of a parameter pack.
5431 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
5432 end a template argument.
5433 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5434 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5437 2007-03-09 Dirk Mueller <dmueller@suse.de>
5439 * call.c (build_new_op): Call warn_logical_operator.
5441 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
5444 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
5447 * pt.c (any_template_arguments_need_structural_equality_p):
5450 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
5452 * decl.c (grokdeclarator): Disable warnings for anonymous
5455 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
5457 * typeck2.c (readonly_error): Always emit a hard error.
5458 Remove last argument.
5459 * cp-tree.h (readonly_error): Adjust prototype.
5460 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
5461 * typeck.c (build_unary_op): Likewise.
5462 (build_modify_expr): Likewise.
5464 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
5467 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
5469 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5472 * parser.c (struct cp_parser): New IN_IF_STMT.
5473 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
5474 returning if parsing the body of an 'if' statement or issuing an
5475 error and continuing.
5476 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
5478 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
5480 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
5483 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
5486 2007-03-02 Geoffrey Keating <geoffk@apple.com>
5488 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
5489 Objective-C++. Don't exit early if -shared-libgcc needs to be
5492 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5494 * typeck.c (common_base_type): Delete unused function.
5496 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
5498 * Make-lang.in: Add dummy lang.install-pdf target.
5500 2007-03-01 Simon Baldwin <simonb@google.com>
5503 * decl.c (check_tag_decl): Added new warning for typedef ignored
5504 when it precedes an otherwise valid non-typedef declaration.
5506 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
5508 * typeck.c (build_function_call): Store converted arguments
5509 in a stack-allocated array instead of building a list.
5510 (convert_arguments): Store arguments in the array passed in as an
5511 argument, and return the actual number of arguments.
5512 * call.c (build_call): Delete, and replace with...
5513 (build_call_n, build_call_a): New.
5514 (build_op_delete_call): Rewrite to avoid constructing argument lists.
5515 (build_over_call): Store converted arguments in a stack-allocated
5516 array instead of building a list.
5517 (build_cxx_call): Pass arguments in an array instead of as a list.
5518 (build_java_interface_fn_ref): Rewrite to avoid constructing
5520 * tree.h: Update declarations to reflect above changes.
5521 * method.c (use_thunk): Use a stack-allocated array to hold
5522 the arguments instead of a list.
5523 * rtti.c (throw_bad_cast): Update call to cxx_call.
5524 (throw_bad_typeid): Likewise.
5525 (build_dynamic_cast_1): Likewise.
5526 * init.c (build_builtin_delete_call): Use build_call_n.
5527 * decl.c (expand_static_init): Likewise.
5528 * except.c (cp_protect_cleanup_actions): Likewise.
5529 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
5530 (gimplify_must_not_throw_expr): Likewise.
5531 (cxx_omp_apply_fn): Use build_call_a.
5533 2007-02-26 Mark Mitchell <mark@codesourcery.com>
5535 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
5536 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
5538 2007-02-25 Mark Mitchell <mark@codesourcery.com>
5540 * cp-tree.h (static_ctors): Remove.
5541 * cp-tree.h (static_dtors): Likewise.
5542 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
5543 refactoring of tree_map hierarchy.
5544 (decl_shadowed_for_var_insert): Likewise.
5545 * semantics.c (expand_body): Use c_expand_body.
5546 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
5547 * decl2.c (static_ctors): Remove.
5548 (static_dtors): Likewise.
5549 (generate_ctor_or_dtor_function): Pass NULL_TREE to
5550 objc_generate_static_init_call. Do not call static_[cd]tors.
5551 (generate_ctor_and_dtor_functions_for_priority): Do not check for
5553 (cp_write_global_declarations): Likewise.
5555 2007-02-23 Richard Guenther <rguenther@suse.de>
5557 * class.c (note_name_declared_in_class): Make declaration
5558 changes meaning a pedwarn.
5560 2007-02-22 Michael Matz <matz@suse.de>
5563 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
5564 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
5565 dump_function_decl): Guard emitting outer scopes by new flag.
5566 * cp-lang.c (cxx_dwarf_name): New function.
5567 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
5568 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
5570 (push_template_decl_real, lookup_template_class): Remove calls
5573 2007-02-19 Mark Mitchell <mark@codesourcery.com>
5575 * call.c (build_new_method_call): Ensure that explicit calls of
5576 destructors have type "void".
5578 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5580 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
5581 and -Walways-true with -Waddress.
5582 * cvt.c (convert_to_void): Replace unconditional warning with
5585 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
5587 * decl.c, tree.c: Fix comment typos.
5589 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5592 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
5593 statement expression if we had an error mark node.
5595 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
5596 Brooks Moses <brooks.moses@codesourcery.com>
5597 Lee Millward <lee.millward@codesourcery.com>
5599 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
5600 Change class to tcc_vl_exp.
5602 * call.c (build_call): Use build_call_list instead
5604 (build_over_call): Likewise.
5605 (build_new_method_call): Use build_min_non_dep_call_list
5606 instead of build_min_non_dep.
5608 * error.c (dump_call_expr_args): New function.
5609 (dump_aggr_init_expr_args): New function.
5610 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
5611 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
5613 * cvt.c (convert_to_void): Use build_call_array instead
5614 of build3; use new AGGR_INIT_EXPR accessor macros.
5616 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
5617 instead of TREE_CODE_LENGTH.
5619 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
5620 AGGR_INIT_EXPR accessor macros.
5622 * cp-gimplify.c (cp_gimplify_init_expr): Use
5623 AGGR_INIT_EXPR_SLOT to set the slot operand.
5625 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
5626 (AGGR_INIT_EXPR_SLOT): New macro.
5627 (AGGR_INIT_EXPR_ARG): New macro.
5628 (aggr_init_expr_nargs): New macro.
5629 (AGGR_INIT_EXPR_ARGP): New macro.
5630 (aggr_init_expr_arg_iterator): New.
5631 (init_aggr_init_expr_arg_iterator): New.
5632 (next_aggr_init_expr_arg): New.
5633 (first_aggr_init_expr_arg): New.
5634 (more_aggr_init_expr_args_p): New.
5635 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
5636 (stabilize_aggr_init): New declaration.
5637 (build_min_non_dep_call_list): Likewise.
5639 * tree.c (process_aggr_init_operands): New function.
5640 (build_aggr_init_array) New function.
5641 (build_cplus_new): Update to use new CALL_EXPR and
5642 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
5643 build_aggr_init_array.
5644 (build_min_non_dep_call_list) New function.
5645 (build_min_nt): Assert input code parameter is not a variable
5646 length expression class.
5647 (build_min, build_min_non_dep): Likewise.
5648 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
5649 to check for equality instead of recursing. Handle tcc_vl_exp
5651 (stabilize_call): Update to only handle CALL_EXPRs, not
5652 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
5653 (stabilize_aggr_init): New function.
5654 (stabilize_init): Use it.
5656 * cxx-pretty-print.c (pp_cxx_postfix_expression)
5657 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
5658 AGGR_INIT_EXPR accessor macros and argument iterators.
5660 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
5661 build_vl_exp. Iterate through the operands, recursively
5662 processing each one.
5663 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
5664 CALL_EXPR accessor macros.
5665 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
5666 tree code classes. Use TREE_OPERAND_LENGTH instead of
5669 * semantics.c (finish_call_expr): Use build_nt_call_list
5670 instead of build_nt.
5671 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
5672 accessor macros. Use build_call_array to construct the
5673 CALL_EXPR node instead of build3
5675 * decl2.c (build_offset_ref_call_from_tree): Use
5676 build_nt_call_list and build_min_non_dep_call_list instead
5677 of build_min_nt and build_min_non_dep.
5679 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
5680 Use build_nt_call_list instead of build_min_nt.
5682 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5685 * call.c (build_conditional_expr): Improve error message.
5687 2007-02-13 Dirk Mueller <dmueller@suse.de>
5689 * friend.c (do_friend): Annotate warning about friend
5690 declarations in templates with OPT_Wnon_template_friend.
5691 Convert informal message from warning() to inform().
5693 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
5694 Mark Mitchell <mark@codesourcery.com>
5697 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
5698 instantiations for variables.
5700 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5703 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
5704 Check warn_unused_value just once.
5706 2007-02-11 Mark Mitchell <mark@codesourcery.com>
5709 * pt.c (determine_specialization): Use skip_artificial_parms_for.
5710 (fn_type_unificiation): Likewise.
5711 (get_bindings): Likewise.
5713 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
5716 * decl.c (finish_function): Use DECL_REPLACEABLE.
5717 * tree.c (cp_cannot_inline_tree_fn): Likewise.
5719 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
5721 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
5723 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
5725 * decl.c (grokvardecl): Don't error if !have_tls.
5726 (grokdeclarator): Likewise.
5727 * parser.c (cp_parser_omp_threadprivate): Likewise.
5729 2007-02-07 Jakub Jelinek <jakub@redhat.com>
5732 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
5733 parameters and result decls in omp clauses.
5734 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
5737 2007-02-05 Dirk Mueller <dmueller@suse.de>
5740 * parser.c (cp_parser_class_specifier): Always initialize bases.
5742 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5744 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
5745 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
5746 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
5748 * semantics.c (finish_omp_atomic): Store a whole expression node
5749 in operand 1, and integer_zero_node in operand 0, for dependent
5750 OMP_ATOMIC. Rewrite to make flow easier to understand.
5752 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5754 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
5756 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
5758 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
5759 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
5761 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
5763 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
5764 keyword warning to -Wc++0x-compat.
5766 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5768 * decl.c (grokdeclarator): Update documentation.
5770 2007-02-02 Jakub Jelinek <jakub@redhat.com>
5773 * decl.c (grokdeclarator): If __thread is used together with
5774 a storage class other than extern and static, clear thread_p
5775 after issuing diagnostics and fall through to checking the
5778 2007-01-30 Roger Sayle <roger@eyesopen.com>
5780 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
5781 calculating the size of an array (to avoid recursive errors).
5783 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5786 * typeck.c (build_binary_op): Fix logic for warning. Move warning
5788 * call.c (convert_like_real): Don't warn when converting to
5791 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5793 * decl.c (pop_label): Replace warning with call to
5794 warn_for_unused_label.
5796 2007-01-28 Andrew Pinski <pinskia@gmail.com>
5799 * semantics.c (finish_pseudo_destructor_expr): Check the
5800 destrutor name by calling check_dtor_name.
5802 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
5804 * lex.c (D_CPP0X): Rename.
5806 (reswords): D_CPP0X -> D_CXX0X.
5807 (init_reswords): Ditto.
5808 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
5809 of C++0x keywords as identifiers.
5811 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
5814 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
5817 2007-01-23 Ian Lance Taylor <iant@google.com>
5819 * typeck.c (convert_for_assignment): Only warn about a = b = c
5820 when converting to bool.
5822 2007-01-23 Roger Sayle <roger@eyesopen.com>
5824 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
5826 * typeck.c (ignore_overflows): Remove the remaining uses of
5827 TREE_CONSTANT_OVERFLOW.
5829 2007-01-20 Jan Hubicka <jh@suse.cz>
5831 * decl2.c (start_objects, start_static_storage_duration_function):
5832 Do not make the functions uninlinable.
5834 2007-01-17 Ian Lance Taylor <iant@google.com>
5836 * class.c (add_method): Call VEC_reserve_exact rather than passing
5837 a negative size to VEC_reserve.
5839 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
5842 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
5844 2007-01-10 Mark Mitchell <mark@codesourcery.com>
5847 * decl.c (make_typename_type): If the qualified name is not a
5848 type, issue an error.
5849 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
5852 2007-01-08 Geoffrey Keating <geoffk@apple.com>
5854 * rtti.c: Include target.h.
5855 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
5856 don't emit typeinfo for fundamental types as weak.
5857 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
5859 2007-01-08 Richard Guenther <rguenther@suse.de>
5861 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
5863 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
5865 * call.c (standard_conversion): Pass flag to
5866 vector_types_convertible_p to disallow emission of note.
5867 * typeck.c (convert_for_assignment): Pass flag to
5868 vector_types_convertible_p to allow emission of note.
5869 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
5870 to disallow emission of note.
5872 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5875 * typeck.c (build_binary_op): Call overflow_warning if
5876 TREE_OVERFLOW_P is true for the result and not for any of the
5879 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
5882 * class.c (add_method): Don't wait until template
5883 instantiation time to complain about duplicate methods.
5885 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5888 * semantics.c (finish_unary_op_expr): Warn only if result
5889 overflowed and operands did not.
5891 2007-01-05 Ian Lance Taylor <iant@google.com>
5893 * typeck.c (build_binary_op): Warn about comparing a non-weak
5896 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
5898 * pt.c (tsubst): Propagate the need for structural equality checks
5899 when reducing the level of template parameters.
5901 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
5903 * pt.c: Fix a comment typo.
5905 2007-01-02 Ian Lance Taylor <iant@google.com>
5907 * semantics.c (maybe_convert_cond): Optionally warn when using an
5908 assignment as a condition.
5909 * typeck.c (convert_for_assignment): Optionally warn about
5910 assigning the result of an assignment to a bool.
5912 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
5914 * pt.c (canonical_template_parms): Correct typo in comment.
5916 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
5918 * typeck.c (structural_comptypes): Renamed from "comptypes".
5919 (comptypes): Use canonical type information to perform fast type
5920 comparison. When VERIFY_CANONICAL_TYPES, verify that the
5921 canonical type comparison returns the same results as we would see
5922 from the current, structural check. Support COMPARE_STRUCTURAL
5923 when we need structural checks.
5924 * decl.c (typename_compare): Fix comment.
5925 (build_typename_type): TYPENAME_TYPE nodes require structural
5926 equality checks, because they resolve different based on the
5928 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
5929 require structural equality checks (for now).
5930 (build_ptrmemfunc_type): Build the canonical pointer to member
5932 (compute_array_index_type): Whenever we build a new index type
5933 to represent the size of an array in a template, we need to mark
5934 this index type as requiring structural equality. This goes for
5935 arrays with value-dependent sizes with the current ABI, or all
5937 * tree.c (cplus_array_hash): New.
5938 (struct cplus_array_info): New.
5939 (cplus_array_compare): New.
5940 (cplus_array_htab): New.
5941 (build_cplus_array_type_1): Use a hash table to cache the array
5942 types we build. Build the canonical array type for each array
5944 (cp_build_qualified_type_real): When building a cv-qualified array
5945 type, use the hash table of array types and build canonical array
5947 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
5948 use structural equality (for now).
5949 * cp-tree.h (COMPARE_STRUCTURAL): New.
5950 * pt.c (canonical_template_parms): New.
5951 (canonical_type_parameter): New.
5952 (process_template_parm): Find the canonical type parameter.
5953 (lookup_template_class): When we have named the primary template
5954 type, set the canonical type for our template class to the primary
5955 template type. If any of the template arguments need structural
5956 equality checks, the template class needs structural equality
5958 (tsubst): When reducing the level of a template template
5959 parameter, we require structural equality tests for the resulting
5960 parameter because its template parameters have not had their types
5961 canonicalized. When reducing a template type parameter, find the
5962 canonical reduced type parameter.
5963 (any_template_arguments_need_structural_equality_p): New.