1 2008-08-29 Michael Meissner <gnu@the-meissners.org>
3 * decl.c (builtin_function_1): Take a bool argument to decide
4 whether to use pushdecl or pushdecl_top_level.
5 (duplicate_decls): Copy function specific target and optimization
6 options on duplicate declarations.
7 (cxx_builtin_function): Update builtin_function_1 call.
8 (cxx_builtin_function_ext_scope): New function, guarantee that the
9 declaration is done at global scope.
11 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
12 macro, define builtin function hook for delayed machine specific
15 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
17 2008-08-30 Jason Merrill <jason@redhat.com>
20 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
22 2008-08-29 Jason Merrill <jason@redhat.com>
24 Implement C++0x 'auto' semantics.
25 * decl.c (start_decl_1): Don't complain about auto being incomplete.
26 (cp_finish_decl): Deduce auto.
27 * init.c (build_new): Handle 'new auto'.
28 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
29 message for auto than for normal template type parms.
30 * pt.c (type_dependent_expression_p): Handle { }.
31 (make_auto): New function.
32 (listify_autos): New function.
33 (do_auto_deduction): New function.
34 (is_auto): New function.
35 (type_uses_auto): New function.
36 * cp-tree.h: Declare them.
37 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
38 treat auto as a declspec.
39 (cp_parser_simple_type_specifier): It's a type-specifier.
41 2008-08-29 Mark Mitchell <mark@codesourcery.com>
43 * mangle.c (write_type): Add target-specific manglings for
44 non-fundamental types to the substitution table.
47 2008-08-29 Jakub Jelinek <jakub@redhat.com>
51 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
52 Adjust debug_hooks->imported_module_or_decl callers.
54 2008-08-29 Jan Hubicka <jh@suse.cz>
56 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
58 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
61 * decl.c (reshape_init_r): Check init for error_mark_node.
63 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
66 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
67 (finish_return_stmt): Likewise.
68 (finish_switch_condition): Likewise.
70 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
72 * cp-tree.h: Fix #error directive.
74 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
76 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
77 usual arithmetic conversions on scoped enumeration types.
79 (default_conversion): Don't perform integral promotions on scoped
81 (build_array_ref): Scoped enumeration types can't be used as
83 * decl.c (start_enum): If building a C++0x scoped enumeration,
84 enter its scope. If provided with an underlying type, check that
85 underlying type and set up the enumeration type accordingly.
86 (finish_enum): Only compute an underlying type if the underlying
87 type isn't already fixed, and only convert the enumerator values
88 now if we've just computed the underlying type. Finish the scope
89 of C++0x scoped enumerations.
90 (build_enumerator): For enumerations with a fixed underlying type,
91 check the enumerator values when the enumerator is defined.
92 (lookup_enumerator): New.
93 * call.c (standard_conversion): Don't allow assignment from
94 integers to scoped enumeration types, even with -fpermissive.
95 Don't convert from scoped enumerations to bool or any arithmetic
97 (build_conditional_expr): Don't per the usual arithmetic
98 conversions for scoped enumeration types.
99 (convert_like_real): Check complain to see if we should
101 * error.c (class_key_or_enum_as_string): Print scoped enums.
102 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
104 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
105 (SCOPED_ENUM_P): New.
106 (UNSCOPED_ENUM_P): New.
107 (SET_SCOPED_ENUM_P): New.
108 (ENUM_UNDERLYING_TYPE): New.
109 * pt.c (lookup_template_class): Update the instantiation of enum
110 types to deal with C++0x scoped enumerations and underlying
112 * name-lookup.c (begin_scope): Deal with scoped enumeration
114 (lookup_qualified_name): Deal with lookup into enumeration types.
115 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
116 * parser.c (cp_parser_class_or_namespace_name): Rename to...
117 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
118 parse a type-name that can be an enumeration type.
119 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
120 (cp_parser_elaborated_type_specifier): Parse the
121 optional `struct' or `class' following enum (in C++0x).
122 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
125 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
127 * typeck.c: Update all calls to pedwarn.
132 * name-lookup.c: Likewise.
133 * parser.c: Likewise.
135 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
138 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
141 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
143 * parser.c: Update all calls to inform.
144 * typeck.c: Likewise.
148 * method.c: Likewise.
149 * friend.c: Likewise.
150 * typeck2.c: Likewise.
152 * name-lookup.c: Likewise.
155 2008-08-19 Jakub Jelinek <jakub@redhat.com>
158 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
160 2008-08-18 Tomas Bily <tbily@suse.cz>
162 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
164 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
166 * typeck.c: Update all callers of permerror.
171 * except.c: Likewise.
173 * typeck2.c: Likewise.
175 * semantics.c: Likewise.
176 * name-lookup.c: Likewise.
179 * parser.c: Likewise.
181 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
184 * pt.c (check_template_shadow): Change to return a bool.
185 * name-lookup.c (push_class_level_binding): Early return if
186 check_template_shadow returns false.
187 * cp-tree.h (check_template_shadow): Adjust declaration.
189 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
192 * decl.c (grokdeclarator): In case of extern and initializer, return
193 error_mark_node after the error.
195 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
198 * decl.c (grokfndecl): Call check_main_parameters_type only if
201 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
204 * parser.c (cp_parser_class_head): Early return error_mark_node in
205 case of global qualification of class name or qualified name that
206 does not name a class.
208 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
211 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
213 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
216 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
217 Delete forward declarations. Check that toplev.h has not been
218 included before this file. Include toplev.h and diagnostic.h.
219 * error.c (cp_cpp_error): Use DK_PEDWARN.
220 (cxx_incomplete_type_diagnostic): Update declaration.
221 (cxx_incomplete_type_error): Use DK_ERROR.
222 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
223 as argument. Use emit_diagnostic.
224 (cxx_incomplete_type_error): Use DK_ERROR.
225 (add_exception_specifier): Use diagnostic_t instead of custom
227 * typeck.c (complete_type_or_else): Update call to
228 cxx_incomplete_type_diagnostic.
229 * init.c (build_delete): Likewise.
230 * call.c (diagnostic_fn_t): Remove unused typedef.
231 (build_temp): Pass a pointer to diagnostic_t.
232 (convert_like_real): Use emit_diagnostic.
233 (joust): Check return value of warning before giving informative
235 * friend.c (do_friend): Check return value of warning
236 before giving informative note.
237 * parser.c (cp_parser_template_id): Likewise.
239 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
242 * class.c (check_bases_and_members): Warn with -Wuninitialized
245 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
248 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
249 and make sure it is not a union.
251 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
253 * semantics.c (finish_decltype_type): Initialize type.
255 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
257 * semantics.c (finish_decltype_type): Handle calls to function
258 pointers and references to functions properly.
260 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
263 * parser.c (cp_parser_template_argument): Don't assume that '>>'
264 following a type-id is an error when in C++0x mode.
266 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
269 * decl.c (grokdeclarator): Use explicit location with permerror_at.
271 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
274 * typeck.c (cp_build_binary_op): Move code to c-common.c.
276 2008-08-05 Jason Merrill <jason@redhat.com>
279 * decl.c (build_ptrmemfunc_type): Don't require structural
280 comparison of PMF types.
281 * tree.c (cp_build_qualified_type_real): Don't clear
282 a valid TYPE_PTRMEMFUNC_TYPE.
283 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
286 2008-08-04 Jason Merrill <jason@redhat.com>
289 * typeck2.c (check_narrowing): Allow narrowing conversion
290 from an explicit floating-point constant.
293 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
296 2008-08-04 Simon Baldwin <simonb@google.com>
299 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
300 the declaration's id is followed by a semicolon.
302 2008-07-31 Jakub Jelinek <jakub@redhat.com>
305 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
306 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
308 2008-07-31 Jason Merrill <jason@redhat.com>
311 * init.c (build_new_1): Don't convert pointer to the data type
312 until we're actually going to treat it as that type.
315 * tree.c (build_aggr_init_expr): Split out...
316 (build_cplus_new): ...from here.
317 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
318 * init.c (build_new_1): new T() means value-initialization,
319 not default-initialization.
320 (build_vec_init): Likewise.
321 (build_value_init_1): Use build_aggr_init_expr.
323 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
326 * decl2.c (fix_temporary_vars_context_r): New function.
327 (one_static_initialization_or_destruction): Make sure temporary
328 variables part of the initialiser have their DECL_CONTEXT()
331 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
334 * typeck.c (build_binary_op): Encapsulate code into
337 2008-07-29 Jakub Jelinek <jakub@redhat.com>
340 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
341 TYPE_UID instead of pointers.
343 2008-07-29 Jan Hubicka <jh@suse.cz>
345 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
346 * decl.c (duplicate_decls): Likewise.
347 (grokfndecl): Likewise.
348 (start_method): Likewise.
349 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
351 * pt.c (register_specialization, regenerate_decl_from_template):
353 * decl2.c (grokfield): Likewise.
355 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
358 * decl.c (duplicate_decls): Merge USED flags.
360 2008-07-27 Jason Merrill <jason@redhat.com>
363 * decl.c (reshape_init_r): Allow C++0x initializer lists.
365 2008-07-28 Richard Guenther <rguenther@suse.de>
367 Merge from gimple-tuples-branch.
369 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
371 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
374 2008-07-18 Jakub Jelinek <jakub@redhat.com>
376 * decl.c (finish_function): Call gimple_body after cp_genericize.
378 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
380 * optimize.c: Include gimple.h instead of tree-gimple.h.
381 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
382 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
385 2008-07-16 Jakub Jelinek <jakub@redhat.com>
387 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
389 2008-07-14 Jakub Jelinek <jakub@redhat.com>
391 * cp-gimplify.c (cp_gimplify_expr): Update comment.
393 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
395 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
397 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
398 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
399 (cxx_omp_clause_copy_ctor): Same.
400 (cxx_omp_clause_assign_op): Same.
402 2008-05-28 Jakub Jelinek <jakub@redhat.com>
404 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
405 (cp_gimplify_expr): Adjust caller.
407 2008-05-11 Doug Kwan <dougkwan@google.com>
409 * init.c (build_vec_delete): Add type conversion for argument
410 0 of POINTER_PLUS_EXPR.
412 2008-04-29 Doug Kwan <dougkwan@google.com>
414 * decl2 (File): Include "gimple.h"
415 (cp_write_global_declarations): Use gimple_body instead of
417 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
419 2008-04-10 Diego Novillo <dnovillo@google.com>
421 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
423 * optimize.c (maybe_clone_body): Re-enable call to
425 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
426 code with call to gimple_unreachable.
427 (cp_genericize): Fix handling of clone bodies.
429 2008-04-04 Diego Novillo <dnovillo@google.com>
431 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
433 * optimize.c (maybe_clone_body): Re-enable.
435 2008-02-19 Diego Novillo <dnovillo@google.com>
436 Oleg Ryjkov <olegr@google.com>
438 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
440 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
441 argument to gimple_seq *. Update all users.
442 (gimplify_must_not_throw_expr): Likewise.
444 2008-02-04 Oleg Ryjkov <olegr@google.com>
446 * except.c: Include gimple.h
447 (cp_protect_cleanup_actions): Convert to tuples.
448 * Make-lang.in (cp/except.o): Add dependency on gimple.h
450 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
452 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
453 instead of annotating each block manually.
455 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
457 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
458 (gimplify_for_stmt): Same.
459 (gimplify_switch_stmt): Same.
460 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
462 [WHILE_STMT]: Return GS_OK.
464 [CONTINUE_STMT]: Same.
466 (cp_genericize): Set gimple_body() of cloned functions when needed.
468 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
470 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
471 (cp_gimplify_init_expr): Convert to tuples.
472 (gimplify_must_not_throw_expr): Make function return a
473 gimplify_status and convert to tuples.
475 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
477 * cp-gimplify.c (genericize_try_block): Enable and do not call
479 (genericize_catch_block): Same.
480 (genericize_eh_spec_block): Same.
481 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
482 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
484 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
486 * optimize.c (maybe_clone_body): Comment out call to clone_body.
487 * decl.c (finish_function): Use gimple_body instead of
489 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
490 * cp-gimplify.c (genericize_try_block): Comment out.
491 (genericize_catch_block): Same.
492 (genericize_eh_spec_block): Same.
493 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
494 (gimplify_for_stmt): Comment out.
495 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
496 (cp_gimplify_omp_for): Same.
497 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
498 Comment out call to gimplify_stmt and append_to_statement_list.
499 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
500 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
501 (cp_gimplify_expr): Same.
502 Comment out calls to genericize_*_block. Comment out call to
505 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
508 * class.c (type_has_user_provided_default_constructor): Handle
511 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
513 * decl.c (push_library_fn): Add a parameter for the exceptions that
514 the function may throw.
515 (push_void_library_fn, push_throw_library_fn, expand_static_init):
517 (build_library_fn): Change to static.
518 * cp-tree.h: Adjust declarations.
519 * except.c (declare_nothrow_library_fn): New.
520 (do_get_exception_ptr, do_begin_catch, do_free_exception,
521 do_allocate_exception): Use the latter, adjust the declarations
522 (ie, add empty exception-specification), consistently with the
523 actual implementation in libsupc++.
525 2008-07-25 Jan Hubicka <jh@suse.cz>
527 * typeck.c (inline_conversion): Remove.
528 (cp_build_function_call): Do not use inline_conversion.
529 * decl.c (duplicate_decls): Do not insist on inline being declared
531 (start_cleanup_fn): Do not assume that INLINE flags prevent function
532 from being output. We now remove static functions always.
533 (finish_function): Do return warning on all static functions.
534 * call.c (build_over_call): Do not use inline_conversion.
535 * cp-tree.h (possibly_inlined_p): Declare.
536 (inline_conversion): Remove.
537 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
538 * decl2.c (cp_write_global_declarations): Likewise.
539 (mark_used): Likewise.
540 (possibly_inlined_p): New functions.
542 2008-07-25 Jason Merrill <jason@redhat.com>
544 * class.c (type_has_user_provided_default_constructor): Handle
547 2008-07-23 Jan Hubicka <jh@suse.cz>
549 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
550 (grogfndecl): Drop flag_inline_trees code.
551 * pt.c (instantiate_decl): Drop flag_iline_trees code.
552 * lex.c (cxx_init): Do not set unit-at-a-time.
554 2008-07-23 Jason Merrill <jason@redhat.com>
556 * mangle.c (write_unqualified_name): Avoid infinite recursion when
557 trying to mangle a decl with no name.
559 Implement defaulted/deleted functions as per N2346
560 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
561 (DECL_DELETED_FN): New macro.
562 (DECL_DEFAULTED_FN): New macro.
563 * class.c (user_provided_p): New fn.
564 (defaultable_fn_p): New fn.
565 (type_has_user_provided_constructor): New fn.
566 (type_has_user_provided_default_constructor): New fn.
567 (check_methods): A defaulted fn is still trivial.
568 (check_bases_and_members): Likewise.
569 * decl.c (grok_special_member_properties): Likewise.
570 (duplicate_decls): Complain about redeclaring a function as deleted.
571 (start_decl): initialized==2 means deleted.
572 (cp_finish_decl): Handle deleted/defaulted semantics.
573 * decl2.c (grokfield): Likewise.
574 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
575 Complain about using a deleted fn.
576 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
577 (perform_member_init): Check for a user-provided default constructor
578 even if TYPE_NEEDS_CONSTRUCTING.
579 (build_new_1): Likewise.
580 * call.c (build_over_call): Don't call mark_used twice.
581 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
582 * search.c (check_final_overrider): Check for deleted mismatch.
583 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
584 (cp_parser_pure_specifier): Handle =default and =delete.
586 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
588 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
591 * typeck.c: All calls to pedwarn changed.
592 * decl.c: All calls to pedwarn changed.
593 * call.c: All calls to pedwarn changed.
594 * error.c: All calls to pedwarn changed.
595 * typeck2.c: All calls to pedwarn changed.
596 * pt.c: All calls to pedwarn changed.
597 * name-lookup.c: All calls to pedwarn changed.
598 * parser.c: All calls to pedwarn changed.
600 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
602 * call.c: Fix comment typos.
604 * cp-tree.h: Likewise.
605 * cxx-pretty-print.c: Likewise.
608 * name-lookup.c: Likewise.
609 * operators.def: Likewise.
610 * parser.c: Likewise.
613 * typeck.c: Likewise.
615 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
619 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
620 copy constructors and copy assignment operators proper.
622 2008-07-21 Rafael Avila de Espindola <espindola@google.com>
624 * parser.c (cp_token): Remove in_system_header.
625 (eof_token): Remove in_system_header.
626 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
627 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
628 (cp_parser_member_declaration): Use in_system_header_at.
629 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
630 (pop_tinst_level): Don't set in_system_header.
631 (instantiate_class_template): Don't set in_system_header.
632 (instantiate_decl): Don't set in_system_header.
633 (instantiate_pending_templates): Don't set in_system_header.
635 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
638 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
639 TYPE_NOTHROW_P, not TREE_NOTHROW.
640 (trait_expr_value): Likewise.
642 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
645 * call.c (convert_like_real): Don't take the error code path
646 when a rvalue or base conversion has the bad_p field set.
648 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
650 * rtti.c (emit_support_tinfos): Add char16_type_node and
652 * typeck2.c (digest_init): Support char16_t and char32_t.
654 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
656 * cvt.c (convert_to_void): Avoid C++ keywords.
657 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
659 * friend.c (is_friend): Likewise.
660 * init.c (perform_member_init): Likewise.
661 * mangle.c (write_template_prefix, write_template_template_param):
663 * name-lookup.c (do_namespace_alias, do_using_directive,
664 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
665 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
666 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
668 * pt.c (is_specialization_of_friend, lookup_template_class,
669 push_tinst_level, instantiate_class_template,
670 tsubst_copy_and_build): Likewise.
671 * tree.c (add_stmt_to_compound): Likewise.
672 * typeck.c (finish_class_member_access_expr): Likewise.
674 2008-07-17 Julian Brown <julian@codesourcery.com>
675 Mark Mitchell <mark@codesourcery.com>
677 * decl2.c (determine_visibility): Allow target to override
678 visibility of class data.
680 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
683 * semantics.c (trait_expr_value): Update __has_trivial_destructor
684 semantics to the current WP (N2691).
686 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
689 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
690 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
691 complies with exception specification constraints.
693 2008-07-14 Jason Merrill <jason@redhat.com>
695 * lex.c (init_reswords): Always set D_OBJC.
697 2008-07-11 Tom Tromey <tromey@redhat.com>
698 Ian Lance Taylor <iant@google.com>
700 * lex.c (struct resword, reswords): Don't define.
701 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
702 (init_reswords): Clarify mask code. Use c_common_reswords rather
705 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
708 * decl.c (grokdeclarator): Warn about initializing variables
709 of storage class 'extern' only after the type of the declarator
710 has been properly computed.
712 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
715 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
716 carries the location of the primary type.
717 * parser.c (cp_parser_check_type_definition): Update documentation.
718 (cp_parser_check_for_definition_in_return_type,
719 cp_parser_check_for_invalid_template_id,
720 cp_parser_set_decl_spec_type,
721 cp_parser_check_for_definition_in_return_type,
722 cp_parser_diagnose_invalid_type_name,
723 cp_parser_new_expression, cp_parser_explicit_instantiation,
724 cp_parser_type_specifier, cp_parser_simple_type_specifier,
725 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
728 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
732 * semantic.c (qualified_name_lookup_error, finish_id_expression):
733 Add a location_t parameter so that
734 error message can have a more accurate location.
735 * cp-tree.h: Updated prototype
736 * pt.c (tsubst_qualified_id): Use location in error messages.
737 * parser.c (cp_parser_postfix_expression,
738 cp_parser_objc_statement, cp_parser_trait_expr,
739 cp_parser_token_is_class_key,
740 cp_parser_uncommitted_to_tentative_parse_p,
741 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
742 cp_parser_error, cp_parser_name_lookup_error,
743 cp_parser_simulate_error, cp_parser_check_decl_spec,
744 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
745 cp_parser_diagnose_invalid_type_name,
746 cp_parser_parse_and_diagnose_invalid_type_name,
747 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
748 cp_parser_string_literal, cp_parser_primary_expression,
749 cp_parser_primary_expression, cp_parser_unqualified_id,
750 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
751 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
752 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
753 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
754 cp_parser_jump_statement, cp_parser_block_declaration,
755 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
756 cp_parser_function_specifier_opt, cp_parser_decltype,
757 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
758 cp_parser_mem_initializer_id, cp_parser_template_parameter,
759 cp_parser_type_parameter, cp_parser_template_id,
760 cp_parser_template_name, cp_parser_template_argument): Likewise.
762 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
765 * pt.c (tsubst_function_type): Remove warning for type qualifiers
766 on function return type.
768 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
771 * pt.c (tsubst_function_type): Don't warn for type qualifiers
772 on function return type in case of system header.
774 2008-07-09 Raksit Ashok <raksit@google.com>
776 * parser.c (cp_parser_postfix_expression): New warning based on flag
777 warn_disallowed_functions.
779 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
782 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
783 functions declared with a storage class qualifier.
785 2008-07-03 Richard Guenther <rguenther@suse.de>
788 * typeck.c (cp_build_function_call): Move code to verify
789 builtin function arguments ...
790 * call.c (build_cxx_call): ... here.
792 2008-07-02 Jason Merrill <jason@redhat.com>
794 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
796 Implement WG21 N2672, Initializer List proposed wording
797 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
798 (struct lang_type_class): Add has_list_ctor bitfield.
799 (TYPE_HAS_LIST_CTOR): New macro.
800 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
801 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
802 (LOOKUP_NO_NARROWING): New macro.
803 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
804 * parser.c (cp_parse_braced_list): Split out from...
805 (cp_parser_initializer_clause): ...here.
806 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
808 (cp_lexer_next_token_is_not_keyword): New fn.
809 (cp_parser_parenthesized_expression_list): Handle { }.
810 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
811 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
812 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
813 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
814 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
815 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
816 (cp_parser_save_member_function_body): Likewise.
817 * call.c (conversion_kind): Add ck_list, ck_aggr.
818 (struct conversion): Add check_narrowing bitfield, conversion list.
819 (build_list_conv): New fn.
820 (build_aggr_conv): New fn.
821 (implicit_conversion): Call them.
822 (standard_conversion): Set check_narrowing if appropriate.
823 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
824 (build_user_type_conversion_1): When converting from an init list,
825 we allow additional conversions except when calling a copy ctor.
826 (convert_like_real): Calling an explicit ctor for an init list is
827 ill-formed. Handle ck_list and ck_addr. Check narrowing.
828 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
829 class doesn't have a list ctor, break the {} into a TREE_LIST.
830 (compare_ics): ck_list is better than other UDCs.
831 (set_up_extended_ref_temp): Split out from initialize_reference.
832 (is_std_init_list): New fn.
833 (is_list_ctor): New fn.
834 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
835 (reshape_init_array_1): Pass it to build_constructor.
836 (reshape_init_class): Ditto.
837 (initialize_artificial_var): Pass the appropriate type.
838 (build_aggr_init_full_exprs): Split out from...
839 (check_initializer): ...here. Handle new semantics.
840 (build_init_list_var_init): New subroutine of check_initializer.
841 (grokdeclarator): Converting constructors can have more than one parm.
842 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
843 * init.c (expand_default_init): Only do digest_init for aggregates.
844 * rtti.c (tinfo_base_init): Pass init_list_type_node to
845 build_constructor_from_list.
846 (generic_initializer, ptr_initializer): Ditto.
847 (ptm_initializer, class_initializer): Ditto.
848 (get_pseudo_ti_init): Ditto.
849 * error.c (dump_type): Handle init_list_type_node.
850 (maybe_warn_cpp0x): New fn.
851 (maybe_varn_variadic_templates): Call it.
852 * cvt.c (ocp_convert): Handle conversion from { }.
853 * tree.c (build_array_of_n_type): New fn.
854 * typeck2.c (store_init_value): Use init_list_type_node.
855 (digest_init): Likewise.
856 (check_narrowing): New fn.
857 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
858 of vector of constructor elts. Handle non-aggregate types. Make
859 constant literals static.
860 * pt.c: (tsubst_copy_and_build): Adjust.
862 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
864 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
866 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
867 (comp_ptr_ttypes_const): Likewise.
869 2008-07-01 Andrew Haley <aph@redhat.com>
871 * decl.c (finish_constructor_body): Don't set the return value of
872 the constructor if the constructor is that of a Java type.
874 2008-06-30 Jakub Jelinek <jakub@redhat.com>
877 * decl2.c (is_late_template_attribute): If the first attribute
878 argument is IDENTIFIER_NODE, don't consider it when checking
879 if arguments are value or type dependent.
881 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
884 * pt.c (do_type_instantiation): In c++0x mode do not warn for
887 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
889 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
891 2008-06-28 Jakub Jelinek <jakub@redhat.com>
894 * repo.c (repo_emit_p): Put const static data members initialized
895 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
898 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
901 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
904 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
907 * typeck.c (cp_build_function_call): Show example syntax in
910 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
912 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
913 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
914 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
915 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
916 pedwarn to permerror.
917 * init.c (perform_member_init, build_new_1, build_new): Likewise.
918 * decl.c (warn_extern_redeclared_static, duplicate_decls,
919 * identify_goto, check_previous_goto_1, check_goto, define_label,
920 check_tag_decl, start_decl, check_class_member_definition_namespace,
921 grokfndecl, grokdeclarator): Likewise.
922 * except.c (check_handlers): Likewise.
923 * typeck2.c (digest_init): Likewise.
924 * pt.c (check_specialization_namespace,
925 check_explicit_instantiation_namespace,
926 maybe_process_partial_specialization, check_explicit_specialization,
927 convert_template_argument, do_decl_instantiation,
928 do_type_instantiation, instantiate_decl): Likewise.
929 * semantics.c (finish_template_type_parm): Likewise.
930 * name-lookup.c (pushdecl_maybe_friend,
931 check_for_out_of_scope_variable): Likewise.
932 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
933 coerce_new_type): Likewise.
934 * parser.c (cp_parser_nested_name_specifier_opt,
935 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
936 cp_parser_class_head, cp_parser_check_class_key): Likewise.
937 (cp_parser_parameter_declaration): Check flag_permissive instead of
938 flag_pedantic_errors.
939 * call.c (joust): Change pedwarn to warning.
940 * friend.c (make_friend_class): Likewise.
942 2008-06-16 Jan Hubicka <jh@suse.cz>
944 * method.c: Include cgraph.h.
945 (use_thunk): Use cgraph_add_new_function instead of calling backend
948 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
950 * parser.c: Fix comment typo.
952 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
955 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
956 grokdeclarator and apply it to the created declaration.
957 * cp-tree.h (grokbitfield): Update prototype.
958 * parser.c (cp_parser_member_declaration): Don't apply the attributes
959 since they are now applied in grokbitfield. Adjusted the call to
961 (cp_parser_objc_class_ivars): Likewise.
963 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
966 * class.c (type_requires_array_cookie): Do not consider delete[]
967 operators with an ellipsis as second argument.
969 2008-06-09 Jakub Jelinek <jakub@redhat.com>
972 * semantics.c (stmt_expr_value_expr): Don't crash on empty
975 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
978 * pt.c (maybe_process_partial_specialization): Check the tree
979 returned by push_template_decl for error_mark_node.
980 * parser.c (cp_parser_class_head): Likewise, check the tree
981 returned by the latter.
983 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
986 * decl.c (grokdeclarator): In case of wrong return type return
987 immediately error_mark_node.
989 2008-06-06 Jakub Jelinek <jakub@redhat.com>
991 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
992 dependent_omp_for_p, begin_omp_task, finish_omp_task,
993 finish_omp_taskwait): New prototypes.
994 (cxx_omp_clause_default_ctor): Add outer argument.
995 (finish_omp_for): Add new clauses argument.
996 * cp-gimplify.c (cxx_omp_finish_clause): New function.
997 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
998 (cxx_omp_clause_default_ctor): Add outer argument.
999 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1000 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1001 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1002 Add par_clauses argument. If decl is present in parallel's
1003 lastprivate clause, change that clause to shared and add
1004 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1005 Fix wording of error messages. Adjust finish_omp_for caller.
1006 Add clauses argument. Parse loops with random access iterators.
1007 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1009 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1010 cp_parser_omp_for_loop callers.
1011 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
1013 (cp_parser_omp_clause_name): Handle collapse and untied
1015 (cp_parser_omp_clause_schedule): Handle auto schedule.
1016 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
1017 and PRAGMA_OMP_CLAUSE_UNTIED.
1018 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
1019 (OMP_TASK_CLAUSE_MASK): Define.
1020 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
1021 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
1022 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
1023 PRAGMA_OMP_TASKWAIT.
1024 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
1025 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
1026 (tsubst_omp_for_iterator): New function.
1027 (dependent_omp_for_p): New function.
1028 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
1029 loops. Adjust finish_omp_for caller. Handle loops with random
1030 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
1031 (tsubst_expr): Handle OMP_TASK.
1032 * semantics.c (cxx_omp_create_clause_info): New function.
1033 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
1034 OMP_CLAUSE_COLLAPSE.
1035 (cxx_omp_predetermined_sharing): Removed.
1036 * semantics.c (finish_omp_for): Allow pointer iterators. Use
1037 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
1038 collapsed for loops. Adjust c_finish_omp_for caller. Add new
1039 clauses argument. Fix check for type dependent cond or incr.
1040 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
1041 fold_convert to convert incr amount to difference_type. Only
1042 fold if not in template. If decl is mentioned in lastprivate
1043 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
1044 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
1046 (finish_omp_threadprivate): Allow static class members of the
1048 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
1049 finish_omp_taskwait): New functions.
1051 * parser.c (cp_parser_binary_expression): Add prec argument.
1052 (cp_parser_assignment_expression): Adjust caller.
1053 * cp-tree.h (outer_curly_brace_block): New prototype.
1054 * decl.c (outer_curly_brace_block): No longer static.
1056 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1059 * pt.c (push_template_decl_real): Consistently return error_mark_node
1062 2008-06-02 Tomas Bily <tbily@suse.cz>
1064 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
1065 (cp_build_unary_op): Likewise.
1066 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
1067 (maybe_warn_about_returning_address_of_local): Likewise.
1069 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
1072 * pt.c (tsubst_initializer_list): Consistently check the tree
1073 returned by tsubst_pack_expansion for error_mark_node.
1075 2008-05-27 Michael Matz <matz@suse.de>
1078 * call.c (build_new_op): Make warning conditional on
1081 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
1084 * call.c (convert_like_real): Convert bitfield to desired type
1085 before creating temporary.
1087 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1089 * Makefile.in: Adjusted dependencies on c-incpath.o.
1091 2008-05-23 Jakub Jelinek <jakub@redhat.com>
1094 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
1095 fold_build_cleanup_point_expr on build_call_a results.
1098 * semantics.c (omp_clause_info_fndecl): New function.
1099 (finish_omp_clauses): Use it.
1101 2008-05-21 Jakub Jelinek <jakub@redhat.com>
1104 * cp-tree.h (check_array_initializer): New prototype.
1105 * decl.c (check_array_initializer): New function.
1106 (check_initializer): Call it.
1107 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
1109 2008-05-21 Tom Tromey <tromey@redhat.com>
1111 * mangle.c (save_partially_mangled_name): Remove.
1112 (restore_partially_mangled_name): Likewise.
1113 (write_encoding): Update.
1114 (write_unqualified_name): Likewise.
1115 (start_mangling): Always use name_obstack. Remove 'ident_p'
1117 (get_identifier_nocopy): Remove.
1118 (finish_mangling_internal): Rename from finish_mangling.
1119 (finish_mangling): New function.
1120 (finish_mangling_get_identifier): Likewise.
1121 (partially_mangled_name, partially_mangled_name_len): Remove.
1122 (mangle_decl_string): Change return type. Update.
1123 (mangle_decl, mangle_type_string, mangle_special_for_type,
1124 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
1125 mangle_ref_init_variable): Update.
1127 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1130 * semantics.c (begin_class_definition): Extend checks on the first
1133 2008-05-12 Tomas Bily <tbily@suse.cz>
1135 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
1136 * call.c (build_over_call): Likewise.
1137 * error.c (dump_expr): Use CASE_CONVERT.
1138 * class.c (fixed_type_or_null): Likewise.
1140 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
1142 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
1144 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
1147 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1149 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
1150 DECL_LOOPING_CONST_OR_PURE_P attributes.
1151 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
1154 2008-05-02 Simon Baldwin <simonb@google.com>
1157 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
1159 2008-05-01 Simon Baldwin <simonb@google.com>
1161 * typeck.c (build_array_ref): Call warn_array_subscript_range.
1163 2008-04-30 Jakub Jelinek <jakub@redhat.com>
1166 * pt.c (more_specialized_fn): Stop the loop even if there are no
1167 arguments before ellipsis.
1169 2008-04-29 Jakub Jelinek <jakub@redhat.com>
1172 * parser.c (cp_parser_lookup_name): Look through single function
1176 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
1177 COMPOUND_EXPR if the second argument would be error_mark_node.
1179 2008-04-28 Jason Merrill <jason@redhat.com>
1180 Liu Guanwei <liu_gw@163.com>
1183 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
1184 in default arguments.
1186 2008-04-25 Jan Hubicka <jh@suse.cz>
1188 * typeck.c (check_return_expr): Update.
1189 * decl.c (start_preparsed_function): Update.
1190 * method.c (use_thunk): Update.
1192 2008-04-24 Jakub Jelinek <jakub@redhat.com>
1195 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
1196 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
1197 * decl2.c (is_late_template_attribute): Only make vector_size
1198 late tmpl attribute if argument is type or value dependent.
1199 (cp_reconstruct_complex_type): New function.
1201 2008-04-24 Richard Guenther <rguenther@suse.de>
1203 * typeck.c (cp_build_function_call): Call
1204 check_builtin_function_arguments.
1206 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1208 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
1209 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
1210 * init.c (build_zero_init): Don't set TREE_INVARIANT.
1211 * class.c (build_base_path): Don't set TREE_INVARIANT.
1212 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
1213 (build_vtbl_initializer): Don't set TREE_INVARIANT.
1214 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
1215 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
1216 (generic_initializer): Don't set TREE_INVARIANT.
1217 (ptr_initializer): Don't set TREE_INVARIANT.
1218 (ptm_initializer): Don't set TREE_INVARIANT.
1219 (class_initializer): Don't set TREE_INVARIANT.
1220 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
1221 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
1222 (build_template_parm_index): Don't set TREE_INVARIANT.
1223 (reduce_template_parm_level): Don't set TREE_INVARIANT.
1224 (process_template_parm): Don't set TREE_INVARIANT.
1226 2008-04-22 Jason Merrill <jason@redhat.com>
1229 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
1230 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
1231 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
1233 2008-04-22 Jakub Jelinek <jakub@redhat.com>
1236 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
1237 expression is errorneous.
1239 2008-04-21 Jason Merrill <jason@redhat.com>
1242 * tree.c (cp_tree_equal): Handle FIXED_CST.
1245 * pt.c (template_template_parm_bindings_ok_p): Set
1246 processing_template_decl while in this function.
1248 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
1250 * cvt.c (type_promotes_to): Support char16_t and char32_t.
1251 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
1252 char16_t and char32_t.
1253 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
1254 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
1255 extended builtin type "u8char{16,32}_t".
1256 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
1258 (cp_lexer_print_token): Support CPP_STRING{16,32}.
1259 (cp_parser_is_string_literal): Idem.
1260 (cp_parser_string_literal): Idem.
1261 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
1263 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
1264 * tree.c (char_type_p): Support char16_t and char32_t as char types.
1265 * typeck.c (string_conv_p): Support char16_t and char32_t.
1267 2008-04-17 Jason Merrill <jason@redhat.com>
1270 * call.c (build_user_type_conversion_1): Represent second step of
1271 copy-init with an rvalue conversion.
1272 (convert_like_real) [ck_user]: Don't implicitly add it here.
1274 2008-04-15 Jakub Jelinek <jakub@redhat.com>
1277 * decl.c (layout_var_decl): If extern or static var has variable
1278 size, set TREE_TYPE (decl) to error_mark_node.
1280 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
1283 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
1286 2008-04-09 Jason Merrill <jason@redhat.com>
1289 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
1290 not a pushed variable.
1292 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
1294 * call.c (build_op_delete_call): Fix quotation in warning message.
1295 * decl.c (grokdeclarator): Quote keyword in error message.
1296 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
1299 * parser.c (cp_parser_check_type_definition): Print error string
1300 directly rather than using "%s".
1301 (cp_parser_postfix_expression): Fix quotation.
1302 (cp_parser_decltype): Likewise.
1303 (cp_parser_sizeof_operand): Fix quotation. Simplify.
1305 * parser.c (cp_parser_non_integral_constant_expression): Build error
1306 message with CONCAT rather than using "%s".
1307 (cp_parser_primary_expression): Fix quotation.
1308 (cp_parser_postfix_expression): Likewise.
1309 (cp_parser_postfix_dot_deref_expression): Likewise.
1310 (cp_parser_unary_expression): Likewise.
1311 (cp_parser_new_expression): Likewise.
1312 (cp_parser_delete_expression): Likewise.
1314 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
1315 as `)', not as `('. Fix quotation.
1316 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
1317 (cp_parser_primary_expression): Likewise.
1318 (cp_parser_nested_name_specifier_opt): Likewise.
1319 (cp_parser_postfix_expression): Likewise.
1320 (cp_parser_postfix_open_square_expression): Likewise.
1321 (cp_parser_parenthesized_expression_list): Likewise.
1322 (cp_parser_pseudo_destructor_name): Likewise.
1323 (cp_parser_new_expression): Likewise.
1324 (cp_parser_direct_new_declarator): Likewise.
1325 (cp_parser_delete_expression): Likewise.
1326 (cp_parser_cast_expression): Likewise.
1327 (cp_parser_question_colon_clause): Likewise.
1328 (cp_parser_builtin_offsetof): Likewise.
1329 (cp_parser_trait_expr): Likewise.
1330 (cp_parser_label_for_labeled_statement): Likewise.
1331 (cp_parser_compound_statement): Likewise.
1332 (cp_parser_selection_statement): Likewise.
1333 (cp_parser_condition): Likewise.
1334 (cp_parser_iteration_statement): Likewise.
1335 (cp_parser_already_scoped_statement): Likewise.
1336 (cp_parser_simple_declaration): Likewise.
1337 (cp_parser_linkage_specification): Likewise.
1338 (cp_parser_static_assert): Likewise.
1339 (cp_parser_decltype): Likewise.
1340 (cp_parser_conversion_function_id): Likewise.
1341 (cp_parser_operator_function_id): Likewise.
1342 (cp_parser_operator): Likewise.
1343 (cp_parser_type_parameter): Likewise.
1344 (cp_parser_template_id): Likewise.
1345 (cp_parser_explicit_instantiation): Likewise.
1346 (cp_parser_explicit_specialization): Likewise.
1347 (cp_parser_enum_specifier): Likewise.
1348 (cp_parser_namespace_definition): Likewise.
1349 (cp_parser_namespace_alias_definition): Likewise.
1350 (cp_parser_using_declaration): Likewise.
1351 (cp_parser_using_directive): Likewise.
1352 (cp_parser_asm_definition): Likewise.
1353 (cp_parser_direct_declarator): Likewise.
1354 (cp_parser_ptr_operator): Likewise.
1355 (cp_parser_parameter_declaration_clause): Likewise.
1356 (cp_parser_initializer_clause): Likewise.
1357 (cp_parser_class_specifier): Likewise.
1358 (cp_parser_member_specification_opt): Likewise.
1359 (cp_parser_member_declaration): Likewise.
1360 (cp_parser_pure_specifier): Likewise.
1361 (cp_parser_constant_initializer): Likewise.
1362 (cp_parser_base_clause): Likewise.
1363 (cp_parser_exception_specification_opt): Likewise.
1364 (cp_parser_try_block): Likewise.
1365 (cp_parser_function_try_block): Likewise.
1366 (cp_parser_handler): Likewise.
1367 (cp_parser_throw_expression): Likewise.
1368 (cp_parser_asm_operand_list): Likewise.
1369 (cp_parser_attributes_opt): Likewise.
1370 (cp_parser_label_declaration): Likewise.
1371 (cp_parser_constructor_declarator_p): Likewise.
1372 (cp_parser_template_declaration_after_export): Likewise.
1373 (cp_parser_single_declaration): Likewise.
1374 (cp_parser_objc_message_expression): Likewise.
1375 (cp_parser_objc_message_args): Likewise.
1376 (cp_parser_objc_encode_expression): Likewise.
1377 (cp_parser_objc_defs_expression): Likewise.
1378 (cp_parser_objc_protocol_expression): Likewise.
1379 (cp_parser_objc_selector_expression): Likewise.
1380 (cp_parser_objc_protocol_refs_opt): Likewise.
1381 (cp_parser_objc_typename): Likewise.
1382 (cp_parser_objc_method_keyword_params): Likewise.
1383 (cp_parser_objc_superclass_or_category): Likewise.
1384 (cp_parser_objc_try_catch_finally_statement): Likewise.
1385 (cp_parser_objc_synchronized_statement): Likewise.
1386 (cp_parser_objc_throw_statement): Likewise.
1387 (cp_parser_omp_var_list_no_open): Likewise.
1388 (cp_parser_omp_clause_default): Likewise.
1389 (cp_parser_omp_clause_if): Likewise.
1390 (cp_parser_omp_clause_num_threads): Likewise.
1391 (cp_parser_omp_clause_reduction): Likewise.
1392 (cp_parser_omp_clause_schedule): Likewise.
1393 (cp_parser_omp_critical): Likewise.
1394 (cp_parser_omp_for_loop): Likewise.
1395 (cp_parser_omp_sections_scope): Likewise.
1397 * parser.c (cp_parser_template_parameter_list): Simplify.
1399 2008-04-07 James E. Wilson <wilson@tuliptree.org>
1401 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
1403 2008-04-07 Jason Merrill <jason@redhat.com>
1406 * class.c (type_has_user_nondefault_constructor): A template
1407 counts as a nondefault constructor.
1409 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
1411 * decl.c (cxx_push_function_context): Delete.
1412 (cxx_pop_function_context): Delete.
1413 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
1415 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
1416 LANG_HOOKS_FUNCTION_FINAL): Delete.
1417 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
1418 LANG_HOOKS_MISSING_NORETURN_OK_P.
1419 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
1421 * semantics.c (current_stmt_tree): Fix comment.
1423 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1426 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
1427 before calling fold_offsetof.
1429 2008-04-03 Tom Tromey <tromey@redhat.com>
1431 * Make-lang.in (c++_OBJS): New variable.
1433 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1435 * optimize.c (clone_body): New, from tree-inline.c.
1437 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1439 * method.c (synthesize_method): Use {push,pop}_function_context.
1440 * name-lookup.c (push_to_top_level): Likewise.
1441 * parser.c (cp_parser_late_parsing_for_member): Likewise.
1443 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
1446 * parser.c (cp_parser_decl_specifier_seq): Add location to error
1449 2008-03-27 Tom Tromey <tromey@redhat.com>
1451 * Make-lang.in: Revert automatic dependency patch.
1453 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1456 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
1457 (build_compound_expr): New, for compatibility with C
1458 build_compound_expr.
1459 (cp_build_compound_expr): Renamed from build_compound_expr.
1460 (build_c_cast): New, for compatibility with C build_c_cast.
1461 (cp_build_c_cast): Renamed from build_c_cast.
1462 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
1463 * decl.c (cxx_maybe_build_cleanup): Ditto.
1464 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
1465 (cp_build_compound_expr): Renamed from build_compound_expr.
1466 (build_c_cast): Add C-compatible prototype.
1467 (cp_build_c_cast): Renamed from build_c_cast.
1468 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
1469 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
1471 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1473 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
1474 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
1475 ending in a pack expansion, both of which can occur when
1476 substituting into a nested template.
1477 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
1478 instantiating the sizeof...(X) form, make tsubst_copy do the work.
1479 * parser.c (cp_parser_template_parameter): Deal with unnamed
1480 non-type template parameter packs identified by pack expansions in
1483 2008-03-26 Jakub Jelinek <jakub@redhat.com>
1486 * pt.c (apply_late_template_attributes): Don't call tsubst on
1487 first attribute argument if it is IDENTIFIER_NODE.
1490 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
1491 and LTGT_EXPR to pp_expression.
1493 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
1495 * pt.c (coerce_template_template_parm): Moved the body of the loop
1496 of coerce_template_template_parms here, to make iteration over a
1497 template argument pack simpler.
1498 Also, allow matching of a template parameter pack in the template
1499 template parameter to a template parameter in the template
1501 (coerce_template_template_parms): Deal with variadic template
1502 template parameters. Use coerce_template_template_parm.
1503 (unify): Make sure we coerce the template template argument's
1504 template arguments to the template template parameter's template
1505 parameters, not the other way around.
1507 2008-03-25 Tom Tromey <tromey@redhat.com>
1509 * Make-lang.in: Remove .o targets.
1510 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
1512 (c++_OBJS): New variable.
1513 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
1515 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
1517 * typeck.c (composite_pointer_type_r): Add SFINAE support.
1518 (composite_pointer_type): Ditto.
1519 (common_type): Fix call to composite_pointer_type.
1520 (cxx_sizeof_nowarn): New; used to be a macro.
1521 (cxx_sizeof_expr): Add SFINAE support.
1522 (cxx_alignof_expr): Ditto.
1523 (decay_conversion): Fix calls for SFINAE support.
1524 (rationalize_conditional_expr): Add SFINAE support.
1525 (build_class_member_access_expr): Ditto.
1526 (finish_class_member_access_expr): Ditto.
1527 (build_x_indirect_ref): Ditto.
1528 (build_indirect_ref): Original version renamed to
1529 cp_build_indirect_ref; new version provides a bridge from
1531 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
1533 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
1534 (build_function_call): Original version renamed to
1535 cp_build_function_call; new version provides a bridge from
1537 (cp_build_function_call): Was build_function_call; added SFINAE
1539 (convert_arguments): Add SFINAE support.
1540 (build_x_binary_op): Ditto.
1541 (build_binary_op): Original version renamed to cp_build_binary_op;
1542 new version provides a bridge from c-common.
1543 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
1544 (pointer_diff): Fix calls for SFINAE.
1545 (build_x_unary_op): Add SFINAE support.
1546 (condition_conversion): Fix calls for SFINAE.
1547 (build_unary_op): Original version renamed to cp_build_unary_op;
1548 new version provides a bridge from c-common.
1549 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
1550 (unary_complex_lvalue): Fix calls for SFINAE.
1551 (build_x_conditional_expr): Add SFINAE support.
1552 (build_x_compound_expr_from_list): Fix calls for SFINAE.
1553 (build_x_compound_expr): Add SFINAE support.
1554 (convert_ptrmem): Fix calls for SFINAE.
1555 (build_static_cast_1): Add SFINAE support.
1556 (build_static_cast): Ditto.
1557 (build_reinterpret_cast_1): Ditto.
1558 (build_reinterpret_cast): Ditto.
1559 (build_const_cast_1): Ditto.
1560 (build_const_cast): Ditto.
1561 (build_c_cast): Ditto.
1562 (build_modify_expr): Original version renamed to
1563 cp_build_modify_expr; new version provides a bridge from c-common.
1564 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
1566 (build_x_modify_expr): Add SFINAE support.
1567 (build_ptrmemfunc): Fix calls for SFINAE.
1568 (convert_for_assignment): Add SFINAE support.
1569 (convert_for_initialization): Ditto.
1570 (check_return_expr): Fix calls for SFINAE.
1571 (lvalue_or_else): Add SFINAE support.
1572 * init.c (perform_member_init): Fix calls for SFINAE.
1573 (emit_mem_initializers): Ditto.
1574 (expand_virtual_init): Ditto.
1575 (expand_cleanup_for_base): Ditto.
1576 (build_aggr_init): Add SFINAE support.
1577 (expand_default_init): Ditto.
1578 (expand_aggr_init_1): Fix calls for SFINAE.
1579 (build_offset_ref): Ditto.
1580 (build_new_1): Add SFINAE support.
1582 (build_vec_delete_1): Fix calls for SFINAE.
1583 (get_temp_regvar): Ditto.
1584 (build_vec_init): Add SFINAE support.
1585 (build_dtor_call): Fix calls for SFINAE.
1586 (build_delete): Ditto.
1587 (push_base_cleanups): Ditto.
1588 (build_vec_delete_1): Ditto.
1589 * class.c (build_base_path): Fix calls for SFINAE.
1590 (build_simple_base_path): Ditto.
1591 (convert_to_base_statically): Ditto.
1592 (build_vfn_ref): Ditto.
1593 (resolve_address_of_overloaded_function): Ditto.
1594 * decl.c (check_initializer): Fix calls for SFINAE.
1595 (register_dtor_fn): Ditto.
1596 (compute_array_index_type): Ditto.
1597 (finish_enum): Ditto.
1598 (start_preparsed_function): Ditto.
1599 (cxx_maybe_build_cleanup): Ditto.
1600 * call.c (convert_like): Add COMPLAIN argument.
1601 (convert_like_with_context): Ditto.
1602 (build_this): Fix calls for SFINAE.
1603 (build_user_type_conversion): Ditto.
1604 (resolve_args): Ditto.
1605 (build_new_function_call): Add SFINAE support.
1606 (build_operator_new_call): Fix calls for SFINAE.
1607 (build_object_call): Add SFINAE support.
1608 (build_conditional_expr): Ditto.
1609 (build_new_op): Ditto.
1610 (build_op_delete_call): Fix calls for SFINAE.
1611 (build_temp): Ditto.
1612 (convert_like_real): Add SFINAE support.
1613 (build_x_va_arg): Fix calls for SFINAE.
1614 (convert_default_arg): Ditto.
1615 (build_over_call): Add SFINAE support.
1616 (build_java_interface_fn_ref): Fix calls for SFINAE.
1617 (build_special_member_call): Add SFINAE support.
1618 (build_new_method_call): Ditto.
1619 (perform_implicit_conversion): Ditto.
1620 (perform_direct_initialization_if_possible): Ditto.
1621 (initialize_reference): Fix calls for SFINAE.
1622 * method.c (do_build_assign_ref): Fix calls for SFINAE.
1623 * rtti.c (build_headof): Fix calls for SFINAE.
1624 (get_tinfo_decl_dynamic): Ditto.
1625 (get_typeid): Ditto.
1626 (build_dynamic_cast_1): Add SFINAE support.
1627 (build_dynamic_cast): Ditto.
1628 (tinfo_base_init): Fix calls for SFINAE.
1629 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
1630 (do_end_catch): Ditto.
1631 (initialize_handler_parm): Ditto.
1632 (expand_start_catch_block): Ditto.
1633 (do_allocate_exception): Ditto.
1634 (do_free_exception): Ditto.
1635 (build_throw): Ditto.
1636 * cvt.c (build_up_reference): Fix calls for SFINAE.
1637 (convert_to_reference): Ditto.
1638 (ocp_convert): Ditto.
1639 (convert_to_void): Add SFINAE support.
1640 * tree.c (build_dummy_object): Fix calls for SFINAE.
1641 (stabilize_expr): Ditto.
1642 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
1644 (build_new_method_call): Ditto.
1645 (build_special_member_call): Ditto.
1646 (build_new_op): Ditto.
1647 (perform_implicit_conversion): Ditto.
1648 (perform_direct_initialization_if_possible): Ditto.
1649 (convert_to_void): Ditto.
1650 (build_aggr_init): Ditto.
1652 (build_vec_init): Ditto.
1653 (build_dynamic_cast): Ditto.
1654 (finish_call_expr): Ditto
1655 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
1656 (cxx_sizeof_nowarn): Remove macro; add function declaration.
1657 (build_class_member_access_expr): Add tsubst_flags_t parameter.
1658 (finish_class_member_access_expr): Ditto.
1659 (build_x_indirect_ref): Ditto.
1660 (cp_build_indirect_ref): New.
1661 (cp_build_function_call): Add tsubst_flags_t parameter.
1662 (build_x_unary_op): Ditto.
1663 (cp_build_unary_op): New.
1664 (build_x_conditional_expr): Add tsubst_flags_t parameter.
1665 (build_x_compound_expr): Ditto.
1666 (build_compound_expr): Ditto.
1667 (build_static_cast): Ditto.
1668 (build_reinterpret_cast): Ditto.
1669 (build_const_cast): Ditto.
1670 (build_c_cast): Ditto.
1671 (build_x_modify_expr): Ditto.
1672 (cp_build_modify_expr): New.
1673 (convert_for_initialization): Add tsubst_flags_t parameter.
1674 (cp_build_binary_op): Remove macro; add function declaration.
1675 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
1676 (lvalue_or_else): Ditto.
1677 (build_functional_cast): Ditto.
1678 * typeck2.c (digest_init): Fix calls for SFINAE.
1679 (process_init_constructor_array): Ditto.
1680 (process_init_constructor_record): Ditto.
1681 (build_x_arrow): Ditto.
1682 (build_m_component_ref): Ditto.
1683 (build_functional_cast): Add SFINAE support.
1684 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
1685 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
1686 (finish_expr_stmt): Ditto.
1687 (finish_for_expr): Ditto.
1688 (finish_asm_stmt): Ditto.
1689 (finish_non_static_data_member): Ditto.
1690 (finish_qualified_id_expr): Ditto.
1691 (finish_call_expr): Add SFINAE support.
1692 (finish_increment_expr): Fix calls for SFINAE.
1693 (finish_unary_op_expr): Ditto.
1694 (simplify_aggr_init_expr): Ditto.
1695 (finish_omp_clauses): Ditto.
1696 (finish_omp_for): Ditto.
1697 (finish_omp_barrier): Ditto.
1698 (finish_omo_flush): Ditto.
1699 * decl2.c (grok_array_decl): Fix calls or SFINAE.
1700 (build_anon_union_vars): Ditto.
1701 (get_guard_cond): Ditto.
1703 (one_static_initialization_or_destruction): Ditto.
1704 (do_static_initialization_or_destruction): Ditto.
1705 (generate_ctor_or_dtor_function): Ditto.
1706 (build_offset_ref_call_from_tree): Ditto.
1707 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
1708 (cp_parser_postfix_dot_deref_expression): Ditto.
1709 (cp_parser_unary_expression): Ditto.
1710 (cp_parser_new_expression): Ditto.
1711 (cp_parser_cast_expression): Ditto.
1712 (cp_parser_binary_expression): Ditto.
1713 (cp_parser_question_colon_clause): Ditto.
1714 (cp_parser_assignment_expression): Ditto.
1715 (cp_parser_expression): Ditto.
1716 (cp_parser_builtin_offsetof): Ditto.
1717 (cp_parser_template_argument): Ditto.
1718 (cp_parser_functional_cast): Ditto.
1720 2008-03-24 Tom Tromey <tromey@redhat.com>
1722 * lex.c (handle_pragma_interface): Don't copy the filename.
1723 (handle_pragma_implementation): Copy filename using xstrdup.
1725 2008-03-21 Paolo Carlini <pcarlini@suse.de>
1727 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
1728 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
1729 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
1730 (PROMOTES_TO_AGGR_TYPE): Remove.
1731 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
1732 * typeck.c (unary_complex_lvalue, build_modify_expr,
1733 convert_for_initialization): Adjust.
1734 * init.c (is_aggr_type): Remove.
1735 (is_class_type): Add.
1736 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
1737 build_delete): Adjust.
1738 * lex.c (make_aggr_type): Remove.
1739 (make_class_type): Add.
1740 (cxx_make_type): Adjust.
1741 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
1743 * decl.c (build_typename_type, make_typename_type,
1744 make_unbound_class_template, cxx_init_decl_processing,
1745 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
1746 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
1747 grok_op_properties, xref_tag, check_function_type): Adjust.
1748 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
1749 add_builtin_candidate, add_builtin_candidates,
1750 build_user_type_conversion_1, convert_like_real, build_cxx_call,
1751 is_subseq, compare_ics): Adjust.
1752 * method.c (use_thunk): Adjust.
1753 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
1754 create_tinfo_types): Adjust.
1755 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1756 build_up_reference, convert_to_reference, convert_from_reference,
1757 ocp_convert, build_expr_type_conversion): Adjust.
1758 * tree.c (bind_template_template_parm, error_type): Adjust.
1759 * dump.c (cp_dump_tree): Adjust.
1760 * search.c (lookup_member): Adjust.
1761 * friend.c (make_friend_class, do_friend): Adjust.
1762 * typeck2.c (store_init_value, process_init_constructor_array,
1763 process_init_constructor_record, build_x_arrow, build_m_component_ref,
1764 build_functional_cast): Adjust.
1765 * pt.c (finish_member_template_decl, process_template_parm,
1766 lookup_template_class, tsubst_function_type, tsubst,
1767 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
1769 * semantics.c (begin_class_definition, finish_base_specifier,
1770 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
1772 * name-lookup.c (constructor_name_p, push_overloaded_decl,
1773 do_class_using_decl, lookup_qualified_name,
1774 maybe_process_template_type_declaration): Adjust.
1775 * decl2.c (grok_array_decl, check_member_template,
1776 constrain_class_visibility): Adjust.
1777 * parser.c (cp_parser_class_name): Adjust.
1779 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
1781 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
1783 2008-03-17 Jason Merrill <jason@redhat.com>
1786 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
1787 a temp directly to a reference as per DR391.
1789 2008-03-12 Richard Guenther <rguenther@suse.de>
1793 2008-02-04 Richard Guenther <rguenther@suse.de>
1796 * decl.c (record_builtin_java_type): Make jboolean a
1797 integer type again where its mode doesn't match that of bool.
1799 2008-01-25 Richard Guenther <rguenther@suse.de>
1802 * decl.c (record_builtin_java_type): Make __java_boolean
1804 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1805 after TYPE_MAIN_VARIANT check.
1807 2008-03-10 Jakub Jelinek <jakub@redhat.com>
1810 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
1814 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
1815 DECL_P in not a variable and appears more than once error messages.
1817 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
1821 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
1825 * typeck.c (structural_comptypes): Call cp_comptypes.
1826 (comptypes): New; called from the C/C++ common bits to perform
1828 (cp_comptypes): Renamed from comptypes, which is already used,
1829 with a different signature, by the C++ front end.
1830 (build_reinterpret_cast_1): Call cp_comptypes.
1831 (ptr_reasonably_similar): Ditto.
1832 * decl.c (decls_match): Ditto.
1833 * cvt.c (convert_to_reference): Ditto.
1834 * cp-tree.h (same_type_p): Ditto.
1835 (same_or_base_type_p): Ditto.
1836 (comptypes): Rename to cp_comptypes.
1837 * pt.c (canonical_type_parameter): Call cp_comptypes.
1839 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
1841 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
1842 test for equivalence between pointer and references.
1844 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1847 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
1848 (check_field_decls): Likewise.
1849 (note_name_declared_in_class): Likewise.
1850 * call.c (build_new_op): Likewise.
1851 (convert_like_real): Likewise.
1852 (build_over_call): Likewise.
1853 * lex.c (unqualified_fn_lookup_error): Likewise.
1854 * parser.c (cp_parser_template_id): Likewise.
1855 * cvt.c (warn_ref_binding): Likewise.
1856 (convert_to_reference): Likewise.
1857 (ocp_convert): Likewise.
1858 (convert_to_void): Use error instead of pedwarn.
1859 * error.c (cp_cpp_error): Use pedantic_warning_kind.
1860 * decl.c (compute_array_index_type): Use constant_expression_error.
1862 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
1864 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
1865 that auto is either a storage class or a simple type specifier,
1866 depending on the dialect.
1867 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
1868 specifier in C++98 mode, error in C++0x mode (since we don't
1869 support auto as a type specifier, yet).
1870 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
1871 storage specifier in C++0x mode.
1872 (cp_parser_simple_type_specifier): Parse `auto' as a
1873 simple-type-specifier, but error because we don't support it yet.
1875 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1877 * parser.c (cp_parser_nonclass_name): New.
1878 (cp_parser_pseudo_destructor_name): Use it instead of
1879 cp_parser_type_name.
1880 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
1882 2008-02-29 Tom Tromey <tromey@redhat.com>
1884 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
1885 (cp_lexer_get_preprocessor_token): Update.
1886 (cp_lexer_set_source_position_from_token): Don't call
1887 restore_input_file_stack.
1888 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
1890 2008-02-28 Richard Guenther <rguenther@suse.de>
1893 2008-02-26 Richard Guenther <rguenther@suse.de>
1895 * decl.c (duplicate_decls): Remove decl from global mapping
1896 before ggc_freeing it.
1898 2008-02-27 Jakub Jelinek <jakub@redhat.com>
1901 * rtti.c: Include c-pragma.h.
1902 (push_abi_namespace, pop_abi_namespace): New functions.
1903 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
1904 create_tinfo_types, emit_support_tinfos): Use them.
1905 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
1907 2008-02-26 Jason Merrill <jason@redhat.com>
1910 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
1911 to name the struct for linkage purposes even if it has attributes.
1912 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
1914 2008-02-26 Tom Tromey <tromey@redhat.com>
1916 * parser.c (eof_token): Remove old location code.
1917 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
1918 * decl2.c (generate_ctor_or_dtor_function): Remove old location
1920 (cp_write_global_declarations): Likewise.
1921 * lex.c (cxx_init): Remove old location code.
1922 (handle_pragma_implementation): Remove test of
1923 USE_MAPPED_LOCATION.
1924 * pt.c (tsubst): Remove old location code.
1925 * error.c (cp_print_error_function): Remove test of
1926 USE_MAPPED_LOCATION.
1927 * decl.c (pop_label): Remove old location code.
1928 (finish_function): Likewise.
1930 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1933 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
1935 2008-02-26 Richard Guenther <rguenther@suse.de>
1937 * decl.c (duplicate_decls): Remove decl from global mapping
1938 before ggc_freeing it.
1940 2008-02-26 Paolo Carlini <pcarlini@suse.de>
1943 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
1945 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1947 * typeck.c (build_class_member_access_expr): Add appropriate
1948 OPT_W* parameter to warning.
1949 (build_reinterpret_cast_1): Likewise.
1950 * name-lookup.c (push_overloaded_decl): Likewise.
1952 2008-02-25 Paolo Carlini <pcarlini@suse.de>
1955 * error.c (dump_expr): Handle CONJ_EXPR.
1957 2008-02-25 Paolo Carlini <pcarlini@suse.de>
1960 * error.c (dump_type): Handle FIXED_POINT_TYPE.
1961 (dump_expr): Handle FIXED_CST.
1963 2008-02-24 Jason Merrill <jason@redhat.com>
1965 * parser.c (cp_parser_declaration): Handle "inline namespace".
1966 (cp_parser_namespace_definition): Likewise.
1969 * name-lookup.c (arg_assoc_namespace): Look down into inline
1972 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1974 * typeck.c (check_for_casting_away_constness): Use 1 single
1975 argument, the type of cast, to decide what diagnostics generate.
1976 (build_static_cast_1): Remove unused code. Update call to
1977 check_for_casting_away_constness.
1978 (build_reinterpret_cast_1): Update call to
1979 check_for_casting_away_constness.
1980 (build_const_cast_1): Likewise.
1982 2008-02-24 Paolo Carlini <pcarlini@suse.de>
1984 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
1985 VEC_NEW_EXPR), forward to pp_expression.
1986 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
1988 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
1991 * friend.c (do_friend): Call cplus_decl_attributes earlier.
1993 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
1996 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
1997 template decls' function decl.
1999 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2003 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2006 * pt.c (determine_specialization): In case of function templates,
2007 when the type of DECL does not match FN there is no match.
2009 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2012 * typeck.c (build_binary_op): Warn about floating point
2013 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2015 2008-02-19 Jason Merrill <jason@redhat.com>
2018 * pt.c (resolve_overloaded_unification): Set processing_template_decl
2019 while we look for possible bindings.
2021 2008-02-19 Jakub Jelinek <jakub@redhat.com>
2024 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
2028 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
2029 vars. Afterwards ensure v is VAR_DECL.
2032 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
2033 call cp_finish_decl.
2034 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
2037 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
2042 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
2043 is error_mark_node, return an error early.
2044 (find_parameter_packs_r): Pass the pointer set along to recursive
2045 calls of cp_walk_subtrees; don't try to manage the pointer set
2047 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
2048 (make_pack_expansion): Ditto.
2049 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
2050 a second pass through the tree with find_parameter_packs_r; that
2051 second pass no longer does anything.
2052 (push_template_decl_real): If we have an erroneous declaration,
2053 set its type to error_mark_node before returning an error.
2055 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
2058 * pt.c (tsubst_initializer_list): Deal with the use of
2059 VOID_TYPE_NODE to indicate value-initialization of the bases.
2061 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2062 Jason Merrill <jason@redhat.com>
2066 * class.c (type_has_user_nondefault_constructor): New fn.
2067 * cp-tree.h: Declare it.
2068 * init.c (emit_mem_initializers): Use it for -W warning about
2069 missing base initializer.
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-13 Jakub Jelinek <jakub@redhat.com>
2078 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2081 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
2082 are not identifier :: ~, return before calling cp_parser_type_name.
2084 2008-02-13 Jason Merrill <jason@redhat.com>
2086 PR c++/34962, c++/34937, c++/34939
2087 * decl2.c (is_late_template_attribute): Always defer attributes
2088 vector_size and weak.
2091 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
2092 of enumerators, too.
2094 2008-02-12 Jason Merrill <jason@redhat.com>
2097 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
2098 if we're doing conversions to call a user-defined conversion function.
2100 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
2103 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
2106 2008-02-12 Jakub Jelinek <jakub@redhat.com>
2109 * init.c (build_new_1): Don't create placement_expr before
2110 constructing alloc_call. Verify that the pointer is passed by
2111 value to operator new.
2113 2008-02-11 Jason Merrill <jason@redhat.com>
2116 * pt.c (tsubst): Don't look up a template typedef in an explicit
2119 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
2122 * tree.c (cp_build_qualified_type_real): When building a
2123 cv-qualified array type, build it as a unique type with
2124 build_cplus_array_type_1 and then adopt the unqualified type's
2127 2008-02-11 Paolo Carlini <pcarlini@suse.de>
2130 * decl.c (groktypename): Check grokdeclarator return.
2132 2008-02-10 Jason Merrill <jason@redhat.com>
2135 * decl2.c (cp_write_global_declarations): Don't write out static
2136 data members with DECL_IN_AGGR_P set.
2138 2008-02-08 Jason Merrill <jason@redhat.com>
2141 * tree.c (build_target_expr_with_type): Handle void initializer.
2142 (bot_manip): Remap slot before recursing.
2144 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2147 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
2149 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
2152 * tree.c: Include tree-flow.h.
2153 (build_target_expr): Check type compatibility.
2154 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
2155 * call.c (convert_like_real): Convert bitfield to expected type.
2157 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2161 * typeck.c (structural_comptypes): Call cp_comptypes.
2162 (comptypes): New; called from the C/C++ common bits to perform
2164 (cp_comptypes): Renamed from comptypes, which is already used,
2165 with a different signature, by the C++ front end.
2166 (build_reinterpret_cast_1): Call cp_comptypes.
2167 (ptr_reasonably_similar): Ditto.
2168 * decl.c (decls_match): Ditto.
2169 * cvt.c (convert_to_reference): Ditto.
2170 * cp-tree.h (same_type_p): Ditto.
2171 (same_or_base_type_p): Ditto.
2172 (comptypes): Rename to cp_comptypes.
2173 * pt.c (canonical_type_parameter): Call cp_comptypes.
2175 2008-02-05 Jakub Jelinek <jakub@redhat.com>
2178 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
2179 value dependent expression.
2181 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
2184 * decl2.c (save_template_attributes): When we're modifying the
2185 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
2186 all of the other variants to add those same attributes. Otherwise,
2187 the main variant will be inconsistent with those other variants.
2189 2008-02-04 Richard Guenther <rguenther@suse.de>
2192 * decl.c (record_builtin_java_type): Make jboolean a
2193 integer type again where its mode doesn't match that of bool.
2195 2008-02-02 Jason Merrill <jason@redhat.com>
2196 Mark Mitchell <mark@codesourcery.com>
2199 * init.c (build_value_init_1): New function.
2200 (build_value_init): New function.
2201 * typeck2.c (build_functional_cast): Call it.
2202 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
2204 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
2205 TYPE_HAS_CONSTRUCTOR.
2206 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
2207 add_implicitly_declared_members): Adjust.
2208 (check_field_decls): Adjust. Remove warnings about reference/const
2209 in class without constructor.
2210 (check_bases_and_members): Adjust. Give those warnings here instead.
2211 * decl.c (fixup_anonymous_aggr): Adjust.
2212 (check_initializer): Adjust, clarify logic slightly.
2213 (grok_special_member_properties): Adjust, only set if user-provided.
2214 * rtti.c (create_tinfo_types): Don't set.
2215 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
2216 Use same_type_ignoring_top_level_qualifiers_p.
2217 * pt.c (check_explicit_specialization): Adjust.
2218 (instantiate_class_template): Adjust.
2220 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
2221 Jakub Jelinek <jakub@redhat.com>
2225 * typeck.c (structural_comptypes): Handle comparisons of
2226 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
2228 * mangle.c (write_builtin_type): Map down to the canonical type,
2229 which will be one of the predefined type nodes.
2231 2008-01-29 Michael Meissner <michael.meissner@amd.com>
2234 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
2235 bits to allow for expansion of the number of middle end tree
2238 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
2249 * typeck.c (check_return_expr): Tweak call to
2250 check_for_bare_parameter_packs.
2251 * class.c (add_method): Be careful with error_mark_nodes.
2252 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
2254 * pt.c (struct find_parameter_pack_data): Remove
2256 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
2257 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
2258 (make_pack_expansion): Ditto.
2259 (check_for_bare_parameter_packs): Parameter is now a tree, not a
2261 (process_template_parm): Tweak call to
2262 check_for_bare_parameter_packs.
2263 (push_template_decl_real): Tweak calls to
2264 check_for_bare_parameter_packs. If bare parameter packs are found
2265 in the list of exceptions, clear out that list after giving an
2267 * semantics.c (finish_cond): Tweak call to
2268 check_for_bare_parameter_packs.
2269 (finish_expr_stmt): Ditto.
2270 (finish_for_expr): Ditto.
2271 (finish_switch_cond): Ditto.
2272 (finish_mem_initializers): Ditto.
2273 (finish_member_declaration): Ditto.
2274 (finish_static_assert): Check for bare parameter packs in the
2276 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
2277 attributes of a declaration.
2278 * parser.c (cp_parser_using_declaration): Tweak call to
2279 check_for_bare_parameter_packs.
2280 (cp_parser_base_clause): Ditto.
2282 2008-01-28 Jason Merrill <jason@redhat.com>
2285 * class.c (build_base_path): Fix !want_pointer case.
2287 2008-01-27 Jason Merrill <jason@redhat.com>
2290 * class.c (build_base_path): Fix previous change.
2292 2008-01-26 Jakub Jelinek <jakub@redhat.com>
2295 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
2298 2008-01-26 Richard Guenther <rguenther@suse.de>
2301 * typeck.c (build_binary_op): Remove code to shorten compares.
2303 2008-01-25 Richard Guenther <rguenther@suse.de>
2306 * decl.c (record_builtin_java_type): Make __java_boolean
2308 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2309 after TYPE_MAIN_VARIANT check.
2311 2008-01-25 Jason Merrill <jason@redhat.com>
2314 * class.c (build_base_path): Don't mess with virtual access if
2316 * call.c (standard_conversion): Don't check whether source type
2319 * decl2.c (is_late_template_attribute): Don't defer attribute
2320 visibility just because the type is dependent.
2322 2008-01-25 Jason Merrill <jason@redhat.com>
2323 Mark Mitchell <mark@codesourcery.com>
2326 * call.c (standard_conversion): Allow conversion from integer/real
2328 (compare_ics): Such a conversion is worse than a normal arithmetic
2331 2008-01-25 Richard Guenther <rguenther@suse.de>
2334 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
2337 2008-01-24 Paolo Carlini <pcarlini@suse.de>
2340 * pt.c (push_template_decl_real): Return error_mark_node in case
2341 of template definition of non-template.
2343 2008-01-24 Jason Merrill <jason@redhat.com>
2346 * decl2.c (is_late_template_attribute): Defer any attribute with
2347 dependent args. Also defer type attributes if the type is dependent.
2349 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2350 Alexandre Oliva <aoliva@redhat.com>
2353 * call.c (reference_binding): For bitfields use the declared bitfield
2355 (add_builtin_candidates): Likewise.
2356 * class.c (layout_class_type): For bitfields copy over the
2357 original type quals.
2359 2008-01-22 Jason Merrill <jason@redhat.com>
2362 * decl.c (groktypename): Also ignore attributes on dependent
2363 possibly-class types.
2366 * friend.c (do_friend): Check for prior declaration of a friend
2367 function of a local class.
2368 * name-lookup.c (lookup_name_innermost_nonclass_level):
2370 * name-lookup.h: Declare it.
2372 2008-01-22 Tom Tromey <tromey@redhat.com>
2375 * init.c (build_new_1): Only disallow Java aggregates.
2377 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2380 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
2381 if decl or init is error_mark_node.
2384 * error.c (dump_expr): Handle VECTOR_CST.
2386 2008-01-21 Jason Merrill <jason@redhat.com>
2389 * pt.c (tsubst_aggr_type): Make sure our context is complete.
2392 * pt.c (retrieve_local_specialization): Robustify.
2393 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
2396 * pt.c (tsubst): Only call retrieve_local_specialization if the
2397 original typedef was in a function template.
2400 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
2402 2008-01-21 Richard Guenther <rguenther@suse.de>
2405 * error.c (cp_print_error_function): Deal with recursive
2408 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2411 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
2413 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2417 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
2418 on non-IS_AGGR_TYPE scope.
2419 (constructor_name_p): Assert IS_AGGR_TYPE.
2421 2008-01-18 Ian Lance Taylor <iant@google.com>
2424 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
2425 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
2426 DECL_IS_OPERATOR_NEW flag.
2428 2008-01-16 Richard Guenther <rguenther@suse.de>
2431 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
2432 for conversions to type variants.
2434 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
2436 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
2437 declaration and code. Update copyright year.
2439 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2442 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
2443 know we have a class type.
2445 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2448 * pt.c (coerce_template_parameter_pack): When substituting into
2449 the type of a non-type template parameter pack. use the
2450 deduced/substituted arguments.
2451 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
2452 can be a parameter pack with the ellipsis following it. When we
2453 have an erroneous declaration, allow it to be a parameter pack.
2454 (cp_parser_template_parameter): Complain about default
2455 arguments on non-type template parameter packs, and parse them
2456 using the new cp_parser_default_argument.
2457 (cp_parser_parameter_declaration): Complain about parameter packs
2458 with default arguments. Move parsing of default arguments into a
2459 new function, cp_parser_default_argument.
2460 (cp_parser_default_argument): New; extracted from
2461 cp_parser_parameter_declaration.
2463 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2469 * typeck.c (check_return_expr): If there are bare parameter packs
2470 in the return value, set it to error_mark_node.
2471 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
2472 * pt.c (find_parameter_packs_r): Look at the type of
2473 IDENTIFIER_NODEs (e.g., for user-defined conversions).
2474 (check_for_bare_parameter_packs): Flip the result: now returns
2475 TRUE when there were bare parameter packs, FALSE otherwise.
2476 (push_template_decl_real): Deal with flipped result of
2477 check_for_bare_parameter_packs.
2478 * semantics.c (finish_cond): If there are bare parameter packs in
2479 the conditional, set it to error_mark_node.
2480 (finish_expr_stmt): If there are bare parameter packs in the
2481 expression, set it to error_mark_node.
2482 (finish_for_expr): Ditto.
2483 (finish_switch_cond): If there are bare parameter packs in
2484 the conditional, set it to error_mark_node.
2485 (finish_mem_initializers): If there are bare parameter packs in
2486 the member initializer, set it to error_mark_node.
2487 (finish_member_declaration): Check the attributes of the
2488 declaration for bare parameter packs, and remove the attributes if
2489 any have bare parameter packs.
2490 * parser.c (cp_parser_using_declaration): Check the using
2491 declaration for bare parameter packs.
2492 (cp_parser_base_clause): If there are bare parameter packs in a
2493 base specifier, don't add it to the chain.
2495 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2498 * error.c (dump_simple_decl): Display ellipsis for template
2499 non-type parameter packs.
2500 (dump_decl): Display ellipsis for template type parameter packs.
2501 (dump_template_decl): Display ellipsis for template template
2503 * pt.c (redeclare_class_template): When redeclaring a class
2504 template, check for collisions between template parameters and
2505 template parameter packs.
2507 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2510 * pt.c (process_partial_specialization): Don't mark template
2511 parameters that occur in non-deduced contexts.
2512 (struct pair_fn_data): Add include_nondeduced_p.
2513 (for_each_template_parm_r): Only visit non-deduced contexts if
2514 include_nondeduced_p is set.
2515 (for_each_template_parm): Added parameter include_nondeduced_p,
2516 which states whether template parameters found in non-deduced
2517 contexts should be visited.
2518 (uses_template_parms): Visit all template parameters, even those
2519 in non-deduced contexts.
2521 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2524 * pt.c (check_default_tmpl_args): Check for parameter packs that
2525 aren't at the end of a primary template.
2526 (push_template_decl_real): Remove check for parameter packs that
2527 aren't at the end of a primary template; that now happens in
2528 check_default_tmpl_args.
2529 * semantics.c (finish_template_template_parm): Use
2530 check_default_tmpl_args to check for errors in the template
2533 2008-01-12 Doug Kwan <dougkwan@google.com>
2535 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
2536 instead of OPT_Wreturn_type in warning due to ignored return type
2538 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
2539 instead of OPT_Wreturn_type in warning due to ignored return type
2542 2008-01-08 Jakub Jelinek <jakub@redhat.com>
2545 * semantics.c (finish_omp_for): Don't call
2546 fold_build_cleanup_point_expr if processing_template_decl.
2548 2008-01-04 Paolo Carlini <pcarlini@suse.de>
2549 Jakub Jelinek <jakub@redhat.com>
2552 * error.c (dump_template_argument): Deal with TREE_LIST.
2554 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
2556 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
2557 long" in C++0x mode; change the warning to note that "long long"
2558 is only unsupported in C++98 mode.
2560 2007-12-20 Jason Merrill <jason@redhat.com>
2563 * call.c (standard_conversion): Derived-to-base is considered a
2564 standard conversion.
2566 2007-12-19 Jakub Jelinek <jakub@redhat.com>
2569 * parser.c (cp_parser_omp_parallel): For non-combined parallel
2570 call cp_parser_statement rather than
2571 cp_parser_already_scoped_statement.
2573 2007-12-18 Jason Merrill <jason@redhat.com>
2576 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
2578 (dependent_type_p_r): Handle the domain of an array.
2580 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
2581 Jakub Jelinek <jakub@redhat.com>
2586 * pt.c (template_template_parm_bindings_ok_p): New; verifies
2587 bindings of template template parameters after all template
2588 arguments have been deduced.
2589 (coerce_template_parms): Don't complain when COMPLAIN doesn't
2591 (fn_type_unification): Use template_template_parm_bindings_ok_p.
2592 (unify): Deal with variadic, bound template template parameters.
2593 (get_class_bindings): Use template_template_parm_bindings_ok_p.
2595 2007-12-18 Jakub Jelinek <jakub@redhat.com>
2598 * decl.c (grokdeclarator): Reject friend sfk_constructor
2601 2007-12-17 Jakub Jelinek <jakub@redhat.com>
2604 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
2607 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
2610 * cp-lang.c (cp_classify_record): New.
2611 (LANG_HOOKS_CLASSIFY_RECORD): Override.
2613 2007-12-11 Jakub Jelinek <jakub@redhat.com>
2616 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
2619 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
2620 dynamic_cast in a template.
2622 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
2625 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
2626 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
2628 2007-12-10 Jakub Jelinek <jakub@redhat.com>
2631 * error.c (dump_type_prefix, dump_type_suffix): Handle
2632 TYPE_PACK_EXPANSION.
2635 * error.c (dump_expr): Handle ABS_EXPR.
2637 2007-12-09 Jakub Jelinek <jakub@redhat.com>
2641 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
2642 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2643 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
2644 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
2645 flag_use_repository and repo_emit_p returned 2.
2647 2007-12-06 Jakub Jelinek <jakub@redhat.com>
2650 * tree.c (stabilize_call, stabilize_init): Do nothing if
2651 processing_template_decl.
2653 2007-12-05 Jakub Jelinek <jakub@redhat.com>
2656 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
2657 error instead of assertion failure.
2658 * parser.c (cp_parser_decltype): If closing paren is not found,
2659 return error_mark_node.
2661 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2664 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
2666 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
2667 since arg_assoc_template_arg will deal with them (better).
2669 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2672 * pt.c (tsubst_exception_specification): Handle substitutions into
2673 member templates, where tsubst_pack_expansion returns a
2674 TYPE_PACK_EXPANSION.
2676 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2679 * pt.c (unify_pack_expansion): If we didn't deduce any actual
2680 bindings for the template parameter pack, don't try to keep the
2681 empty deduced arguments.
2682 (unify): If a parameter is a template-id whose template argument
2683 list contains a pack expansion that is not at the end, then we
2684 cannot unify against that template-id.
2686 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2689 * pt.c (current_template_args): Use error_operand_p.
2691 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2694 * error.c (dump_decl): Handle TREE_BINFO.
2696 2007-12-01 Ollie Wild <aaw@google.com>
2699 * typeck.c (build_binary_op): Add conversion of pointers to function
2700 members appearing as operands to the equality operators.
2702 2007-11-30 Jakub Jelinek <jakub@redhat.com>
2705 * error.c (dump_expr): Handle OBJ_TYPE_REF.
2707 2007-11-29 Jakub Jelinek <jakub@redhat.com>
2710 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
2712 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
2717 * parser.c (cp_parser_decltype): Don't call finish_id_expression
2719 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
2722 2007-11-27 Jakub Jelinek <jakub@redhat.com>
2724 PR tree-optimization/34181
2725 * method.c (use_thunk): Don't inline the call in the thunk.
2728 * tree.c (decl_linkage): Static data members and static member
2729 functions in anonymous ns classes are lk_external.
2731 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
2734 * decl.c (start_preparsed_function): Pass
2735 processing_template_decl for the new allocate_struct_function
2738 2007-11-25 Richard Guenther <rguenther@suse.de>
2740 * decl.c (poplevel): Use BLOCK_CHAIN.
2742 2007-11-24 Ollie Wild <aaw@google.com>
2744 * typeck.c (delta_from_ptrmemfunc): New function.
2745 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
2746 (build_binary_op): Call delta_from_ptrmemfunc.
2748 2007-11-23 Jakub Jelinek <jakub@redhat.com>
2752 * decl.c (cp_finish_decl): Disallow variable or field
2753 definitions if extern "Java" aggregates.
2754 (grokparms): Disallow parameters with extern "Java"
2756 (check_function_type): Disallow function return values
2757 with extern "Java" aggregates.
2758 * init.c (build_new_1): Disallow placement new with
2759 extern "Java" aggregates.
2761 2007-11-23 Mark Mitchell <mark@codesourcery.com>
2762 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2765 * call.c (convert_like_real): Build a zero constant when __null is
2766 converted to an integer type.
2768 2007-11-22 Jakub Jelinek <jakub@redhat.com>
2771 * decl2.c (cp_write_global_declarations): Issue error about static
2772 data members in anonymous namespace which are declared and used,
2775 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2778 * parser.c (cp_parser_class_head): Reject function template ids.
2781 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
2782 when processing_template_decl to build_array_type.
2785 * pt.c (more_specialized_fn): Don't segfault if one or
2786 both argument list end with ellipsis.
2788 2007-11-18 Jakub Jelinek <jakub@redhat.com>
2791 * semantics.c (finish_call_expr): Set
2792 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
2793 or OVERLOAD with all noreturn functions.
2795 2007-11-16 Jakub Jelinek <jakub@redhat.com>
2798 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
2801 2007-11-13 Jakub Jelinek <jakub@redhat.com>
2808 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
2809 set to error_mark_node the outermost POINTER_TYPE to the pack if
2810 it is seen in a POINTER_TYPE.
2811 (push_template_decl_real): If check_for_bare_parameter_packs
2812 fails for function return type, set the return type to
2813 integer_type_node. If check_for_bare_parameter_packs failed
2814 for non-function, return error_mark_node.
2817 * call.c (build_new_op): Call resolve_args before calling
2820 2007-11-11 Tom Tromey <tromey@redhat.com>
2823 * lex.c (handle_pragma_implementation): Use cpp_included_before.
2825 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2828 * pt.c (redeclare_class_template): Update error message. Use a
2829 note to show the previous declaration.
2830 (tsubst_friend_class): Use the location of the friend template as
2831 the input location before calling redeclare_class_template.
2833 2007-11-11 Jakub Jelinek <jakub@redhat.com>
2836 * semantics.c (finish_pseudo_destructor_expr): Handle
2837 object == error_mark_node.
2839 2007-11-10 Jakub Jelinek <jakub@redhat.com>
2842 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
2843 is not scalar type, let finish_class_member_access_expr handle
2844 diagnostics. Pass BIT_NOT_EXPR argument to
2845 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
2847 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
2850 * decl.c (cp_complete_array_type): If any of the initializer
2851 elements are pack expansions, don't compute the array size yet.
2853 2007-11-08 Andrew Pinski <pinskia@gmail.com>
2856 * tree.c (decl_linkage): Fields have no linkage.
2858 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
2860 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
2862 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
2867 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
2868 Be careful with ERROR_MARK_NODEs.
2869 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
2872 2007-11-07 Jakub Jelinek <jakub@redhat.com>
2875 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
2878 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
2882 * tree.c (c_build_qualified_type): Define bridge to
2883 cp_build_qualified_type.
2885 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
2896 * typeck.c (check_return_expr): Pass address of retval to
2897 check_for_bare_parameter_packs.
2898 * class.c (build_base_field): Tolerate bases that have no layout
2900 (end_of_base): Ditto.
2901 * tree.c (canonical_type_variant): Be careful with
2903 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
2905 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
2906 which states whether parameter packs should be replaced with
2908 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
2909 possible. If set_packs_to_error is set true, replace the parameter
2910 pack with ERROR_MARK_NODE. Manage our own pointer sets.
2911 (uses_parameter_packs): Don't set parameter packs to
2913 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
2914 which may be modified (if it is a parameter pack). Instructs
2915 find_parameter_packs_r to replace parameter packs with
2916 ERROR_MARK_NODE (so that they won't cause errors later on).
2917 (process_template_parm): Pass pointer to
2918 check_for_bare_parameter_packs.
2919 (process_partial_specialization): Replace pack expansions before
2920 the end of the template argument list with ERROR_MARK_NODE.
2921 (push_template_decl_real): Pass pointer to
2922 check_for_bare_parameter_packs. Replace parameter packs not at the
2923 end of the template parameter list with ERROR_MARK_NODE.
2924 (convert_template_argument): Be more careful about using DECL_NAME
2925 on only declarations.
2926 (unify): Can't unify against ERROR_MARK_NODE.
2927 * semantics.c (finish_cond): Pass pointer to
2928 check_for_bare_parameter_packs.
2929 (finish_expr_stmt): Ditto.
2930 (finish_for_expr): Ditto.
2931 (finish_switch_cond): Pass pointer to
2932 check_for_bare_parameter_packs, and call it before we put the
2933 condition into the statement.
2934 (finish_mem_initializers): Pass pointer to
2935 check_for_bare_parameter_packs.
2936 (finish_member_declaration): Ditto.
2937 * parser.c (cp_parser_base_clause): Ditto.
2939 2007-11-06 Jakub Jelinek <jakub@redhat.com>
2942 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
2943 with the final TREE_READONLY flag in place. processing_template_decl
2944 is known to be 0 in this part of function.
2947 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
2948 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
2949 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
2950 * semantics.c (finish_omp_atomic): Revert most of the
2951 2007-02-05 changes, just keep the new representation of
2952 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
2954 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
2957 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
2960 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
2965 * typeck.c (merge_types): Don't lose rvalue references when
2967 * call.c (build_over_call): Don't elide move constructors just
2968 because the copy constructor is trivial (!).
2969 (compare_ics): If comparing cv-qualifiers fails, we can still order
2970 based on binding lvalues vs. rvalues.
2972 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
2975 * pt.c (unify_pack_expansion): bring handling of function call
2976 arguments into line with type_unification_real.
2978 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2980 * typeck.c (build_binary_op): Use pedwarn instead of error for
2983 2007-11-05 Jakub Jelinek <jakub@redhat.com>
2986 * parser.c (cp_parser_unary_expression): For &&label call
2987 cp_parser_non_integral_constant_expression and return error_mark_node
2988 if it returned true.
2991 * decl.c (grokdeclarator): Don't call build_memfn_type if type
2992 is neither FUNCTION_TYPE nor METHOD_TYPE.
2994 2007-11-02 Jakub Jelinek <jakub@redhat.com>
2997 * parser.c (cp_parser_nested_name_specifier_opt): Use
2998 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
2999 typedef of currently open class.
3001 2007-11-02 Paolo Carlini <pcarlini@suse.de>
3004 * error.c (dump_expr): Deal specially with statements.
3006 2007-11-01 Jason Merrill <jason@redhat.com>
3009 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
3011 (lookup_template_class): Use it to get the outer template args
3012 for instantiating one.
3015 * pt.c (reduce_template_parm_level): tsubst the parameters
3016 of a template template parm.
3018 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
3021 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
3023 2007-11-01 Jakub Jelinek <jakub@redhat.com>
3026 * parser.c (cp_parser_postfix_dot_deref_expression): If
3027 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
3028 first and if that succeeds and type is SCALAR_TYPE_P, create
3032 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
3033 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
3034 as for std::type_info.
3036 2007-10-31 Paolo Carlini <pcarlini@suse.de>
3039 * cxx-pretty-print.c (pp_cxx_typeid_expression,
3040 pp_cxx_delete_expression): Change to static linkage.
3041 * cxx-pretty-print.h: Adjust declarations.
3042 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
3043 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
3044 MODOP_EXPR): Forward to pp_expression.
3046 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
3049 2007-10-31 Christian Bruel <christian.bruel@st.com>
3050 Mark Mitchell <mark@codesourcery.com>
3053 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
3054 if retval is volatile.
3056 2007-10-30 Jakub Jelinek <jakub@redhat.com>
3059 * decl2.c (build_offset_ref_call_from_tree): Call
3060 build_non_dependent_expr on object prior to building ADDR_EXPR from it
3061 if FN is DOTSTAR_EXPR.
3063 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
3067 * pt.c (find_parameter_packs_r): Fix typo in comment.
3068 (convert_template_argument): Look at the pattern of a pack
3069 expansion to determine what kind of entity we're converting.
3070 (coerce_template_parameter_pack): When we have coerced a non-type
3071 template parameter pack, substitute into the type of that pack.
3072 (tsubst_pack_expansion): When our substitution of a parameter pack
3073 is a "trivial" substitution of itself, just substitute into the
3074 pack expansion rather than actually expanding.
3076 2007-10-29 Jakub Jelinek <jakub@redhat.com>
3079 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
3080 for non-integral type bitfields. Return true if bitfield is correct, false
3081 error has been diagnosed.
3082 (check_field_decls): If check_bitfield_decl returned false, call also
3085 2007-10-28 Paolo Carlini <pcarlini@suse.de>
3086 Mark Mitchell <mark@codesourcery.com>
3089 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
3090 class member error out and return.
3092 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3094 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
3095 to current_function_decl rather than 0.
3098 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
3100 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
3102 2007-10-27 Jason Merrill <jason@redhat.com>
3105 * call.c (convert_default_arg): Detect recursion.
3107 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3110 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
3111 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
3113 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
3115 * error.c (dump_expr): Handle OFFSETOF_EXPR.
3117 2007-10-26 Jason Merrill <jason@redhat.com>
3120 * pt.c (get_template_info): New fn.
3121 (template_class_depth): Use it.
3122 (push_template_decl_real): Check that the template args of the
3123 definition match the args of the previous declaration.
3125 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3128 * decl2.c (coerce_new_type): Do not allow a default argument for
3129 the first parameter.
3131 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
3134 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
3135 don't see the leading '('. Only lookup names if we get an
3138 2007-10-26 Jakub Jelinek <jakub@redhat.com>
3141 * parser.c (cp_parser_parenthesized_expression_list): Set
3142 greater_than_is_operator_p to true in between the parens.
3144 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3147 * decl.c (grokdeclarator): In case of conflicting specifiers
3148 just return error_mark_node.
3150 2007-10-26 Ollie Wild <aaw@google.com>
3152 * expr.c (cxx_expand_expr): Removed.
3153 * cp-tree.h (exx_expand_expr): Removed.
3154 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
3157 2007-10-25 Paolo Carlini <pcarlini@suse.de>
3160 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
3162 2007-10-23 Jason Merrill <jason@redhat.com>
3164 PR c++/25950 (DR 391)
3165 * call.c (struct conversion): Remove check_copy_constructor_p.
3166 (reference_binding): Always bind a reference directly to a
3167 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
3169 (check_constructor_callable): Remove.
3170 (convert_like_real): Don't call it.
3171 (initialize_reference): Don't call check_constructor_callable.
3172 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
3173 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
3174 conversions if LOOKUP_NO_TEMP_BIND.
3175 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
3176 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
3178 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
3180 2007-10-22 Jakub Jelinek <jakub@redhat.com>
3183 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
3184 before checking if its type is integral.
3186 2007-10-22 Jason Merrill <jason@redhat.com>
3189 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
3190 * pt.c (apply_late_template_attributes): Splice out dependent
3191 attributes from DECL_ATTRIBUTES.
3193 * decl.c (cxx_maybe_build_cleanup): Use build_address.
3195 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3197 * typeck.c (build_binary_op) : Use appropriate warning option
3198 instead of unnamed warning.
3200 2007-10-16 Paolo Carlini <pcarlini@suse.de>
3203 * pt.c (current_template_args): Do not change TREE_LIST elements
3204 with a TREE_VALUE of error_mark_node.
3206 2007-10-16 Mark Mitchell <mark@codesourcery.com>
3208 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
3209 * decl.c (start_decl): Tidy.
3210 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
3212 (grokdeclarator): Clarify comment.
3214 2007-10-14 Andrew Pinski <pinskia@gmail.com>
3217 * decl.c (grokfndecl): Return NULL after the "definition of
3218 implicitly-declared" error happened.
3220 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
3223 * call.c (build_user_type_conversion_1): Do not consider conversion
3224 functions to convert a (possibly cv-qualified) object to the (possibly
3225 cv-qualified) same object type (or a reference to it), to a (possibly
3226 cv-qualified) base class of that type (or a reference to it).
3228 2007-10-12 Paolo Carlini <pcarlini@suse.de>
3230 * pt.c (tsubst): Use template_parm_level_and_index.
3232 2007-10-12 Jakub Jelinek <jakub@redhat.com>
3235 * parser.c (cp_parser_compound_statement): Handle label-declarations
3236 at the beginning of the compound statement.
3237 (cp_parser_block_declaration): Issue diagnostics about __label__
3238 not at the beginning of a block.
3240 2007-10-11 Paolo Carlini <pcarlini@suse.de>
3243 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
3244 to convert_template_argument.
3245 (coerce_template_parms): Return error_mark_node after fixed-length
3247 (tsubst_decl): Check for error_mark_node the return value of the
3248 first tsubst in 'case VAR_DECL'.
3250 2007-10-08 Ollie Wild <aaw@google.com>
3252 * typeck2.c (digest_init): Call cplus_expand_constant after
3253 convert_for_initialization.
3254 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3255 * expr.c (cplus_expand_constant): Updated function description.
3257 2007-10-04 Jason Merrill <jason@redhat.com>
3260 * call.c (initialize_reference): Handle local static reference
3263 2007-10-03 Jason Merrill <jason@redhat.com>
3266 * name-lookup.c (push_namespace_with_attrs): Fold back into...
3267 (push_namespace): Here.
3268 (handle_namespace_attrs): New fn for the attr code.
3269 (leave_scope): Don't pop_visibility.
3270 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
3271 * parser.c (cp_parser_namespace_definition): Call
3272 handle_namespace_attrs and pop_visibility as appropriate.
3275 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
3277 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
3279 * decl.c (duplicate_decls): Preserve linkage flags for mere
3280 redeclarations of gnu_inline definitions.
3282 2007-10-03 Jason Merrill <jason@redhat.com>
3285 * decl.c (wrap_cleanups_r): New fn.
3286 (wrap_temporary_cleanups): New fn.
3287 (initialize_local_var): Call it.
3289 2007-09-29 Jason Merrill <jason@redhat.com>
3292 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
3293 constant to not have DECL_EXTERNAL if it's file-local.
3295 2007-09-28 Ollie Wild <aaw@google.com>
3298 2007-09-27 Ollie Wild <aaw@google.com>
3300 * typeck2.c (digest_init): Call cplus_expand_constant after
3301 convert_for_initialization.
3302 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3303 * expr.c (cplus_expand_constant): Updated function description.
3305 2007-09-28 Jason Merrill <jason@redhat.com>
3308 * class.c (layout_empty_base): Take rli parameter, update
3309 rli->record_align if empty base has user-specified alignment.
3310 (build_base_field): Pass rli to it.
3312 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3315 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
3317 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3320 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
3321 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
3322 (dump_parameters): Just call dump_type for argument packs too.
3324 2007-09-28 Jakub Jelinek <jakub@redhat.com>
3327 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
3328 qualification by creating qualified PACK_EXPANSION_PATTERN and
3329 then calling make_pack_expansion on it.
3331 2007-09-27 Ollie Wild <aaw@google.com>
3333 * typeck2.c (digest_init): Call cplus_expand_constant after
3334 convert_for_initialization.
3335 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3336 * expr.c (cplus_expand_constant): Updated function description.
3338 2007-09-27 Jason Merrill <jason@redhat.com>
3341 * decl2.c (is_late_template_attribute): Don't crash on unknown
3344 2007-09-27 Paolo Carlini <pcarlini@suse.de>
3347 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
3348 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
3349 spaces in the formatting.
3350 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
3352 2007-09-27 Jakub Jelinek <jakub@redhat.com>
3354 * error.c (cxx_print_error_function): Add third argument, pass
3355 it over to lhd_print_error_function.
3356 (cp_print_error_function): If diagnostic->abstract_origin, print
3358 * cp-tree.h (struct diagnostic_info): New forward decl.
3359 (cxx_print_error_function): Add third argument.
3361 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
3364 * name-lookup.c (pushtag): Do not create an implicit typedef before
3365 the associated type declaration is known to be valid.
3367 2007-09-25 Jakub Jelinek <jakub@redhat.com>
3369 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
3370 rather than pointers.
3372 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
3375 * search.c (check_final_overrider): Fail if
3376 targetm.comp_type_attributes returns 0.
3378 2007-09-24 Jason Merrill <jason@redhat.com>
3381 * pt.c (resolve_typename_type): Don't look things up in the original
3382 template if it would mean losing template arguments.
3384 2007-09-24 Jakub Jelinek <jakub@redhat.com>
3387 * cp-tree.h (cxx_type_hash_eq): New prototype.
3388 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
3389 * tree.c (cxx_type_hash_eq): New function.
3391 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3394 * tree.c (cp_build_qualified_type_real): Build a canonical
3395 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
3397 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3401 * tree.c (cplus_array_compare): Compare pointers, not types.
3402 (build_cplus_array_type_1): Store new array type into the hash
3403 table before building the canonical type; build the canonical type
3405 (cp_build_qualified_type_real): Put all of the array types with
3406 cv-qualified element types into the C++ array hash table, built as
3407 variants of the unqualified versions.
3409 2007-09-23 Jason Merrill <jason@redhat.com>
3412 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
3413 for deprecation warnings.
3415 2007-09-22 Jason Merrill <jason@redhat.com>
3418 * call.c (build_over_call): Warn about deprecated virtuals.
3421 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
3422 (MAYBE_TAGGED_TYPE_P): Remove.
3423 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
3424 instead of calling is_late_template_attribute again.
3425 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
3426 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
3427 Don't crash on typedefs from non-template classes.
3428 * decl2.c (grokfield): Don't sorry about attrs on template parms.
3429 (is_late_template_attribute): All attributes applied to template
3430 parms or typename types are dependent. Static.
3431 (splice_template_attributes): Pass decl through.
3432 (save_template_attributes): Likewise.
3434 2007-09-20 Jakub Jelinek <jakub@redhat.com>
3437 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
3438 returned from tsubst_pack_expansion.
3439 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
3440 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
3442 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3445 * semantics.c (finish_id_expression): Use consistently
3446 context_for_name_lookup.
3447 * decl.c (fixup_anonymous_aggr): Fix error message for
3448 anonymous struct (vs union).
3450 2007-09-19 Jason Merrill <jason@redhat.com>
3453 * pt.c (tsubst): Handle typedefs by looking for the specialization.
3454 (retrieve_specialization): Only tagged types use
3455 DECL_TEMPLATE_INSTANTIATIONS.
3456 (instantiate_class_template): Push nested classes too.
3457 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
3459 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
3460 * init.c (is_aggr_type): Remove redundant tests.
3461 * class.c (push_nested_class): Use CLASS_TYPE_P.
3463 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3466 * init.c (build_zero_init): If, recursively, build_zero_init
3467 returns a NULL_TREE, do not append it to the VEC of constructors.
3469 2007-09-18 Jason Merrill <jason@redhat.com>
3472 * pt.c (apply_late_template_attributes): Set processing_template_decl.
3473 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
3474 ATTR_FLAG_TYPE_IN_PLACE.
3475 (tsubst): Do unqualified lookup to find typedefs from current class.
3476 [ARRAY_TYPE]: Propagate alignment info.
3477 * decl2.c (is_late_template_attribute): Only defer handling of
3478 attribute aligned if the expression is dependent.
3479 (save_template_attributes): If we're deferring any attributes,
3480 make this a naming typedef.
3482 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3484 PR c++/33462 (again)
3485 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
3486 va_arg instead of __builtin_va_arg.
3488 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3491 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
3492 (pp_cxx_primary_expression): Use it.
3493 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
3494 * error.c (dump_expr): Use it.
3496 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3499 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
3500 out case TYPEID_EXPR to...
3501 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
3502 and pp_cxx_right_paren.
3503 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
3504 * error.c (dump_expr): Use it.
3506 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3509 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
3510 (pp_cxx_primary_expression): Use it.
3511 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
3512 * error.c (dump_expr): Use it.
3514 2007-09-16 Paolo Carlini <pcarlini@suse.de>
3517 * init.c (build_new): Remove warning for zero-element
3520 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
3523 * call.c (maybe_handle_implicit_object): Set this_p, clear
3524 rvaluedness_matches_p.
3525 (compare_ics): Do not compare rvaluedness matching when one of the
3526 operands is an implicit object.
3528 2007-09-14 Jason Merrill <jason@redhat.com>
3530 PR c++/17743, c++/19163
3531 * decl2.c (is_late_template_attribute): New fn.
3532 (splice_template_attributes, save_template_attributes): New fns.
3533 (cplus_decl_attributes): Call save_template_attributes.
3534 * pt.c (apply_late_template_attributes): New fn.
3535 (instantiate_class_template, tsubst_decl): Use it.
3536 * cp-tree.h: Declare is_late_template_attribute.
3538 2007-09-13 Tom Tromey <tromey@redhat.com>
3540 * parser.c (cp_lexer_new_main): Don't use
3541 c_lex_return_raw_strings.
3542 (cp_lexer_get_preprocessor_token): Update. Add special case when
3545 2007-09-11 Jan Hubicka <jh@suse.cz>
3547 * method.c (use_thunk): Use tree_rest_of_compilation
3548 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
3549 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
3550 * cp-tree.h (expand_body): Kill.
3551 (emit_associated_thunks): Declare.
3552 * semantics.c (emit_associated_thunks): Export.
3553 (expand_body): Kill.
3555 2007-09-09 David Daney <ddaney@avtrex.com>
3558 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
3559 to calculate cookie_ptr.
3561 2007-09-08 Jason Merrill <jason@redhat.com>
3564 * pt.c (most_specialized_class): Set processing_template_decl
3565 while tsubsting partial spec args.
3567 2007-09-06 Jason Merrill <jason@redhat.com>
3569 * decl2.c (get_guard): Copy visibility from the guarded variable.
3571 2007-09-06 Jan Hubicka <jh@suse.cz>
3573 * semantics.c (expand_body): Do not mark arguments of clones used.
3575 2007-09-06 Paolo Carlini <pcarlini@suse.de>
3578 * decl.c (cp_finish_decl): When processing_template_decl,
3579 deal correctly with init as TREE_LIST.
3581 2007-09-06 Tom Tromey <tromey@redhat.com>
3583 * decl.c (finish_function): Put return's location on line zero of
3586 2007-09-05 Jason Merrill <jason@redhat.com>
3589 * except.c (prepare_eh_type): Use type_decays_to.
3592 * init.c (build_delete): Use build_headof to get the address of the
3593 complete object if we aren't using the deleting destructor.
3594 * rtti.c (build_headof): No longer static.
3595 * cp-tree.h: Declare it.
3597 2007-09-06 Jakub Jelinek <jakub@redhat.com>
3599 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
3600 decl if a prototype for XX is provided with throw().
3603 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
3604 on __*_chk non-__builtin_* decls.
3606 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3609 * semantics.c (finish_id_expression): Use context_for_name_lookup
3610 insted of DECL_CONTEXT, to see through anonymous structs and unions.
3611 * class.c (finish_struct_anon): Deal correctly with anonymous
3612 structs (vs unions, as GNU extension) in error messages.
3614 2007-09-05 Jan Hubicka <jh@suse.cz>
3616 * sematics.c (expand_body): Remove unnecesary import_export_decl
3617 call, DECL_EXTERNAL checks and current_function_decl saving.
3619 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3621 PR c++/29731 (again)
3622 * parser.c (cp_parser_primary_expression): Return error_mark_node
3623 when a statement-expression is found in a template-argument list.
3625 2007-09-04 Jason Merrill <jason@redhat.com>
3627 * except.c (initialize_handler_parm): Use
3628 fold_build_cleanup_point_expr.
3631 * call.c (reference_binding): Don't look for user-defined conversions
3635 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
3636 the MUST_NOT_THROW_EXPR.
3638 2007-09-04 Richard Sandiford <richard@codesourcery.com>
3640 * decl.c (cp_finish_decl): Call determine_visibility before
3641 make_rtl_for_nonlocal_decl.
3643 2007-09-04 Jason Merrill <jason@redhat.com>
3646 * pt.c (most_specialized_class): Substitute outer template
3647 arguments into the arguments of a member template partial
3649 (strip_innermost_template_args): New fn.
3651 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
3653 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
3655 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3657 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
3658 * decl.c (cp_make_fname_decl): Likewise,
3659 * parser.c (cp_parser_string_literal): Likewise,
3660 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
3661 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3664 2007-09-02 Paolo Carlini <pcarlini@suse.de>
3667 * typeck.c (build_unary_op): Fix error message for
3668 Boolean expression as operand to operator--.
3670 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3672 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
3673 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3676 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3679 * init.c (build_default_init): Make extern.
3680 * cp-tree.h (build_default_init): Declare here.
3681 * pt.c (tsubst_expr): When the instantiation of the initializer of
3682 a variable results in an empty list, default-initialize the
3684 (tsubst_copy_and_build): When the instantiation of the initializer
3685 in a new expression results in an empty initializer list,
3686 default-initialize it.
3688 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3690 * mangle.c (write_type): Change mangling of rvalue reference from
3693 2007-08-31 Jakub Jelinek <jakub@redhat.com>
3695 * decl.c (duplicate_decls): Remove duplicated line.
3697 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3700 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
3701 BOUND_TEMPLATE_TEMPLATE_PARM.
3703 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3706 * search.c (lookup_member): Check the name argument for
3709 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3712 * parser.c (cp_parser_trait_expr): Check rerurn value of
3715 2007-08-30 Ollie Wild <aaw@google.com>
3717 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
3718 convert_ptrmem for pointer to member conversions.
3719 (convert_to_pointer_force): Update cp_convert_to_pointer call.
3720 (ocp_convert): Update cp_convert_to_pointer call.
3721 * typeck.c (convert_ptrmem): Add conditional for null pointers to
3723 (build_static_cast_1): Check can_convert for conversions in either
3725 (get_delta_difference_1): New function.
3726 (get_delta_difference): Refactor to call get_delta_difference_1.
3728 2007-08-30 Jakub Jelinek <jakub@redhat.com>
3730 * decl.c (start_preparsed_function): Set
3731 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
3733 2007-08-28 Paolo Carlini <pcarlini@suse.de>
3736 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
3737 BOUND_TEMPLATE_TEMPLATE_PARM.
3739 2007-08-28 Jakub Jelinek <jakub@redhat.com>
3743 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
3744 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
3746 2007-08-27 Jason Merrill <jason@redhat.com>
3749 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
3750 Look inside STMT_EXPR.
3751 * semantics.c (stmt_expr_value_expr): New fn.
3752 * cp-tree.h: Declare it.
3755 * decl.c (groktypename): Ignore attributes applied to class type.
3757 2007-08-28 Richard Guenther <rguenther@suse.de>
3759 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
3761 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3763 * error.c (dump_expr): Handle COMPLEX_CST.
3764 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
3765 (pp_cxx_expression): Likewise.
3767 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
3769 * decl.c (GNU_INLINE_P): New.
3770 (duplicate_decls): Handle gnu_inline. Merge attributes and
3771 some flags in overriding definitions.
3772 (redeclaration_error_message): Handle gnu_inline.
3773 (start_preparsed_function): Likewise.
3775 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3777 * call.c (sufficient_parms_p): Constify.
3778 * class.c (same_signature_p): Likewise.
3779 * cp-gimplify.c (is_invisiref_parm,
3780 cxx_omp_privatize_by_reference): Likewise.
3781 * cp-objcp-common.c (has_c_linkage): Likewise.
3782 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
3783 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
3784 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
3785 num_artificial_parms_for, comp_template_parms,
3786 template_parameter_pack_p, any_dependent_template_arguments_p,
3787 any_type_dependent_arguments_p, any_value_dependent_elements_p,
3788 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
3789 zero_init_p, member_p, cp_lvalue_kind,
3790 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
3791 varargs_function_p, is_dummy_object, special_function_kind,
3792 string_conv_p, type_unknown_p, comp_except_specs, compparms,
3793 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
3794 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
3795 cp_has_mutable_p, at_least_as_qualified_p,
3796 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
3797 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
3798 * except.c (nothrow_libfn_p): Likewise.
3799 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
3801 * pt.c (comp_template_parms, template_parameter_pack_p,
3802 any_type_dependent_arguments_p, any_value_dependent_elements_p,
3803 any_dependent_template_arguments_p): Likewise.
3804 * repo.c (repo_export_class_p): Likewise.
3805 * semantics.c (anon_aggr_type_p): Likewise.
3806 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
3807 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
3808 varargs_function_p, member_p, is_dummy_object, pod_type_p,
3809 zero_init_p, special_function_p): Likewise.
3810 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
3811 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
3812 compparms, invalid_nonstatic_memfn_p,
3813 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
3814 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
3815 cp_has_mutable_p, lvalue_or_else): Likewise.
3817 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
3819 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
3820 * cp-objcp-common.c (cp_tree_size): Ditto.
3821 * tree.c (cp_walk_subtrees): Ditto
3822 * cp-tree.def (TINST_LEVEL): Go away.
3823 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
3824 move together with other non-tree structs.
3825 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
3826 (union lang_tree_node): Eliminate tinst_level field.
3827 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
3828 (current_instantiation, outermost_tinst_level): Return
3829 a "struct tinst_level *".
3831 * error.c (print_instantiation_partial_context): Change second
3832 parameter to a "struct tinst_level *". Replace accessor macros
3834 (print_instantiation_full_context): Likewise.
3835 * lex.c (in_main_input_context): Likewise.
3837 * pt.c (struct pending_templates): New.
3838 (pending_templates, last_pending_template): Use it as a type.
3839 (current_tinst_level): Change typo to "struct tinst_level *"
3840 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
3841 (add_pending_template): Construct a "struct pending_template".
3842 Replace TINST_LEVEL accessor macros with field access.
3843 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
3844 (pop_tinst_level): Likewise.
3845 (instantiate_pending_templates): Likewise. Factor common code used
3846 when an instantiation has been done.
3847 (outermost_tinst_level): Replace tree_last with loop.
3848 (current_instantiation): Return a "struct tinst_level *".
3850 2007-08-24 Ollie Wild <aaw@google.com>
3852 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
3853 * name-lookup.h (cp_binding_level): Remove vtables member.
3855 2007-08-24 Richard Guenther <rguenther@suse.de>
3857 * tree.c (cp_cannot_inline_tree_fn): Remove.
3858 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
3859 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
3862 2007-08-24 Jakub Jelinek <jakub@redhat.com>
3865 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
3866 error_mark_node right away if build_expr_type_conversion
3870 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
3871 is error_mark_node rather than NULL_TREE.
3872 * pt.c (check_explicit_specialization): Likewise.
3875 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
3876 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
3878 2007-08-22 Jason Merrill <jason@redhat.com>
3881 * pt.c (outermost_tinst_level): New function.
3882 * lex.c (in_main_input_context): New function.
3883 * cp-tree.h: Declare it.
3884 * decl2.c (constrain_class_visibility): Use it to avoid warning
3885 about uses of the anonymous namespace in the main input file.
3887 2007-08-21 Jakub Jelinek <jakub@redhat.com>
3889 * init.c (build_new_1): Use get_target_expr instead of save_expr.
3891 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
3894 * class.c (finish_struct_1): Warn when a class has virtual
3895 functions and accessible non-virtual destructor.
3897 2007-08-20 Richard Guenther <rguenther@suse.de>
3901 * call.c (build_new_method_call): Convert initializer to
3903 * init.c (build_aggr_init): Do not fiddle with types.
3904 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
3905 * except.c (build_throw): Do not drop qualifiers for the
3907 * typeck.c (get_member_function_from_ptrfunc): Do not
3908 fiddle with types, instead convert.
3909 (build_ptrmemfunc1): Convert to the target type for
3911 (gfc_trans_allocate): Convert result to target type.
3912 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
3913 pointer-to-member structures shall have alias set zero as well.
3915 2007-08-20 Richard Guenther <rguenther@suse.de>
3917 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
3919 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
3920 (nonstatic_local_decl_p): Likewise.
3921 * tree.c (cp_auto_var_in_fn_p): Remove.
3922 * decl.c (nonstatic_local_decl_p): Remove.
3924 2007-08-20 Richard Guenther <rguenther@suse.de>
3926 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
3928 * tree.h (cp_walk_tree): New define to walk_tree_1 with
3929 cp_walk_subtrees lh parameter.
3930 (cp_walk_tree_without_duplicates): New define to
3931 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
3932 * tree.c (count_trees): Call
3933 cp_walk_tree_without_duplicates.
3934 (verify_stmt_tree): Call cp_walk_tree.
3935 (break_out_target_exprs): Likewise.
3936 (WALK_SUBTREE): Likewise.
3937 * cp-gimplify.c (cp_genericize): Likewise.
3938 * cp-pt.c (find_parameter_packs_r): Likewise.
3939 (uses_parameter_packs): Likewise.
3940 (make_pack_expansion): Likewise.
3941 (check_for_bare_parameter_packs): Likewise.
3942 (for_each_template_parm): Likewise.
3943 * decl.c (check_default_argument): Call
3944 cp_walk_tree_without_duplicates.
3945 * except.c (build_throw): Likewise.
3946 * decl2.c (type_visibility): Likewise.
3947 * semantics.c (expand_or_defer_fn): Likewise.
3948 (finalize_nrv): Call cp_walk_tree.
3950 2007-08-20 Jakub Jelinek <jakub@redhat.com>
3953 * init.c (build_new_1): Rename placement_var variable to placement_expr.
3954 Initialize it with save_expr rather than get_temp_regvar.
3956 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
3959 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
3962 2007-08-17 Ollie Wild <aaw@google.com>
3965 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
3966 declarations into appropriate slots for comparison. Fix type
3969 2007-08-17 Paolo Carlini <pcarlini@suse.de>
3972 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
3973 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
3975 2007-08-17 Paolo Carlini <pcarlini@suse.de>
3978 * parser.c (cp_parser_class_head): Improve error message.
3980 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
3982 * pt.c (instantiate_decl): Set input_location
3983 for the function end.
3985 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3987 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
3989 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
3990 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
3991 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
3992 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
3993 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
3994 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
3995 * typeck.c (cp_type_quals): Likewise.
3996 * typeck2.c (cxx_incomplete_type_diagnostic,
3997 cxx_incomplete_type_error): Likewise.
3999 2007-08-16 Paolo Carlini <pcarlini@suse.de>
4002 * pt.c (tsubst_friend_function): When check_classfn
4003 returns error_mark_node likewise return it.
4005 2007-08-15 Jakub Jelinek <jakub@redhat.com>
4008 * typeck.c (check_return_expr): Don't NRV optimize vars in
4010 * decl.c (finish_function): Comment fix.
4012 2007-08-15 Paolo Carlini <pcarlini@suse.de>
4015 * pt.c (push_template_decl_real): Depending on TYPE_P
4016 use either TYPE_CONTEXT or DECL_CONTEXT.
4018 2007-08-14 Mark Mitchell <mark@codesourcery.com>
4020 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
4021 constructors and destructors return this.
4023 2007-08-14 Paolo Carlini <pcarlini@suse.de>
4026 * decl2.c (check_classfn): Return error_mark_node in case of error;
4027 in that case, do not call add_method.
4028 * decl.c (start_decl): Deal with check_classfn returning
4030 (grokfndecl): Likewise.
4031 * pt.c (tsubst_friend_function): Likewise.
4033 2007-08-14 Andrew Pinski <pinskia@gmail.com>
4036 * typeck.c (build_binary_op): Disallow vector float types with
4037 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
4039 2007-08-11 Ian Lance Taylor <iant@google.com>
4041 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
4043 * cp-tree.h (cxx_get_alias_set): Update declaration.
4045 2007-08-10 Ollie Wild <aaw@google.com>
4047 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
4049 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
4051 (unqualified_namespace_lookup): Fix ambiguous_decl call.
4052 (lookup_using_namespace): Fix ambiguous_decl call.
4053 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
4055 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4057 * call.c (name_as_c_string): Use CONST_CAST.
4058 * decl.c (build_decl): Likewise.
4059 * parser.c (cp_parser_string_literal): Likewise.
4061 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4064 * error.c (dump_expr): Consistently use the *_cxx_*
4065 variants of the pretty-print functions.
4067 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4070 * decl.c (check_special_function_return_type): Just error
4071 on return type specified for conversion operator.
4073 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
4075 * typeck2.c (readonly_error): Handle general expressions.
4076 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
4078 2007-08-06 Dan Hipschman <dsh@google.com>
4080 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
4081 access function name.
4083 2007-08-04 Alfred Minarik <a.minarik@aon.at>
4086 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
4087 * g++spec.c (lang_specific_driver): Check them.
4089 2007-08-06 Paolo Carlini <pcarlini@suse.de>
4092 * pt.c (inline_needs_template_parms): Fix comment; change return type
4095 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
4098 2007-03-26 Dirk Mueller <dmueller@suse.de>
4100 * parser.c (cp_parser_member_declaration): Pedwarn
4101 about stray semicolons after member declarations.
4103 2007-08-02 Lee Millward <lee.millward@gmail.com>
4108 * parser.c (cp_parser_asm_definition): Detect and discard asm
4109 statements with invalid inputs or outputs.
4110 (cp_parser_asm_operand_list): Return error mark node if any
4111 of the operands are invalid. Adjust documentation.
4113 2007-08-02 Nick Clifton <nickc@redhat.com>
4115 * typeck.c: Change copyright header to refer to version 3 of the
4116 GNU General Public License and to point readers at the COPYING3
4117 file and the FSF's license web page.
4118 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
4119 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
4120 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
4121 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
4122 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
4123 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
4124 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
4125 name-lookup.h, parser.c: Likewise.
4127 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4130 * call.c (magic_varargs_p): Honor the "type generic" attribute.
4132 2007-07-30 Paolo Carlini <pcarlini@suse.de>
4135 * semantics.c (finish_label_stmt): Reject the __label__
4136 extension outside function scopes.
4138 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4140 * parser.c (eof_token): Un-constify.
4141 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
4142 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
4145 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
4147 * pt.c, tree.c, typeck2.c: Fix comment typos.
4149 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
4150 Mark Mitchell <mark@codesourcery.com>
4153 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
4154 hidden due to friend declarations in local classes.
4156 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
4158 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
4159 * cp-tree.def (DECLTYPE_TYPE): New.
4160 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
4161 (dump_type_prefix): Ditto.
4162 (dump_type_suffix): Ditto.
4163 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
4164 * mangle.c (write_type): Handle DECLTYPE_TYPE.
4165 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
4167 (DECLTYPE_TYPE_EXPR): New.
4168 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
4169 (finish_declared_type): Declare.
4170 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
4171 DECLTYPE_TYPE nodes.
4172 (pp_cxx_type_id): Ditto.
4173 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
4174 (tsubst): Substitute into a DECLTYPE_TYPE node.
4175 (tsubst_copy): Ditto.
4176 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
4178 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
4179 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
4180 structural equality (because we can't hash the expressions).
4181 (finish_declared_type): New.
4182 * lex.c (reswords): Add "decltype" keyword.
4183 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
4184 (cp_parser_postfix_expression): Add member_access_only_p to
4185 restrict postfix expression to member access expressions.
4186 (cp_parser_unary_expression): Update call to
4187 cp_parser_postfix_expression to reflect new parameter.
4188 (cp_parser_declared_type): New.
4189 (cp_parser_simple_type_specifier): Parse decltype types.
4191 2007-07-27 Mark Mitchell <mark@codesourcery.com>
4194 * call.c (convert_for_arg_passing): Only widen bitfields to their
4195 declared types if necessary.
4197 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4199 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
4202 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4204 * decl.c (typename_hash, typename_compare): Constify.
4205 * mangle.c (hash_type, compare_type): Likewise.
4206 * pt.c (eq_local_specializations, hash_local_specialization):
4208 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
4209 list_hash): Likewise.
4210 * typeck2.c (pat_compare): Likewise.
4212 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
4214 * method.c (implicitly_declare_fn): Increase alignment if member
4215 function pointer format requires it.
4217 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4220 * typeck.c (check_return_expr): Do not pass a null argument
4223 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4226 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
4229 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
4232 * typeck.c (convert_arguments): Only use default args if we have
4236 * typeck.c (structural_comptypes): No need to check
4237 resolve_typename_type return value here.
4238 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
4239 * pt.c (resolve_typename_type): Follow typename typedefs. Return
4240 original type rather than error_mark_node in case of failure.
4241 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
4242 resolve_typename_type result check.
4243 (cp_parser_direct_declarator, cp_parser_head,
4244 cp_parser_constructor_declarator_p): Likewise.
4246 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
4248 * pt.c (template_parms_variadic_p): Remove.
4249 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
4251 2007-07-12 Jakub Jelinek <jakub@redhat.com>
4254 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
4255 argument to dump_aggr_init_expr_args instead of false.
4257 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
4259 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
4260 canonical types; otherwise, fall back to structural type
4261 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
4262 internal compiler error if the canonical types are wrong.
4264 2007-07-11 Paolo Carlini <pcarlini@suse.de>
4267 * parser.c (cp_parser_make_indirect_declarator): When the
4268 the code argument is ERROR_MARK return cp_error_declarator.
4270 2007-07-09 Geoffrey Keating <geoffk@apple.com>
4273 * decl.c (cxx_init_decl_processing): Don't set
4274 force_align_functions_log.
4275 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
4276 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
4277 FUNCTION_DECL, return its alignment.
4279 2007-07-09 Richard Guenther <rguenther@suse.de>
4281 * decl.c (start_preparsed_function): Do not promote return type.
4283 2007-07-08 Paolo Carlini <pcarlini@suse.de>
4286 * pt.c (unify): Never pass error_mark_node to template_decl_level.
4288 2007-07-07 Mark Mitchell <mark@codesourcery.com>
4291 * pt.c (resolve_overloaded_unification): Robustify. Return a
4293 (type_unification_real): Adjust accordingly.
4295 2007-07-06 Richard Guenther <rguenther@suse.de>
4297 * init.c (build_new_1): Use the correct pointer type.
4298 * typeck2.c (build_m_component_ref): Likewise.
4300 2007-07-05 Mark Mitchell <mark@codesourcery.com>
4303 * init.c (build_zero_init): Always build an initializer for
4305 * typeck2.c (build_functional_cast): Use build_zero_init.
4308 * init.c (build_new_1): Always pass the allocation function to
4309 build_op_delete_call.
4310 * call.c (build_op_delete_call): Handle operator delete with a
4311 variable-argument list. Do not issue an error when no matching
4312 deallocation function is available for a new operator.
4315 * cp-tree.h (any_value_dependent_elements_p): Declare it.
4316 * decl.c (value_dependent_init_p): New function.
4317 (cp_finish_decl): Use it.
4318 * pt.c (value_dependent_expression_p): Use
4319 any_value_dependent_elements_p.
4320 * parser.c (cp_parser_primary_expression): Add comment about
4321 treating dependent qualified names as integral
4322 constant-expressions.
4324 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
4326 * decl.c (build_ptrmemfunc_type): Always use structural equality
4327 tests when comparing pointer-to-member-function types, because the
4328 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
4331 2007-07-03 Mark Mitchell <mark@codesourcery.com>
4333 * init.c (build_new): Tweak comment.
4335 2007-06-29 Dave Brolley <brolley@redhat.com>
4338 * parser.c (cp_parser_new_type_id): Don't reduce a named array
4339 type to its base type and number of elements here.
4340 * init.c (build_new): Call complete_type_or_else to ensure that the
4341 type is complete and to issue a diagnostic if it is not.
4342 (build_new_1): Don't call complete_type_or_else here.
4344 2007-07-03 Richard Guenther <rguenther@suse.de>
4347 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
4350 2007-07-02 Simon Baldwin <simonb@google.com>
4352 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
4353 for inner-style nested forward declarations that don't declare
4356 2007-07-02 Jakub Jelinek <jakub@redhat.com>
4359 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
4360 DECL_P in not a variable and appears more than once error messages.
4362 2007-07-01 Ollie Wild <aaw@google.com>
4364 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
4365 (select_decl): Remove function.
4366 (unqualified_namespace_lookup): Populate binding by calling
4367 ambiguous_decl. Remove select_decl call.
4368 (lookup_qualified_name): Remove select_decl call.
4369 * decl.c (lookup_and_check_tag): Check for ambiguous references.
4370 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
4371 generation when name lookup is ambiguous.
4373 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
4376 * init.c (build_new_1): Use structural equality on the copy of the
4379 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4381 * decl2.c (determine_visibility): Implement
4382 flag_visibility_ms_compat effect on type info.
4383 * decl.c (cxx_init_decl_processing): Implement
4384 global effect of flag_visibility_ms_compat.
4386 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4388 * decl2.c (start_objects): Mark constructor-running function
4391 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
4394 * decl.c (grokdeclarator): Reset friendp for member functions declared
4395 friend of their own class.
4397 2007-06-23 Mark Mitchell <mark@codesourcery.com>
4399 * decl2.c (determine_visibility): Don't look for dllexport here.
4400 (determine_visibility_from_class): Tidy.
4402 2007-06-18 Simon Baldwin <simonb@google.com>
4405 * parser.c (cp_parser_single_declaration): Added check for storage
4406 class other than sc_none in parsed declaration, and a flag to indicate
4407 if the call is part of an explicit template specialization parse.
4408 * (cp_parser_explicit_specialization): Specialization check flag added
4409 to call to cp_parser_single_declaration(), set true.
4410 * (cp_parser_template_declaration_after_export): Specialization check
4411 flag added to call to cp_parser_single_declaration(), set false.
4412 * pt.c (check_explicit_specialization): Added code to copy visiblity
4413 and linkage from the templated function to the explicit specialization.
4415 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
4417 * typeck.c (build_binary_op): For templates build the
4418 expression in pieces to avoid the assert in build2_stat.
4419 (get_member_function_from_ptrfunc):
4420 Change over to using POINTER_PLUS_EXPR and convert
4421 the second operand to sizetype.
4422 * typeck2.c (build_m_component_ref): Likewise.
4423 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
4424 instead of PLUS_EXPR for pointers.
4425 (build_new_1): Likewise.
4426 (build_vec_delete_1): Likewise.
4427 (build_vec_delete): Likewise.
4428 * class.c (build_base_path): Likewise.
4429 (build_base_path): Likewise.
4430 (convert_to_base_statically): Likewise.
4431 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
4432 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
4433 instead of PLUS_EXPR.
4434 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
4435 instead of PLUS_EXPR for pointers.
4436 * call.c (build_special_member_call): Likewise.
4437 * rtti.c (build_headof): Likewise.
4438 Use sizetype instead of ptrdiff_type_node.
4439 (tinfo_base_init): Create a POINTER_PLUS_EXPR
4440 instead of PLUS_EXPR for pointers.
4441 * except.c (expand_start_catch_block): Do a
4442 NEGATIVE and then a POINTER_PLUS_EXPR instead
4444 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
4445 PLUS_EXPR on pointer types over to use
4446 POINTER_PLUS_EXPR and remove the conversion
4447 to the pointer types.
4448 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
4449 adding to a pointer type. Use size_int instead of
4450 ssize_int. Convert the index to sizetype before
4451 adding it to the pointer.
4453 2007-06-15 Mark Mitchell <mark@codesourcery.com>
4455 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
4456 (DECL_ANON_UNION_VAR_P): New macro.
4457 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
4458 than DECL_VAR_MARKED_P, to keep track of which variables we have
4460 * decl.c (redeclaration_error_message): Complain about redeclaring
4461 anonymous union members at namespace scope.
4462 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
4464 2007-06-14 Geoff Keating <geoffk@apple.com>
4466 * decl2.c (determine_visibility): Ensure that functions with
4467 hidden types as parameters are hidden.
4470 * decl2.c (determine_visibility): Remove duplicate code for
4473 2007-06-12 Ian Lance Taylor <iant@google.com>
4476 * init.c (avoid_placement_new_aliasing): New static function.
4477 (build_new_1): Call it.
4479 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
4481 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
4482 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
4484 2007-06-08 Jakub Jelinek <jakub@redhat.com>
4487 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
4488 on init, the non-decl cond operand and increment value.
4490 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
4493 * decl.c (check_initializer): Report an error when a brace enclosed
4494 initializer is used for a non-aggregate type in C++98.
4495 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
4497 (grokdeclarator): Likewise.
4498 (move_fn_p): Likewise.
4499 * typeck.c (check_return_expr): Likewise.
4500 * call.c (reference_binding): Likewise.
4501 * error.c (cp_cpp_error): Likewise.
4502 * pt.c (check_default_tmpl_args): Likewise.
4504 * lex.c (init_reswords): Likewise.
4505 * parser.c (p_parser_primary_expression): Likewise.
4506 (TOKEN_PRECEDENCE): Likewise.
4507 (cp_parser_init_declarator): Likewise.
4508 (cp_parser_ptr_operator): Likewise.
4509 (cp_parser_parameter_declaration): Likewise.
4510 (cp_parser_enclosed_template_argument_list): Likewise.
4511 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
4512 (cp_parser_next_token_ends_template_argument_p): Likewise.
4514 2007-06-04 Simon Baldwin <simonb@google.com>
4516 * decl.c (grokdeclarator): Readability change. Moved case labels
4517 into direct switch statement scope.
4519 2007-06-04 Paolo Carlini <pcarlini@suse.de>
4521 * call.c (convert_like_real): Remove pointless code.
4523 2007-05-31 Mark Mitchell <mark@codesourcery.com>
4525 * decl.c (get_atexit_fn_ptr_type): New function.
4526 (get_atexit_node): Use it.
4527 (start_cleanup_fn): Likewise.
4528 (register_dtor_fn): Use the object's destructor, instead of a
4529 separate cleanup function, where possible.
4530 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
4531 (atexit_fn_ptr_type_node): New macro.
4532 * decl2.c (build_cleanup): Use build_address.
4534 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
4536 * typeck.c (build_binary_op): Include types in error.
4538 2007-05-31 Jakub Jelinek <jakub@redhat.com>
4541 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
4542 needs runtime initialization.
4544 2007-05-31 Paolo Carlini <pcarlini@suse.de>
4547 * semantics.c (finish_trait_expr): Complete the types.
4549 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
4550 Douglas Gregor <doug.gregor@gmail.com>
4551 Pedro Lamarao <pedro.lamarao@mndfck.org>
4552 Howard Hinnant <howard.hinnant@gmail.com>
4556 * typeck.c (comptypes): Don't consider rvalue and lvalue
4557 reference types to be equivalent.
4558 (check_return_expr): Move from certain lvalues when returning
4560 * decl.c (grokdeclarator): Implement reference collapsing.
4561 (copy_fn_p): Don't consider constructors taking rvalue references
4562 to be copy constructors.
4564 * call.c (conversion): New "rvaluedness_matches_p" member.
4565 (convert_class_to_reference): Require reference type as first
4566 parameter instead of base type.
4567 (reference_binding): Add logic to handle rvalue references.
4568 (implicit_conversion): Update inaccurate comment.
4569 (convert_like_real): Disable creation of temporaries that are
4570 impossible to initialize for types with move constructors.
4571 (build_over_call): Elide move constructors when possible.
4572 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
4573 (maybe_handle_ref_bind): Return conversion instead of type node.
4574 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
4575 determine preferred conversion sequences.
4576 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
4577 (LOOKUP_PREFER_RVALUE): New.
4578 (DECL_MOVE_CONSTRUCTOR_P): New.
4579 (struct cp_declarator): Add "reference" member for reference
4580 types, with new "rvalue_ref" flag.
4581 (cp_build_reference_type): Declare.
4582 (move_fn_p): Declare.
4583 * error.c (dump_type_prefix): Format rvalue reference types
4584 correctly in error messages.
4585 * except.c (build_throw): Move from certain lvalues when
4587 * mangle.c (write_type): Mangle rvalue references differently
4588 than regular references.
4589 * parser.c (make_reference_declarator): Add boolean parameter for
4591 (cp_parser_make_indirect_declarator): New.
4592 (cp_parser_new_declarator_opt): Call
4593 cp_parser_make_indirect_declarator.
4594 (cp_parser_conversion_declarator_opt): Ditto.
4595 (cp_parser_declarator): Ditto.
4596 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
4598 * pt.c (tsubst): Implement reference collapsing.
4599 (maybe_adjust_types_for_deduction): Implement special template
4600 parameter deduction rule for rvalue references.
4601 (type_unification_real): Update calls to
4602 maybe_adjust_types_for_deduction.
4603 (try_one_overload): Ditto.
4604 (unify_pack_expansion): Ditto.
4605 * tree.c (lvalue_p_1): Handle rvalue reference types.
4606 (cp_build_reference_type): New.
4608 2007-05-30 Jakub Jelinek <jakub@redhat.com>
4611 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
4612 variables that need runtime initialization.
4614 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
4617 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
4618 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
4619 case POSTDECREMENT_EXPR>): Return the error_mark_node
4620 if either the real or imaginary parts would an
4623 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
4624 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4627 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
4628 token is a closing brace, false if there are no tokens left.
4629 (cp_parser_namespace_alias_definition): Only consume the next token if
4630 it is a closing brace.
4632 * parser.c (cp_parser_class_specifier): Likewise.
4634 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
4636 * semantics.c (finish_member_declaration): Fix a typo in the
4639 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
4651 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
4652 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
4653 * pt.c (check_for_bare_parameter_packs): Return bool indicated
4654 whether everything was okay. Fix indentation.
4655 (push_template_decl_real): Check for bare parameter packs in
4656 function parameters; where errors occur, mark the parameter types
4657 with ERROR_MARK_NODEs to avert ICEs.
4658 (coerce_template_parameter_pack): New.
4659 (coerce_template_parms): Moved parameter pack coercion into
4660 coerce_template_parameter_pack, and permit it anywhere in the
4661 template parameter list (not just at the end). Parameter and
4662 argument indices can vary (somewhat) separately now, so add
4663 PARM_IDX and ARG_IDX.
4664 (fn_type_unification): Don't set an argument pack as incomplete if
4665 no argument pack was deduced.
4666 (type_unification_real): If a type parameter is a parameter pack
4667 and has not otherwise been deduced, it will be deduced to an empty
4669 (more_specialized_fn): Use the actual lengths of the argument
4670 lists when comparing against expansions.
4671 * semantics.c (finish_member_declaration): If a field's type has
4672 bare parameter packs, error and set its type to ERROR_MARK_NODE.
4674 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
4677 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
4679 2007-05-22 Ollie Wild <aaw@google.com>
4681 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
4682 (unqualified_namespace_lookup): Adds check for hidden types.
4684 2007-05-22 Ollie Wild <aaw@google.com>
4686 * decl.c (duplicate_decls): Verify namespace names are unique.
4688 2007-05-21 Mark Mitchell <mark@codesourcery.com>
4690 * decl.c (cxx_maybe_build_cleanup): Handle
4691 __attribute__((cleanup)).
4693 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4695 * cvt.c (cp_convert_and_check): Don't check warnings if the
4698 2007-05-18 Geoffrey Keating <geoffk@apple.com>
4700 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
4702 2007-05-14 Paolo Carlini <pcarlini@suse.de>
4705 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
4706 type only if is a class type (5.2.8/4).
4708 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
4710 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
4711 * decl.c (grokdeclarator): Use unsigned_type_for instead of
4712 c_common_unsigned_type.
4714 2007-05-11 Silvius Rus <rus@google.com>
4716 * typeck.c (build_indirect_ref): Add call to
4717 strict_aliasing_warning.
4718 (build_reinterpret_cast_1): Condition call to
4719 strict_aliasing_warning.
4721 2007-05-11 Jan Hubicka <jh@suse.cz>
4723 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
4724 * decl2.c (start_objects): ctors and dtors are no longer public.
4725 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
4727 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
4729 * typeck.c (build_unary_op): Remove code that used to
4730 handle non lvalue increments/decrements.
4732 2007-05-07 Mike Stump <mrs@apple.com>
4734 * parser.c (check_empty_body): Add.
4735 (cp_parser_iteration_statement): Add call to check_empty_body.
4737 2007-05-05 Geoffrey Keating <geoffk@apple.com>
4740 * mangle.c (write_mangled_name): Mangle static variable names.
4741 (write_unqualified_name): Use local-source-name for
4742 namespace-scope static variables.
4744 2007-05-04 Dirk Mueller <dmueller@suse.de>
4746 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
4749 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
4752 * decl2.c (constrain_class_visibility):
4753 Use strip_pointer_or_array_types instead of strip_array_types.
4755 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
4758 * decl.c (reshape_init_r): Don't reshape the first element if it
4759 is a pointer to member function.
4761 2007-04-27 Simon Baldwin <simonb@google.com>
4763 * decl.c (grokparms): Changed message format from %qD to %qE.
4765 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
4767 * error.c (maybe_warn_variadic_templates): Variadic templates are
4768 now in C++0x, so only warn about them in C++98 mode.
4770 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
4773 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
4774 integeral types from vectors types.
4776 2007-04-26 Jakub Jelinek <jakub@redhat.com>
4779 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
4780 for type dependent OMP_CLAUSE_DECLs.
4782 2007-04-24 Mark Mitchell <mark@codesourcery.com>
4785 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
4786 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
4787 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
4788 * init.c (build_zero_init): Adjust, as
4789 COMPLEX_TYPE is now a SCALAR_TYPE.
4790 * typeck2.c (digest_init): Allow brace-enclosed initializers for
4791 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
4793 2007-04-25 Paolo Carlini <pcarlini@suse.de>
4795 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
4796 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
4797 (trait_expr_value): Adjust.
4799 2007-04-23 Simon Baldwin <simonb@google.com>
4801 * decl.c (grokparms): Added new error for duplicate function
4802 parameters names in function prototypes, to match gcc behavior.
4804 2007-04-23 Jan Hubicka <jh@suse.cz>
4806 * decl2.c (finish_objects): Do not call target constructor/destructor
4809 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
4811 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
4812 instead of checking GIMPLE_STMT_P in chain_next.
4814 2007-04-17 Mark Mitchell <mark@codesourcery.com>
4817 * call.c (convert_for_arg_passing): Convert bitfields to their
4820 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
4823 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
4825 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
4828 * decl2.c (constrain_class_visibility):
4829 Do not warn about the use of anonymous namespace in the main input file.
4831 2007-04-15 Mark Mitchell <mark@codesourcery.com>
4833 * cp-tree.h (current_template_parms): Fix typo in comment.
4835 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
4837 * cp-tree.h, error.c: Fix comment typos.
4839 2007-04-13 Jason Merrill <jason@redhat.com>
4842 * call.c (reference_binding): Add c_cast_p parm. If true,
4843 add quals to TO as needed to make it reference-compatible.
4845 2007-04-11 Jan Hubicka <jh@suse.cz>
4847 * class.c (convert_to_base_statically): Fold produced tree; verify
4848 that we are not processing template_decl.
4850 2007-04-09 Mark Mitchell <mark@codesourcery.com>
4853 * class.c (build_base_path): Ensure that the converted pointer has
4854 the same cv-qualification as the input.
4856 2007-04-09 Paolo Carlini <pcarlini@suse.de>
4858 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
4860 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
4862 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
4864 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
4865 * tree.c (cp_add_pending_fn_decls): Remove.
4866 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
4868 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
4870 Revert change removing staticp.
4872 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
4874 * cp-objcp-common.c (cxx_staticp): Remove.
4875 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
4876 * cp-tree.h (cxx_staticp):
4878 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
4880 * class.c (check_for_override): Don't remove dllmport attribute
4883 2007-04-03 Jakub Jelinek <jakub@redhat.com>
4886 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
4887 type issue error and return early.
4889 2007-03-30 Jason Merrill <jason@redhat.com>
4892 * typeck.c (cp_type_readonly): New fn.
4893 * cp-tree.h: Declare it.
4894 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
4895 (cp_finish_decl): Not here.
4897 2007-03-31 Richard Guenther <rguenther@suse.de>
4899 * optimize.c (maybe_clone_body): Replace splay-tree usage by
4902 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
4907 * parser.c (declarator_can_be_parameter_pack): New.
4908 (cp_parser_template_parameter): Only parse the `...' if the
4909 declarator can be a parameter pack.
4910 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
4912 * pt.c (find_parameter_packs_r): Look into the bounds on integer
4913 types (they could be used as array bounds).
4914 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
4915 (tsubst_pack_expansion): Handle failure to expand parameter
4918 2007-03-30 Paolo Carlini <pcarlini@suse.de>
4921 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
4922 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
4923 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
4924 (CLASS_TYPE_NON_UNION_P): Add.
4925 (struct lang_type_class): Add has_complex_dflt.
4926 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
4927 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
4928 * cp-tree.def: Add TRAIT_EXPR.
4929 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
4930 * lex.c (struct resword): Add __has_nothrow_assign,
4931 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
4932 __has_trivial_constructor, __has_trivial_copy,
4933 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
4934 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
4935 __is_pod, __is_polymorphic, __is_union.
4936 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
4937 (cp_parser_trait_expr): New.
4938 * semantics.c (finish_trait_expr, trait_expr_value
4939 classtype_has_nothrow_copy_or_assign_p): New.
4940 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
4942 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
4943 * class.c (check_bases, check_field_decl, check_bases_and_members):
4944 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
4945 * pt.c (uses_template_parms, tsubst_copy_and_build,
4946 value_dependent_expression_p, type_dependent_expression_p): Deal with
4948 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
4950 2007-03-29 Richard Guenther <rguenther@suse.de>
4952 * tree.c (cp_walk_subtrees): Do not set input_location.
4954 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
4957 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
4960 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4962 * parser.c (struct cp_parser): Update comment for
4963 greater_than_is_operator_p.
4964 (cp_parser_primary_expression): In C++0x mode, a cast operator can
4965 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
4966 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
4967 !GREATER_THAN_IS_OPERATOR_P.
4968 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
4969 `>>' operators that will become two `>' tokens in C++0x.
4970 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
4971 mode, allowing it to terminate default arguments.
4972 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
4973 `>>' like two consecutive `>' tokens.
4974 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
4975 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
4976 ends a template argument.
4978 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4980 * decl.c (redeclaration_error_message): Complain when redeclaring
4981 a friend function with default template arguments (C++0x mode only).
4982 * cp-tree.h (check_default_tmpl_args): Declare.
4983 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
4984 template arguments in function templates. Add support for checking
4985 the default template arguments of friend templates.
4986 (push_template_decl_real): Fix call to check_default_tmpl_args.
4987 (type_unification_real): If a template parameter has not been
4988 deduced but provides a default template argument, substitute into
4989 that default template argument.
4990 * parser.c (cp_parser_init_declarator): When declaring (but not
4991 defining!) a function template in C++0x mode, check for default
4994 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4997 * decl.c (grokdeclarator): Deal with cv-qualified function type
4998 typedefs in the same way for member and non-member functions.
5000 2007-03-26 Dirk Mueller <dmueller@suse.de>
5002 * parser.c (cp_parser_member_declaration): Pedwarn
5003 about stray semicolons after member declarations.
5005 2007-03-26 Paolo Carlini <pcarlini@suse.de>
5008 * pt.c (instantiate_decl): Set in_system_header.
5010 2007-03-22 Mark Mitchell <mark@codesourcery.com>
5012 * cp-tree.h (current_tempalte_parms): Improve documentation.
5013 * pt.c (current_template_args): Likewise.
5016 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
5017 not consume tokens when failing.
5019 2007-03-22 Jim Wilson <wilson@specifix.com>
5020 Mark Mitchell <mark@codesourcery.com>
5023 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
5024 consistent with FROM.
5026 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5028 * error.c (dump_expr): Handle dependent names that designate types.
5029 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
5031 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
5033 * cp-tree.def, parser.c, pt.c: Fix comment typos.
5035 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5037 * cvt.c (cp_convert_and_check) : Define.
5038 * cp-tree.h (cp_convert_and_check): Declare.
5039 * call.c (convert_conversion_warnings): Rename to
5040 conversion_null_warnings. The warning for floating-point to
5041 integer is handled by convert_and_check in convert_like_real.
5042 (convert_like_real): convert_conversion_warnings was renamed as
5043 conversion_null_warnings.
5044 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
5045 overflow and changes of value during conversion.
5047 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5050 * parser.c (cp_parser_statement): If 'namespace' is found, this
5051 only can be a namespace alias definition, so parse it now.
5052 (cp_parser_namespace_alias_definition): if we find an open brace
5053 instead of '=', then this is actually a misplaced namespace
5056 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5059 * decl.c (cxx_init_decl_processing): Move command-line options
5060 processing to c-opts.c.
5062 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
5064 * ptree.c (cxx_print_type): Use formatting markup for integers
5065 when printing template parameter index/level/orig level.
5066 (cxx_print_xnode): Ditto.
5067 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
5068 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
5069 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
5071 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
5072 rather than a HOST_WIDE_INT.
5073 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
5074 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
5076 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
5077 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
5078 IN_BASE_INITIALIZER bool bitfields.
5079 (struct cp_declarator): Make KIND a 4-bit field. Make
5080 PARAMETER_PACK_P a bool bitfield just after KIND.
5081 * pt.c (uses_parameter_packs): Destroy the pointer set.
5082 (make_pack_expansion): Ditto.
5083 (check_for_bare_parameter_packs): Ditto.
5084 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
5086 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
5089 * call.c (convert_default_arg): Instead of copying the node,
5092 2007-03-15 Dirk Mueller <dmueller@suse.de>
5095 * call.c (convert_conversion_warnings): New..
5096 (convert_like_real): .. factored out from here.
5097 (convert_conversion_warnings): Add warning about
5098 false being converted to NULL in argument passing.
5100 2007-03-14 Dirk Mueller <dmueller@suse.de>
5102 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
5103 (finish_do_body): Warn about empty body in do/while statement.
5105 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5107 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
5109 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5112 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
5115 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
5117 * repo.c (init_repo): Initialize random_seed saved options.
5118 (finish_repo): Adjust.
5120 2007-03-13 Mark Mitchell <mark@codesourcery.com>
5123 * Make-lang.in (doc/g++.1): Use $< to specify the location from
5126 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
5128 * decl.c (compute_array_index_type): New warning flag warn_vla.
5130 2007-03-12 Mark Mitchell <mark@codesourcery.com>
5133 * call.c (convert_default_arg): Copy non-constant arguments.
5135 2007-03-11 Mark Mitchell <mark@codesourcery.com>
5138 * parser.c (cp_parser_postfix_expression): Disallow compound
5139 literals in constant expressions.
5142 * semantics.c (finish_typeof): Use unlowered_expr_type.
5144 2007-03-10 Mark Mitchell <mark@codesourcery.com>
5147 * cp-tree.h (unlowered_expr_type): New function.
5148 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
5149 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
5150 (unlowered_expr_type): New function.
5151 (build_unary_op): Disallow predecrements of bool bitfields.
5152 * call.c (build_conditional_expr): Use unlowered_expr_type.
5153 * pt.c (type_unification_real): Likewise.
5155 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
5158 * typeck.c (check_return_expr): Check for bare parameter packs.
5159 (comptypes): Compare template parameter packs and
5160 type pack expansions.
5161 * decl.c (grokdeclarator): Deal with the declaration of function
5163 (grokparms): Verify that the (optional) function parameter pack is
5164 at the end of the parameter list.
5165 (xref_basetypes): Handle pack expansions in the base class.
5166 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
5167 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
5168 (NONTYPE_ARGUMENT_PACK): New.
5169 (TYPE_PACK_EXPANSION): New.
5170 (EXPR_PACK_EXPANSION): New.
5171 (ARGUMENT_PACK_SELECT): New.
5172 * cp-objcp-common.c (cp_tree_size): Compute size of
5173 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
5174 ARGUMENT_PACK_SELECT.
5175 * error.c (dump_template_argument): Print template argument packs.
5176 (dump_template_argument_list): Ditto.
5177 (dump_template_parameter): Dump `...' for template type parameter
5179 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
5180 (dump_parameters): Print function parameter packs.
5181 (dump_template_parms): Print template argument packs.
5182 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
5183 (maybe_warn_variadic_templates): New.
5184 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
5185 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5186 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5188 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
5189 (write_template_arg): Write argument packs as separate arguments.
5190 * cp-tree.h (struct template_parm_index_s): Add flag that
5191 indicates that the template parameter is actually a parameter
5193 (struct tree_argument_pack_select): New.
5194 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
5195 (union lang_tree_node): Add argument_pack_select.
5196 (FUNCTION_PARAMETER_PACK_P): New.
5197 (PACK_EXPANSION_P): New.
5198 (PACK_EXPANSION_PATTERN): New.
5199 (SET_PACK_EXPANSION_PATTERN): New.
5200 (PACK_EXPANSION_PARAMETER_PACKS): New.
5201 (ARGUMENT_PACK_P): New.
5202 (ARGUMENT_PACK_ARGS): New.
5203 (SET_ARGUMENT_PACK_ARGS): New.
5204 (ARGUMENT_PACK_INCOMPLETE_P): New.
5205 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
5206 (TEMPLATE_PARM_PARAMETER_PACK): New.
5207 (TEMPLATE_TYPE_PARAMETER_PACK): New.
5208 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
5209 (ARGUMENT_PACK_SELECT_INDEX): New.
5210 (ARGUMENT_PACK_SELECT_ARG): New.
5211 (struct cp_declarator): Add parameter_pack_p flag.
5212 (maybe_warn_variadic_templates): Declare.
5213 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
5214 indicate a template parameter pack.
5215 (uses_parameter_packs): Declare.
5216 (template_parameter_pack_p): Declare.
5217 (template_parms_variadic_p): Declare.
5218 (make_pack_expansion): Declare.
5219 (check_for_bare_parameter_packs): Declare.
5220 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
5221 sizeof... expressions.
5222 (pp_cxx_expression): Print pack expansions and non-type argument
5224 (pp_cxx_exception_specification): Print pack expansions.
5225 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
5226 (pp_cxx_ctor_initializer): Print pack expansions.
5227 (pp_cxx_type_id): Print pack expansions.
5228 (pp_cxx_template_argument_list): Print argument packs.
5229 (pp_cxx_template_parameter): Print ellipsis for template parameter
5231 * pt.c (comp_template_parms): Compare template parameter packs.
5232 (template_parameter_pack_p): New.
5233 (template_parms_variadic_p): New.
5234 (template_args_variadic_p): New.
5235 (make_ith_pack_parameter_name): New.
5236 (struct find_parameter_pack_data): New.
5237 (find_parameter_packs_r): New.
5238 (uses_parameter_packs): New.
5239 (make_pack_expansion): New.
5240 (check_for_bare_parameter_packs): New.
5241 (expand_template_argument_pack): New.
5242 (reduce_template_parm_level): Propagate parameter pack flag.
5243 (process_template_parm): Add is_parameter_pack parameter to state
5244 when the parameter is actually a parameter pack. Create template
5245 parameter packs when is_parameter_pack is true.
5246 (current_template_args): The argument for a template parameter
5247 pack is an argument pack containing a single pack expansion.
5248 (process_partial_specialization): When checking that non-type
5249 argument expressions do not involve template parameters, loop over
5250 the arguments in argument packs separately.
5251 (push_template_decl_real): Check that the type of the declaration
5252 does not have any bare parameter packs. Check that primary
5253 templates have no more than one parameter pack, and that it comes
5254 at the end of the template parameter list.
5255 (convert_template_argument): Handle coercions for pack expansion
5256 expressions by coercing the pattern then rebuilding the expansion.
5257 (coerce_template_parms): When coercing the arguments for a
5258 variadic template, pack "extra" arguments into an argument pack.
5259 (coerce_template_template_parms): Cannot coerce between parameter
5260 packs and non-pack parameters.
5261 (template_args_equal): Compare PACK_EXPANSION_P expressions.
5262 (comp_template_args): Expand all template arguments packs before
5263 comparing template argument lists.
5264 (mangle_class_name_for_template): Make argument packs as separate
5266 (for_each_template_parm_r): No need to handle BASELINK.
5267 (instantiate_class_template): Handle pack expansions in the base
5269 (tsubst_pack_expansion): New.
5270 (tsubst_template_args): Handle substitutions of argument packs and
5271 pack expansion into template argument lists.
5272 (tsubst_decl): Expand function parameter packs into separate
5273 function parameters.
5274 (tsubst_arg_types): Expand a type pack expansion into separate
5276 (tsubst_exception_specification): Handle pack expansions in
5277 exception specifiers.
5278 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
5279 replacing a template parameter with its argument. If we encounter
5280 a substitution for an argument pack, just return the parameter
5282 (tsubst_copy): sizeof(X...) returns the number of elements in
5283 parameter pack X. See through ARGUMENT_PACK_SELECT when the
5284 PARM_DECL is a parameter pack.
5285 (tsubst_expr): Expression pack expansions and argument packs
5286 cannot show up here; they will all be handled through function
5287 calls, sizeof, and template argument lists.
5288 (tsubst_copy_and_build): sizeof(X...) returns the number of
5289 elements in parameter pack X. Handle pack expansions in TREE_LIST
5290 and CONSTRUCTOR nodes.
5291 (fn_type_unification): Handle "incomplete" explicit template
5292 argument lists that specify some of the arguments for a template
5294 (type_unification_real): Unify arguments against pack expansions.
5295 (template_parm_level_and_index): New, helper function.
5296 (unify_pack_expansion): New.
5297 (unify): Unify argument packs on an argument-by-argument basis,
5298 handling variadic argument packs as well.
5299 (more_specialized_fn): Handle unification of function parameter
5300 packs. All things being equal, prefer non-variadic function
5301 templates to variadic function templates.
5302 (more_specialized_class): Prefer the variadic class template
5303 partial specialization that binds fewer arguments to a parameter
5305 (regenerate_decl_from_template): Expand function parameter packs
5306 into separate parameters.
5307 (instantiate_decl): Ditto.
5308 (tsubst_initializer_list): Handle pack expansions for base-class
5310 (dependent_type_p_r): Determine dependent types in argument packs
5311 and pack expansions.
5312 (value_dependent_expression_p): Determine value-dependence of
5313 non-type argument packs.
5314 (dependent_template_arg_p): Handle argument packs.
5315 * semantics.c (finish_cond): Check for bare parameter packs.
5316 (finish_expr_stmt): Ditto.
5317 (finish_for_expr): Ditto.
5318 (finish_switch_cond): Ditto.
5319 (finish_mem_initializers): Ditto.
5320 * name-lookup.c (arg_assoc_type): Handle pack expansions and
5322 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
5323 * parser.c (make_declarator): Declarator is not an expansion.
5324 (make_pointer_declarator): Transfer parameter pack flag to outer
5326 (make_reference_declarator): Ditto.
5327 (make_ptrmem_declarator): Ditto.
5328 (make_call_declarator): Ditto.
5329 (make_array_declarator): Ditto.
5330 (cp_parser_postfix_expression): Allow pack expansion expressions
5331 in the argument list for a call expression.
5332 (cp_parser_parenthesized_expression_list): Add new parameter
5333 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
5334 into separate arguments."
5335 (cp_parser_new_placement): Allow pack expansion expressions.
5336 (cp_parser_new_initializer): Ditto.
5337 (cp_parser_mem_initializer_list): Allow ellipsis to create a
5338 base-class initializer expansion.
5339 (cp_parser_mem_initializer): Ditto.
5340 (cp_parser_template_parameter_list): Keep track of whether the
5341 template parameter is a template parameter pack.
5342 (cp_parser_template_parameter): Parse the ellipsis to indicate a
5343 template parameter pack.
5344 (cp_parser_type_parameter): Ditto.
5345 (cp_parser_template_argument_list): Parse the ellipsis to indicate
5347 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
5348 this declarator is a parameter pack.
5349 (cp_parser_parameter_declaration): The ellipsis does not end the
5350 parameter declaration, because it might be a parameter pack. Parse
5351 the ellipsis to indicate a parameter pack.
5352 (cp_parser_initializer): Allow pack expansions.
5353 (cp_parser_initializer_list): Allow ellipsis to create an
5354 initializer expansion.
5355 (cp_parser_base_clause): Allow ellipsis to create a base specifier
5357 (cp_parser_type_id_list): Allow ellipsis to create an exception
5358 specifier expansion.
5359 (cp_parser_attribute_list): Don't allow pack expansions.
5360 (cp_parser_functional_cast): Allow pack expansions.
5361 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
5362 compute the length of a parameter pack.
5363 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
5364 end a template argument.
5365 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5366 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5369 2007-03-09 Dirk Mueller <dmueller@suse.de>
5371 * call.c (build_new_op): Call warn_logical_operator.
5373 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
5376 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
5379 * pt.c (any_template_arguments_need_structural_equality_p):
5382 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
5384 * decl.c (grokdeclarator): Disable warnings for anonymous
5387 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
5389 * typeck2.c (readonly_error): Always emit a hard error.
5390 Remove last argument.
5391 * cp-tree.h (readonly_error): Adjust prototype.
5392 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
5393 * typeck.c (build_unary_op): Likewise.
5394 (build_modify_expr): Likewise.
5396 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
5399 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
5401 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5404 * parser.c (struct cp_parser): New IN_IF_STMT.
5405 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
5406 returning if parsing the body of an 'if' statement or issuing an
5407 error and continuing.
5408 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
5410 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
5412 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
5415 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
5418 2007-03-02 Geoffrey Keating <geoffk@apple.com>
5420 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
5421 Objective-C++. Don't exit early if -shared-libgcc needs to be
5424 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5426 * typeck.c (common_base_type): Delete unused function.
5428 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
5430 * Make-lang.in: Add dummy lang.install-pdf target.
5432 2007-03-01 Simon Baldwin <simonb@google.com>
5435 * decl.c (check_tag_decl): Added new warning for typedef ignored
5436 when it precedes an otherwise valid non-typedef declaration.
5438 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
5440 * typeck.c (build_function_call): Store converted arguments
5441 in a stack-allocated array instead of building a list.
5442 (convert_arguments): Store arguments in the array passed in as an
5443 argument, and return the actual number of arguments.
5444 * call.c (build_call): Delete, and replace with...
5445 (build_call_n, build_call_a): New.
5446 (build_op_delete_call): Rewrite to avoid constructing argument lists.
5447 (build_over_call): Store converted arguments in a stack-allocated
5448 array instead of building a list.
5449 (build_cxx_call): Pass arguments in an array instead of as a list.
5450 (build_java_interface_fn_ref): Rewrite to avoid constructing
5452 * tree.h: Update declarations to reflect above changes.
5453 * method.c (use_thunk): Use a stack-allocated array to hold
5454 the arguments instead of a list.
5455 * rtti.c (throw_bad_cast): Update call to cxx_call.
5456 (throw_bad_typeid): Likewise.
5457 (build_dynamic_cast_1): Likewise.
5458 * init.c (build_builtin_delete_call): Use build_call_n.
5459 * decl.c (expand_static_init): Likewise.
5460 * except.c (cp_protect_cleanup_actions): Likewise.
5461 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
5462 (gimplify_must_not_throw_expr): Likewise.
5463 (cxx_omp_apply_fn): Use build_call_a.
5465 2007-02-26 Mark Mitchell <mark@codesourcery.com>
5467 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
5468 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
5470 2007-02-25 Mark Mitchell <mark@codesourcery.com>
5472 * cp-tree.h (static_ctors): Remove.
5473 * cp-tree.h (static_dtors): Likewise.
5474 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
5475 refactoring of tree_map hierarchy.
5476 (decl_shadowed_for_var_insert): Likewise.
5477 * semantics.c (expand_body): Use c_expand_body.
5478 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
5479 * decl2.c (static_ctors): Remove.
5480 (static_dtors): Likewise.
5481 (generate_ctor_or_dtor_function): Pass NULL_TREE to
5482 objc_generate_static_init_call. Do not call static_[cd]tors.
5483 (generate_ctor_and_dtor_functions_for_priority): Do not check for
5485 (cp_write_global_declarations): Likewise.
5487 2007-02-23 Richard Guenther <rguenther@suse.de>
5489 * class.c (note_name_declared_in_class): Make declaration
5490 changes meaning a pedwarn.
5492 2007-02-22 Michael Matz <matz@suse.de>
5495 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
5496 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
5497 dump_function_decl): Guard emitting outer scopes by new flag.
5498 * cp-lang.c (cxx_dwarf_name): New function.
5499 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
5500 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
5502 (push_template_decl_real, lookup_template_class): Remove calls
5505 2007-02-19 Mark Mitchell <mark@codesourcery.com>
5507 * call.c (build_new_method_call): Ensure that explicit calls of
5508 destructors have type "void".
5510 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5512 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
5513 and -Walways-true with -Waddress.
5514 * cvt.c (convert_to_void): Replace unconditional warning with
5517 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
5519 * decl.c, tree.c: Fix comment typos.
5521 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5524 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
5525 statement expression if we had an error mark node.
5527 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
5528 Brooks Moses <brooks.moses@codesourcery.com>
5529 Lee Millward <lee.millward@codesourcery.com>
5531 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
5532 Change class to tcc_vl_exp.
5534 * call.c (build_call): Use build_call_list instead
5536 (build_over_call): Likewise.
5537 (build_new_method_call): Use build_min_non_dep_call_list
5538 instead of build_min_non_dep.
5540 * error.c (dump_call_expr_args): New function.
5541 (dump_aggr_init_expr_args): New function.
5542 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
5543 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
5545 * cvt.c (convert_to_void): Use build_call_array instead
5546 of build3; use new AGGR_INIT_EXPR accessor macros.
5548 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
5549 instead of TREE_CODE_LENGTH.
5551 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
5552 AGGR_INIT_EXPR accessor macros.
5554 * cp-gimplify.c (cp_gimplify_init_expr): Use
5555 AGGR_INIT_EXPR_SLOT to set the slot operand.
5557 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
5558 (AGGR_INIT_EXPR_SLOT): New macro.
5559 (AGGR_INIT_EXPR_ARG): New macro.
5560 (aggr_init_expr_nargs): New macro.
5561 (AGGR_INIT_EXPR_ARGP): New macro.
5562 (aggr_init_expr_arg_iterator): New.
5563 (init_aggr_init_expr_arg_iterator): New.
5564 (next_aggr_init_expr_arg): New.
5565 (first_aggr_init_expr_arg): New.
5566 (more_aggr_init_expr_args_p): New.
5567 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
5568 (stabilize_aggr_init): New declaration.
5569 (build_min_non_dep_call_list): Likewise.
5571 * tree.c (process_aggr_init_operands): New function.
5572 (build_aggr_init_array) New function.
5573 (build_cplus_new): Update to use new CALL_EXPR and
5574 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
5575 build_aggr_init_array.
5576 (build_min_non_dep_call_list) New function.
5577 (build_min_nt): Assert input code parameter is not a variable
5578 length expression class.
5579 (build_min, build_min_non_dep): Likewise.
5580 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
5581 to check for equality instead of recursing. Handle tcc_vl_exp
5583 (stabilize_call): Update to only handle CALL_EXPRs, not
5584 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
5585 (stabilize_aggr_init): New function.
5586 (stabilize_init): Use it.
5588 * cxx-pretty-print.c (pp_cxx_postfix_expression)
5589 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
5590 AGGR_INIT_EXPR accessor macros and argument iterators.
5592 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
5593 build_vl_exp. Iterate through the operands, recursively
5594 processing each one.
5595 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
5596 CALL_EXPR accessor macros.
5597 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
5598 tree code classes. Use TREE_OPERAND_LENGTH instead of
5601 * semantics.c (finish_call_expr): Use build_nt_call_list
5602 instead of build_nt.
5603 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
5604 accessor macros. Use build_call_array to construct the
5605 CALL_EXPR node instead of build3
5607 * decl2.c (build_offset_ref_call_from_tree): Use
5608 build_nt_call_list and build_min_non_dep_call_list instead
5609 of build_min_nt and build_min_non_dep.
5611 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
5612 Use build_nt_call_list instead of build_min_nt.
5614 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5617 * call.c (build_conditional_expr): Improve error message.
5619 2007-02-13 Dirk Mueller <dmueller@suse.de>
5621 * friend.c (do_friend): Annotate warning about friend
5622 declarations in templates with OPT_Wnon_template_friend.
5623 Convert informal message from warning() to inform().
5625 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
5626 Mark Mitchell <mark@codesourcery.com>
5629 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
5630 instantiations for variables.
5632 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5635 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
5636 Check warn_unused_value just once.
5638 2007-02-11 Mark Mitchell <mark@codesourcery.com>
5641 * pt.c (determine_specialization): Use skip_artificial_parms_for.
5642 (fn_type_unificiation): Likewise.
5643 (get_bindings): Likewise.
5645 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
5648 * decl.c (finish_function): Use DECL_REPLACEABLE.
5649 * tree.c (cp_cannot_inline_tree_fn): Likewise.
5651 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
5653 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
5655 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
5657 * decl.c (grokvardecl): Don't error if !have_tls.
5658 (grokdeclarator): Likewise.
5659 * parser.c (cp_parser_omp_threadprivate): Likewise.
5661 2007-02-07 Jakub Jelinek <jakub@redhat.com>
5664 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
5665 parameters and result decls in omp clauses.
5666 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
5669 2007-02-05 Dirk Mueller <dmueller@suse.de>
5672 * parser.c (cp_parser_class_specifier): Always initialize bases.
5674 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5676 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
5677 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
5678 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
5680 * semantics.c (finish_omp_atomic): Store a whole expression node
5681 in operand 1, and integer_zero_node in operand 0, for dependent
5682 OMP_ATOMIC. Rewrite to make flow easier to understand.
5684 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5686 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
5688 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
5690 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
5691 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
5693 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
5695 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
5696 keyword warning to -Wc++0x-compat.
5698 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5700 * decl.c (grokdeclarator): Update documentation.
5702 2007-02-02 Jakub Jelinek <jakub@redhat.com>
5705 * decl.c (grokdeclarator): If __thread is used together with
5706 a storage class other than extern and static, clear thread_p
5707 after issuing diagnostics and fall through to checking the
5710 2007-01-30 Roger Sayle <roger@eyesopen.com>
5712 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
5713 calculating the size of an array (to avoid recursive errors).
5715 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5718 * typeck.c (build_binary_op): Fix logic for warning. Move warning
5720 * call.c (convert_like_real): Don't warn when converting to
5723 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5725 * decl.c (pop_label): Replace warning with call to
5726 warn_for_unused_label.
5728 2007-01-28 Andrew Pinski <pinskia@gmail.com>
5731 * semantics.c (finish_pseudo_destructor_expr): Check the
5732 destrutor name by calling check_dtor_name.
5734 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
5736 * lex.c (D_CPP0X): Rename.
5738 (reswords): D_CPP0X -> D_CXX0X.
5739 (init_reswords): Ditto.
5740 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
5741 of C++0x keywords as identifiers.
5743 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
5746 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
5749 2007-01-23 Ian Lance Taylor <iant@google.com>
5751 * typeck.c (convert_for_assignment): Only warn about a = b = c
5752 when converting to bool.
5754 2007-01-23 Roger Sayle <roger@eyesopen.com>
5756 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
5758 * typeck.c (ignore_overflows): Remove the remaining uses of
5759 TREE_CONSTANT_OVERFLOW.
5761 2007-01-20 Jan Hubicka <jh@suse.cz>
5763 * decl2.c (start_objects, start_static_storage_duration_function):
5764 Do not make the functions uninlinable.
5766 2007-01-17 Ian Lance Taylor <iant@google.com>
5768 * class.c (add_method): Call VEC_reserve_exact rather than passing
5769 a negative size to VEC_reserve.
5771 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
5774 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
5776 2007-01-10 Mark Mitchell <mark@codesourcery.com>
5779 * decl.c (make_typename_type): If the qualified name is not a
5780 type, issue an error.
5781 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
5784 2007-01-08 Geoffrey Keating <geoffk@apple.com>
5786 * rtti.c: Include target.h.
5787 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
5788 don't emit typeinfo for fundamental types as weak.
5789 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
5791 2007-01-08 Richard Guenther <rguenther@suse.de>
5793 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
5795 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
5797 * call.c (standard_conversion): Pass flag to
5798 vector_types_convertible_p to disallow emission of note.
5799 * typeck.c (convert_for_assignment): Pass flag to
5800 vector_types_convertible_p to allow emission of note.
5801 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
5802 to disallow emission of note.
5804 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5807 * typeck.c (build_binary_op): Call overflow_warning if
5808 TREE_OVERFLOW_P is true for the result and not for any of the
5811 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
5814 * class.c (add_method): Don't wait until template
5815 instantiation time to complain about duplicate methods.
5817 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5820 * semantics.c (finish_unary_op_expr): Warn only if result
5821 overflowed and operands did not.
5823 2007-01-05 Ian Lance Taylor <iant@google.com>
5825 * typeck.c (build_binary_op): Warn about comparing a non-weak
5828 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
5830 * pt.c (tsubst): Propagate the need for structural equality checks
5831 when reducing the level of template parameters.
5833 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
5835 * pt.c: Fix a comment typo.
5837 2007-01-02 Ian Lance Taylor <iant@google.com>
5839 * semantics.c (maybe_convert_cond): Optionally warn when using an
5840 assignment as a condition.
5841 * typeck.c (convert_for_assignment): Optionally warn about
5842 assigning the result of an assignment to a bool.
5844 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
5846 * pt.c (canonical_template_parms): Correct typo in comment.
5848 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
5850 * typeck.c (structural_comptypes): Renamed from "comptypes".
5851 (comptypes): Use canonical type information to perform fast type
5852 comparison. When VERIFY_CANONICAL_TYPES, verify that the
5853 canonical type comparison returns the same results as we would see
5854 from the current, structural check. Support COMPARE_STRUCTURAL
5855 when we need structural checks.
5856 * decl.c (typename_compare): Fix comment.
5857 (build_typename_type): TYPENAME_TYPE nodes require structural
5858 equality checks, because they resolve different based on the
5860 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
5861 require structural equality checks (for now).
5862 (build_ptrmemfunc_type): Build the canonical pointer to member
5864 (compute_array_index_type): Whenever we build a new index type
5865 to represent the size of an array in a template, we need to mark
5866 this index type as requiring structural equality. This goes for
5867 arrays with value-dependent sizes with the current ABI, or all
5869 * tree.c (cplus_array_hash): New.
5870 (struct cplus_array_info): New.
5871 (cplus_array_compare): New.
5872 (cplus_array_htab): New.
5873 (build_cplus_array_type_1): Use a hash table to cache the array
5874 types we build. Build the canonical array type for each array
5876 (cp_build_qualified_type_real): When building a cv-qualified array
5877 type, use the hash table of array types and build canonical array
5879 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
5880 use structural equality (for now).
5881 * cp-tree.h (COMPARE_STRUCTURAL): New.
5882 * pt.c (canonical_template_parms): New.
5883 (canonical_type_parameter): New.
5884 (process_template_parm): Find the canonical type parameter.
5885 (lookup_template_class): When we have named the primary template
5886 type, set the canonical type for our template class to the primary
5887 template type. If any of the template arguments need structural
5888 equality checks, the template class needs structural equality
5890 (tsubst): When reducing the level of a template template
5891 parameter, we require structural equality tests for the resulting
5892 parameter because its template parameters have not had their types
5893 canonicalized. When reducing a template type parameter, find the
5894 canonical reduced type parameter.
5895 (any_template_arguments_need_structural_equality_p): New.