1 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
4 * decl.c (reshape_init_r): Check init for error_mark_node.
6 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
9 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
10 (finish_return_stmt): Likewise.
11 (finish_switch_condition): Likewise.
13 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
15 * cp-tree.h: Fix #error directive.
17 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
19 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
20 usual arithmetic conversions on scoped enumeration types.
22 (default_conversion): Don't perform integral promotions on scoped
24 (build_array_ref): Scoped enumeration types can't be used as
26 * decl.c (start_enum): If building a C++0x scoped enumeration,
27 enter its scope. If provided with an underlying type, check that
28 underlying type and set up the enumeration type accordingly.
29 (finish_enum): Only compute an underlying type if the underlying
30 type isn't already fixed, and only convert the enumerator values
31 now if we've just computed the underlying type. Finish the scope
32 of C++0x scoped enumerations.
33 (build_enumerator): For enumerations with a fixed underlying type,
34 check the enumerator values when the enumerator is defined.
35 (lookup_enumerator): New.
36 * call.c (standard_conversion): Don't allow assignment from
37 integers to scoped enumeration types, even with -fpermissive.
38 Don't convert from scoped enumerations to bool or any arithmetic
40 (build_conditional_expr): Don't per the usual arithmetic
41 conversions for scoped enumeration types.
42 (convert_like_real): Check complain to see if we should
44 * error.c (class_key_or_enum_as_string): Print scoped enums.
45 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
47 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
49 (UNSCOPED_ENUM_P): New.
50 (SET_SCOPED_ENUM_P): New.
51 (ENUM_UNDERLYING_TYPE): New.
52 * pt.c (lookup_template_class): Update the instantiation of enum
53 types to deal with C++0x scoped enumerations and underlying
55 * name-lookup.c (begin_scope): Deal with scoped enumeration
57 (lookup_qualified_name): Deal with lookup into enumeration types.
58 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
59 * parser.c (cp_parser_class_or_namespace_name): Rename to...
60 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
61 parse a type-name that can be an enumeration type.
62 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
63 (cp_parser_elaborated_type_specifier): Parse the
64 optional `struct' or `class' following enum (in C++0x).
65 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
68 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
70 * typeck.c: Update all calls to pedwarn.
75 * name-lookup.c: Likewise.
78 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
81 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
84 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
86 * parser.c: Update all calls to inform.
93 * typeck2.c: Likewise.
95 * name-lookup.c: Likewise.
98 2008-08-19 Jakub Jelinek <jakub@redhat.com>
101 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
103 2008-08-18 Tomas Bily <tbily@suse.cz>
105 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
107 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
109 * typeck.c: Update all callers of permerror.
114 * except.c: Likewise.
116 * typeck2.c: Likewise.
118 * semantics.c: Likewise.
119 * name-lookup.c: Likewise.
122 * parser.c: Likewise.
124 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
127 * pt.c (check_template_shadow): Change to return a bool.
128 * name-lookup.c (push_class_level_binding): Early return if
129 check_template_shadow returns false.
130 * cp-tree.h (check_template_shadow): Adjust declaration.
132 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
135 * decl.c (grokdeclarator): In case of extern and initializer, return
136 error_mark_node after the error.
138 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
141 * decl.c (grokfndecl): Call check_main_parameters_type only if
144 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
147 * parser.c (cp_parser_class_head): Early return error_mark_node in
148 case of global qualification of class name or qualified name that
149 does not name a class.
151 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
154 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
156 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
159 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
160 Delete forward declarations. Check that toplev.h has not been
161 included before this file. Include toplev.h and diagnostic.h.
162 * error.c (cp_cpp_error): Use DK_PEDWARN.
163 (cxx_incomplete_type_diagnostic): Update declaration.
164 (cxx_incomplete_type_error): Use DK_ERROR.
165 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
166 as argument. Use emit_diagnostic.
167 (cxx_incomplete_type_error): Use DK_ERROR.
168 (add_exception_specifier): Use diagnostic_t instead of custom
170 * typeck.c (complete_type_or_else): Update call to
171 cxx_incomplete_type_diagnostic.
172 * init.c (build_delete): Likewise.
173 * call.c (diagnostic_fn_t): Remove unused typedef.
174 (build_temp): Pass a pointer to diagnostic_t.
175 (convert_like_real): Use emit_diagnostic.
176 (joust): Check return value of warning before giving informative
178 * friend.c (do_friend): Check return value of warning
179 before giving informative note.
180 * parser.c (cp_parser_template_id): Likewise.
182 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
185 * class.c (check_bases_and_members): Warn with -Wuninitialized
188 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
191 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
192 and make sure it is not a union.
194 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
196 * semantics.c (finish_decltype_type): Initialize type.
198 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
200 * semantics.c (finish_decltype_type): Handle calls to function
201 pointers and references to functions properly.
203 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
206 * parser.c (cp_parser_template_argument): Don't assume that '>>'
207 following a type-id is an error when in C++0x mode.
209 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
212 * decl.c (grokdeclarator): Use explicit location with permerror_at.
214 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
217 * typeck.c (cp_build_binary_op): Move code to c-common.c.
219 2008-08-05 Jason Merrill <jason@redhat.com>
222 * decl.c (build_ptrmemfunc_type): Don't require structural
223 comparison of PMF types.
224 * tree.c (cp_build_qualified_type_real): Don't clear
225 a valid TYPE_PTRMEMFUNC_TYPE.
226 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
229 2008-08-04 Jason Merrill <jason@redhat.com>
232 * typeck2.c (check_narrowing): Allow narrowing conversion
233 from an explicit floating-point constant.
236 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
239 2008-08-04 Simon Baldwin <simonb@google.com>
242 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
243 the declaration's id is followed by a semicolon.
245 2008-07-31 Jakub Jelinek <jakub@redhat.com>
248 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
249 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
251 2008-07-31 Jason Merrill <jason@redhat.com>
254 * init.c (build_new_1): Don't convert pointer to the data type
255 until we're actually going to treat it as that type.
258 * tree.c (build_aggr_init_expr): Split out...
259 (build_cplus_new): ...from here.
260 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
261 * init.c (build_new_1): new T() means value-initialization,
262 not default-initialization.
263 (build_vec_init): Likewise.
264 (build_value_init_1): Use build_aggr_init_expr.
266 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
269 * decl2.c (fix_temporary_vars_context_r): New function.
270 (one_static_initialization_or_destruction): Make sure temporary
271 variables part of the initialiser have their DECL_CONTEXT()
274 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
277 * typeck.c (build_binary_op): Encapsulate code into
280 2008-07-29 Jakub Jelinek <jakub@redhat.com>
283 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
284 TYPE_UID instead of pointers.
286 2008-07-29 Jan Hubicka <jh@suse.cz>
288 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
289 * decl.c (duplicate_decls): Likewise.
290 (grokfndecl): Likewise.
291 (start_method): Likewise.
292 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
294 * pt.c (register_specialization, regenerate_decl_from_template):
296 * decl2.c (grokfield): Likewise.
298 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
301 * decl.c (duplicate_decls): Merge USED flags.
303 2008-07-27 Jason Merrill <jason@redhat.com>
306 * decl.c (reshape_init_r): Allow C++0x initializer lists.
308 2008-07-28 Richard Guenther <rguenther@suse.de>
310 Merge from gimple-tuples-branch.
312 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
314 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
317 2008-07-18 Jakub Jelinek <jakub@redhat.com>
319 * decl.c (finish_function): Call gimple_body after cp_genericize.
321 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
323 * optimize.c: Include gimple.h instead of tree-gimple.h.
324 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
325 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
328 2008-07-16 Jakub Jelinek <jakub@redhat.com>
330 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
332 2008-07-14 Jakub Jelinek <jakub@redhat.com>
334 * cp-gimplify.c (cp_gimplify_expr): Update comment.
336 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
338 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
340 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
341 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
342 (cxx_omp_clause_copy_ctor): Same.
343 (cxx_omp_clause_assign_op): Same.
345 2008-05-28 Jakub Jelinek <jakub@redhat.com>
347 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
348 (cp_gimplify_expr): Adjust caller.
350 2008-05-11 Doug Kwan <dougkwan@google.com>
352 * init.c (build_vec_delete): Add type conversion for argument
353 0 of POINTER_PLUS_EXPR.
355 2008-04-29 Doug Kwan <dougkwan@google.com>
357 * decl2 (File): Include "gimple.h"
358 (cp_write_global_declarations): Use gimple_body instead of
360 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
362 2008-04-10 Diego Novillo <dnovillo@google.com>
364 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
366 * optimize.c (maybe_clone_body): Re-enable call to
368 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
369 code with call to gimple_unreachable.
370 (cp_genericize): Fix handling of clone bodies.
372 2008-04-04 Diego Novillo <dnovillo@google.com>
374 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
376 * optimize.c (maybe_clone_body): Re-enable.
378 2008-02-19 Diego Novillo <dnovillo@google.com>
379 Oleg Ryjkov <olegr@google.com>
381 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
383 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
384 argument to gimple_seq *. Update all users.
385 (gimplify_must_not_throw_expr): Likewise.
387 2008-02-04 Oleg Ryjkov <olegr@google.com>
389 * except.c: Include gimple.h
390 (cp_protect_cleanup_actions): Convert to tuples.
391 * Make-lang.in (cp/except.o): Add dependency on gimple.h
393 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
395 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
396 instead of annotating each block manually.
398 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
400 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
401 (gimplify_for_stmt): Same.
402 (gimplify_switch_stmt): Same.
403 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
405 [WHILE_STMT]: Return GS_OK.
407 [CONTINUE_STMT]: Same.
409 (cp_genericize): Set gimple_body() of cloned functions when needed.
411 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
413 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
414 (cp_gimplify_init_expr): Convert to tuples.
415 (gimplify_must_not_throw_expr): Make function return a
416 gimplify_status and convert to tuples.
418 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
420 * cp-gimplify.c (genericize_try_block): Enable and do not call
422 (genericize_catch_block): Same.
423 (genericize_eh_spec_block): Same.
424 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
425 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
427 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
429 * optimize.c (maybe_clone_body): Comment out call to clone_body.
430 * decl.c (finish_function): Use gimple_body instead of
432 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
433 * cp-gimplify.c (genericize_try_block): Comment out.
434 (genericize_catch_block): Same.
435 (genericize_eh_spec_block): Same.
436 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
437 (gimplify_for_stmt): Comment out.
438 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
439 (cp_gimplify_omp_for): Same.
440 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
441 Comment out call to gimplify_stmt and append_to_statement_list.
442 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
443 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
444 (cp_gimplify_expr): Same.
445 Comment out calls to genericize_*_block. Comment out call to
448 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
451 * class.c (type_has_user_provided_default_constructor): Handle
454 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
456 * decl.c (push_library_fn): Add a parameter for the exceptions that
457 the function may throw.
458 (push_void_library_fn, push_throw_library_fn, expand_static_init):
460 (build_library_fn): Change to static.
461 * cp-tree.h: Adjust declarations.
462 * except.c (declare_nothrow_library_fn): New.
463 (do_get_exception_ptr, do_begin_catch, do_free_exception,
464 do_allocate_exception): Use the latter, adjust the declarations
465 (ie, add empty exception-specification), consistently with the
466 actual implementation in libsupc++.
468 2008-07-25 Jan Hubicka <jh@suse.cz>
470 * typeck.c (inline_conversion): Remove.
471 (cp_build_function_call): Do not use inline_conversion.
472 * decl.c (duplicate_decls): Do not insist on inline being declared
474 (start_cleanup_fn): Do not assume that INLINE flags prevent function
475 from being output. We now remove static functions always.
476 (finish_function): Do return warning on all static functions.
477 * call.c (build_over_call): Do not use inline_conversion.
478 * cp-tree.h (possibly_inlined_p): Declare.
479 (inline_conversion): Remove.
480 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
481 * decl2.c (cp_write_global_declarations): Likewise.
482 (mark_used): Likewise.
483 (possibly_inlined_p): New functions.
485 2008-07-25 Jason Merrill <jason@redhat.com>
487 * class.c (type_has_user_provided_default_constructor): Handle
490 2008-07-23 Jan Hubicka <jh@suse.cz>
492 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
493 (grogfndecl): Drop flag_inline_trees code.
494 * pt.c (instantiate_decl): Drop flag_iline_trees code.
495 * lex.c (cxx_init): Do not set unit-at-a-time.
497 2008-07-23 Jason Merrill <jason@redhat.com>
499 * mangle.c (write_unqualified_name): Avoid infinite recursion when
500 trying to mangle a decl with no name.
502 Implement defaulted/deleted functions as per N2346
503 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
504 (DECL_DELETED_FN): New macro.
505 (DECL_DEFAULTED_FN): New macro.
506 * class.c (user_provided_p): New fn.
507 (defaultable_fn_p): New fn.
508 (type_has_user_provided_constructor): New fn.
509 (type_has_user_provided_default_constructor): New fn.
510 (check_methods): A defaulted fn is still trivial.
511 (check_bases_and_members): Likewise.
512 * decl.c (grok_special_member_properties): Likewise.
513 (duplicate_decls): Complain about redeclaring a function as deleted.
514 (start_decl): initialized==2 means deleted.
515 (cp_finish_decl): Handle deleted/defaulted semantics.
516 * decl2.c (grokfield): Likewise.
517 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
518 Complain about using a deleted fn.
519 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
520 (perform_member_init): Check for a user-provided default constructor
521 even if TYPE_NEEDS_CONSTRUCTING.
522 (build_new_1): Likewise.
523 * call.c (build_over_call): Don't call mark_used twice.
524 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
525 * search.c (check_final_overrider): Check for deleted mismatch.
526 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
527 (cp_parser_pure_specifier): Handle =default and =delete.
529 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
531 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
534 * typeck.c: All calls to pedwarn changed.
535 * decl.c: All calls to pedwarn changed.
536 * call.c: All calls to pedwarn changed.
537 * error.c: All calls to pedwarn changed.
538 * typeck2.c: All calls to pedwarn changed.
539 * pt.c: All calls to pedwarn changed.
540 * name-lookup.c: All calls to pedwarn changed.
541 * parser.c: All calls to pedwarn changed.
543 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
545 * call.c: Fix comment typos.
547 * cp-tree.h: Likewise.
548 * cxx-pretty-print.c: Likewise.
551 * name-lookup.c: Likewise.
552 * operators.def: Likewise.
553 * parser.c: Likewise.
556 * typeck.c: Likewise.
558 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
562 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
563 copy constructors and copy assignment operators proper.
565 2008-07-21 Rafael Avila de Espindola <espindola@google.com>
567 * parser.c (cp_token): Remove in_system_header.
568 (eof_token): Remove in_system_header.
569 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
570 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
571 (cp_parser_member_declaration): Use in_system_header_at.
572 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
573 (pop_tinst_level): Don't set in_system_header.
574 (instantiate_class_template): Don't set in_system_header.
575 (instantiate_decl): Don't set in_system_header.
576 (instantiate_pending_templates): Don't set in_system_header.
578 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
581 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
582 TYPE_NOTHROW_P, not TREE_NOTHROW.
583 (trait_expr_value): Likewise.
585 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
588 * call.c (convert_like_real): Don't take the error code path
589 when a rvalue or base conversion has the bad_p field set.
591 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
593 * rtti.c (emit_support_tinfos): Add char16_type_node and
595 * typeck2.c (digest_init): Support char16_t and char32_t.
597 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
599 * cvt.c (convert_to_void): Avoid C++ keywords.
600 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
602 * friend.c (is_friend): Likewise.
603 * init.c (perform_member_init): Likewise.
604 * mangle.c (write_template_prefix, write_template_template_param):
606 * name-lookup.c (do_namespace_alias, do_using_directive,
607 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
608 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
609 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
611 * pt.c (is_specialization_of_friend, lookup_template_class,
612 push_tinst_level, instantiate_class_template,
613 tsubst_copy_and_build): Likewise.
614 * tree.c (add_stmt_to_compound): Likewise.
615 * typeck.c (finish_class_member_access_expr): Likewise.
617 2008-07-17 Julian Brown <julian@codesourcery.com>
618 Mark Mitchell <mark@codesourcery.com>
620 * decl2.c (determine_visibility): Allow target to override
621 visibility of class data.
623 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
626 * semantics.c (trait_expr_value): Update __has_trivial_destructor
627 semantics to the current WP (N2691).
629 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
632 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
633 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
634 complies with exception specification constraints.
636 2008-07-14 Jason Merrill <jason@redhat.com>
638 * lex.c (init_reswords): Always set D_OBJC.
640 2008-07-11 Tom Tromey <tromey@redhat.com>
641 Ian Lance Taylor <iant@google.com>
643 * lex.c (struct resword, reswords): Don't define.
644 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
645 (init_reswords): Clarify mask code. Use c_common_reswords rather
648 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
651 * decl.c (grokdeclarator): Warn about initializing variables
652 of storage class 'extern' only after the type of the declarator
653 has been properly computed.
655 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
658 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
659 carries the location of the primary type.
660 * parser.c (cp_parser_check_type_definition): Update documentation.
661 (cp_parser_check_for_definition_in_return_type,
662 cp_parser_check_for_invalid_template_id,
663 cp_parser_set_decl_spec_type,
664 cp_parser_check_for_definition_in_return_type,
665 cp_parser_diagnose_invalid_type_name,
666 cp_parser_new_expression, cp_parser_explicit_instantiation,
667 cp_parser_type_specifier, cp_parser_simple_type_specifier,
668 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
671 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
675 * semantic.c (qualified_name_lookup_error, finish_id_expression):
676 Add a location_t parameter so that
677 error message can have a more accurate location.
678 * cp-tree.h: Updated prototype
679 * pt.c (tsubst_qualified_id): Use location in error messages.
680 * parser.c (cp_parser_postfix_expression,
681 cp_parser_objc_statement, cp_parser_trait_expr,
682 cp_parser_token_is_class_key,
683 cp_parser_uncommitted_to_tentative_parse_p,
684 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
685 cp_parser_error, cp_parser_name_lookup_error,
686 cp_parser_simulate_error, cp_parser_check_decl_spec,
687 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
688 cp_parser_diagnose_invalid_type_name,
689 cp_parser_parse_and_diagnose_invalid_type_name,
690 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
691 cp_parser_string_literal, cp_parser_primary_expression,
692 cp_parser_primary_expression, cp_parser_unqualified_id,
693 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
694 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
695 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
696 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
697 cp_parser_jump_statement, cp_parser_block_declaration,
698 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
699 cp_parser_function_specifier_opt, cp_parser_decltype,
700 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
701 cp_parser_mem_initializer_id, cp_parser_template_parameter,
702 cp_parser_type_parameter, cp_parser_template_id,
703 cp_parser_template_name, cp_parser_template_argument): Likewise.
705 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
708 * pt.c (tsubst_function_type): Remove warning for type qualifiers
709 on function return type.
711 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
714 * pt.c (tsubst_function_type): Don't warn for type qualifiers
715 on function return type in case of system header.
717 2008-07-09 Raksit Ashok <raksit@google.com>
719 * parser.c (cp_parser_postfix_expression): New warning based on flag
720 warn_disallowed_functions.
722 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
725 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
726 functions declared with a storage class qualifier.
728 2008-07-03 Richard Guenther <rguenther@suse.de>
731 * typeck.c (cp_build_function_call): Move code to verify
732 builtin function arguments ...
733 * call.c (build_cxx_call): ... here.
735 2008-07-02 Jason Merrill <jason@redhat.com>
737 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
739 Implement WG21 N2672, Initializer List proposed wording
740 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
741 (struct lang_type_class): Add has_list_ctor bitfield.
742 (TYPE_HAS_LIST_CTOR): New macro.
743 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
744 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
745 (LOOKUP_NO_NARROWING): New macro.
746 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
747 * parser.c (cp_parse_braced_list): Split out from...
748 (cp_parser_initializer_clause): ...here.
749 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
751 (cp_lexer_next_token_is_not_keyword): New fn.
752 (cp_parser_parenthesized_expression_list): Handle { }.
753 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
754 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
755 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
756 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
757 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
758 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
759 (cp_parser_save_member_function_body): Likewise.
760 * call.c (conversion_kind): Add ck_list, ck_aggr.
761 (struct conversion): Add check_narrowing bitfield, conversion list.
762 (build_list_conv): New fn.
763 (build_aggr_conv): New fn.
764 (implicit_conversion): Call them.
765 (standard_conversion): Set check_narrowing if appropriate.
766 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
767 (build_user_type_conversion_1): When converting from an init list,
768 we allow additional conversions except when calling a copy ctor.
769 (convert_like_real): Calling an explicit ctor for an init list is
770 ill-formed. Handle ck_list and ck_addr. Check narrowing.
771 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
772 class doesn't have a list ctor, break the {} into a TREE_LIST.
773 (compare_ics): ck_list is better than other UDCs.
774 (set_up_extended_ref_temp): Split out from initialize_reference.
775 (is_std_init_list): New fn.
776 (is_list_ctor): New fn.
777 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
778 (reshape_init_array_1): Pass it to build_constructor.
779 (reshape_init_class): Ditto.
780 (initialize_artificial_var): Pass the appropriate type.
781 (build_aggr_init_full_exprs): Split out from...
782 (check_initializer): ...here. Handle new semantics.
783 (build_init_list_var_init): New subroutine of check_initializer.
784 (grokdeclarator): Converting constructors can have more than one parm.
785 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
786 * init.c (expand_default_init): Only do digest_init for aggregates.
787 * rtti.c (tinfo_base_init): Pass init_list_type_node to
788 build_constructor_from_list.
789 (generic_initializer, ptr_initializer): Ditto.
790 (ptm_initializer, class_initializer): Ditto.
791 (get_pseudo_ti_init): Ditto.
792 * error.c (dump_type): Handle init_list_type_node.
793 (maybe_warn_cpp0x): New fn.
794 (maybe_varn_variadic_templates): Call it.
795 * cvt.c (ocp_convert): Handle conversion from { }.
796 * tree.c (build_array_of_n_type): New fn.
797 * typeck2.c (store_init_value): Use init_list_type_node.
798 (digest_init): Likewise.
799 (check_narrowing): New fn.
800 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
801 of vector of constructor elts. Handle non-aggregate types. Make
802 constant literals static.
803 * pt.c: (tsubst_copy_and_build): Adjust.
805 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
807 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
809 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
810 (comp_ptr_ttypes_const): Likewise.
812 2008-07-01 Andrew Haley <aph@redhat.com>
814 * decl.c (finish_constructor_body): Don't set the return value of
815 the constructor if the constructor is that of a Java type.
817 2008-06-30 Jakub Jelinek <jakub@redhat.com>
820 * decl2.c (is_late_template_attribute): If the first attribute
821 argument is IDENTIFIER_NODE, don't consider it when checking
822 if arguments are value or type dependent.
824 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
827 * pt.c (do_type_instantiation): In c++0x mode do not warn for
830 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
832 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
834 2008-06-28 Jakub Jelinek <jakub@redhat.com>
837 * repo.c (repo_emit_p): Put const static data members initialized
838 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
841 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
844 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
847 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
850 * typeck.c (cp_build_function_call): Show example syntax in
853 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
855 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
856 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
857 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
858 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
859 pedwarn to permerror.
860 * init.c (perform_member_init, build_new_1, build_new): Likewise.
861 * decl.c (warn_extern_redeclared_static, duplicate_decls,
862 * identify_goto, check_previous_goto_1, check_goto, define_label,
863 check_tag_decl, start_decl, check_class_member_definition_namespace,
864 grokfndecl, grokdeclarator): Likewise.
865 * except.c (check_handlers): Likewise.
866 * typeck2.c (digest_init): Likewise.
867 * pt.c (check_specialization_namespace,
868 check_explicit_instantiation_namespace,
869 maybe_process_partial_specialization, check_explicit_specialization,
870 convert_template_argument, do_decl_instantiation,
871 do_type_instantiation, instantiate_decl): Likewise.
872 * semantics.c (finish_template_type_parm): Likewise.
873 * name-lookup.c (pushdecl_maybe_friend,
874 check_for_out_of_scope_variable): Likewise.
875 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
876 coerce_new_type): Likewise.
877 * parser.c (cp_parser_nested_name_specifier_opt,
878 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
879 cp_parser_class_head, cp_parser_check_class_key): Likewise.
880 (cp_parser_parameter_declaration): Check flag_permissive instead of
881 flag_pedantic_errors.
882 * call.c (joust): Change pedwarn to warning.
883 * friend.c (make_friend_class): Likewise.
885 2008-06-16 Jan Hubicka <jh@suse.cz>
887 * method.c: Include cgraph.h.
888 (use_thunk): Use cgraph_add_new_function instead of calling backend
891 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
893 * parser.c: Fix comment typo.
895 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
898 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
899 grokdeclarator and apply it to the created declaration.
900 * cp-tree.h (grokbitfield): Update prototype.
901 * parser.c (cp_parser_member_declaration): Don't apply the attributes
902 since they are now applied in grokbitfield. Adjusted the call to
904 (cp_parser_objc_class_ivars): Likewise.
906 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
909 * class.c (type_requires_array_cookie): Do not consider delete[]
910 operators with an ellipsis as second argument.
912 2008-06-09 Jakub Jelinek <jakub@redhat.com>
915 * semantics.c (stmt_expr_value_expr): Don't crash on empty
918 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
921 * pt.c (maybe_process_partial_specialization): Check the tree
922 returned by push_template_decl for error_mark_node.
923 * parser.c (cp_parser_class_head): Likewise, check the tree
924 returned by the latter.
926 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
929 * decl.c (grokdeclarator): In case of wrong return type return
930 immediately error_mark_node.
932 2008-06-06 Jakub Jelinek <jakub@redhat.com>
934 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
935 dependent_omp_for_p, begin_omp_task, finish_omp_task,
936 finish_omp_taskwait): New prototypes.
937 (cxx_omp_clause_default_ctor): Add outer argument.
938 (finish_omp_for): Add new clauses argument.
939 * cp-gimplify.c (cxx_omp_finish_clause): New function.
940 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
941 (cxx_omp_clause_default_ctor): Add outer argument.
942 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
943 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
944 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
945 Add par_clauses argument. If decl is present in parallel's
946 lastprivate clause, change that clause to shared and add
947 a lastprivate clause for decl to OMP_FOR_CLAUSES.
948 Fix wording of error messages. Adjust finish_omp_for caller.
949 Add clauses argument. Parse loops with random access iterators.
950 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
952 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
953 cp_parser_omp_for_loop callers.
954 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
956 (cp_parser_omp_clause_name): Handle collapse and untied
958 (cp_parser_omp_clause_schedule): Handle auto schedule.
959 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
960 and PRAGMA_OMP_CLAUSE_UNTIED.
961 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
962 (OMP_TASK_CLAUSE_MASK): Define.
963 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
964 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
965 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
967 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
968 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
969 (tsubst_omp_for_iterator): New function.
970 (dependent_omp_for_p): New function.
971 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
972 loops. Adjust finish_omp_for caller. Handle loops with random
973 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
974 (tsubst_expr): Handle OMP_TASK.
975 * semantics.c (cxx_omp_create_clause_info): New function.
976 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
978 (cxx_omp_predetermined_sharing): Removed.
979 * semantics.c (finish_omp_for): Allow pointer iterators. Use
980 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
981 collapsed for loops. Adjust c_finish_omp_for caller. Add new
982 clauses argument. Fix check for type dependent cond or incr.
983 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
984 fold_convert to convert incr amount to difference_type. Only
985 fold if not in template. If decl is mentioned in lastprivate
986 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
987 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
989 (finish_omp_threadprivate): Allow static class members of the
991 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
992 finish_omp_taskwait): New functions.
994 * parser.c (cp_parser_binary_expression): Add prec argument.
995 (cp_parser_assignment_expression): Adjust caller.
996 * cp-tree.h (outer_curly_brace_block): New prototype.
997 * decl.c (outer_curly_brace_block): No longer static.
999 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1002 * pt.c (push_template_decl_real): Consistently return error_mark_node
1005 2008-06-02 Tomas Bily <tbily@suse.cz>
1007 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
1008 (cp_build_unary_op): Likewise.
1009 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
1010 (maybe_warn_about_returning_address_of_local): Likewise.
1012 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
1015 * pt.c (tsubst_initializer_list): Consistently check the tree
1016 returned by tsubst_pack_expansion for error_mark_node.
1018 2008-05-27 Michael Matz <matz@suse.de>
1021 * call.c (build_new_op): Make warning conditional on
1024 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
1027 * call.c (convert_like_real): Convert bitfield to desired type
1028 before creating temporary.
1030 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1032 * Makefile.in: Adjusted dependencies on c-incpath.o.
1034 2008-05-23 Jakub Jelinek <jakub@redhat.com>
1037 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
1038 fold_build_cleanup_point_expr on build_call_a results.
1041 * semantics.c (omp_clause_info_fndecl): New function.
1042 (finish_omp_clauses): Use it.
1044 2008-05-21 Jakub Jelinek <jakub@redhat.com>
1047 * cp-tree.h (check_array_initializer): New prototype.
1048 * decl.c (check_array_initializer): New function.
1049 (check_initializer): Call it.
1050 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
1052 2008-05-21 Tom Tromey <tromey@redhat.com>
1054 * mangle.c (save_partially_mangled_name): Remove.
1055 (restore_partially_mangled_name): Likewise.
1056 (write_encoding): Update.
1057 (write_unqualified_name): Likewise.
1058 (start_mangling): Always use name_obstack. Remove 'ident_p'
1060 (get_identifier_nocopy): Remove.
1061 (finish_mangling_internal): Rename from finish_mangling.
1062 (finish_mangling): New function.
1063 (finish_mangling_get_identifier): Likewise.
1064 (partially_mangled_name, partially_mangled_name_len): Remove.
1065 (mangle_decl_string): Change return type. Update.
1066 (mangle_decl, mangle_type_string, mangle_special_for_type,
1067 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
1068 mangle_ref_init_variable): Update.
1070 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1073 * semantics.c (begin_class_definition): Extend checks on the first
1076 2008-05-12 Tomas Bily <tbily@suse.cz>
1078 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
1079 * call.c (build_over_call): Likewise.
1080 * error.c (dump_expr): Use CASE_CONVERT.
1081 * class.c (fixed_type_or_null): Likewise.
1083 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
1085 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
1087 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
1090 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1092 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
1093 DECL_LOOPING_CONST_OR_PURE_P attributes.
1094 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
1097 2008-05-02 Simon Baldwin <simonb@google.com>
1100 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
1102 2008-05-01 Simon Baldwin <simonb@google.com>
1104 * typeck.c (build_array_ref): Call warn_array_subscript_range.
1106 2008-04-30 Jakub Jelinek <jakub@redhat.com>
1109 * pt.c (more_specialized_fn): Stop the loop even if there are no
1110 arguments before ellipsis.
1112 2008-04-29 Jakub Jelinek <jakub@redhat.com>
1115 * parser.c (cp_parser_lookup_name): Look through single function
1119 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
1120 COMPOUND_EXPR if the second argument would be error_mark_node.
1122 2008-04-28 Jason Merrill <jason@redhat.com>
1123 Liu Guanwei <liu_gw@163.com>
1126 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
1127 in default arguments.
1129 2008-04-25 Jan Hubicka <jh@suse.cz>
1131 * typeck.c (check_return_expr): Update.
1132 * decl.c (start_preparsed_function): Update.
1133 * method.c (use_thunk): Update.
1135 2008-04-24 Jakub Jelinek <jakub@redhat.com>
1138 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
1139 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
1140 * decl2.c (is_late_template_attribute): Only make vector_size
1141 late tmpl attribute if argument is type or value dependent.
1142 (cp_reconstruct_complex_type): New function.
1144 2008-04-24 Richard Guenther <rguenther@suse.de>
1146 * typeck.c (cp_build_function_call): Call
1147 check_builtin_function_arguments.
1149 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1151 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
1152 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
1153 * init.c (build_zero_init): Don't set TREE_INVARIANT.
1154 * class.c (build_base_path): Don't set TREE_INVARIANT.
1155 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
1156 (build_vtbl_initializer): Don't set TREE_INVARIANT.
1157 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
1158 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
1159 (generic_initializer): Don't set TREE_INVARIANT.
1160 (ptr_initializer): Don't set TREE_INVARIANT.
1161 (ptm_initializer): Don't set TREE_INVARIANT.
1162 (class_initializer): Don't set TREE_INVARIANT.
1163 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
1164 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
1165 (build_template_parm_index): Don't set TREE_INVARIANT.
1166 (reduce_template_parm_level): Don't set TREE_INVARIANT.
1167 (process_template_parm): Don't set TREE_INVARIANT.
1169 2008-04-22 Jason Merrill <jason@redhat.com>
1172 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
1173 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
1174 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
1176 2008-04-22 Jakub Jelinek <jakub@redhat.com>
1179 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
1180 expression is errorneous.
1182 2008-04-21 Jason Merrill <jason@redhat.com>
1185 * tree.c (cp_tree_equal): Handle FIXED_CST.
1188 * pt.c (template_template_parm_bindings_ok_p): Set
1189 processing_template_decl while in this function.
1191 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
1193 * cvt.c (type_promotes_to): Support char16_t and char32_t.
1194 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
1195 char16_t and char32_t.
1196 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
1197 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
1198 extended builtin type "u8char{16,32}_t".
1199 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
1201 (cp_lexer_print_token): Support CPP_STRING{16,32}.
1202 (cp_parser_is_string_literal): Idem.
1203 (cp_parser_string_literal): Idem.
1204 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
1206 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
1207 * tree.c (char_type_p): Support char16_t and char32_t as char types.
1208 * typeck.c (string_conv_p): Support char16_t and char32_t.
1210 2008-04-17 Jason Merrill <jason@redhat.com>
1213 * call.c (build_user_type_conversion_1): Represent second step of
1214 copy-init with an rvalue conversion.
1215 (convert_like_real) [ck_user]: Don't implicitly add it here.
1217 2008-04-15 Jakub Jelinek <jakub@redhat.com>
1220 * decl.c (layout_var_decl): If extern or static var has variable
1221 size, set TREE_TYPE (decl) to error_mark_node.
1223 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
1226 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
1229 2008-04-09 Jason Merrill <jason@redhat.com>
1232 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
1233 not a pushed variable.
1235 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
1237 * call.c (build_op_delete_call): Fix quotation in warning message.
1238 * decl.c (grokdeclarator): Quote keyword in error message.
1239 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
1242 * parser.c (cp_parser_check_type_definition): Print error string
1243 directly rather than using "%s".
1244 (cp_parser_postfix_expression): Fix quotation.
1245 (cp_parser_decltype): Likewise.
1246 (cp_parser_sizeof_operand): Fix quotation. Simplify.
1248 * parser.c (cp_parser_non_integral_constant_expression): Build error
1249 message with CONCAT rather than using "%s".
1250 (cp_parser_primary_expression): Fix quotation.
1251 (cp_parser_postfix_expression): Likewise.
1252 (cp_parser_postfix_dot_deref_expression): Likewise.
1253 (cp_parser_unary_expression): Likewise.
1254 (cp_parser_new_expression): Likewise.
1255 (cp_parser_delete_expression): Likewise.
1257 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
1258 as `)', not as `('. Fix quotation.
1259 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
1260 (cp_parser_primary_expression): Likewise.
1261 (cp_parser_nested_name_specifier_opt): Likewise.
1262 (cp_parser_postfix_expression): Likewise.
1263 (cp_parser_postfix_open_square_expression): Likewise.
1264 (cp_parser_parenthesized_expression_list): Likewise.
1265 (cp_parser_pseudo_destructor_name): Likewise.
1266 (cp_parser_new_expression): Likewise.
1267 (cp_parser_direct_new_declarator): Likewise.
1268 (cp_parser_delete_expression): Likewise.
1269 (cp_parser_cast_expression): Likewise.
1270 (cp_parser_question_colon_clause): Likewise.
1271 (cp_parser_builtin_offsetof): Likewise.
1272 (cp_parser_trait_expr): Likewise.
1273 (cp_parser_label_for_labeled_statement): Likewise.
1274 (cp_parser_compound_statement): Likewise.
1275 (cp_parser_selection_statement): Likewise.
1276 (cp_parser_condition): Likewise.
1277 (cp_parser_iteration_statement): Likewise.
1278 (cp_parser_already_scoped_statement): Likewise.
1279 (cp_parser_simple_declaration): Likewise.
1280 (cp_parser_linkage_specification): Likewise.
1281 (cp_parser_static_assert): Likewise.
1282 (cp_parser_decltype): Likewise.
1283 (cp_parser_conversion_function_id): Likewise.
1284 (cp_parser_operator_function_id): Likewise.
1285 (cp_parser_operator): Likewise.
1286 (cp_parser_type_parameter): Likewise.
1287 (cp_parser_template_id): Likewise.
1288 (cp_parser_explicit_instantiation): Likewise.
1289 (cp_parser_explicit_specialization): Likewise.
1290 (cp_parser_enum_specifier): Likewise.
1291 (cp_parser_namespace_definition): Likewise.
1292 (cp_parser_namespace_alias_definition): Likewise.
1293 (cp_parser_using_declaration): Likewise.
1294 (cp_parser_using_directive): Likewise.
1295 (cp_parser_asm_definition): Likewise.
1296 (cp_parser_direct_declarator): Likewise.
1297 (cp_parser_ptr_operator): Likewise.
1298 (cp_parser_parameter_declaration_clause): Likewise.
1299 (cp_parser_initializer_clause): Likewise.
1300 (cp_parser_class_specifier): Likewise.
1301 (cp_parser_member_specification_opt): Likewise.
1302 (cp_parser_member_declaration): Likewise.
1303 (cp_parser_pure_specifier): Likewise.
1304 (cp_parser_constant_initializer): Likewise.
1305 (cp_parser_base_clause): Likewise.
1306 (cp_parser_exception_specification_opt): Likewise.
1307 (cp_parser_try_block): Likewise.
1308 (cp_parser_function_try_block): Likewise.
1309 (cp_parser_handler): Likewise.
1310 (cp_parser_throw_expression): Likewise.
1311 (cp_parser_asm_operand_list): Likewise.
1312 (cp_parser_attributes_opt): Likewise.
1313 (cp_parser_label_declaration): Likewise.
1314 (cp_parser_constructor_declarator_p): Likewise.
1315 (cp_parser_template_declaration_after_export): Likewise.
1316 (cp_parser_single_declaration): Likewise.
1317 (cp_parser_objc_message_expression): Likewise.
1318 (cp_parser_objc_message_args): Likewise.
1319 (cp_parser_objc_encode_expression): Likewise.
1320 (cp_parser_objc_defs_expression): Likewise.
1321 (cp_parser_objc_protocol_expression): Likewise.
1322 (cp_parser_objc_selector_expression): Likewise.
1323 (cp_parser_objc_protocol_refs_opt): Likewise.
1324 (cp_parser_objc_typename): Likewise.
1325 (cp_parser_objc_method_keyword_params): Likewise.
1326 (cp_parser_objc_superclass_or_category): Likewise.
1327 (cp_parser_objc_try_catch_finally_statement): Likewise.
1328 (cp_parser_objc_synchronized_statement): Likewise.
1329 (cp_parser_objc_throw_statement): Likewise.
1330 (cp_parser_omp_var_list_no_open): Likewise.
1331 (cp_parser_omp_clause_default): Likewise.
1332 (cp_parser_omp_clause_if): Likewise.
1333 (cp_parser_omp_clause_num_threads): Likewise.
1334 (cp_parser_omp_clause_reduction): Likewise.
1335 (cp_parser_omp_clause_schedule): Likewise.
1336 (cp_parser_omp_critical): Likewise.
1337 (cp_parser_omp_for_loop): Likewise.
1338 (cp_parser_omp_sections_scope): Likewise.
1340 * parser.c (cp_parser_template_parameter_list): Simplify.
1342 2008-04-07 James E. Wilson <wilson@tuliptree.org>
1344 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
1346 2008-04-07 Jason Merrill <jason@redhat.com>
1349 * class.c (type_has_user_nondefault_constructor): A template
1350 counts as a nondefault constructor.
1352 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
1354 * decl.c (cxx_push_function_context): Delete.
1355 (cxx_pop_function_context): Delete.
1356 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
1358 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
1359 LANG_HOOKS_FUNCTION_FINAL): Delete.
1360 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
1361 LANG_HOOKS_MISSING_NORETURN_OK_P.
1362 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
1364 * semantics.c (current_stmt_tree): Fix comment.
1366 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1369 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
1370 before calling fold_offsetof.
1372 2008-04-03 Tom Tromey <tromey@redhat.com>
1374 * Make-lang.in (c++_OBJS): New variable.
1376 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1378 * optimize.c (clone_body): New, from tree-inline.c.
1380 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1382 * method.c (synthesize_method): Use {push,pop}_function_context.
1383 * name-lookup.c (push_to_top_level): Likewise.
1384 * parser.c (cp_parser_late_parsing_for_member): Likewise.
1386 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
1389 * parser.c (cp_parser_decl_specifier_seq): Add location to error
1392 2008-03-27 Tom Tromey <tromey@redhat.com>
1394 * Make-lang.in: Revert automatic dependency patch.
1396 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1399 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
1400 (build_compound_expr): New, for compatibility with C
1401 build_compound_expr.
1402 (cp_build_compound_expr): Renamed from build_compound_expr.
1403 (build_c_cast): New, for compatibility with C build_c_cast.
1404 (cp_build_c_cast): Renamed from build_c_cast.
1405 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
1406 * decl.c (cxx_maybe_build_cleanup): Ditto.
1407 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
1408 (cp_build_compound_expr): Renamed from build_compound_expr.
1409 (build_c_cast): Add C-compatible prototype.
1410 (cp_build_c_cast): Renamed from build_c_cast.
1411 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
1412 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
1414 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1416 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
1417 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
1418 ending in a pack expansion, both of which can occur when
1419 substituting into a nested template.
1420 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
1421 instantiating the sizeof...(X) form, make tsubst_copy do the work.
1422 * parser.c (cp_parser_template_parameter): Deal with unnamed
1423 non-type template parameter packs identified by pack expansions in
1426 2008-03-26 Jakub Jelinek <jakub@redhat.com>
1429 * pt.c (apply_late_template_attributes): Don't call tsubst on
1430 first attribute argument if it is IDENTIFIER_NODE.
1433 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
1434 and LTGT_EXPR to pp_expression.
1436 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
1438 * pt.c (coerce_template_template_parm): Moved the body of the loop
1439 of coerce_template_template_parms here, to make iteration over a
1440 template argument pack simpler.
1441 Also, allow matching of a template parameter pack in the template
1442 template parameter to a template parameter in the template
1444 (coerce_template_template_parms): Deal with variadic template
1445 template parameters. Use coerce_template_template_parm.
1446 (unify): Make sure we coerce the template template argument's
1447 template arguments to the template template parameter's template
1448 parameters, not the other way around.
1450 2008-03-25 Tom Tromey <tromey@redhat.com>
1452 * Make-lang.in: Remove .o targets.
1453 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
1455 (c++_OBJS): New variable.
1456 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
1458 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
1460 * typeck.c (composite_pointer_type_r): Add SFINAE support.
1461 (composite_pointer_type): Ditto.
1462 (common_type): Fix call to composite_pointer_type.
1463 (cxx_sizeof_nowarn): New; used to be a macro.
1464 (cxx_sizeof_expr): Add SFINAE support.
1465 (cxx_alignof_expr): Ditto.
1466 (decay_conversion): Fix calls for SFINAE support.
1467 (rationalize_conditional_expr): Add SFINAE support.
1468 (build_class_member_access_expr): Ditto.
1469 (finish_class_member_access_expr): Ditto.
1470 (build_x_indirect_ref): Ditto.
1471 (build_indirect_ref): Original version renamed to
1472 cp_build_indirect_ref; new version provides a bridge from
1474 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
1476 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
1477 (build_function_call): Original version renamed to
1478 cp_build_function_call; new version provides a bridge from
1480 (cp_build_function_call): Was build_function_call; added SFINAE
1482 (convert_arguments): Add SFINAE support.
1483 (build_x_binary_op): Ditto.
1484 (build_binary_op): Original version renamed to cp_build_binary_op;
1485 new version provides a bridge from c-common.
1486 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
1487 (pointer_diff): Fix calls for SFINAE.
1488 (build_x_unary_op): Add SFINAE support.
1489 (condition_conversion): Fix calls for SFINAE.
1490 (build_unary_op): Original version renamed to cp_build_unary_op;
1491 new version provides a bridge from c-common.
1492 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
1493 (unary_complex_lvalue): Fix calls for SFINAE.
1494 (build_x_conditional_expr): Add SFINAE support.
1495 (build_x_compound_expr_from_list): Fix calls for SFINAE.
1496 (build_x_compound_expr): Add SFINAE support.
1497 (convert_ptrmem): Fix calls for SFINAE.
1498 (build_static_cast_1): Add SFINAE support.
1499 (build_static_cast): Ditto.
1500 (build_reinterpret_cast_1): Ditto.
1501 (build_reinterpret_cast): Ditto.
1502 (build_const_cast_1): Ditto.
1503 (build_const_cast): Ditto.
1504 (build_c_cast): Ditto.
1505 (build_modify_expr): Original version renamed to
1506 cp_build_modify_expr; new version provides a bridge from c-common.
1507 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
1509 (build_x_modify_expr): Add SFINAE support.
1510 (build_ptrmemfunc): Fix calls for SFINAE.
1511 (convert_for_assignment): Add SFINAE support.
1512 (convert_for_initialization): Ditto.
1513 (check_return_expr): Fix calls for SFINAE.
1514 (lvalue_or_else): Add SFINAE support.
1515 * init.c (perform_member_init): Fix calls for SFINAE.
1516 (emit_mem_initializers): Ditto.
1517 (expand_virtual_init): Ditto.
1518 (expand_cleanup_for_base): Ditto.
1519 (build_aggr_init): Add SFINAE support.
1520 (expand_default_init): Ditto.
1521 (expand_aggr_init_1): Fix calls for SFINAE.
1522 (build_offset_ref): Ditto.
1523 (build_new_1): Add SFINAE support.
1525 (build_vec_delete_1): Fix calls for SFINAE.
1526 (get_temp_regvar): Ditto.
1527 (build_vec_init): Add SFINAE support.
1528 (build_dtor_call): Fix calls for SFINAE.
1529 (build_delete): Ditto.
1530 (push_base_cleanups): Ditto.
1531 (build_vec_delete_1): Ditto.
1532 * class.c (build_base_path): Fix calls for SFINAE.
1533 (build_simple_base_path): Ditto.
1534 (convert_to_base_statically): Ditto.
1535 (build_vfn_ref): Ditto.
1536 (resolve_address_of_overloaded_function): Ditto.
1537 * decl.c (check_initializer): Fix calls for SFINAE.
1538 (register_dtor_fn): Ditto.
1539 (compute_array_index_type): Ditto.
1540 (finish_enum): Ditto.
1541 (start_preparsed_function): Ditto.
1542 (cxx_maybe_build_cleanup): Ditto.
1543 * call.c (convert_like): Add COMPLAIN argument.
1544 (convert_like_with_context): Ditto.
1545 (build_this): Fix calls for SFINAE.
1546 (build_user_type_conversion): Ditto.
1547 (resolve_args): Ditto.
1548 (build_new_function_call): Add SFINAE support.
1549 (build_operator_new_call): Fix calls for SFINAE.
1550 (build_object_call): Add SFINAE support.
1551 (build_conditional_expr): Ditto.
1552 (build_new_op): Ditto.
1553 (build_op_delete_call): Fix calls for SFINAE.
1554 (build_temp): Ditto.
1555 (convert_like_real): Add SFINAE support.
1556 (build_x_va_arg): Fix calls for SFINAE.
1557 (convert_default_arg): Ditto.
1558 (build_over_call): Add SFINAE support.
1559 (build_java_interface_fn_ref): Fix calls for SFINAE.
1560 (build_special_member_call): Add SFINAE support.
1561 (build_new_method_call): Ditto.
1562 (perform_implicit_conversion): Ditto.
1563 (perform_direct_initialization_if_possible): Ditto.
1564 (initialize_reference): Fix calls for SFINAE.
1565 * method.c (do_build_assign_ref): Fix calls for SFINAE.
1566 * rtti.c (build_headof): Fix calls for SFINAE.
1567 (get_tinfo_decl_dynamic): Ditto.
1568 (get_typeid): Ditto.
1569 (build_dynamic_cast_1): Add SFINAE support.
1570 (build_dynamic_cast): Ditto.
1571 (tinfo_base_init): Fix calls for SFINAE.
1572 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
1573 (do_end_catch): Ditto.
1574 (initialize_handler_parm): Ditto.
1575 (expand_start_catch_block): Ditto.
1576 (do_allocate_exception): Ditto.
1577 (do_free_exception): Ditto.
1578 (build_throw): Ditto.
1579 * cvt.c (build_up_reference): Fix calls for SFINAE.
1580 (convert_to_reference): Ditto.
1581 (ocp_convert): Ditto.
1582 (convert_to_void): Add SFINAE support.
1583 * tree.c (build_dummy_object): Fix calls for SFINAE.
1584 (stabilize_expr): Ditto.
1585 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
1587 (build_new_method_call): Ditto.
1588 (build_special_member_call): Ditto.
1589 (build_new_op): Ditto.
1590 (perform_implicit_conversion): Ditto.
1591 (perform_direct_initialization_if_possible): Ditto.
1592 (convert_to_void): Ditto.
1593 (build_aggr_init): Ditto.
1595 (build_vec_init): Ditto.
1596 (build_dynamic_cast): Ditto.
1597 (finish_call_expr): Ditto
1598 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
1599 (cxx_sizeof_nowarn): Remove macro; add function declaration.
1600 (build_class_member_access_expr): Add tsubst_flags_t parameter.
1601 (finish_class_member_access_expr): Ditto.
1602 (build_x_indirect_ref): Ditto.
1603 (cp_build_indirect_ref): New.
1604 (cp_build_function_call): Add tsubst_flags_t parameter.
1605 (build_x_unary_op): Ditto.
1606 (cp_build_unary_op): New.
1607 (build_x_conditional_expr): Add tsubst_flags_t parameter.
1608 (build_x_compound_expr): Ditto.
1609 (build_compound_expr): Ditto.
1610 (build_static_cast): Ditto.
1611 (build_reinterpret_cast): Ditto.
1612 (build_const_cast): Ditto.
1613 (build_c_cast): Ditto.
1614 (build_x_modify_expr): Ditto.
1615 (cp_build_modify_expr): New.
1616 (convert_for_initialization): Add tsubst_flags_t parameter.
1617 (cp_build_binary_op): Remove macro; add function declaration.
1618 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
1619 (lvalue_or_else): Ditto.
1620 (build_functional_cast): Ditto.
1621 * typeck2.c (digest_init): Fix calls for SFINAE.
1622 (process_init_constructor_array): Ditto.
1623 (process_init_constructor_record): Ditto.
1624 (build_x_arrow): Ditto.
1625 (build_m_component_ref): Ditto.
1626 (build_functional_cast): Add SFINAE support.
1627 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
1628 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
1629 (finish_expr_stmt): Ditto.
1630 (finish_for_expr): Ditto.
1631 (finish_asm_stmt): Ditto.
1632 (finish_non_static_data_member): Ditto.
1633 (finish_qualified_id_expr): Ditto.
1634 (finish_call_expr): Add SFINAE support.
1635 (finish_increment_expr): Fix calls for SFINAE.
1636 (finish_unary_op_expr): Ditto.
1637 (simplify_aggr_init_expr): Ditto.
1638 (finish_omp_clauses): Ditto.
1639 (finish_omp_for): Ditto.
1640 (finish_omp_barrier): Ditto.
1641 (finish_omo_flush): Ditto.
1642 * decl2.c (grok_array_decl): Fix calls or SFINAE.
1643 (build_anon_union_vars): Ditto.
1644 (get_guard_cond): Ditto.
1646 (one_static_initialization_or_destruction): Ditto.
1647 (do_static_initialization_or_destruction): Ditto.
1648 (generate_ctor_or_dtor_function): Ditto.
1649 (build_offset_ref_call_from_tree): Ditto.
1650 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
1651 (cp_parser_postfix_dot_deref_expression): Ditto.
1652 (cp_parser_unary_expression): Ditto.
1653 (cp_parser_new_expression): Ditto.
1654 (cp_parser_cast_expression): Ditto.
1655 (cp_parser_binary_expression): Ditto.
1656 (cp_parser_question_colon_clause): Ditto.
1657 (cp_parser_assignment_expression): Ditto.
1658 (cp_parser_expression): Ditto.
1659 (cp_parser_builtin_offsetof): Ditto.
1660 (cp_parser_template_argument): Ditto.
1661 (cp_parser_functional_cast): Ditto.
1663 2008-03-24 Tom Tromey <tromey@redhat.com>
1665 * lex.c (handle_pragma_interface): Don't copy the filename.
1666 (handle_pragma_implementation): Copy filename using xstrdup.
1668 2008-03-21 Paolo Carlini <pcarlini@suse.de>
1670 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
1671 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
1672 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
1673 (PROMOTES_TO_AGGR_TYPE): Remove.
1674 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
1675 * typeck.c (unary_complex_lvalue, build_modify_expr,
1676 convert_for_initialization): Adjust.
1677 * init.c (is_aggr_type): Remove.
1678 (is_class_type): Add.
1679 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
1680 build_delete): Adjust.
1681 * lex.c (make_aggr_type): Remove.
1682 (make_class_type): Add.
1683 (cxx_make_type): Adjust.
1684 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
1686 * decl.c (build_typename_type, make_typename_type,
1687 make_unbound_class_template, cxx_init_decl_processing,
1688 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
1689 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
1690 grok_op_properties, xref_tag, check_function_type): Adjust.
1691 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
1692 add_builtin_candidate, add_builtin_candidates,
1693 build_user_type_conversion_1, convert_like_real, build_cxx_call,
1694 is_subseq, compare_ics): Adjust.
1695 * method.c (use_thunk): Adjust.
1696 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
1697 create_tinfo_types): Adjust.
1698 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1699 build_up_reference, convert_to_reference, convert_from_reference,
1700 ocp_convert, build_expr_type_conversion): Adjust.
1701 * tree.c (bind_template_template_parm, error_type): Adjust.
1702 * dump.c (cp_dump_tree): Adjust.
1703 * search.c (lookup_member): Adjust.
1704 * friend.c (make_friend_class, do_friend): Adjust.
1705 * typeck2.c (store_init_value, process_init_constructor_array,
1706 process_init_constructor_record, build_x_arrow, build_m_component_ref,
1707 build_functional_cast): Adjust.
1708 * pt.c (finish_member_template_decl, process_template_parm,
1709 lookup_template_class, tsubst_function_type, tsubst,
1710 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
1712 * semantics.c (begin_class_definition, finish_base_specifier,
1713 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
1715 * name-lookup.c (constructor_name_p, push_overloaded_decl,
1716 do_class_using_decl, lookup_qualified_name,
1717 maybe_process_template_type_declaration): Adjust.
1718 * decl2.c (grok_array_decl, check_member_template,
1719 constrain_class_visibility): Adjust.
1720 * parser.c (cp_parser_class_name): Adjust.
1722 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
1724 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
1726 2008-03-17 Jason Merrill <jason@redhat.com>
1729 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
1730 a temp directly to a reference as per DR391.
1732 2008-03-12 Richard Guenther <rguenther@suse.de>
1736 2008-02-04 Richard Guenther <rguenther@suse.de>
1739 * decl.c (record_builtin_java_type): Make jboolean a
1740 integer type again where its mode doesn't match that of bool.
1742 2008-01-25 Richard Guenther <rguenther@suse.de>
1745 * decl.c (record_builtin_java_type): Make __java_boolean
1747 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1748 after TYPE_MAIN_VARIANT check.
1750 2008-03-10 Jakub Jelinek <jakub@redhat.com>
1753 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
1757 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
1758 DECL_P in not a variable and appears more than once error messages.
1760 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
1764 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
1768 * typeck.c (structural_comptypes): Call cp_comptypes.
1769 (comptypes): New; called from the C/C++ common bits to perform
1771 (cp_comptypes): Renamed from comptypes, which is already used,
1772 with a different signature, by the C++ front end.
1773 (build_reinterpret_cast_1): Call cp_comptypes.
1774 (ptr_reasonably_similar): Ditto.
1775 * decl.c (decls_match): Ditto.
1776 * cvt.c (convert_to_reference): Ditto.
1777 * cp-tree.h (same_type_p): Ditto.
1778 (same_or_base_type_p): Ditto.
1779 (comptypes): Rename to cp_comptypes.
1780 * pt.c (canonical_type_parameter): Call cp_comptypes.
1782 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
1784 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
1785 test for equivalence between pointer and references.
1787 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1790 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
1791 (check_field_decls): Likewise.
1792 (note_name_declared_in_class): Likewise.
1793 * call.c (build_new_op): Likewise.
1794 (convert_like_real): Likewise.
1795 (build_over_call): Likewise.
1796 * lex.c (unqualified_fn_lookup_error): Likewise.
1797 * parser.c (cp_parser_template_id): Likewise.
1798 * cvt.c (warn_ref_binding): Likewise.
1799 (convert_to_reference): Likewise.
1800 (ocp_convert): Likewise.
1801 (convert_to_void): Use error instead of pedwarn.
1802 * error.c (cp_cpp_error): Use pedantic_warning_kind.
1803 * decl.c (compute_array_index_type): Use constant_expression_error.
1805 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
1807 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
1808 that auto is either a storage class or a simple type specifier,
1809 depending on the dialect.
1810 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
1811 specifier in C++98 mode, error in C++0x mode (since we don't
1812 support auto as a type specifier, yet).
1813 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
1814 storage specifier in C++0x mode.
1815 (cp_parser_simple_type_specifier): Parse `auto' as a
1816 simple-type-specifier, but error because we don't support it yet.
1818 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1820 * parser.c (cp_parser_nonclass_name): New.
1821 (cp_parser_pseudo_destructor_name): Use it instead of
1822 cp_parser_type_name.
1823 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
1825 2008-02-29 Tom Tromey <tromey@redhat.com>
1827 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
1828 (cp_lexer_get_preprocessor_token): Update.
1829 (cp_lexer_set_source_position_from_token): Don't call
1830 restore_input_file_stack.
1831 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
1833 2008-02-28 Richard Guenther <rguenther@suse.de>
1836 2008-02-26 Richard Guenther <rguenther@suse.de>
1838 * decl.c (duplicate_decls): Remove decl from global mapping
1839 before ggc_freeing it.
1841 2008-02-27 Jakub Jelinek <jakub@redhat.com>
1844 * rtti.c: Include c-pragma.h.
1845 (push_abi_namespace, pop_abi_namespace): New functions.
1846 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
1847 create_tinfo_types, emit_support_tinfos): Use them.
1848 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
1850 2008-02-26 Jason Merrill <jason@redhat.com>
1853 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
1854 to name the struct for linkage purposes even if it has attributes.
1855 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
1857 2008-02-26 Tom Tromey <tromey@redhat.com>
1859 * parser.c (eof_token): Remove old location code.
1860 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
1861 * decl2.c (generate_ctor_or_dtor_function): Remove old location
1863 (cp_write_global_declarations): Likewise.
1864 * lex.c (cxx_init): Remove old location code.
1865 (handle_pragma_implementation): Remove test of
1866 USE_MAPPED_LOCATION.
1867 * pt.c (tsubst): Remove old location code.
1868 * error.c (cp_print_error_function): Remove test of
1869 USE_MAPPED_LOCATION.
1870 * decl.c (pop_label): Remove old location code.
1871 (finish_function): Likewise.
1873 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1876 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
1878 2008-02-26 Richard Guenther <rguenther@suse.de>
1880 * decl.c (duplicate_decls): Remove decl from global mapping
1881 before ggc_freeing it.
1883 2008-02-26 Paolo Carlini <pcarlini@suse.de>
1886 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
1888 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1890 * typeck.c (build_class_member_access_expr): Add appropriate
1891 OPT_W* parameter to warning.
1892 (build_reinterpret_cast_1): Likewise.
1893 * name-lookup.c (push_overloaded_decl): Likewise.
1895 2008-02-25 Paolo Carlini <pcarlini@suse.de>
1898 * error.c (dump_expr): Handle CONJ_EXPR.
1900 2008-02-25 Paolo Carlini <pcarlini@suse.de>
1903 * error.c (dump_type): Handle FIXED_POINT_TYPE.
1904 (dump_expr): Handle FIXED_CST.
1906 2008-02-24 Jason Merrill <jason@redhat.com>
1908 * parser.c (cp_parser_declaration): Handle "inline namespace".
1909 (cp_parser_namespace_definition): Likewise.
1912 * name-lookup.c (arg_assoc_namespace): Look down into inline
1915 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1917 * typeck.c (check_for_casting_away_constness): Use 1 single
1918 argument, the type of cast, to decide what diagnostics generate.
1919 (build_static_cast_1): Remove unused code. Update call to
1920 check_for_casting_away_constness.
1921 (build_reinterpret_cast_1): Update call to
1922 check_for_casting_away_constness.
1923 (build_const_cast_1): Likewise.
1925 2008-02-24 Paolo Carlini <pcarlini@suse.de>
1927 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
1928 VEC_NEW_EXPR), forward to pp_expression.
1929 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
1931 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
1934 * friend.c (do_friend): Call cplus_decl_attributes earlier.
1936 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
1939 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
1940 template decls' function decl.
1942 2008-02-22 Paolo Carlini <pcarlini@suse.de>
1946 2008-02-14 Paolo Carlini <pcarlini@suse.de>
1949 * pt.c (determine_specialization): In case of function templates,
1950 when the type of DECL does not match FN there is no match.
1952 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1955 * typeck.c (build_binary_op): Warn about floating point
1956 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
1958 2008-02-19 Jason Merrill <jason@redhat.com>
1961 * pt.c (resolve_overloaded_unification): Set processing_template_decl
1962 while we look for possible bindings.
1964 2008-02-19 Jakub Jelinek <jakub@redhat.com>
1967 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
1971 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
1972 vars. Afterwards ensure v is VAR_DECL.
1975 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
1976 call cp_finish_decl.
1977 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
1980 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
1985 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
1986 is error_mark_node, return an error early.
1987 (find_parameter_packs_r): Pass the pointer set along to recursive
1988 calls of cp_walk_subtrees; don't try to manage the pointer set
1990 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
1991 (make_pack_expansion): Ditto.
1992 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
1993 a second pass through the tree with find_parameter_packs_r; that
1994 second pass no longer does anything.
1995 (push_template_decl_real): If we have an erroneous declaration,
1996 set its type to error_mark_node before returning an error.
1998 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
2001 * pt.c (tsubst_initializer_list): Deal with the use of
2002 VOID_TYPE_NODE to indicate value-initialization of the bases.
2004 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2005 Jason Merrill <jason@redhat.com>
2009 * class.c (type_has_user_nondefault_constructor): New fn.
2010 * cp-tree.h: Declare it.
2011 * init.c (emit_mem_initializers): Use it for -W warning about
2012 missing base initializer.
2014 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2017 * pt.c (determine_specialization): In case of function templates,
2018 when the type of DECL does not match FN there is no match.
2020 2008-02-13 Jakub Jelinek <jakub@redhat.com>
2021 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2024 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
2025 are not identifier :: ~, return before calling cp_parser_type_name.
2027 2008-02-13 Jason Merrill <jason@redhat.com>
2029 PR c++/34962, c++/34937, c++/34939
2030 * decl2.c (is_late_template_attribute): Always defer attributes
2031 vector_size and weak.
2034 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
2035 of enumerators, too.
2037 2008-02-12 Jason Merrill <jason@redhat.com>
2040 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
2041 if we're doing conversions to call a user-defined conversion function.
2043 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
2046 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
2049 2008-02-12 Jakub Jelinek <jakub@redhat.com>
2052 * init.c (build_new_1): Don't create placement_expr before
2053 constructing alloc_call. Verify that the pointer is passed by
2054 value to operator new.
2056 2008-02-11 Jason Merrill <jason@redhat.com>
2059 * pt.c (tsubst): Don't look up a template typedef in an explicit
2062 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
2065 * tree.c (cp_build_qualified_type_real): When building a
2066 cv-qualified array type, build it as a unique type with
2067 build_cplus_array_type_1 and then adopt the unqualified type's
2070 2008-02-11 Paolo Carlini <pcarlini@suse.de>
2073 * decl.c (groktypename): Check grokdeclarator return.
2075 2008-02-10 Jason Merrill <jason@redhat.com>
2078 * decl2.c (cp_write_global_declarations): Don't write out static
2079 data members with DECL_IN_AGGR_P set.
2081 2008-02-08 Jason Merrill <jason@redhat.com>
2084 * tree.c (build_target_expr_with_type): Handle void initializer.
2085 (bot_manip): Remap slot before recursing.
2087 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2090 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
2092 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
2095 * tree.c: Include tree-flow.h.
2096 (build_target_expr): Check type compatibility.
2097 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
2098 * call.c (convert_like_real): Convert bitfield to expected type.
2100 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2104 * typeck.c (structural_comptypes): Call cp_comptypes.
2105 (comptypes): New; called from the C/C++ common bits to perform
2107 (cp_comptypes): Renamed from comptypes, which is already used,
2108 with a different signature, by the C++ front end.
2109 (build_reinterpret_cast_1): Call cp_comptypes.
2110 (ptr_reasonably_similar): Ditto.
2111 * decl.c (decls_match): Ditto.
2112 * cvt.c (convert_to_reference): Ditto.
2113 * cp-tree.h (same_type_p): Ditto.
2114 (same_or_base_type_p): Ditto.
2115 (comptypes): Rename to cp_comptypes.
2116 * pt.c (canonical_type_parameter): Call cp_comptypes.
2118 2008-02-05 Jakub Jelinek <jakub@redhat.com>
2121 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
2122 value dependent expression.
2124 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
2127 * decl2.c (save_template_attributes): When we're modifying the
2128 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
2129 all of the other variants to add those same attributes. Otherwise,
2130 the main variant will be inconsistent with those other variants.
2132 2008-02-04 Richard Guenther <rguenther@suse.de>
2135 * decl.c (record_builtin_java_type): Make jboolean a
2136 integer type again where its mode doesn't match that of bool.
2138 2008-02-02 Jason Merrill <jason@redhat.com>
2139 Mark Mitchell <mark@codesourcery.com>
2142 * init.c (build_value_init_1): New function.
2143 (build_value_init): New function.
2144 * typeck2.c (build_functional_cast): Call it.
2145 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
2147 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
2148 TYPE_HAS_CONSTRUCTOR.
2149 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
2150 add_implicitly_declared_members): Adjust.
2151 (check_field_decls): Adjust. Remove warnings about reference/const
2152 in class without constructor.
2153 (check_bases_and_members): Adjust. Give those warnings here instead.
2154 * decl.c (fixup_anonymous_aggr): Adjust.
2155 (check_initializer): Adjust, clarify logic slightly.
2156 (grok_special_member_properties): Adjust, only set if user-provided.
2157 * rtti.c (create_tinfo_types): Don't set.
2158 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
2159 Use same_type_ignoring_top_level_qualifiers_p.
2160 * pt.c (check_explicit_specialization): Adjust.
2161 (instantiate_class_template): Adjust.
2163 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
2164 Jakub Jelinek <jakub@redhat.com>
2168 * typeck.c (structural_comptypes): Handle comparisons of
2169 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
2171 * mangle.c (write_builtin_type): Map down to the canonical type,
2172 which will be one of the predefined type nodes.
2174 2008-01-29 Michael Meissner <michael.meissner@amd.com>
2177 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
2178 bits to allow for expansion of the number of middle end tree
2181 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
2192 * typeck.c (check_return_expr): Tweak call to
2193 check_for_bare_parameter_packs.
2194 * class.c (add_method): Be careful with error_mark_nodes.
2195 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
2197 * pt.c (struct find_parameter_pack_data): Remove
2199 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
2200 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
2201 (make_pack_expansion): Ditto.
2202 (check_for_bare_parameter_packs): Parameter is now a tree, not a
2204 (process_template_parm): Tweak call to
2205 check_for_bare_parameter_packs.
2206 (push_template_decl_real): Tweak calls to
2207 check_for_bare_parameter_packs. If bare parameter packs are found
2208 in the list of exceptions, clear out that list after giving an
2210 * semantics.c (finish_cond): Tweak call to
2211 check_for_bare_parameter_packs.
2212 (finish_expr_stmt): Ditto.
2213 (finish_for_expr): Ditto.
2214 (finish_switch_cond): Ditto.
2215 (finish_mem_initializers): Ditto.
2216 (finish_member_declaration): Ditto.
2217 (finish_static_assert): Check for bare parameter packs in the
2219 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
2220 attributes of a declaration.
2221 * parser.c (cp_parser_using_declaration): Tweak call to
2222 check_for_bare_parameter_packs.
2223 (cp_parser_base_clause): Ditto.
2225 2008-01-28 Jason Merrill <jason@redhat.com>
2228 * class.c (build_base_path): Fix !want_pointer case.
2230 2008-01-27 Jason Merrill <jason@redhat.com>
2233 * class.c (build_base_path): Fix previous change.
2235 2008-01-26 Jakub Jelinek <jakub@redhat.com>
2238 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
2241 2008-01-26 Richard Guenther <rguenther@suse.de>
2244 * typeck.c (build_binary_op): Remove code to shorten compares.
2246 2008-01-25 Richard Guenther <rguenther@suse.de>
2249 * decl.c (record_builtin_java_type): Make __java_boolean
2251 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2252 after TYPE_MAIN_VARIANT check.
2254 2008-01-25 Jason Merrill <jason@redhat.com>
2257 * class.c (build_base_path): Don't mess with virtual access if
2259 * call.c (standard_conversion): Don't check whether source type
2262 * decl2.c (is_late_template_attribute): Don't defer attribute
2263 visibility just because the type is dependent.
2265 2008-01-25 Jason Merrill <jason@redhat.com>
2266 Mark Mitchell <mark@codesourcery.com>
2269 * call.c (standard_conversion): Allow conversion from integer/real
2271 (compare_ics): Such a conversion is worse than a normal arithmetic
2274 2008-01-25 Richard Guenther <rguenther@suse.de>
2277 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
2280 2008-01-24 Paolo Carlini <pcarlini@suse.de>
2283 * pt.c (push_template_decl_real): Return error_mark_node in case
2284 of template definition of non-template.
2286 2008-01-24 Jason Merrill <jason@redhat.com>
2289 * decl2.c (is_late_template_attribute): Defer any attribute with
2290 dependent args. Also defer type attributes if the type is dependent.
2292 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2293 Alexandre Oliva <aoliva@redhat.com>
2296 * call.c (reference_binding): For bitfields use the declared bitfield
2298 (add_builtin_candidates): Likewise.
2299 * class.c (layout_class_type): For bitfields copy over the
2300 original type quals.
2302 2008-01-22 Jason Merrill <jason@redhat.com>
2305 * decl.c (groktypename): Also ignore attributes on dependent
2306 possibly-class types.
2309 * friend.c (do_friend): Check for prior declaration of a friend
2310 function of a local class.
2311 * name-lookup.c (lookup_name_innermost_nonclass_level):
2313 * name-lookup.h: Declare it.
2315 2008-01-22 Tom Tromey <tromey@redhat.com>
2318 * init.c (build_new_1): Only disallow Java aggregates.
2320 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2323 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
2324 if decl or init is error_mark_node.
2327 * error.c (dump_expr): Handle VECTOR_CST.
2329 2008-01-21 Jason Merrill <jason@redhat.com>
2332 * pt.c (tsubst_aggr_type): Make sure our context is complete.
2335 * pt.c (retrieve_local_specialization): Robustify.
2336 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
2339 * pt.c (tsubst): Only call retrieve_local_specialization if the
2340 original typedef was in a function template.
2343 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
2345 2008-01-21 Richard Guenther <rguenther@suse.de>
2348 * error.c (cp_print_error_function): Deal with recursive
2351 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2354 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
2356 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2360 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
2361 on non-IS_AGGR_TYPE scope.
2362 (constructor_name_p): Assert IS_AGGR_TYPE.
2364 2008-01-18 Ian Lance Taylor <iant@google.com>
2367 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
2368 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
2369 DECL_IS_OPERATOR_NEW flag.
2371 2008-01-16 Richard Guenther <rguenther@suse.de>
2374 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
2375 for conversions to type variants.
2377 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
2379 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
2380 declaration and code. Update copyright year.
2382 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2385 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
2386 know we have a class type.
2388 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2391 * pt.c (coerce_template_parameter_pack): When substituting into
2392 the type of a non-type template parameter pack. use the
2393 deduced/substituted arguments.
2394 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
2395 can be a parameter pack with the ellipsis following it. When we
2396 have an erroneous declaration, allow it to be a parameter pack.
2397 (cp_parser_template_parameter): Complain about default
2398 arguments on non-type template parameter packs, and parse them
2399 using the new cp_parser_default_argument.
2400 (cp_parser_parameter_declaration): Complain about parameter packs
2401 with default arguments. Move parsing of default arguments into a
2402 new function, cp_parser_default_argument.
2403 (cp_parser_default_argument): New; extracted from
2404 cp_parser_parameter_declaration.
2406 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2412 * typeck.c (check_return_expr): If there are bare parameter packs
2413 in the return value, set it to error_mark_node.
2414 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
2415 * pt.c (find_parameter_packs_r): Look at the type of
2416 IDENTIFIER_NODEs (e.g., for user-defined conversions).
2417 (check_for_bare_parameter_packs): Flip the result: now returns
2418 TRUE when there were bare parameter packs, FALSE otherwise.
2419 (push_template_decl_real): Deal with flipped result of
2420 check_for_bare_parameter_packs.
2421 * semantics.c (finish_cond): If there are bare parameter packs in
2422 the conditional, set it to error_mark_node.
2423 (finish_expr_stmt): If there are bare parameter packs in the
2424 expression, set it to error_mark_node.
2425 (finish_for_expr): Ditto.
2426 (finish_switch_cond): If there are bare parameter packs in
2427 the conditional, set it to error_mark_node.
2428 (finish_mem_initializers): If there are bare parameter packs in
2429 the member initializer, set it to error_mark_node.
2430 (finish_member_declaration): Check the attributes of the
2431 declaration for bare parameter packs, and remove the attributes if
2432 any have bare parameter packs.
2433 * parser.c (cp_parser_using_declaration): Check the using
2434 declaration for bare parameter packs.
2435 (cp_parser_base_clause): If there are bare parameter packs in a
2436 base specifier, don't add it to the chain.
2438 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2441 * error.c (dump_simple_decl): Display ellipsis for template
2442 non-type parameter packs.
2443 (dump_decl): Display ellipsis for template type parameter packs.
2444 (dump_template_decl): Display ellipsis for template template
2446 * pt.c (redeclare_class_template): When redeclaring a class
2447 template, check for collisions between template parameters and
2448 template parameter packs.
2450 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2453 * pt.c (process_partial_specialization): Don't mark template
2454 parameters that occur in non-deduced contexts.
2455 (struct pair_fn_data): Add include_nondeduced_p.
2456 (for_each_template_parm_r): Only visit non-deduced contexts if
2457 include_nondeduced_p is set.
2458 (for_each_template_parm): Added parameter include_nondeduced_p,
2459 which states whether template parameters found in non-deduced
2460 contexts should be visited.
2461 (uses_template_parms): Visit all template parameters, even those
2462 in non-deduced contexts.
2464 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2467 * pt.c (check_default_tmpl_args): Check for parameter packs that
2468 aren't at the end of a primary template.
2469 (push_template_decl_real): Remove check for parameter packs that
2470 aren't at the end of a primary template; that now happens in
2471 check_default_tmpl_args.
2472 * semantics.c (finish_template_template_parm): Use
2473 check_default_tmpl_args to check for errors in the template
2476 2008-01-12 Doug Kwan <dougkwan@google.com>
2478 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
2479 instead of OPT_Wreturn_type in warning due to ignored return type
2481 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
2482 instead of OPT_Wreturn_type in warning due to ignored return type
2485 2008-01-08 Jakub Jelinek <jakub@redhat.com>
2488 * semantics.c (finish_omp_for): Don't call
2489 fold_build_cleanup_point_expr if processing_template_decl.
2491 2008-01-04 Paolo Carlini <pcarlini@suse.de>
2492 Jakub Jelinek <jakub@redhat.com>
2495 * error.c (dump_template_argument): Deal with TREE_LIST.
2497 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
2499 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
2500 long" in C++0x mode; change the warning to note that "long long"
2501 is only unsupported in C++98 mode.
2503 2007-12-20 Jason Merrill <jason@redhat.com>
2506 * call.c (standard_conversion): Derived-to-base is considered a
2507 standard conversion.
2509 2007-12-19 Jakub Jelinek <jakub@redhat.com>
2512 * parser.c (cp_parser_omp_parallel): For non-combined parallel
2513 call cp_parser_statement rather than
2514 cp_parser_already_scoped_statement.
2516 2007-12-18 Jason Merrill <jason@redhat.com>
2519 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
2521 (dependent_type_p_r): Handle the domain of an array.
2523 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
2524 Jakub Jelinek <jakub@redhat.com>
2529 * pt.c (template_template_parm_bindings_ok_p): New; verifies
2530 bindings of template template parameters after all template
2531 arguments have been deduced.
2532 (coerce_template_parms): Don't complain when COMPLAIN doesn't
2534 (fn_type_unification): Use template_template_parm_bindings_ok_p.
2535 (unify): Deal with variadic, bound template template parameters.
2536 (get_class_bindings): Use template_template_parm_bindings_ok_p.
2538 2007-12-18 Jakub Jelinek <jakub@redhat.com>
2541 * decl.c (grokdeclarator): Reject friend sfk_constructor
2544 2007-12-17 Jakub Jelinek <jakub@redhat.com>
2547 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
2550 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
2553 * cp-lang.c (cp_classify_record): New.
2554 (LANG_HOOKS_CLASSIFY_RECORD): Override.
2556 2007-12-11 Jakub Jelinek <jakub@redhat.com>
2559 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
2562 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
2563 dynamic_cast in a template.
2565 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
2568 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
2569 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
2571 2007-12-10 Jakub Jelinek <jakub@redhat.com>
2574 * error.c (dump_type_prefix, dump_type_suffix): Handle
2575 TYPE_PACK_EXPANSION.
2578 * error.c (dump_expr): Handle ABS_EXPR.
2580 2007-12-09 Jakub Jelinek <jakub@redhat.com>
2584 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
2585 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2586 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
2587 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
2588 flag_use_repository and repo_emit_p returned 2.
2590 2007-12-06 Jakub Jelinek <jakub@redhat.com>
2593 * tree.c (stabilize_call, stabilize_init): Do nothing if
2594 processing_template_decl.
2596 2007-12-05 Jakub Jelinek <jakub@redhat.com>
2599 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
2600 error instead of assertion failure.
2601 * parser.c (cp_parser_decltype): If closing paren is not found,
2602 return error_mark_node.
2604 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2607 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
2609 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
2610 since arg_assoc_template_arg will deal with them (better).
2612 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2615 * pt.c (tsubst_exception_specification): Handle substitutions into
2616 member templates, where tsubst_pack_expansion returns a
2617 TYPE_PACK_EXPANSION.
2619 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2622 * pt.c (unify_pack_expansion): If we didn't deduce any actual
2623 bindings for the template parameter pack, don't try to keep the
2624 empty deduced arguments.
2625 (unify): If a parameter is a template-id whose template argument
2626 list contains a pack expansion that is not at the end, then we
2627 cannot unify against that template-id.
2629 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2632 * pt.c (current_template_args): Use error_operand_p.
2634 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2637 * error.c (dump_decl): Handle TREE_BINFO.
2639 2007-12-01 Ollie Wild <aaw@google.com>
2642 * typeck.c (build_binary_op): Add conversion of pointers to function
2643 members appearing as operands to the equality operators.
2645 2007-11-30 Jakub Jelinek <jakub@redhat.com>
2648 * error.c (dump_expr): Handle OBJ_TYPE_REF.
2650 2007-11-29 Jakub Jelinek <jakub@redhat.com>
2653 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
2655 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
2660 * parser.c (cp_parser_decltype): Don't call finish_id_expression
2662 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
2665 2007-11-27 Jakub Jelinek <jakub@redhat.com>
2667 PR tree-optimization/34181
2668 * method.c (use_thunk): Don't inline the call in the thunk.
2671 * tree.c (decl_linkage): Static data members and static member
2672 functions in anonymous ns classes are lk_external.
2674 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
2677 * decl.c (start_preparsed_function): Pass
2678 processing_template_decl for the new allocate_struct_function
2681 2007-11-25 Richard Guenther <rguenther@suse.de>
2683 * decl.c (poplevel): Use BLOCK_CHAIN.
2685 2007-11-24 Ollie Wild <aaw@google.com>
2687 * typeck.c (delta_from_ptrmemfunc): New function.
2688 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
2689 (build_binary_op): Call delta_from_ptrmemfunc.
2691 2007-11-23 Jakub Jelinek <jakub@redhat.com>
2695 * decl.c (cp_finish_decl): Disallow variable or field
2696 definitions if extern "Java" aggregates.
2697 (grokparms): Disallow parameters with extern "Java"
2699 (check_function_type): Disallow function return values
2700 with extern "Java" aggregates.
2701 * init.c (build_new_1): Disallow placement new with
2702 extern "Java" aggregates.
2704 2007-11-23 Mark Mitchell <mark@codesourcery.com>
2705 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2708 * call.c (convert_like_real): Build a zero constant when __null is
2709 converted to an integer type.
2711 2007-11-22 Jakub Jelinek <jakub@redhat.com>
2714 * decl2.c (cp_write_global_declarations): Issue error about static
2715 data members in anonymous namespace which are declared and used,
2718 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2721 * parser.c (cp_parser_class_head): Reject function template ids.
2724 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
2725 when processing_template_decl to build_array_type.
2728 * pt.c (more_specialized_fn): Don't segfault if one or
2729 both argument list end with ellipsis.
2731 2007-11-18 Jakub Jelinek <jakub@redhat.com>
2734 * semantics.c (finish_call_expr): Set
2735 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
2736 or OVERLOAD with all noreturn functions.
2738 2007-11-16 Jakub Jelinek <jakub@redhat.com>
2741 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
2744 2007-11-13 Jakub Jelinek <jakub@redhat.com>
2751 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
2752 set to error_mark_node the outermost POINTER_TYPE to the pack if
2753 it is seen in a POINTER_TYPE.
2754 (push_template_decl_real): If check_for_bare_parameter_packs
2755 fails for function return type, set the return type to
2756 integer_type_node. If check_for_bare_parameter_packs failed
2757 for non-function, return error_mark_node.
2760 * call.c (build_new_op): Call resolve_args before calling
2763 2007-11-11 Tom Tromey <tromey@redhat.com>
2766 * lex.c (handle_pragma_implementation): Use cpp_included_before.
2768 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2771 * pt.c (redeclare_class_template): Update error message. Use a
2772 note to show the previous declaration.
2773 (tsubst_friend_class): Use the location of the friend template as
2774 the input location before calling redeclare_class_template.
2776 2007-11-11 Jakub Jelinek <jakub@redhat.com>
2779 * semantics.c (finish_pseudo_destructor_expr): Handle
2780 object == error_mark_node.
2782 2007-11-10 Jakub Jelinek <jakub@redhat.com>
2785 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
2786 is not scalar type, let finish_class_member_access_expr handle
2787 diagnostics. Pass BIT_NOT_EXPR argument to
2788 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
2790 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
2793 * decl.c (cp_complete_array_type): If any of the initializer
2794 elements are pack expansions, don't compute the array size yet.
2796 2007-11-08 Andrew Pinski <pinskia@gmail.com>
2799 * tree.c (decl_linkage): Fields have no linkage.
2801 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
2803 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
2805 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
2810 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
2811 Be careful with ERROR_MARK_NODEs.
2812 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
2815 2007-11-07 Jakub Jelinek <jakub@redhat.com>
2818 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
2821 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
2825 * tree.c (c_build_qualified_type): Define bridge to
2826 cp_build_qualified_type.
2828 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
2839 * typeck.c (check_return_expr): Pass address of retval to
2840 check_for_bare_parameter_packs.
2841 * class.c (build_base_field): Tolerate bases that have no layout
2843 (end_of_base): Ditto.
2844 * tree.c (canonical_type_variant): Be careful with
2846 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
2848 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
2849 which states whether parameter packs should be replaced with
2851 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
2852 possible. If set_packs_to_error is set true, replace the parameter
2853 pack with ERROR_MARK_NODE. Manage our own pointer sets.
2854 (uses_parameter_packs): Don't set parameter packs to
2856 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
2857 which may be modified (if it is a parameter pack). Instructs
2858 find_parameter_packs_r to replace parameter packs with
2859 ERROR_MARK_NODE (so that they won't cause errors later on).
2860 (process_template_parm): Pass pointer to
2861 check_for_bare_parameter_packs.
2862 (process_partial_specialization): Replace pack expansions before
2863 the end of the template argument list with ERROR_MARK_NODE.
2864 (push_template_decl_real): Pass pointer to
2865 check_for_bare_parameter_packs. Replace parameter packs not at the
2866 end of the template parameter list with ERROR_MARK_NODE.
2867 (convert_template_argument): Be more careful about using DECL_NAME
2868 on only declarations.
2869 (unify): Can't unify against ERROR_MARK_NODE.
2870 * semantics.c (finish_cond): Pass pointer to
2871 check_for_bare_parameter_packs.
2872 (finish_expr_stmt): Ditto.
2873 (finish_for_expr): Ditto.
2874 (finish_switch_cond): Pass pointer to
2875 check_for_bare_parameter_packs, and call it before we put the
2876 condition into the statement.
2877 (finish_mem_initializers): Pass pointer to
2878 check_for_bare_parameter_packs.
2879 (finish_member_declaration): Ditto.
2880 * parser.c (cp_parser_base_clause): Ditto.
2882 2007-11-06 Jakub Jelinek <jakub@redhat.com>
2885 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
2886 with the final TREE_READONLY flag in place. processing_template_decl
2887 is known to be 0 in this part of function.
2890 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
2891 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
2892 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
2893 * semantics.c (finish_omp_atomic): Revert most of the
2894 2007-02-05 changes, just keep the new representation of
2895 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
2897 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
2900 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
2903 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
2908 * typeck.c (merge_types): Don't lose rvalue references when
2910 * call.c (build_over_call): Don't elide move constructors just
2911 because the copy constructor is trivial (!).
2912 (compare_ics): If comparing cv-qualifiers fails, we can still order
2913 based on binding lvalues vs. rvalues.
2915 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
2918 * pt.c (unify_pack_expansion): bring handling of function call
2919 arguments into line with type_unification_real.
2921 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2923 * typeck.c (build_binary_op): Use pedwarn instead of error for
2926 2007-11-05 Jakub Jelinek <jakub@redhat.com>
2929 * parser.c (cp_parser_unary_expression): For &&label call
2930 cp_parser_non_integral_constant_expression and return error_mark_node
2931 if it returned true.
2934 * decl.c (grokdeclarator): Don't call build_memfn_type if type
2935 is neither FUNCTION_TYPE nor METHOD_TYPE.
2937 2007-11-02 Jakub Jelinek <jakub@redhat.com>
2940 * parser.c (cp_parser_nested_name_specifier_opt): Use
2941 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
2942 typedef of currently open class.
2944 2007-11-02 Paolo Carlini <pcarlini@suse.de>
2947 * error.c (dump_expr): Deal specially with statements.
2949 2007-11-01 Jason Merrill <jason@redhat.com>
2952 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
2954 (lookup_template_class): Use it to get the outer template args
2955 for instantiating one.
2958 * pt.c (reduce_template_parm_level): tsubst the parameters
2959 of a template template parm.
2961 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
2964 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
2966 2007-11-01 Jakub Jelinek <jakub@redhat.com>
2969 * parser.c (cp_parser_postfix_dot_deref_expression): If
2970 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
2971 first and if that succeeds and type is SCALAR_TYPE_P, create
2975 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
2976 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
2977 as for std::type_info.
2979 2007-10-31 Paolo Carlini <pcarlini@suse.de>
2982 * cxx-pretty-print.c (pp_cxx_typeid_expression,
2983 pp_cxx_delete_expression): Change to static linkage.
2984 * cxx-pretty-print.h: Adjust declarations.
2985 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
2986 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
2987 MODOP_EXPR): Forward to pp_expression.
2989 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
2992 2007-10-31 Christian Bruel <christian.bruel@st.com>
2993 Mark Mitchell <mark@codesourcery.com>
2996 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
2997 if retval is volatile.
2999 2007-10-30 Jakub Jelinek <jakub@redhat.com>
3002 * decl2.c (build_offset_ref_call_from_tree): Call
3003 build_non_dependent_expr on object prior to building ADDR_EXPR from it
3004 if FN is DOTSTAR_EXPR.
3006 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
3010 * pt.c (find_parameter_packs_r): Fix typo in comment.
3011 (convert_template_argument): Look at the pattern of a pack
3012 expansion to determine what kind of entity we're converting.
3013 (coerce_template_parameter_pack): When we have coerced a non-type
3014 template parameter pack, substitute into the type of that pack.
3015 (tsubst_pack_expansion): When our substitution of a parameter pack
3016 is a "trivial" substitution of itself, just substitute into the
3017 pack expansion rather than actually expanding.
3019 2007-10-29 Jakub Jelinek <jakub@redhat.com>
3022 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
3023 for non-integral type bitfields. Return true if bitfield is correct, false
3024 error has been diagnosed.
3025 (check_field_decls): If check_bitfield_decl returned false, call also
3028 2007-10-28 Paolo Carlini <pcarlini@suse.de>
3029 Mark Mitchell <mark@codesourcery.com>
3032 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
3033 class member error out and return.
3035 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3037 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
3038 to current_function_decl rather than 0.
3041 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
3043 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
3045 2007-10-27 Jason Merrill <jason@redhat.com>
3048 * call.c (convert_default_arg): Detect recursion.
3050 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3053 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
3054 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
3056 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
3058 * error.c (dump_expr): Handle OFFSETOF_EXPR.
3060 2007-10-26 Jason Merrill <jason@redhat.com>
3063 * pt.c (get_template_info): New fn.
3064 (template_class_depth): Use it.
3065 (push_template_decl_real): Check that the template args of the
3066 definition match the args of the previous declaration.
3068 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3071 * decl2.c (coerce_new_type): Do not allow a default argument for
3072 the first parameter.
3074 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
3077 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
3078 don't see the leading '('. Only lookup names if we get an
3081 2007-10-26 Jakub Jelinek <jakub@redhat.com>
3084 * parser.c (cp_parser_parenthesized_expression_list): Set
3085 greater_than_is_operator_p to true in between the parens.
3087 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3090 * decl.c (grokdeclarator): In case of conflicting specifiers
3091 just return error_mark_node.
3093 2007-10-26 Ollie Wild <aaw@google.com>
3095 * expr.c (cxx_expand_expr): Removed.
3096 * cp-tree.h (exx_expand_expr): Removed.
3097 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
3100 2007-10-25 Paolo Carlini <pcarlini@suse.de>
3103 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
3105 2007-10-23 Jason Merrill <jason@redhat.com>
3107 PR c++/25950 (DR 391)
3108 * call.c (struct conversion): Remove check_copy_constructor_p.
3109 (reference_binding): Always bind a reference directly to a
3110 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
3112 (check_constructor_callable): Remove.
3113 (convert_like_real): Don't call it.
3114 (initialize_reference): Don't call check_constructor_callable.
3115 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
3116 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
3117 conversions if LOOKUP_NO_TEMP_BIND.
3118 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
3119 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
3121 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
3123 2007-10-22 Jakub Jelinek <jakub@redhat.com>
3126 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
3127 before checking if its type is integral.
3129 2007-10-22 Jason Merrill <jason@redhat.com>
3132 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
3133 * pt.c (apply_late_template_attributes): Splice out dependent
3134 attributes from DECL_ATTRIBUTES.
3136 * decl.c (cxx_maybe_build_cleanup): Use build_address.
3138 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3140 * typeck.c (build_binary_op) : Use appropriate warning option
3141 instead of unnamed warning.
3143 2007-10-16 Paolo Carlini <pcarlini@suse.de>
3146 * pt.c (current_template_args): Do not change TREE_LIST elements
3147 with a TREE_VALUE of error_mark_node.
3149 2007-10-16 Mark Mitchell <mark@codesourcery.com>
3151 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
3152 * decl.c (start_decl): Tidy.
3153 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
3155 (grokdeclarator): Clarify comment.
3157 2007-10-14 Andrew Pinski <pinskia@gmail.com>
3160 * decl.c (grokfndecl): Return NULL after the "definition of
3161 implicitly-declared" error happened.
3163 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
3166 * call.c (build_user_type_conversion_1): Do not consider conversion
3167 functions to convert a (possibly cv-qualified) object to the (possibly
3168 cv-qualified) same object type (or a reference to it), to a (possibly
3169 cv-qualified) base class of that type (or a reference to it).
3171 2007-10-12 Paolo Carlini <pcarlini@suse.de>
3173 * pt.c (tsubst): Use template_parm_level_and_index.
3175 2007-10-12 Jakub Jelinek <jakub@redhat.com>
3178 * parser.c (cp_parser_compound_statement): Handle label-declarations
3179 at the beginning of the compound statement.
3180 (cp_parser_block_declaration): Issue diagnostics about __label__
3181 not at the beginning of a block.
3183 2007-10-11 Paolo Carlini <pcarlini@suse.de>
3186 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
3187 to convert_template_argument.
3188 (coerce_template_parms): Return error_mark_node after fixed-length
3190 (tsubst_decl): Check for error_mark_node the return value of the
3191 first tsubst in 'case VAR_DECL'.
3193 2007-10-08 Ollie Wild <aaw@google.com>
3195 * typeck2.c (digest_init): Call cplus_expand_constant after
3196 convert_for_initialization.
3197 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3198 * expr.c (cplus_expand_constant): Updated function description.
3200 2007-10-04 Jason Merrill <jason@redhat.com>
3203 * call.c (initialize_reference): Handle local static reference
3206 2007-10-03 Jason Merrill <jason@redhat.com>
3209 * name-lookup.c (push_namespace_with_attrs): Fold back into...
3210 (push_namespace): Here.
3211 (handle_namespace_attrs): New fn for the attr code.
3212 (leave_scope): Don't pop_visibility.
3213 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
3214 * parser.c (cp_parser_namespace_definition): Call
3215 handle_namespace_attrs and pop_visibility as appropriate.
3218 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
3220 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
3222 * decl.c (duplicate_decls): Preserve linkage flags for mere
3223 redeclarations of gnu_inline definitions.
3225 2007-10-03 Jason Merrill <jason@redhat.com>
3228 * decl.c (wrap_cleanups_r): New fn.
3229 (wrap_temporary_cleanups): New fn.
3230 (initialize_local_var): Call it.
3232 2007-09-29 Jason Merrill <jason@redhat.com>
3235 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
3236 constant to not have DECL_EXTERNAL if it's file-local.
3238 2007-09-28 Ollie Wild <aaw@google.com>
3241 2007-09-27 Ollie Wild <aaw@google.com>
3243 * typeck2.c (digest_init): Call cplus_expand_constant after
3244 convert_for_initialization.
3245 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3246 * expr.c (cplus_expand_constant): Updated function description.
3248 2007-09-28 Jason Merrill <jason@redhat.com>
3251 * class.c (layout_empty_base): Take rli parameter, update
3252 rli->record_align if empty base has user-specified alignment.
3253 (build_base_field): Pass rli to it.
3255 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3258 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
3260 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3263 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
3264 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
3265 (dump_parameters): Just call dump_type for argument packs too.
3267 2007-09-28 Jakub Jelinek <jakub@redhat.com>
3270 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
3271 qualification by creating qualified PACK_EXPANSION_PATTERN and
3272 then calling make_pack_expansion on it.
3274 2007-09-27 Ollie Wild <aaw@google.com>
3276 * typeck2.c (digest_init): Call cplus_expand_constant after
3277 convert_for_initialization.
3278 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3279 * expr.c (cplus_expand_constant): Updated function description.
3281 2007-09-27 Jason Merrill <jason@redhat.com>
3284 * decl2.c (is_late_template_attribute): Don't crash on unknown
3287 2007-09-27 Paolo Carlini <pcarlini@suse.de>
3290 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
3291 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
3292 spaces in the formatting.
3293 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
3295 2007-09-27 Jakub Jelinek <jakub@redhat.com>
3297 * error.c (cxx_print_error_function): Add third argument, pass
3298 it over to lhd_print_error_function.
3299 (cp_print_error_function): If diagnostic->abstract_origin, print
3301 * cp-tree.h (struct diagnostic_info): New forward decl.
3302 (cxx_print_error_function): Add third argument.
3304 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
3307 * name-lookup.c (pushtag): Do not create an implicit typedef before
3308 the associated type declaration is known to be valid.
3310 2007-09-25 Jakub Jelinek <jakub@redhat.com>
3312 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
3313 rather than pointers.
3315 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
3318 * search.c (check_final_overrider): Fail if
3319 targetm.comp_type_attributes returns 0.
3321 2007-09-24 Jason Merrill <jason@redhat.com>
3324 * pt.c (resolve_typename_type): Don't look things up in the original
3325 template if it would mean losing template arguments.
3327 2007-09-24 Jakub Jelinek <jakub@redhat.com>
3330 * cp-tree.h (cxx_type_hash_eq): New prototype.
3331 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
3332 * tree.c (cxx_type_hash_eq): New function.
3334 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3337 * tree.c (cp_build_qualified_type_real): Build a canonical
3338 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
3340 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3344 * tree.c (cplus_array_compare): Compare pointers, not types.
3345 (build_cplus_array_type_1): Store new array type into the hash
3346 table before building the canonical type; build the canonical type
3348 (cp_build_qualified_type_real): Put all of the array types with
3349 cv-qualified element types into the C++ array hash table, built as
3350 variants of the unqualified versions.
3352 2007-09-23 Jason Merrill <jason@redhat.com>
3355 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
3356 for deprecation warnings.
3358 2007-09-22 Jason Merrill <jason@redhat.com>
3361 * call.c (build_over_call): Warn about deprecated virtuals.
3364 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
3365 (MAYBE_TAGGED_TYPE_P): Remove.
3366 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
3367 instead of calling is_late_template_attribute again.
3368 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
3369 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
3370 Don't crash on typedefs from non-template classes.
3371 * decl2.c (grokfield): Don't sorry about attrs on template parms.
3372 (is_late_template_attribute): All attributes applied to template
3373 parms or typename types are dependent. Static.
3374 (splice_template_attributes): Pass decl through.
3375 (save_template_attributes): Likewise.
3377 2007-09-20 Jakub Jelinek <jakub@redhat.com>
3380 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
3381 returned from tsubst_pack_expansion.
3382 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
3383 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
3385 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3388 * semantics.c (finish_id_expression): Use consistently
3389 context_for_name_lookup.
3390 * decl.c (fixup_anonymous_aggr): Fix error message for
3391 anonymous struct (vs union).
3393 2007-09-19 Jason Merrill <jason@redhat.com>
3396 * pt.c (tsubst): Handle typedefs by looking for the specialization.
3397 (retrieve_specialization): Only tagged types use
3398 DECL_TEMPLATE_INSTANTIATIONS.
3399 (instantiate_class_template): Push nested classes too.
3400 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
3402 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
3403 * init.c (is_aggr_type): Remove redundant tests.
3404 * class.c (push_nested_class): Use CLASS_TYPE_P.
3406 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3409 * init.c (build_zero_init): If, recursively, build_zero_init
3410 returns a NULL_TREE, do not append it to the VEC of constructors.
3412 2007-09-18 Jason Merrill <jason@redhat.com>
3415 * pt.c (apply_late_template_attributes): Set processing_template_decl.
3416 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
3417 ATTR_FLAG_TYPE_IN_PLACE.
3418 (tsubst): Do unqualified lookup to find typedefs from current class.
3419 [ARRAY_TYPE]: Propagate alignment info.
3420 * decl2.c (is_late_template_attribute): Only defer handling of
3421 attribute aligned if the expression is dependent.
3422 (save_template_attributes): If we're deferring any attributes,
3423 make this a naming typedef.
3425 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3427 PR c++/33462 (again)
3428 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
3429 va_arg instead of __builtin_va_arg.
3431 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3434 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
3435 (pp_cxx_primary_expression): Use it.
3436 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
3437 * error.c (dump_expr): Use it.
3439 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3442 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
3443 out case TYPEID_EXPR to...
3444 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
3445 and pp_cxx_right_paren.
3446 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
3447 * error.c (dump_expr): Use it.
3449 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3452 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
3453 (pp_cxx_primary_expression): Use it.
3454 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
3455 * error.c (dump_expr): Use it.
3457 2007-09-16 Paolo Carlini <pcarlini@suse.de>
3460 * init.c (build_new): Remove warning for zero-element
3463 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
3466 * call.c (maybe_handle_implicit_object): Set this_p, clear
3467 rvaluedness_matches_p.
3468 (compare_ics): Do not compare rvaluedness matching when one of the
3469 operands is an implicit object.
3471 2007-09-14 Jason Merrill <jason@redhat.com>
3473 PR c++/17743, c++/19163
3474 * decl2.c (is_late_template_attribute): New fn.
3475 (splice_template_attributes, save_template_attributes): New fns.
3476 (cplus_decl_attributes): Call save_template_attributes.
3477 * pt.c (apply_late_template_attributes): New fn.
3478 (instantiate_class_template, tsubst_decl): Use it.
3479 * cp-tree.h: Declare is_late_template_attribute.
3481 2007-09-13 Tom Tromey <tromey@redhat.com>
3483 * parser.c (cp_lexer_new_main): Don't use
3484 c_lex_return_raw_strings.
3485 (cp_lexer_get_preprocessor_token): Update. Add special case when
3488 2007-09-11 Jan Hubicka <jh@suse.cz>
3490 * method.c (use_thunk): Use tree_rest_of_compilation
3491 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
3492 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
3493 * cp-tree.h (expand_body): Kill.
3494 (emit_associated_thunks): Declare.
3495 * semantics.c (emit_associated_thunks): Export.
3496 (expand_body): Kill.
3498 2007-09-09 David Daney <ddaney@avtrex.com>
3501 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
3502 to calculate cookie_ptr.
3504 2007-09-08 Jason Merrill <jason@redhat.com>
3507 * pt.c (most_specialized_class): Set processing_template_decl
3508 while tsubsting partial spec args.
3510 2007-09-06 Jason Merrill <jason@redhat.com>
3512 * decl2.c (get_guard): Copy visibility from the guarded variable.
3514 2007-09-06 Jan Hubicka <jh@suse.cz>
3516 * semantics.c (expand_body): Do not mark arguments of clones used.
3518 2007-09-06 Paolo Carlini <pcarlini@suse.de>
3521 * decl.c (cp_finish_decl): When processing_template_decl,
3522 deal correctly with init as TREE_LIST.
3524 2007-09-06 Tom Tromey <tromey@redhat.com>
3526 * decl.c (finish_function): Put return's location on line zero of
3529 2007-09-05 Jason Merrill <jason@redhat.com>
3532 * except.c (prepare_eh_type): Use type_decays_to.
3535 * init.c (build_delete): Use build_headof to get the address of the
3536 complete object if we aren't using the deleting destructor.
3537 * rtti.c (build_headof): No longer static.
3538 * cp-tree.h: Declare it.
3540 2007-09-06 Jakub Jelinek <jakub@redhat.com>
3542 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
3543 decl if a prototype for XX is provided with throw().
3546 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
3547 on __*_chk non-__builtin_* decls.
3549 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3552 * semantics.c (finish_id_expression): Use context_for_name_lookup
3553 insted of DECL_CONTEXT, to see through anonymous structs and unions.
3554 * class.c (finish_struct_anon): Deal correctly with anonymous
3555 structs (vs unions, as GNU extension) in error messages.
3557 2007-09-05 Jan Hubicka <jh@suse.cz>
3559 * sematics.c (expand_body): Remove unnecesary import_export_decl
3560 call, DECL_EXTERNAL checks and current_function_decl saving.
3562 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3564 PR c++/29731 (again)
3565 * parser.c (cp_parser_primary_expression): Return error_mark_node
3566 when a statement-expression is found in a template-argument list.
3568 2007-09-04 Jason Merrill <jason@redhat.com>
3570 * except.c (initialize_handler_parm): Use
3571 fold_build_cleanup_point_expr.
3574 * call.c (reference_binding): Don't look for user-defined conversions
3578 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
3579 the MUST_NOT_THROW_EXPR.
3581 2007-09-04 Richard Sandiford <richard@codesourcery.com>
3583 * decl.c (cp_finish_decl): Call determine_visibility before
3584 make_rtl_for_nonlocal_decl.
3586 2007-09-04 Jason Merrill <jason@redhat.com>
3589 * pt.c (most_specialized_class): Substitute outer template
3590 arguments into the arguments of a member template partial
3592 (strip_innermost_template_args): New fn.
3594 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
3596 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
3598 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3600 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
3601 * decl.c (cp_make_fname_decl): Likewise,
3602 * parser.c (cp_parser_string_literal): Likewise,
3603 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
3604 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3607 2007-09-02 Paolo Carlini <pcarlini@suse.de>
3610 * typeck.c (build_unary_op): Fix error message for
3611 Boolean expression as operand to operator--.
3613 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3615 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
3616 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3619 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3622 * init.c (build_default_init): Make extern.
3623 * cp-tree.h (build_default_init): Declare here.
3624 * pt.c (tsubst_expr): When the instantiation of the initializer of
3625 a variable results in an empty list, default-initialize the
3627 (tsubst_copy_and_build): When the instantiation of the initializer
3628 in a new expression results in an empty initializer list,
3629 default-initialize it.
3631 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3633 * mangle.c (write_type): Change mangling of rvalue reference from
3636 2007-08-31 Jakub Jelinek <jakub@redhat.com>
3638 * decl.c (duplicate_decls): Remove duplicated line.
3640 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3643 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
3644 BOUND_TEMPLATE_TEMPLATE_PARM.
3646 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3649 * search.c (lookup_member): Check the name argument for
3652 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3655 * parser.c (cp_parser_trait_expr): Check rerurn value of
3658 2007-08-30 Ollie Wild <aaw@google.com>
3660 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
3661 convert_ptrmem for pointer to member conversions.
3662 (convert_to_pointer_force): Update cp_convert_to_pointer call.
3663 (ocp_convert): Update cp_convert_to_pointer call.
3664 * typeck.c (convert_ptrmem): Add conditional for null pointers to
3666 (build_static_cast_1): Check can_convert for conversions in either
3668 (get_delta_difference_1): New function.
3669 (get_delta_difference): Refactor to call get_delta_difference_1.
3671 2007-08-30 Jakub Jelinek <jakub@redhat.com>
3673 * decl.c (start_preparsed_function): Set
3674 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
3676 2007-08-28 Paolo Carlini <pcarlini@suse.de>
3679 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
3680 BOUND_TEMPLATE_TEMPLATE_PARM.
3682 2007-08-28 Jakub Jelinek <jakub@redhat.com>
3686 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
3687 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
3689 2007-08-27 Jason Merrill <jason@redhat.com>
3692 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
3693 Look inside STMT_EXPR.
3694 * semantics.c (stmt_expr_value_expr): New fn.
3695 * cp-tree.h: Declare it.
3698 * decl.c (groktypename): Ignore attributes applied to class type.
3700 2007-08-28 Richard Guenther <rguenther@suse.de>
3702 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
3704 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3706 * error.c (dump_expr): Handle COMPLEX_CST.
3707 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
3708 (pp_cxx_expression): Likewise.
3710 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
3712 * decl.c (GNU_INLINE_P): New.
3713 (duplicate_decls): Handle gnu_inline. Merge attributes and
3714 some flags in overriding definitions.
3715 (redeclaration_error_message): Handle gnu_inline.
3716 (start_preparsed_function): Likewise.
3718 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3720 * call.c (sufficient_parms_p): Constify.
3721 * class.c (same_signature_p): Likewise.
3722 * cp-gimplify.c (is_invisiref_parm,
3723 cxx_omp_privatize_by_reference): Likewise.
3724 * cp-objcp-common.c (has_c_linkage): Likewise.
3725 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
3726 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
3727 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
3728 num_artificial_parms_for, comp_template_parms,
3729 template_parameter_pack_p, any_dependent_template_arguments_p,
3730 any_type_dependent_arguments_p, any_value_dependent_elements_p,
3731 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
3732 zero_init_p, member_p, cp_lvalue_kind,
3733 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
3734 varargs_function_p, is_dummy_object, special_function_kind,
3735 string_conv_p, type_unknown_p, comp_except_specs, compparms,
3736 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
3737 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
3738 cp_has_mutable_p, at_least_as_qualified_p,
3739 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
3740 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
3741 * except.c (nothrow_libfn_p): Likewise.
3742 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
3744 * pt.c (comp_template_parms, template_parameter_pack_p,
3745 any_type_dependent_arguments_p, any_value_dependent_elements_p,
3746 any_dependent_template_arguments_p): Likewise.
3747 * repo.c (repo_export_class_p): Likewise.
3748 * semantics.c (anon_aggr_type_p): Likewise.
3749 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
3750 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
3751 varargs_function_p, member_p, is_dummy_object, pod_type_p,
3752 zero_init_p, special_function_p): Likewise.
3753 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
3754 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
3755 compparms, invalid_nonstatic_memfn_p,
3756 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
3757 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
3758 cp_has_mutable_p, lvalue_or_else): Likewise.
3760 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
3762 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
3763 * cp-objcp-common.c (cp_tree_size): Ditto.
3764 * tree.c (cp_walk_subtrees): Ditto
3765 * cp-tree.def (TINST_LEVEL): Go away.
3766 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
3767 move together with other non-tree structs.
3768 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
3769 (union lang_tree_node): Eliminate tinst_level field.
3770 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
3771 (current_instantiation, outermost_tinst_level): Return
3772 a "struct tinst_level *".
3774 * error.c (print_instantiation_partial_context): Change second
3775 parameter to a "struct tinst_level *". Replace accessor macros
3777 (print_instantiation_full_context): Likewise.
3778 * lex.c (in_main_input_context): Likewise.
3780 * pt.c (struct pending_templates): New.
3781 (pending_templates, last_pending_template): Use it as a type.
3782 (current_tinst_level): Change typo to "struct tinst_level *"
3783 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
3784 (add_pending_template): Construct a "struct pending_template".
3785 Replace TINST_LEVEL accessor macros with field access.
3786 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
3787 (pop_tinst_level): Likewise.
3788 (instantiate_pending_templates): Likewise. Factor common code used
3789 when an instantiation has been done.
3790 (outermost_tinst_level): Replace tree_last with loop.
3791 (current_instantiation): Return a "struct tinst_level *".
3793 2007-08-24 Ollie Wild <aaw@google.com>
3795 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
3796 * name-lookup.h (cp_binding_level): Remove vtables member.
3798 2007-08-24 Richard Guenther <rguenther@suse.de>
3800 * tree.c (cp_cannot_inline_tree_fn): Remove.
3801 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
3802 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
3805 2007-08-24 Jakub Jelinek <jakub@redhat.com>
3808 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
3809 error_mark_node right away if build_expr_type_conversion
3813 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
3814 is error_mark_node rather than NULL_TREE.
3815 * pt.c (check_explicit_specialization): Likewise.
3818 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
3819 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
3821 2007-08-22 Jason Merrill <jason@redhat.com>
3824 * pt.c (outermost_tinst_level): New function.
3825 * lex.c (in_main_input_context): New function.
3826 * cp-tree.h: Declare it.
3827 * decl2.c (constrain_class_visibility): Use it to avoid warning
3828 about uses of the anonymous namespace in the main input file.
3830 2007-08-21 Jakub Jelinek <jakub@redhat.com>
3832 * init.c (build_new_1): Use get_target_expr instead of save_expr.
3834 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
3837 * class.c (finish_struct_1): Warn when a class has virtual
3838 functions and accessible non-virtual destructor.
3840 2007-08-20 Richard Guenther <rguenther@suse.de>
3844 * call.c (build_new_method_call): Convert initializer to
3846 * init.c (build_aggr_init): Do not fiddle with types.
3847 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
3848 * except.c (build_throw): Do not drop qualifiers for the
3850 * typeck.c (get_member_function_from_ptrfunc): Do not
3851 fiddle with types, instead convert.
3852 (build_ptrmemfunc1): Convert to the target type for
3854 (gfc_trans_allocate): Convert result to target type.
3855 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
3856 pointer-to-member structures shall have alias set zero as well.
3858 2007-08-20 Richard Guenther <rguenther@suse.de>
3860 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
3862 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
3863 (nonstatic_local_decl_p): Likewise.
3864 * tree.c (cp_auto_var_in_fn_p): Remove.
3865 * decl.c (nonstatic_local_decl_p): Remove.
3867 2007-08-20 Richard Guenther <rguenther@suse.de>
3869 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
3871 * tree.h (cp_walk_tree): New define to walk_tree_1 with
3872 cp_walk_subtrees lh parameter.
3873 (cp_walk_tree_without_duplicates): New define to
3874 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
3875 * tree.c (count_trees): Call
3876 cp_walk_tree_without_duplicates.
3877 (verify_stmt_tree): Call cp_walk_tree.
3878 (break_out_target_exprs): Likewise.
3879 (WALK_SUBTREE): Likewise.
3880 * cp-gimplify.c (cp_genericize): Likewise.
3881 * cp-pt.c (find_parameter_packs_r): Likewise.
3882 (uses_parameter_packs): Likewise.
3883 (make_pack_expansion): Likewise.
3884 (check_for_bare_parameter_packs): Likewise.
3885 (for_each_template_parm): Likewise.
3886 * decl.c (check_default_argument): Call
3887 cp_walk_tree_without_duplicates.
3888 * except.c (build_throw): Likewise.
3889 * decl2.c (type_visibility): Likewise.
3890 * semantics.c (expand_or_defer_fn): Likewise.
3891 (finalize_nrv): Call cp_walk_tree.
3893 2007-08-20 Jakub Jelinek <jakub@redhat.com>
3896 * init.c (build_new_1): Rename placement_var variable to placement_expr.
3897 Initialize it with save_expr rather than get_temp_regvar.
3899 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
3902 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
3905 2007-08-17 Ollie Wild <aaw@google.com>
3908 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
3909 declarations into appropriate slots for comparison. Fix type
3912 2007-08-17 Paolo Carlini <pcarlini@suse.de>
3915 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
3916 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
3918 2007-08-17 Paolo Carlini <pcarlini@suse.de>
3921 * parser.c (cp_parser_class_head): Improve error message.
3923 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
3925 * pt.c (instantiate_decl): Set input_location
3926 for the function end.
3928 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3930 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
3932 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
3933 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
3934 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
3935 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
3936 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
3937 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
3938 * typeck.c (cp_type_quals): Likewise.
3939 * typeck2.c (cxx_incomplete_type_diagnostic,
3940 cxx_incomplete_type_error): Likewise.
3942 2007-08-16 Paolo Carlini <pcarlini@suse.de>
3945 * pt.c (tsubst_friend_function): When check_classfn
3946 returns error_mark_node likewise return it.
3948 2007-08-15 Jakub Jelinek <jakub@redhat.com>
3951 * typeck.c (check_return_expr): Don't NRV optimize vars in
3953 * decl.c (finish_function): Comment fix.
3955 2007-08-15 Paolo Carlini <pcarlini@suse.de>
3958 * pt.c (push_template_decl_real): Depending on TYPE_P
3959 use either TYPE_CONTEXT or DECL_CONTEXT.
3961 2007-08-14 Mark Mitchell <mark@codesourcery.com>
3963 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
3964 constructors and destructors return this.
3966 2007-08-14 Paolo Carlini <pcarlini@suse.de>
3969 * decl2.c (check_classfn): Return error_mark_node in case of error;
3970 in that case, do not call add_method.
3971 * decl.c (start_decl): Deal with check_classfn returning
3973 (grokfndecl): Likewise.
3974 * pt.c (tsubst_friend_function): Likewise.
3976 2007-08-14 Andrew Pinski <pinskia@gmail.com>
3979 * typeck.c (build_binary_op): Disallow vector float types with
3980 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
3982 2007-08-11 Ian Lance Taylor <iant@google.com>
3984 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
3986 * cp-tree.h (cxx_get_alias_set): Update declaration.
3988 2007-08-10 Ollie Wild <aaw@google.com>
3990 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
3992 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
3994 (unqualified_namespace_lookup): Fix ambiguous_decl call.
3995 (lookup_using_namespace): Fix ambiguous_decl call.
3996 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
3998 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4000 * call.c (name_as_c_string): Use CONST_CAST.
4001 * decl.c (build_decl): Likewise.
4002 * parser.c (cp_parser_string_literal): Likewise.
4004 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4007 * error.c (dump_expr): Consistently use the *_cxx_*
4008 variants of the pretty-print functions.
4010 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4013 * decl.c (check_special_function_return_type): Just error
4014 on return type specified for conversion operator.
4016 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
4018 * typeck2.c (readonly_error): Handle general expressions.
4019 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
4021 2007-08-06 Dan Hipschman <dsh@google.com>
4023 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
4024 access function name.
4026 2007-08-04 Alfred Minarik <a.minarik@aon.at>
4029 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
4030 * g++spec.c (lang_specific_driver): Check them.
4032 2007-08-06 Paolo Carlini <pcarlini@suse.de>
4035 * pt.c (inline_needs_template_parms): Fix comment; change return type
4038 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
4041 2007-03-26 Dirk Mueller <dmueller@suse.de>
4043 * parser.c (cp_parser_member_declaration): Pedwarn
4044 about stray semicolons after member declarations.
4046 2007-08-02 Lee Millward <lee.millward@gmail.com>
4051 * parser.c (cp_parser_asm_definition): Detect and discard asm
4052 statements with invalid inputs or outputs.
4053 (cp_parser_asm_operand_list): Return error mark node if any
4054 of the operands are invalid. Adjust documentation.
4056 2007-08-02 Nick Clifton <nickc@redhat.com>
4058 * typeck.c: Change copyright header to refer to version 3 of the
4059 GNU General Public License and to point readers at the COPYING3
4060 file and the FSF's license web page.
4061 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
4062 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
4063 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
4064 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
4065 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
4066 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
4067 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
4068 name-lookup.h, parser.c: Likewise.
4070 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4073 * call.c (magic_varargs_p): Honor the "type generic" attribute.
4075 2007-07-30 Paolo Carlini <pcarlini@suse.de>
4078 * semantics.c (finish_label_stmt): Reject the __label__
4079 extension outside function scopes.
4081 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4083 * parser.c (eof_token): Un-constify.
4084 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
4085 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
4088 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
4090 * pt.c, tree.c, typeck2.c: Fix comment typos.
4092 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
4093 Mark Mitchell <mark@codesourcery.com>
4096 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
4097 hidden due to friend declarations in local classes.
4099 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
4101 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
4102 * cp-tree.def (DECLTYPE_TYPE): New.
4103 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
4104 (dump_type_prefix): Ditto.
4105 (dump_type_suffix): Ditto.
4106 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
4107 * mangle.c (write_type): Handle DECLTYPE_TYPE.
4108 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
4110 (DECLTYPE_TYPE_EXPR): New.
4111 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
4112 (finish_declared_type): Declare.
4113 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
4114 DECLTYPE_TYPE nodes.
4115 (pp_cxx_type_id): Ditto.
4116 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
4117 (tsubst): Substitute into a DECLTYPE_TYPE node.
4118 (tsubst_copy): Ditto.
4119 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
4121 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
4122 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
4123 structural equality (because we can't hash the expressions).
4124 (finish_declared_type): New.
4125 * lex.c (reswords): Add "decltype" keyword.
4126 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
4127 (cp_parser_postfix_expression): Add member_access_only_p to
4128 restrict postfix expression to member access expressions.
4129 (cp_parser_unary_expression): Update call to
4130 cp_parser_postfix_expression to reflect new parameter.
4131 (cp_parser_declared_type): New.
4132 (cp_parser_simple_type_specifier): Parse decltype types.
4134 2007-07-27 Mark Mitchell <mark@codesourcery.com>
4137 * call.c (convert_for_arg_passing): Only widen bitfields to their
4138 declared types if necessary.
4140 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4142 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
4145 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4147 * decl.c (typename_hash, typename_compare): Constify.
4148 * mangle.c (hash_type, compare_type): Likewise.
4149 * pt.c (eq_local_specializations, hash_local_specialization):
4151 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
4152 list_hash): Likewise.
4153 * typeck2.c (pat_compare): Likewise.
4155 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
4157 * method.c (implicitly_declare_fn): Increase alignment if member
4158 function pointer format requires it.
4160 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4163 * typeck.c (check_return_expr): Do not pass a null argument
4166 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4169 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
4172 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
4175 * typeck.c (convert_arguments): Only use default args if we have
4179 * typeck.c (structural_comptypes): No need to check
4180 resolve_typename_type return value here.
4181 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
4182 * pt.c (resolve_typename_type): Follow typename typedefs. Return
4183 original type rather than error_mark_node in case of failure.
4184 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
4185 resolve_typename_type result check.
4186 (cp_parser_direct_declarator, cp_parser_head,
4187 cp_parser_constructor_declarator_p): Likewise.
4189 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
4191 * pt.c (template_parms_variadic_p): Remove.
4192 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
4194 2007-07-12 Jakub Jelinek <jakub@redhat.com>
4197 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
4198 argument to dump_aggr_init_expr_args instead of false.
4200 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
4202 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
4203 canonical types; otherwise, fall back to structural type
4204 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
4205 internal compiler error if the canonical types are wrong.
4207 2007-07-11 Paolo Carlini <pcarlini@suse.de>
4210 * parser.c (cp_parser_make_indirect_declarator): When the
4211 the code argument is ERROR_MARK return cp_error_declarator.
4213 2007-07-09 Geoffrey Keating <geoffk@apple.com>
4216 * decl.c (cxx_init_decl_processing): Don't set
4217 force_align_functions_log.
4218 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
4219 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
4220 FUNCTION_DECL, return its alignment.
4222 2007-07-09 Richard Guenther <rguenther@suse.de>
4224 * decl.c (start_preparsed_function): Do not promote return type.
4226 2007-07-08 Paolo Carlini <pcarlini@suse.de>
4229 * pt.c (unify): Never pass error_mark_node to template_decl_level.
4231 2007-07-07 Mark Mitchell <mark@codesourcery.com>
4234 * pt.c (resolve_overloaded_unification): Robustify. Return a
4236 (type_unification_real): Adjust accordingly.
4238 2007-07-06 Richard Guenther <rguenther@suse.de>
4240 * init.c (build_new_1): Use the correct pointer type.
4241 * typeck2.c (build_m_component_ref): Likewise.
4243 2007-07-05 Mark Mitchell <mark@codesourcery.com>
4246 * init.c (build_zero_init): Always build an initializer for
4248 * typeck2.c (build_functional_cast): Use build_zero_init.
4251 * init.c (build_new_1): Always pass the allocation function to
4252 build_op_delete_call.
4253 * call.c (build_op_delete_call): Handle operator delete with a
4254 variable-argument list. Do not issue an error when no matching
4255 deallocation function is available for a new operator.
4258 * cp-tree.h (any_value_dependent_elements_p): Declare it.
4259 * decl.c (value_dependent_init_p): New function.
4260 (cp_finish_decl): Use it.
4261 * pt.c (value_dependent_expression_p): Use
4262 any_value_dependent_elements_p.
4263 * parser.c (cp_parser_primary_expression): Add comment about
4264 treating dependent qualified names as integral
4265 constant-expressions.
4267 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
4269 * decl.c (build_ptrmemfunc_type): Always use structural equality
4270 tests when comparing pointer-to-member-function types, because the
4271 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
4274 2007-07-03 Mark Mitchell <mark@codesourcery.com>
4276 * init.c (build_new): Tweak comment.
4278 2007-06-29 Dave Brolley <brolley@redhat.com>
4281 * parser.c (cp_parser_new_type_id): Don't reduce a named array
4282 type to its base type and number of elements here.
4283 * init.c (build_new): Call complete_type_or_else to ensure that the
4284 type is complete and to issue a diagnostic if it is not.
4285 (build_new_1): Don't call complete_type_or_else here.
4287 2007-07-03 Richard Guenther <rguenther@suse.de>
4290 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
4293 2007-07-02 Simon Baldwin <simonb@google.com>
4295 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
4296 for inner-style nested forward declarations that don't declare
4299 2007-07-02 Jakub Jelinek <jakub@redhat.com>
4302 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
4303 DECL_P in not a variable and appears more than once error messages.
4305 2007-07-01 Ollie Wild <aaw@google.com>
4307 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
4308 (select_decl): Remove function.
4309 (unqualified_namespace_lookup): Populate binding by calling
4310 ambiguous_decl. Remove select_decl call.
4311 (lookup_qualified_name): Remove select_decl call.
4312 * decl.c (lookup_and_check_tag): Check for ambiguous references.
4313 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
4314 generation when name lookup is ambiguous.
4316 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
4319 * init.c (build_new_1): Use structural equality on the copy of the
4322 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4324 * decl2.c (determine_visibility): Implement
4325 flag_visibility_ms_compat effect on type info.
4326 * decl.c (cxx_init_decl_processing): Implement
4327 global effect of flag_visibility_ms_compat.
4329 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4331 * decl2.c (start_objects): Mark constructor-running function
4334 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
4337 * decl.c (grokdeclarator): Reset friendp for member functions declared
4338 friend of their own class.
4340 2007-06-23 Mark Mitchell <mark@codesourcery.com>
4342 * decl2.c (determine_visibility): Don't look for dllexport here.
4343 (determine_visibility_from_class): Tidy.
4345 2007-06-18 Simon Baldwin <simonb@google.com>
4348 * parser.c (cp_parser_single_declaration): Added check for storage
4349 class other than sc_none in parsed declaration, and a flag to indicate
4350 if the call is part of an explicit template specialization parse.
4351 * (cp_parser_explicit_specialization): Specialization check flag added
4352 to call to cp_parser_single_declaration(), set true.
4353 * (cp_parser_template_declaration_after_export): Specialization check
4354 flag added to call to cp_parser_single_declaration(), set false.
4355 * pt.c (check_explicit_specialization): Added code to copy visiblity
4356 and linkage from the templated function to the explicit specialization.
4358 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
4360 * typeck.c (build_binary_op): For templates build the
4361 expression in pieces to avoid the assert in build2_stat.
4362 (get_member_function_from_ptrfunc):
4363 Change over to using POINTER_PLUS_EXPR and convert
4364 the second operand to sizetype.
4365 * typeck2.c (build_m_component_ref): Likewise.
4366 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
4367 instead of PLUS_EXPR for pointers.
4368 (build_new_1): Likewise.
4369 (build_vec_delete_1): Likewise.
4370 (build_vec_delete): Likewise.
4371 * class.c (build_base_path): Likewise.
4372 (build_base_path): Likewise.
4373 (convert_to_base_statically): Likewise.
4374 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
4375 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
4376 instead of PLUS_EXPR.
4377 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
4378 instead of PLUS_EXPR for pointers.
4379 * call.c (build_special_member_call): Likewise.
4380 * rtti.c (build_headof): Likewise.
4381 Use sizetype instead of ptrdiff_type_node.
4382 (tinfo_base_init): Create a POINTER_PLUS_EXPR
4383 instead of PLUS_EXPR for pointers.
4384 * except.c (expand_start_catch_block): Do a
4385 NEGATIVE and then a POINTER_PLUS_EXPR instead
4387 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
4388 PLUS_EXPR on pointer types over to use
4389 POINTER_PLUS_EXPR and remove the conversion
4390 to the pointer types.
4391 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
4392 adding to a pointer type. Use size_int instead of
4393 ssize_int. Convert the index to sizetype before
4394 adding it to the pointer.
4396 2007-06-15 Mark Mitchell <mark@codesourcery.com>
4398 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
4399 (DECL_ANON_UNION_VAR_P): New macro.
4400 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
4401 than DECL_VAR_MARKED_P, to keep track of which variables we have
4403 * decl.c (redeclaration_error_message): Complain about redeclaring
4404 anonymous union members at namespace scope.
4405 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
4407 2007-06-14 Geoff Keating <geoffk@apple.com>
4409 * decl2.c (determine_visibility): Ensure that functions with
4410 hidden types as parameters are hidden.
4413 * decl2.c (determine_visibility): Remove duplicate code for
4416 2007-06-12 Ian Lance Taylor <iant@google.com>
4419 * init.c (avoid_placement_new_aliasing): New static function.
4420 (build_new_1): Call it.
4422 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
4424 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
4425 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
4427 2007-06-08 Jakub Jelinek <jakub@redhat.com>
4430 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
4431 on init, the non-decl cond operand and increment value.
4433 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
4436 * decl.c (check_initializer): Report an error when a brace enclosed
4437 initializer is used for a non-aggregate type in C++98.
4438 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
4440 (grokdeclarator): Likewise.
4441 (move_fn_p): Likewise.
4442 * typeck.c (check_return_expr): Likewise.
4443 * call.c (reference_binding): Likewise.
4444 * error.c (cp_cpp_error): Likewise.
4445 * pt.c (check_default_tmpl_args): Likewise.
4447 * lex.c (init_reswords): Likewise.
4448 * parser.c (p_parser_primary_expression): Likewise.
4449 (TOKEN_PRECEDENCE): Likewise.
4450 (cp_parser_init_declarator): Likewise.
4451 (cp_parser_ptr_operator): Likewise.
4452 (cp_parser_parameter_declaration): Likewise.
4453 (cp_parser_enclosed_template_argument_list): Likewise.
4454 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
4455 (cp_parser_next_token_ends_template_argument_p): Likewise.
4457 2007-06-04 Simon Baldwin <simonb@google.com>
4459 * decl.c (grokdeclarator): Readability change. Moved case labels
4460 into direct switch statement scope.
4462 2007-06-04 Paolo Carlini <pcarlini@suse.de>
4464 * call.c (convert_like_real): Remove pointless code.
4466 2007-05-31 Mark Mitchell <mark@codesourcery.com>
4468 * decl.c (get_atexit_fn_ptr_type): New function.
4469 (get_atexit_node): Use it.
4470 (start_cleanup_fn): Likewise.
4471 (register_dtor_fn): Use the object's destructor, instead of a
4472 separate cleanup function, where possible.
4473 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
4474 (atexit_fn_ptr_type_node): New macro.
4475 * decl2.c (build_cleanup): Use build_address.
4477 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
4479 * typeck.c (build_binary_op): Include types in error.
4481 2007-05-31 Jakub Jelinek <jakub@redhat.com>
4484 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
4485 needs runtime initialization.
4487 2007-05-31 Paolo Carlini <pcarlini@suse.de>
4490 * semantics.c (finish_trait_expr): Complete the types.
4492 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
4493 Douglas Gregor <doug.gregor@gmail.com>
4494 Pedro Lamarao <pedro.lamarao@mndfck.org>
4495 Howard Hinnant <howard.hinnant@gmail.com>
4499 * typeck.c (comptypes): Don't consider rvalue and lvalue
4500 reference types to be equivalent.
4501 (check_return_expr): Move from certain lvalues when returning
4503 * decl.c (grokdeclarator): Implement reference collapsing.
4504 (copy_fn_p): Don't consider constructors taking rvalue references
4505 to be copy constructors.
4507 * call.c (conversion): New "rvaluedness_matches_p" member.
4508 (convert_class_to_reference): Require reference type as first
4509 parameter instead of base type.
4510 (reference_binding): Add logic to handle rvalue references.
4511 (implicit_conversion): Update inaccurate comment.
4512 (convert_like_real): Disable creation of temporaries that are
4513 impossible to initialize for types with move constructors.
4514 (build_over_call): Elide move constructors when possible.
4515 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
4516 (maybe_handle_ref_bind): Return conversion instead of type node.
4517 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
4518 determine preferred conversion sequences.
4519 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
4520 (LOOKUP_PREFER_RVALUE): New.
4521 (DECL_MOVE_CONSTRUCTOR_P): New.
4522 (struct cp_declarator): Add "reference" member for reference
4523 types, with new "rvalue_ref" flag.
4524 (cp_build_reference_type): Declare.
4525 (move_fn_p): Declare.
4526 * error.c (dump_type_prefix): Format rvalue reference types
4527 correctly in error messages.
4528 * except.c (build_throw): Move from certain lvalues when
4530 * mangle.c (write_type): Mangle rvalue references differently
4531 than regular references.
4532 * parser.c (make_reference_declarator): Add boolean parameter for
4534 (cp_parser_make_indirect_declarator): New.
4535 (cp_parser_new_declarator_opt): Call
4536 cp_parser_make_indirect_declarator.
4537 (cp_parser_conversion_declarator_opt): Ditto.
4538 (cp_parser_declarator): Ditto.
4539 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
4541 * pt.c (tsubst): Implement reference collapsing.
4542 (maybe_adjust_types_for_deduction): Implement special template
4543 parameter deduction rule for rvalue references.
4544 (type_unification_real): Update calls to
4545 maybe_adjust_types_for_deduction.
4546 (try_one_overload): Ditto.
4547 (unify_pack_expansion): Ditto.
4548 * tree.c (lvalue_p_1): Handle rvalue reference types.
4549 (cp_build_reference_type): New.
4551 2007-05-30 Jakub Jelinek <jakub@redhat.com>
4554 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
4555 variables that need runtime initialization.
4557 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
4560 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
4561 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
4562 case POSTDECREMENT_EXPR>): Return the error_mark_node
4563 if either the real or imaginary parts would an
4566 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
4567 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4570 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
4571 token is a closing brace, false if there are no tokens left.
4572 (cp_parser_namespace_alias_definition): Only consume the next token if
4573 it is a closing brace.
4575 * parser.c (cp_parser_class_specifier): Likewise.
4577 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
4579 * semantics.c (finish_member_declaration): Fix a typo in the
4582 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
4594 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
4595 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
4596 * pt.c (check_for_bare_parameter_packs): Return bool indicated
4597 whether everything was okay. Fix indentation.
4598 (push_template_decl_real): Check for bare parameter packs in
4599 function parameters; where errors occur, mark the parameter types
4600 with ERROR_MARK_NODEs to avert ICEs.
4601 (coerce_template_parameter_pack): New.
4602 (coerce_template_parms): Moved parameter pack coercion into
4603 coerce_template_parameter_pack, and permit it anywhere in the
4604 template parameter list (not just at the end). Parameter and
4605 argument indices can vary (somewhat) separately now, so add
4606 PARM_IDX and ARG_IDX.
4607 (fn_type_unification): Don't set an argument pack as incomplete if
4608 no argument pack was deduced.
4609 (type_unification_real): If a type parameter is a parameter pack
4610 and has not otherwise been deduced, it will be deduced to an empty
4612 (more_specialized_fn): Use the actual lengths of the argument
4613 lists when comparing against expansions.
4614 * semantics.c (finish_member_declaration): If a field's type has
4615 bare parameter packs, error and set its type to ERROR_MARK_NODE.
4617 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
4620 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
4622 2007-05-22 Ollie Wild <aaw@google.com>
4624 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
4625 (unqualified_namespace_lookup): Adds check for hidden types.
4627 2007-05-22 Ollie Wild <aaw@google.com>
4629 * decl.c (duplicate_decls): Verify namespace names are unique.
4631 2007-05-21 Mark Mitchell <mark@codesourcery.com>
4633 * decl.c (cxx_maybe_build_cleanup): Handle
4634 __attribute__((cleanup)).
4636 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4638 * cvt.c (cp_convert_and_check): Don't check warnings if the
4641 2007-05-18 Geoffrey Keating <geoffk@apple.com>
4643 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
4645 2007-05-14 Paolo Carlini <pcarlini@suse.de>
4648 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
4649 type only if is a class type (5.2.8/4).
4651 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
4653 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
4654 * decl.c (grokdeclarator): Use unsigned_type_for instead of
4655 c_common_unsigned_type.
4657 2007-05-11 Silvius Rus <rus@google.com>
4659 * typeck.c (build_indirect_ref): Add call to
4660 strict_aliasing_warning.
4661 (build_reinterpret_cast_1): Condition call to
4662 strict_aliasing_warning.
4664 2007-05-11 Jan Hubicka <jh@suse.cz>
4666 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
4667 * decl2.c (start_objects): ctors and dtors are no longer public.
4668 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
4670 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
4672 * typeck.c (build_unary_op): Remove code that used to
4673 handle non lvalue increments/decrements.
4675 2007-05-07 Mike Stump <mrs@apple.com>
4677 * parser.c (check_empty_body): Add.
4678 (cp_parser_iteration_statement): Add call to check_empty_body.
4680 2007-05-05 Geoffrey Keating <geoffk@apple.com>
4683 * mangle.c (write_mangled_name): Mangle static variable names.
4684 (write_unqualified_name): Use local-source-name for
4685 namespace-scope static variables.
4687 2007-05-04 Dirk Mueller <dmueller@suse.de>
4689 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
4692 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
4695 * decl2.c (constrain_class_visibility):
4696 Use strip_pointer_or_array_types instead of strip_array_types.
4698 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
4701 * decl.c (reshape_init_r): Don't reshape the first element if it
4702 is a pointer to member function.
4704 2007-04-27 Simon Baldwin <simonb@google.com>
4706 * decl.c (grokparms): Changed message format from %qD to %qE.
4708 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
4710 * error.c (maybe_warn_variadic_templates): Variadic templates are
4711 now in C++0x, so only warn about them in C++98 mode.
4713 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
4716 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
4717 integeral types from vectors types.
4719 2007-04-26 Jakub Jelinek <jakub@redhat.com>
4722 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
4723 for type dependent OMP_CLAUSE_DECLs.
4725 2007-04-24 Mark Mitchell <mark@codesourcery.com>
4728 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
4729 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
4730 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
4731 * init.c (build_zero_init): Adjust, as
4732 COMPLEX_TYPE is now a SCALAR_TYPE.
4733 * typeck2.c (digest_init): Allow brace-enclosed initializers for
4734 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
4736 2007-04-25 Paolo Carlini <pcarlini@suse.de>
4738 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
4739 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
4740 (trait_expr_value): Adjust.
4742 2007-04-23 Simon Baldwin <simonb@google.com>
4744 * decl.c (grokparms): Added new error for duplicate function
4745 parameters names in function prototypes, to match gcc behavior.
4747 2007-04-23 Jan Hubicka <jh@suse.cz>
4749 * decl2.c (finish_objects): Do not call target constructor/destructor
4752 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
4754 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
4755 instead of checking GIMPLE_STMT_P in chain_next.
4757 2007-04-17 Mark Mitchell <mark@codesourcery.com>
4760 * call.c (convert_for_arg_passing): Convert bitfields to their
4763 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
4766 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
4768 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
4771 * decl2.c (constrain_class_visibility):
4772 Do not warn about the use of anonymous namespace in the main input file.
4774 2007-04-15 Mark Mitchell <mark@codesourcery.com>
4776 * cp-tree.h (current_template_parms): Fix typo in comment.
4778 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
4780 * cp-tree.h, error.c: Fix comment typos.
4782 2007-04-13 Jason Merrill <jason@redhat.com>
4785 * call.c (reference_binding): Add c_cast_p parm. If true,
4786 add quals to TO as needed to make it reference-compatible.
4788 2007-04-11 Jan Hubicka <jh@suse.cz>
4790 * class.c (convert_to_base_statically): Fold produced tree; verify
4791 that we are not processing template_decl.
4793 2007-04-09 Mark Mitchell <mark@codesourcery.com>
4796 * class.c (build_base_path): Ensure that the converted pointer has
4797 the same cv-qualification as the input.
4799 2007-04-09 Paolo Carlini <pcarlini@suse.de>
4801 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
4803 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
4805 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
4807 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
4808 * tree.c (cp_add_pending_fn_decls): Remove.
4809 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
4811 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
4813 Revert change removing staticp.
4815 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
4817 * cp-objcp-common.c (cxx_staticp): Remove.
4818 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
4819 * cp-tree.h (cxx_staticp):
4821 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
4823 * class.c (check_for_override): Don't remove dllmport attribute
4826 2007-04-03 Jakub Jelinek <jakub@redhat.com>
4829 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
4830 type issue error and return early.
4832 2007-03-30 Jason Merrill <jason@redhat.com>
4835 * typeck.c (cp_type_readonly): New fn.
4836 * cp-tree.h: Declare it.
4837 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
4838 (cp_finish_decl): Not here.
4840 2007-03-31 Richard Guenther <rguenther@suse.de>
4842 * optimize.c (maybe_clone_body): Replace splay-tree usage by
4845 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
4850 * parser.c (declarator_can_be_parameter_pack): New.
4851 (cp_parser_template_parameter): Only parse the `...' if the
4852 declarator can be a parameter pack.
4853 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
4855 * pt.c (find_parameter_packs_r): Look into the bounds on integer
4856 types (they could be used as array bounds).
4857 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
4858 (tsubst_pack_expansion): Handle failure to expand parameter
4861 2007-03-30 Paolo Carlini <pcarlini@suse.de>
4864 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
4865 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
4866 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
4867 (CLASS_TYPE_NON_UNION_P): Add.
4868 (struct lang_type_class): Add has_complex_dflt.
4869 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
4870 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
4871 * cp-tree.def: Add TRAIT_EXPR.
4872 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
4873 * lex.c (struct resword): Add __has_nothrow_assign,
4874 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
4875 __has_trivial_constructor, __has_trivial_copy,
4876 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
4877 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
4878 __is_pod, __is_polymorphic, __is_union.
4879 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
4880 (cp_parser_trait_expr): New.
4881 * semantics.c (finish_trait_expr, trait_expr_value
4882 classtype_has_nothrow_copy_or_assign_p): New.
4883 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
4885 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
4886 * class.c (check_bases, check_field_decl, check_bases_and_members):
4887 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
4888 * pt.c (uses_template_parms, tsubst_copy_and_build,
4889 value_dependent_expression_p, type_dependent_expression_p): Deal with
4891 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
4893 2007-03-29 Richard Guenther <rguenther@suse.de>
4895 * tree.c (cp_walk_subtrees): Do not set input_location.
4897 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
4900 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
4903 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4905 * parser.c (struct cp_parser): Update comment for
4906 greater_than_is_operator_p.
4907 (cp_parser_primary_expression): In C++0x mode, a cast operator can
4908 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
4909 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
4910 !GREATER_THAN_IS_OPERATOR_P.
4911 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
4912 `>>' operators that will become two `>' tokens in C++0x.
4913 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
4914 mode, allowing it to terminate default arguments.
4915 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
4916 `>>' like two consecutive `>' tokens.
4917 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
4918 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
4919 ends a template argument.
4921 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4923 * decl.c (redeclaration_error_message): Complain when redeclaring
4924 a friend function with default template arguments (C++0x mode only).
4925 * cp-tree.h (check_default_tmpl_args): Declare.
4926 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
4927 template arguments in function templates. Add support for checking
4928 the default template arguments of friend templates.
4929 (push_template_decl_real): Fix call to check_default_tmpl_args.
4930 (type_unification_real): If a template parameter has not been
4931 deduced but provides a default template argument, substitute into
4932 that default template argument.
4933 * parser.c (cp_parser_init_declarator): When declaring (but not
4934 defining!) a function template in C++0x mode, check for default
4937 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4940 * decl.c (grokdeclarator): Deal with cv-qualified function type
4941 typedefs in the same way for member and non-member functions.
4943 2007-03-26 Dirk Mueller <dmueller@suse.de>
4945 * parser.c (cp_parser_member_declaration): Pedwarn
4946 about stray semicolons after member declarations.
4948 2007-03-26 Paolo Carlini <pcarlini@suse.de>
4951 * pt.c (instantiate_decl): Set in_system_header.
4953 2007-03-22 Mark Mitchell <mark@codesourcery.com>
4955 * cp-tree.h (current_tempalte_parms): Improve documentation.
4956 * pt.c (current_template_args): Likewise.
4959 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
4960 not consume tokens when failing.
4962 2007-03-22 Jim Wilson <wilson@specifix.com>
4963 Mark Mitchell <mark@codesourcery.com>
4966 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
4967 consistent with FROM.
4969 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4971 * error.c (dump_expr): Handle dependent names that designate types.
4972 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
4974 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
4976 * cp-tree.def, parser.c, pt.c: Fix comment typos.
4978 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4980 * cvt.c (cp_convert_and_check) : Define.
4981 * cp-tree.h (cp_convert_and_check): Declare.
4982 * call.c (convert_conversion_warnings): Rename to
4983 conversion_null_warnings. The warning for floating-point to
4984 integer is handled by convert_and_check in convert_like_real.
4985 (convert_like_real): convert_conversion_warnings was renamed as
4986 conversion_null_warnings.
4987 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
4988 overflow and changes of value during conversion.
4990 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4993 * parser.c (cp_parser_statement): If 'namespace' is found, this
4994 only can be a namespace alias definition, so parse it now.
4995 (cp_parser_namespace_alias_definition): if we find an open brace
4996 instead of '=', then this is actually a misplaced namespace
4999 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5002 * decl.c (cxx_init_decl_processing): Move command-line options
5003 processing to c-opts.c.
5005 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
5007 * ptree.c (cxx_print_type): Use formatting markup for integers
5008 when printing template parameter index/level/orig level.
5009 (cxx_print_xnode): Ditto.
5010 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
5011 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
5012 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
5014 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
5015 rather than a HOST_WIDE_INT.
5016 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
5017 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
5019 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
5020 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
5021 IN_BASE_INITIALIZER bool bitfields.
5022 (struct cp_declarator): Make KIND a 4-bit field. Make
5023 PARAMETER_PACK_P a bool bitfield just after KIND.
5024 * pt.c (uses_parameter_packs): Destroy the pointer set.
5025 (make_pack_expansion): Ditto.
5026 (check_for_bare_parameter_packs): Ditto.
5027 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
5029 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
5032 * call.c (convert_default_arg): Instead of copying the node,
5035 2007-03-15 Dirk Mueller <dmueller@suse.de>
5038 * call.c (convert_conversion_warnings): New..
5039 (convert_like_real): .. factored out from here.
5040 (convert_conversion_warnings): Add warning about
5041 false being converted to NULL in argument passing.
5043 2007-03-14 Dirk Mueller <dmueller@suse.de>
5045 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
5046 (finish_do_body): Warn about empty body in do/while statement.
5048 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5050 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
5052 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5055 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
5058 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
5060 * repo.c (init_repo): Initialize random_seed saved options.
5061 (finish_repo): Adjust.
5063 2007-03-13 Mark Mitchell <mark@codesourcery.com>
5066 * Make-lang.in (doc/g++.1): Use $< to specify the location from
5069 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
5071 * decl.c (compute_array_index_type): New warning flag warn_vla.
5073 2007-03-12 Mark Mitchell <mark@codesourcery.com>
5076 * call.c (convert_default_arg): Copy non-constant arguments.
5078 2007-03-11 Mark Mitchell <mark@codesourcery.com>
5081 * parser.c (cp_parser_postfix_expression): Disallow compound
5082 literals in constant expressions.
5085 * semantics.c (finish_typeof): Use unlowered_expr_type.
5087 2007-03-10 Mark Mitchell <mark@codesourcery.com>
5090 * cp-tree.h (unlowered_expr_type): New function.
5091 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
5092 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
5093 (unlowered_expr_type): New function.
5094 (build_unary_op): Disallow predecrements of bool bitfields.
5095 * call.c (build_conditional_expr): Use unlowered_expr_type.
5096 * pt.c (type_unification_real): Likewise.
5098 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
5101 * typeck.c (check_return_expr): Check for bare parameter packs.
5102 (comptypes): Compare template parameter packs and
5103 type pack expansions.
5104 * decl.c (grokdeclarator): Deal with the declaration of function
5106 (grokparms): Verify that the (optional) function parameter pack is
5107 at the end of the parameter list.
5108 (xref_basetypes): Handle pack expansions in the base class.
5109 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
5110 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
5111 (NONTYPE_ARGUMENT_PACK): New.
5112 (TYPE_PACK_EXPANSION): New.
5113 (EXPR_PACK_EXPANSION): New.
5114 (ARGUMENT_PACK_SELECT): New.
5115 * cp-objcp-common.c (cp_tree_size): Compute size of
5116 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
5117 ARGUMENT_PACK_SELECT.
5118 * error.c (dump_template_argument): Print template argument packs.
5119 (dump_template_argument_list): Ditto.
5120 (dump_template_parameter): Dump `...' for template type parameter
5122 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
5123 (dump_parameters): Print function parameter packs.
5124 (dump_template_parms): Print template argument packs.
5125 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
5126 (maybe_warn_variadic_templates): New.
5127 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
5128 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5129 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5131 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
5132 (write_template_arg): Write argument packs as separate arguments.
5133 * cp-tree.h (struct template_parm_index_s): Add flag that
5134 indicates that the template parameter is actually a parameter
5136 (struct tree_argument_pack_select): New.
5137 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
5138 (union lang_tree_node): Add argument_pack_select.
5139 (FUNCTION_PARAMETER_PACK_P): New.
5140 (PACK_EXPANSION_P): New.
5141 (PACK_EXPANSION_PATTERN): New.
5142 (SET_PACK_EXPANSION_PATTERN): New.
5143 (PACK_EXPANSION_PARAMETER_PACKS): New.
5144 (ARGUMENT_PACK_P): New.
5145 (ARGUMENT_PACK_ARGS): New.
5146 (SET_ARGUMENT_PACK_ARGS): New.
5147 (ARGUMENT_PACK_INCOMPLETE_P): New.
5148 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
5149 (TEMPLATE_PARM_PARAMETER_PACK): New.
5150 (TEMPLATE_TYPE_PARAMETER_PACK): New.
5151 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
5152 (ARGUMENT_PACK_SELECT_INDEX): New.
5153 (ARGUMENT_PACK_SELECT_ARG): New.
5154 (struct cp_declarator): Add parameter_pack_p flag.
5155 (maybe_warn_variadic_templates): Declare.
5156 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
5157 indicate a template parameter pack.
5158 (uses_parameter_packs): Declare.
5159 (template_parameter_pack_p): Declare.
5160 (template_parms_variadic_p): Declare.
5161 (make_pack_expansion): Declare.
5162 (check_for_bare_parameter_packs): Declare.
5163 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
5164 sizeof... expressions.
5165 (pp_cxx_expression): Print pack expansions and non-type argument
5167 (pp_cxx_exception_specification): Print pack expansions.
5168 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
5169 (pp_cxx_ctor_initializer): Print pack expansions.
5170 (pp_cxx_type_id): Print pack expansions.
5171 (pp_cxx_template_argument_list): Print argument packs.
5172 (pp_cxx_template_parameter): Print ellipsis for template parameter
5174 * pt.c (comp_template_parms): Compare template parameter packs.
5175 (template_parameter_pack_p): New.
5176 (template_parms_variadic_p): New.
5177 (template_args_variadic_p): New.
5178 (make_ith_pack_parameter_name): New.
5179 (struct find_parameter_pack_data): New.
5180 (find_parameter_packs_r): New.
5181 (uses_parameter_packs): New.
5182 (make_pack_expansion): New.
5183 (check_for_bare_parameter_packs): New.
5184 (expand_template_argument_pack): New.
5185 (reduce_template_parm_level): Propagate parameter pack flag.
5186 (process_template_parm): Add is_parameter_pack parameter to state
5187 when the parameter is actually a parameter pack. Create template
5188 parameter packs when is_parameter_pack is true.
5189 (current_template_args): The argument for a template parameter
5190 pack is an argument pack containing a single pack expansion.
5191 (process_partial_specialization): When checking that non-type
5192 argument expressions do not involve template parameters, loop over
5193 the arguments in argument packs separately.
5194 (push_template_decl_real): Check that the type of the declaration
5195 does not have any bare parameter packs. Check that primary
5196 templates have no more than one parameter pack, and that it comes
5197 at the end of the template parameter list.
5198 (convert_template_argument): Handle coercions for pack expansion
5199 expressions by coercing the pattern then rebuilding the expansion.
5200 (coerce_template_parms): When coercing the arguments for a
5201 variadic template, pack "extra" arguments into an argument pack.
5202 (coerce_template_template_parms): Cannot coerce between parameter
5203 packs and non-pack parameters.
5204 (template_args_equal): Compare PACK_EXPANSION_P expressions.
5205 (comp_template_args): Expand all template arguments packs before
5206 comparing template argument lists.
5207 (mangle_class_name_for_template): Make argument packs as separate
5209 (for_each_template_parm_r): No need to handle BASELINK.
5210 (instantiate_class_template): Handle pack expansions in the base
5212 (tsubst_pack_expansion): New.
5213 (tsubst_template_args): Handle substitutions of argument packs and
5214 pack expansion into template argument lists.
5215 (tsubst_decl): Expand function parameter packs into separate
5216 function parameters.
5217 (tsubst_arg_types): Expand a type pack expansion into separate
5219 (tsubst_exception_specification): Handle pack expansions in
5220 exception specifiers.
5221 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
5222 replacing a template parameter with its argument. If we encounter
5223 a substitution for an argument pack, just return the parameter
5225 (tsubst_copy): sizeof(X...) returns the number of elements in
5226 parameter pack X. See through ARGUMENT_PACK_SELECT when the
5227 PARM_DECL is a parameter pack.
5228 (tsubst_expr): Expression pack expansions and argument packs
5229 cannot show up here; they will all be handled through function
5230 calls, sizeof, and template argument lists.
5231 (tsubst_copy_and_build): sizeof(X...) returns the number of
5232 elements in parameter pack X. Handle pack expansions in TREE_LIST
5233 and CONSTRUCTOR nodes.
5234 (fn_type_unification): Handle "incomplete" explicit template
5235 argument lists that specify some of the arguments for a template
5237 (type_unification_real): Unify arguments against pack expansions.
5238 (template_parm_level_and_index): New, helper function.
5239 (unify_pack_expansion): New.
5240 (unify): Unify argument packs on an argument-by-argument basis,
5241 handling variadic argument packs as well.
5242 (more_specialized_fn): Handle unification of function parameter
5243 packs. All things being equal, prefer non-variadic function
5244 templates to variadic function templates.
5245 (more_specialized_class): Prefer the variadic class template
5246 partial specialization that binds fewer arguments to a parameter
5248 (regenerate_decl_from_template): Expand function parameter packs
5249 into separate parameters.
5250 (instantiate_decl): Ditto.
5251 (tsubst_initializer_list): Handle pack expansions for base-class
5253 (dependent_type_p_r): Determine dependent types in argument packs
5254 and pack expansions.
5255 (value_dependent_expression_p): Determine value-dependence of
5256 non-type argument packs.
5257 (dependent_template_arg_p): Handle argument packs.
5258 * semantics.c (finish_cond): Check for bare parameter packs.
5259 (finish_expr_stmt): Ditto.
5260 (finish_for_expr): Ditto.
5261 (finish_switch_cond): Ditto.
5262 (finish_mem_initializers): Ditto.
5263 * name-lookup.c (arg_assoc_type): Handle pack expansions and
5265 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
5266 * parser.c (make_declarator): Declarator is not an expansion.
5267 (make_pointer_declarator): Transfer parameter pack flag to outer
5269 (make_reference_declarator): Ditto.
5270 (make_ptrmem_declarator): Ditto.
5271 (make_call_declarator): Ditto.
5272 (make_array_declarator): Ditto.
5273 (cp_parser_postfix_expression): Allow pack expansion expressions
5274 in the argument list for a call expression.
5275 (cp_parser_parenthesized_expression_list): Add new parameter
5276 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
5277 into separate arguments."
5278 (cp_parser_new_placement): Allow pack expansion expressions.
5279 (cp_parser_new_initializer): Ditto.
5280 (cp_parser_mem_initializer_list): Allow ellipsis to create a
5281 base-class initializer expansion.
5282 (cp_parser_mem_initializer): Ditto.
5283 (cp_parser_template_parameter_list): Keep track of whether the
5284 template parameter is a template parameter pack.
5285 (cp_parser_template_parameter): Parse the ellipsis to indicate a
5286 template parameter pack.
5287 (cp_parser_type_parameter): Ditto.
5288 (cp_parser_template_argument_list): Parse the ellipsis to indicate
5290 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
5291 this declarator is a parameter pack.
5292 (cp_parser_parameter_declaration): The ellipsis does not end the
5293 parameter declaration, because it might be a parameter pack. Parse
5294 the ellipsis to indicate a parameter pack.
5295 (cp_parser_initializer): Allow pack expansions.
5296 (cp_parser_initializer_list): Allow ellipsis to create an
5297 initializer expansion.
5298 (cp_parser_base_clause): Allow ellipsis to create a base specifier
5300 (cp_parser_type_id_list): Allow ellipsis to create an exception
5301 specifier expansion.
5302 (cp_parser_attribute_list): Don't allow pack expansions.
5303 (cp_parser_functional_cast): Allow pack expansions.
5304 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
5305 compute the length of a parameter pack.
5306 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
5307 end a template argument.
5308 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5309 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5312 2007-03-09 Dirk Mueller <dmueller@suse.de>
5314 * call.c (build_new_op): Call warn_logical_operator.
5316 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
5319 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
5322 * pt.c (any_template_arguments_need_structural_equality_p):
5325 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
5327 * decl.c (grokdeclarator): Disable warnings for anonymous
5330 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
5332 * typeck2.c (readonly_error): Always emit a hard error.
5333 Remove last argument.
5334 * cp-tree.h (readonly_error): Adjust prototype.
5335 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
5336 * typeck.c (build_unary_op): Likewise.
5337 (build_modify_expr): Likewise.
5339 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
5342 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
5344 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5347 * parser.c (struct cp_parser): New IN_IF_STMT.
5348 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
5349 returning if parsing the body of an 'if' statement or issuing an
5350 error and continuing.
5351 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
5353 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
5355 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
5358 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
5361 2007-03-02 Geoffrey Keating <geoffk@apple.com>
5363 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
5364 Objective-C++. Don't exit early if -shared-libgcc needs to be
5367 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5369 * typeck.c (common_base_type): Delete unused function.
5371 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
5373 * Make-lang.in: Add dummy lang.install-pdf target.
5375 2007-03-01 Simon Baldwin <simonb@google.com>
5378 * decl.c (check_tag_decl): Added new warning for typedef ignored
5379 when it precedes an otherwise valid non-typedef declaration.
5381 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
5383 * typeck.c (build_function_call): Store converted arguments
5384 in a stack-allocated array instead of building a list.
5385 (convert_arguments): Store arguments in the array passed in as an
5386 argument, and return the actual number of arguments.
5387 * call.c (build_call): Delete, and replace with...
5388 (build_call_n, build_call_a): New.
5389 (build_op_delete_call): Rewrite to avoid constructing argument lists.
5390 (build_over_call): Store converted arguments in a stack-allocated
5391 array instead of building a list.
5392 (build_cxx_call): Pass arguments in an array instead of as a list.
5393 (build_java_interface_fn_ref): Rewrite to avoid constructing
5395 * tree.h: Update declarations to reflect above changes.
5396 * method.c (use_thunk): Use a stack-allocated array to hold
5397 the arguments instead of a list.
5398 * rtti.c (throw_bad_cast): Update call to cxx_call.
5399 (throw_bad_typeid): Likewise.
5400 (build_dynamic_cast_1): Likewise.
5401 * init.c (build_builtin_delete_call): Use build_call_n.
5402 * decl.c (expand_static_init): Likewise.
5403 * except.c (cp_protect_cleanup_actions): Likewise.
5404 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
5405 (gimplify_must_not_throw_expr): Likewise.
5406 (cxx_omp_apply_fn): Use build_call_a.
5408 2007-02-26 Mark Mitchell <mark@codesourcery.com>
5410 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
5411 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
5413 2007-02-25 Mark Mitchell <mark@codesourcery.com>
5415 * cp-tree.h (static_ctors): Remove.
5416 * cp-tree.h (static_dtors): Likewise.
5417 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
5418 refactoring of tree_map hierarchy.
5419 (decl_shadowed_for_var_insert): Likewise.
5420 * semantics.c (expand_body): Use c_expand_body.
5421 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
5422 * decl2.c (static_ctors): Remove.
5423 (static_dtors): Likewise.
5424 (generate_ctor_or_dtor_function): Pass NULL_TREE to
5425 objc_generate_static_init_call. Do not call static_[cd]tors.
5426 (generate_ctor_and_dtor_functions_for_priority): Do not check for
5428 (cp_write_global_declarations): Likewise.
5430 2007-02-23 Richard Guenther <rguenther@suse.de>
5432 * class.c (note_name_declared_in_class): Make declaration
5433 changes meaning a pedwarn.
5435 2007-02-22 Michael Matz <matz@suse.de>
5438 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
5439 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
5440 dump_function_decl): Guard emitting outer scopes by new flag.
5441 * cp-lang.c (cxx_dwarf_name): New function.
5442 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
5443 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
5445 (push_template_decl_real, lookup_template_class): Remove calls
5448 2007-02-19 Mark Mitchell <mark@codesourcery.com>
5450 * call.c (build_new_method_call): Ensure that explicit calls of
5451 destructors have type "void".
5453 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5455 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
5456 and -Walways-true with -Waddress.
5457 * cvt.c (convert_to_void): Replace unconditional warning with
5460 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
5462 * decl.c, tree.c: Fix comment typos.
5464 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5467 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
5468 statement expression if we had an error mark node.
5470 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
5471 Brooks Moses <brooks.moses@codesourcery.com>
5472 Lee Millward <lee.millward@codesourcery.com>
5474 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
5475 Change class to tcc_vl_exp.
5477 * call.c (build_call): Use build_call_list instead
5479 (build_over_call): Likewise.
5480 (build_new_method_call): Use build_min_non_dep_call_list
5481 instead of build_min_non_dep.
5483 * error.c (dump_call_expr_args): New function.
5484 (dump_aggr_init_expr_args): New function.
5485 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
5486 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
5488 * cvt.c (convert_to_void): Use build_call_array instead
5489 of build3; use new AGGR_INIT_EXPR accessor macros.
5491 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
5492 instead of TREE_CODE_LENGTH.
5494 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
5495 AGGR_INIT_EXPR accessor macros.
5497 * cp-gimplify.c (cp_gimplify_init_expr): Use
5498 AGGR_INIT_EXPR_SLOT to set the slot operand.
5500 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
5501 (AGGR_INIT_EXPR_SLOT): New macro.
5502 (AGGR_INIT_EXPR_ARG): New macro.
5503 (aggr_init_expr_nargs): New macro.
5504 (AGGR_INIT_EXPR_ARGP): New macro.
5505 (aggr_init_expr_arg_iterator): New.
5506 (init_aggr_init_expr_arg_iterator): New.
5507 (next_aggr_init_expr_arg): New.
5508 (first_aggr_init_expr_arg): New.
5509 (more_aggr_init_expr_args_p): New.
5510 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
5511 (stabilize_aggr_init): New declaration.
5512 (build_min_non_dep_call_list): Likewise.
5514 * tree.c (process_aggr_init_operands): New function.
5515 (build_aggr_init_array) New function.
5516 (build_cplus_new): Update to use new CALL_EXPR and
5517 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
5518 build_aggr_init_array.
5519 (build_min_non_dep_call_list) New function.
5520 (build_min_nt): Assert input code parameter is not a variable
5521 length expression class.
5522 (build_min, build_min_non_dep): Likewise.
5523 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
5524 to check for equality instead of recursing. Handle tcc_vl_exp
5526 (stabilize_call): Update to only handle CALL_EXPRs, not
5527 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
5528 (stabilize_aggr_init): New function.
5529 (stabilize_init): Use it.
5531 * cxx-pretty-print.c (pp_cxx_postfix_expression)
5532 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
5533 AGGR_INIT_EXPR accessor macros and argument iterators.
5535 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
5536 build_vl_exp. Iterate through the operands, recursively
5537 processing each one.
5538 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
5539 CALL_EXPR accessor macros.
5540 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
5541 tree code classes. Use TREE_OPERAND_LENGTH instead of
5544 * semantics.c (finish_call_expr): Use build_nt_call_list
5545 instead of build_nt.
5546 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
5547 accessor macros. Use build_call_array to construct the
5548 CALL_EXPR node instead of build3
5550 * decl2.c (build_offset_ref_call_from_tree): Use
5551 build_nt_call_list and build_min_non_dep_call_list instead
5552 of build_min_nt and build_min_non_dep.
5554 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
5555 Use build_nt_call_list instead of build_min_nt.
5557 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5560 * call.c (build_conditional_expr): Improve error message.
5562 2007-02-13 Dirk Mueller <dmueller@suse.de>
5564 * friend.c (do_friend): Annotate warning about friend
5565 declarations in templates with OPT_Wnon_template_friend.
5566 Convert informal message from warning() to inform().
5568 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
5569 Mark Mitchell <mark@codesourcery.com>
5572 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
5573 instantiations for variables.
5575 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5578 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
5579 Check warn_unused_value just once.
5581 2007-02-11 Mark Mitchell <mark@codesourcery.com>
5584 * pt.c (determine_specialization): Use skip_artificial_parms_for.
5585 (fn_type_unificiation): Likewise.
5586 (get_bindings): Likewise.
5588 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
5591 * decl.c (finish_function): Use DECL_REPLACEABLE.
5592 * tree.c (cp_cannot_inline_tree_fn): Likewise.
5594 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
5596 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
5598 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
5600 * decl.c (grokvardecl): Don't error if !have_tls.
5601 (grokdeclarator): Likewise.
5602 * parser.c (cp_parser_omp_threadprivate): Likewise.
5604 2007-02-07 Jakub Jelinek <jakub@redhat.com>
5607 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
5608 parameters and result decls in omp clauses.
5609 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
5612 2007-02-05 Dirk Mueller <dmueller@suse.de>
5615 * parser.c (cp_parser_class_specifier): Always initialize bases.
5617 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5619 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
5620 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
5621 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
5623 * semantics.c (finish_omp_atomic): Store a whole expression node
5624 in operand 1, and integer_zero_node in operand 0, for dependent
5625 OMP_ATOMIC. Rewrite to make flow easier to understand.
5627 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5629 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
5631 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
5633 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
5634 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
5636 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
5638 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
5639 keyword warning to -Wc++0x-compat.
5641 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5643 * decl.c (grokdeclarator): Update documentation.
5645 2007-02-02 Jakub Jelinek <jakub@redhat.com>
5648 * decl.c (grokdeclarator): If __thread is used together with
5649 a storage class other than extern and static, clear thread_p
5650 after issuing diagnostics and fall through to checking the
5653 2007-01-30 Roger Sayle <roger@eyesopen.com>
5655 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
5656 calculating the size of an array (to avoid recursive errors).
5658 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5661 * typeck.c (build_binary_op): Fix logic for warning. Move warning
5663 * call.c (convert_like_real): Don't warn when converting to
5666 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5668 * decl.c (pop_label): Replace warning with call to
5669 warn_for_unused_label.
5671 2007-01-28 Andrew Pinski <pinskia@gmail.com>
5674 * semantics.c (finish_pseudo_destructor_expr): Check the
5675 destrutor name by calling check_dtor_name.
5677 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
5679 * lex.c (D_CPP0X): Rename.
5681 (reswords): D_CPP0X -> D_CXX0X.
5682 (init_reswords): Ditto.
5683 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
5684 of C++0x keywords as identifiers.
5686 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
5689 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
5692 2007-01-23 Ian Lance Taylor <iant@google.com>
5694 * typeck.c (convert_for_assignment): Only warn about a = b = c
5695 when converting to bool.
5697 2007-01-23 Roger Sayle <roger@eyesopen.com>
5699 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
5701 * typeck.c (ignore_overflows): Remove the remaining uses of
5702 TREE_CONSTANT_OVERFLOW.
5704 2007-01-20 Jan Hubicka <jh@suse.cz>
5706 * decl2.c (start_objects, start_static_storage_duration_function):
5707 Do not make the functions uninlinable.
5709 2007-01-17 Ian Lance Taylor <iant@google.com>
5711 * class.c (add_method): Call VEC_reserve_exact rather than passing
5712 a negative size to VEC_reserve.
5714 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
5717 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
5719 2007-01-10 Mark Mitchell <mark@codesourcery.com>
5722 * decl.c (make_typename_type): If the qualified name is not a
5723 type, issue an error.
5724 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
5727 2007-01-08 Geoffrey Keating <geoffk@apple.com>
5729 * rtti.c: Include target.h.
5730 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
5731 don't emit typeinfo for fundamental types as weak.
5732 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
5734 2007-01-08 Richard Guenther <rguenther@suse.de>
5736 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
5738 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
5740 * call.c (standard_conversion): Pass flag to
5741 vector_types_convertible_p to disallow emission of note.
5742 * typeck.c (convert_for_assignment): Pass flag to
5743 vector_types_convertible_p to allow emission of note.
5744 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
5745 to disallow emission of note.
5747 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5750 * typeck.c (build_binary_op): Call overflow_warning if
5751 TREE_OVERFLOW_P is true for the result and not for any of the
5754 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
5757 * class.c (add_method): Don't wait until template
5758 instantiation time to complain about duplicate methods.
5760 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5763 * semantics.c (finish_unary_op_expr): Warn only if result
5764 overflowed and operands did not.
5766 2007-01-05 Ian Lance Taylor <iant@google.com>
5768 * typeck.c (build_binary_op): Warn about comparing a non-weak
5771 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
5773 * pt.c (tsubst): Propagate the need for structural equality checks
5774 when reducing the level of template parameters.
5776 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
5778 * pt.c: Fix a comment typo.
5780 2007-01-02 Ian Lance Taylor <iant@google.com>
5782 * semantics.c (maybe_convert_cond): Optionally warn when using an
5783 assignment as a condition.
5784 * typeck.c (convert_for_assignment): Optionally warn about
5785 assigning the result of an assignment to a bool.
5787 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
5789 * pt.c (canonical_template_parms): Correct typo in comment.
5791 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
5793 * typeck.c (structural_comptypes): Renamed from "comptypes".
5794 (comptypes): Use canonical type information to perform fast type
5795 comparison. When VERIFY_CANONICAL_TYPES, verify that the
5796 canonical type comparison returns the same results as we would see
5797 from the current, structural check. Support COMPARE_STRUCTURAL
5798 when we need structural checks.
5799 * decl.c (typename_compare): Fix comment.
5800 (build_typename_type): TYPENAME_TYPE nodes require structural
5801 equality checks, because they resolve different based on the
5803 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
5804 require structural equality checks (for now).
5805 (build_ptrmemfunc_type): Build the canonical pointer to member
5807 (compute_array_index_type): Whenever we build a new index type
5808 to represent the size of an array in a template, we need to mark
5809 this index type as requiring structural equality. This goes for
5810 arrays with value-dependent sizes with the current ABI, or all
5812 * tree.c (cplus_array_hash): New.
5813 (struct cplus_array_info): New.
5814 (cplus_array_compare): New.
5815 (cplus_array_htab): New.
5816 (build_cplus_array_type_1): Use a hash table to cache the array
5817 types we build. Build the canonical array type for each array
5819 (cp_build_qualified_type_real): When building a cv-qualified array
5820 type, use the hash table of array types and build canonical array
5822 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
5823 use structural equality (for now).
5824 * cp-tree.h (COMPARE_STRUCTURAL): New.
5825 * pt.c (canonical_template_parms): New.
5826 (canonical_type_parameter): New.
5827 (process_template_parm): Find the canonical type parameter.
5828 (lookup_template_class): When we have named the primary template
5829 type, set the canonical type for our template class to the primary
5830 template type. If any of the template arguments need structural
5831 equality checks, the template class needs structural equality
5833 (tsubst): When reducing the level of a template template
5834 parameter, we require structural equality tests for the resulting
5835 parameter because its template parameters have not had their types
5836 canonicalized. When reducing a template type parameter, find the
5837 canonical reduced type parameter.
5838 (any_template_arguments_need_structural_equality_p): New.