1 2008-03-12 Richard Guenther <rguenther@suse.de>
5 2008-02-04 Richard Guenther <rguenther@suse.de>
8 * decl.c (record_builtin_java_type): Make jboolean a
9 integer type again where its mode doesn't match that of bool.
11 2008-01-25 Richard Guenther <rguenther@suse.de>
14 * decl.c (record_builtin_java_type): Make __java_boolean
16 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
17 after TYPE_MAIN_VARIANT check.
19 2008-03-10 Jakub Jelinek <jakub@redhat.com>
22 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
26 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
27 DECL_P in not a variable and appears more than once error messages.
29 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
33 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
37 * typeck.c (structural_comptypes): Call cp_comptypes.
38 (comptypes): New; called from the C/C++ common bits to perform
40 (cp_comptypes): Renamed from comptypes, which is already used,
41 with a different signature, by the C++ front end.
42 (build_reinterpret_cast_1): Call cp_comptypes.
43 (ptr_reasonably_similar): Ditto.
44 * decl.c (decls_match): Ditto.
45 * cvt.c (convert_to_reference): Ditto.
46 * cp-tree.h (same_type_p): Ditto.
47 (same_or_base_type_p): Ditto.
48 (comptypes): Rename to cp_comptypes.
49 * pt.c (canonical_type_parameter): Call cp_comptypes.
51 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
53 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
54 test for equivalence between pointer and references.
56 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
59 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
60 (check_field_decls): Likewise.
61 (note_name_declared_in_class): Likewise.
62 * call.c (build_new_op): Likewise.
63 (convert_like_real): Likewise.
64 (build_over_call): Likewise.
65 * lex.c (unqualified_fn_lookup_error): Likewise.
66 * parser.c (cp_parser_template_id): Likewise.
67 * cvt.c (warn_ref_binding): Likewise.
68 (convert_to_reference): Likewise.
69 (ocp_convert): Likewise.
70 (convert_to_void): Use error instead of pedwarn.
71 * error.c (cp_cpp_error): Use pedantic_warning_kind.
72 * decl.c (compute_array_index_type): Use constant_expression_error.
74 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
76 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
77 that auto is either a storage class or a simple type specifier,
78 depending on the dialect.
79 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
80 specifier in C++98 mode, error in C++0x mode (since we don't
81 support auto as a type specifier, yet).
82 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
83 storage specifier in C++0x mode.
84 (cp_parser_simple_type_specifier): Parse `auto' as a
85 simple-type-specifier, but error because we don't support it yet.
87 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
89 * parser.c (cp_parser_nonclass_name): New.
90 (cp_parser_pseudo_destructor_name): Use it instead of
92 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
94 2008-02-29 Tom Tromey <tromey@redhat.com>
96 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
97 (cp_lexer_get_preprocessor_token): Update.
98 (cp_lexer_set_source_position_from_token): Don't call
99 restore_input_file_stack.
100 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
102 2008-02-28 Richard Guenther <rguenther@suse.de>
105 2008-02-26 Richard Guenther <rguenther@suse.de>
107 * decl.c (duplicate_decls): Remove decl from global mapping
108 before ggc_freeing it.
110 2008-02-27 Jakub Jelinek <jakub@redhat.com>
113 * rtti.c: Include c-pragma.h.
114 (push_abi_namespace, pop_abi_namespace): New functions.
115 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
116 create_tinfo_types, emit_support_tinfos): Use them.
117 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
119 2008-02-26 Jason Merrill <jason@redhat.com>
122 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
123 to name the struct for linkage purposes even if it has attributes.
124 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
126 2008-02-26 Tom Tromey <tromey@redhat.com>
128 * parser.c (eof_token): Remove old location code.
129 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
130 * decl2.c (generate_ctor_or_dtor_function): Remove old location
132 (cp_write_global_declarations): Likewise.
133 * lex.c (cxx_init): Remove old location code.
134 (handle_pragma_implementation): Remove test of
136 * pt.c (tsubst): Remove old location code.
137 * error.c (cp_print_error_function): Remove test of
139 * decl.c (pop_label): Remove old location code.
140 (finish_function): Likewise.
142 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
145 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
147 2008-02-26 Richard Guenther <rguenther@suse.de>
149 * decl.c (duplicate_decls): Remove decl from global mapping
150 before ggc_freeing it.
152 2008-02-26 Paolo Carlini <pcarlini@suse.de>
155 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
157 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
159 * typeck.c (build_class_member_access_expr): Add appropriate
160 OPT_W* parameter to warning.
161 (build_reinterpret_cast_1): Likewise.
162 * name-lookup.c (push_overloaded_decl): Likewise.
164 2008-02-25 Paolo Carlini <pcarlini@suse.de>
167 * error.c (dump_expr): Handle CONJ_EXPR.
169 2008-02-25 Paolo Carlini <pcarlini@suse.de>
172 * error.c (dump_type): Handle FIXED_POINT_TYPE.
173 (dump_expr): Handle FIXED_CST.
175 2008-02-24 Jason Merrill <jason@redhat.com>
177 * parser.c (cp_parser_declaration): Handle "inline namespace".
178 (cp_parser_namespace_definition): Likewise.
181 * name-lookup.c (arg_assoc_namespace): Look down into inline
184 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
186 * typeck.c (check_for_casting_away_constness): Use 1 single
187 argument, the type of cast, to decide what diagnostics generate.
188 (build_static_cast_1): Remove unused code. Update call to
189 check_for_casting_away_constness.
190 (build_reinterpret_cast_1): Update call to
191 check_for_casting_away_constness.
192 (build_const_cast_1): Likewise.
194 2008-02-24 Paolo Carlini <pcarlini@suse.de>
196 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
197 VEC_NEW_EXPR), forward to pp_expression.
198 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
200 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
203 * friend.c (do_friend): Call cplus_decl_attributes earlier.
205 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
208 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
209 template decls' function decl.
211 2008-02-22 Paolo Carlini <pcarlini@suse.de>
215 2008-02-14 Paolo Carlini <pcarlini@suse.de>
218 * pt.c (determine_specialization): In case of function templates,
219 when the type of DECL does not match FN there is no match.
221 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
224 * typeck.c (build_binary_op): Warn about floating point
225 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
227 2008-02-19 Jason Merrill <jason@redhat.com>
230 * pt.c (resolve_overloaded_unification): Set processing_template_decl
231 while we look for possible bindings.
233 2008-02-19 Jakub Jelinek <jakub@redhat.com>
236 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
240 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
241 vars. Afterwards ensure v is VAR_DECL.
244 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
246 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
249 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
254 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
255 is error_mark_node, return an error early.
256 (find_parameter_packs_r): Pass the pointer set along to recursive
257 calls of cp_walk_subtrees; don't try to manage the pointer set
259 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
260 (make_pack_expansion): Ditto.
261 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
262 a second pass through the tree with find_parameter_packs_r; that
263 second pass no longer does anything.
264 (push_template_decl_real): If we have an erroneous declaration,
265 set its type to error_mark_node before returning an error.
267 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
270 * pt.c (tsubst_initializer_list): Deal with the use of
271 VOID_TYPE_NODE to indicate value-initialization of the bases.
273 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
274 Jason Merrill <jason@redhat.com>
278 * class.c (type_has_user_nondefault_constructor): New fn.
279 * cp-tree.h: Declare it.
280 * init.c (emit_mem_initializers): Use it for -W warning about
281 missing base initializer.
283 2008-02-14 Paolo Carlini <pcarlini@suse.de>
286 * pt.c (determine_specialization): In case of function templates,
287 when the type of DECL does not match FN there is no match.
289 2008-02-13 Jakub Jelinek <jakub@redhat.com>
290 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
293 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
294 are not identifier :: ~, return before calling cp_parser_type_name.
296 2008-02-13 Jason Merrill <jason@redhat.com>
298 PR c++/34962, c++/34937, c++/34939
299 * decl2.c (is_late_template_attribute): Always defer attributes
300 vector_size and weak.
303 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
306 2008-02-12 Jason Merrill <jason@redhat.com>
309 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
310 if we're doing conversions to call a user-defined conversion function.
312 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
315 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
318 2008-02-12 Jakub Jelinek <jakub@redhat.com>
321 * init.c (build_new_1): Don't create placement_expr before
322 constructing alloc_call. Verify that the pointer is passed by
323 value to operator new.
325 2008-02-11 Jason Merrill <jason@redhat.com>
328 * pt.c (tsubst): Don't look up a template typedef in an explicit
331 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
334 * tree.c (cp_build_qualified_type_real): When building a
335 cv-qualified array type, build it as a unique type with
336 build_cplus_array_type_1 and then adopt the unqualified type's
339 2008-02-11 Paolo Carlini <pcarlini@suse.de>
342 * decl.c (groktypename): Check grokdeclarator return.
344 2008-02-10 Jason Merrill <jason@redhat.com>
347 * decl2.c (cp_write_global_declarations): Don't write out static
348 data members with DECL_IN_AGGR_P set.
350 2008-02-08 Jason Merrill <jason@redhat.com>
353 * tree.c (build_target_expr_with_type): Handle void initializer.
354 (bot_manip): Remap slot before recursing.
356 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
359 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
361 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
364 * tree.c: Include tree-flow.h.
365 (build_target_expr): Check type compatibility.
366 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
367 * call.c (convert_like_real): Convert bitfield to expected type.
369 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
373 * typeck.c (structural_comptypes): Call cp_comptypes.
374 (comptypes): New; called from the C/C++ common bits to perform
376 (cp_comptypes): Renamed from comptypes, which is already used,
377 with a different signature, by the C++ front end.
378 (build_reinterpret_cast_1): Call cp_comptypes.
379 (ptr_reasonably_similar): Ditto.
380 * decl.c (decls_match): Ditto.
381 * cvt.c (convert_to_reference): Ditto.
382 * cp-tree.h (same_type_p): Ditto.
383 (same_or_base_type_p): Ditto.
384 (comptypes): Rename to cp_comptypes.
385 * pt.c (canonical_type_parameter): Call cp_comptypes.
387 2008-02-05 Jakub Jelinek <jakub@redhat.com>
390 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
391 value dependent expression.
393 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
396 * decl2.c (save_template_attributes): When we're modifying the
397 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
398 all of the other variants to add those same attributes. Otherwise,
399 the main variant will be inconsistent with those other variants.
401 2008-02-04 Richard Guenther <rguenther@suse.de>
404 * decl.c (record_builtin_java_type): Make jboolean a
405 integer type again where its mode doesn't match that of bool.
407 2008-02-02 Jason Merrill <jason@redhat.com>
408 Mark Mitchell <mark@codesourcery.com>
411 * init.c (build_value_init_1): New function.
412 (build_value_init): New function.
413 * typeck2.c (build_functional_cast): Call it.
414 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
416 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
417 TYPE_HAS_CONSTRUCTOR.
418 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
419 add_implicitly_declared_members): Adjust.
420 (check_field_decls): Adjust. Remove warnings about reference/const
421 in class without constructor.
422 (check_bases_and_members): Adjust. Give those warnings here instead.
423 * decl.c (fixup_anonymous_aggr): Adjust.
424 (check_initializer): Adjust, clarify logic slightly.
425 (grok_special_member_properties): Adjust, only set if user-provided.
426 * rtti.c (create_tinfo_types): Don't set.
427 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
428 Use same_type_ignoring_top_level_qualifiers_p.
429 * pt.c (check_explicit_specialization): Adjust.
430 (instantiate_class_template): Adjust.
432 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
433 Jakub Jelinek <jakub@redhat.com>
437 * typeck.c (structural_comptypes): Handle comparisons of
438 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
440 * mangle.c (write_builtin_type): Map down to the canonical type,
441 which will be one of the predefined type nodes.
443 2008-01-29 Michael Meissner <michael.meissner@amd.com>
446 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
447 bits to allow for expansion of the number of middle end tree
450 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
461 * typeck.c (check_return_expr): Tweak call to
462 check_for_bare_parameter_packs.
463 * class.c (add_method): Be careful with error_mark_nodes.
464 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
466 * pt.c (struct find_parameter_pack_data): Remove
468 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
469 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
470 (make_pack_expansion): Ditto.
471 (check_for_bare_parameter_packs): Parameter is now a tree, not a
473 (process_template_parm): Tweak call to
474 check_for_bare_parameter_packs.
475 (push_template_decl_real): Tweak calls to
476 check_for_bare_parameter_packs. If bare parameter packs are found
477 in the list of exceptions, clear out that list after giving an
479 * semantics.c (finish_cond): Tweak call to
480 check_for_bare_parameter_packs.
481 (finish_expr_stmt): Ditto.
482 (finish_for_expr): Ditto.
483 (finish_switch_cond): Ditto.
484 (finish_mem_initializers): Ditto.
485 (finish_member_declaration): Ditto.
486 (finish_static_assert): Check for bare parameter packs in the
488 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
489 attributes of a declaration.
490 * parser.c (cp_parser_using_declaration): Tweak call to
491 check_for_bare_parameter_packs.
492 (cp_parser_base_clause): Ditto.
494 2008-01-28 Jason Merrill <jason@redhat.com>
497 * class.c (build_base_path): Fix !want_pointer case.
499 2008-01-27 Jason Merrill <jason@redhat.com>
502 * class.c (build_base_path): Fix previous change.
504 2008-01-26 Jakub Jelinek <jakub@redhat.com>
507 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
510 2008-01-26 Richard Guenther <rguenther@suse.de>
513 * typeck.c (build_binary_op): Remove code to shorten compares.
515 2008-01-25 Richard Guenther <rguenther@suse.de>
518 * decl.c (record_builtin_java_type): Make __java_boolean
520 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
521 after TYPE_MAIN_VARIANT check.
523 2008-01-25 Jason Merrill <jason@redhat.com>
526 * class.c (build_base_path): Don't mess with virtual access if
528 * call.c (standard_conversion): Don't check whether source type
531 * decl2.c (is_late_template_attribute): Don't defer attribute
532 visibility just because the type is dependent.
534 2008-01-25 Jason Merrill <jason@redhat.com>
535 Mark Mitchell <mark@codesourcery.com>
538 * call.c (standard_conversion): Allow conversion from integer/real
540 (compare_ics): Such a conversion is worse than a normal arithmetic
543 2008-01-25 Richard Guenther <rguenther@suse.de>
546 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
549 2008-01-24 Paolo Carlini <pcarlini@suse.de>
552 * pt.c (push_template_decl_real): Return error_mark_node in case
553 of template definition of non-template.
555 2008-01-24 Jason Merrill <jason@redhat.com>
558 * decl2.c (is_late_template_attribute): Defer any attribute with
559 dependent args. Also defer type attributes if the type is dependent.
561 2008-01-22 Jakub Jelinek <jakub@redhat.com>
562 Alexandre Oliva <aoliva@redhat.com>
565 * call.c (reference_binding): For bitfields use the declared bitfield
567 (add_builtin_candidates): Likewise.
568 * class.c (layout_class_type): For bitfields copy over the
571 2008-01-22 Jason Merrill <jason@redhat.com>
574 * decl.c (groktypename): Also ignore attributes on dependent
575 possibly-class types.
578 * friend.c (do_friend): Check for prior declaration of a friend
579 function of a local class.
580 * name-lookup.c (lookup_name_innermost_nonclass_level):
582 * name-lookup.h: Declare it.
584 2008-01-22 Tom Tromey <tromey@redhat.com>
587 * init.c (build_new_1): Only disallow Java aggregates.
589 2008-01-22 Jakub Jelinek <jakub@redhat.com>
592 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
593 if decl or init is error_mark_node.
596 * error.c (dump_expr): Handle VECTOR_CST.
598 2008-01-21 Jason Merrill <jason@redhat.com>
601 * pt.c (tsubst_aggr_type): Make sure our context is complete.
604 * pt.c (retrieve_local_specialization): Robustify.
605 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
608 * pt.c (tsubst): Only call retrieve_local_specialization if the
609 original typedef was in a function template.
612 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
614 2008-01-21 Richard Guenther <rguenther@suse.de>
617 * error.c (cp_print_error_function): Deal with recursive
620 2008-01-20 Paolo Carlini <pcarlini@suse.de>
623 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
625 2008-01-20 Paolo Carlini <pcarlini@suse.de>
629 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
630 on non-IS_AGGR_TYPE scope.
631 (constructor_name_p): Assert IS_AGGR_TYPE.
633 2008-01-18 Ian Lance Taylor <iant@google.com>
636 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
637 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
638 DECL_IS_OPERATOR_NEW flag.
640 2008-01-16 Richard Guenther <rguenther@suse.de>
643 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
644 for conversions to type variants.
646 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
648 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
649 declaration and code. Update copyright year.
651 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
654 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
655 know we have a class type.
657 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
660 * pt.c (coerce_template_parameter_pack): When substituting into
661 the type of a non-type template parameter pack. use the
662 deduced/substituted arguments.
663 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
664 can be a parameter pack with the ellipsis following it. When we
665 have an erroneous declaration, allow it to be a parameter pack.
666 (cp_parser_template_parameter): Complain about default
667 arguments on non-type template parameter packs, and parse them
668 using the new cp_parser_default_argument.
669 (cp_parser_parameter_declaration): Complain about parameter packs
670 with default arguments. Move parsing of default arguments into a
671 new function, cp_parser_default_argument.
672 (cp_parser_default_argument): New; extracted from
673 cp_parser_parameter_declaration.
675 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
681 * typeck.c (check_return_expr): If there are bare parameter packs
682 in the return value, set it to error_mark_node.
683 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
684 * pt.c (find_parameter_packs_r): Look at the type of
685 IDENTIFIER_NODEs (e.g., for user-defined conversions).
686 (check_for_bare_parameter_packs): Flip the result: now returns
687 TRUE when there were bare parameter packs, FALSE otherwise.
688 (push_template_decl_real): Deal with flipped result of
689 check_for_bare_parameter_packs.
690 * semantics.c (finish_cond): If there are bare parameter packs in
691 the conditional, set it to error_mark_node.
692 (finish_expr_stmt): If there are bare parameter packs in the
693 expression, set it to error_mark_node.
694 (finish_for_expr): Ditto.
695 (finish_switch_cond): If there are bare parameter packs in
696 the conditional, set it to error_mark_node.
697 (finish_mem_initializers): If there are bare parameter packs in
698 the member initializer, set it to error_mark_node.
699 (finish_member_declaration): Check the attributes of the
700 declaration for bare parameter packs, and remove the attributes if
701 any have bare parameter packs.
702 * parser.c (cp_parser_using_declaration): Check the using
703 declaration for bare parameter packs.
704 (cp_parser_base_clause): If there are bare parameter packs in a
705 base specifier, don't add it to the chain.
707 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
710 * error.c (dump_simple_decl): Display ellipsis for template
711 non-type parameter packs.
712 (dump_decl): Display ellipsis for template type parameter packs.
713 (dump_template_decl): Display ellipsis for template template
715 * pt.c (redeclare_class_template): When redeclaring a class
716 template, check for collisions between template parameters and
717 template parameter packs.
719 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
722 * pt.c (process_partial_specialization): Don't mark template
723 parameters that occur in non-deduced contexts.
724 (struct pair_fn_data): Add include_nondeduced_p.
725 (for_each_template_parm_r): Only visit non-deduced contexts if
726 include_nondeduced_p is set.
727 (for_each_template_parm): Added parameter include_nondeduced_p,
728 which states whether template parameters found in non-deduced
729 contexts should be visited.
730 (uses_template_parms): Visit all template parameters, even those
731 in non-deduced contexts.
733 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
736 * pt.c (check_default_tmpl_args): Check for parameter packs that
737 aren't at the end of a primary template.
738 (push_template_decl_real): Remove check for parameter packs that
739 aren't at the end of a primary template; that now happens in
740 check_default_tmpl_args.
741 * semantics.c (finish_template_template_parm): Use
742 check_default_tmpl_args to check for errors in the template
745 2008-01-12 Doug Kwan <dougkwan@google.com>
747 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
748 instead of OPT_Wreturn_type in warning due to ignored return type
750 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
751 instead of OPT_Wreturn_type in warning due to ignored return type
754 2008-01-08 Jakub Jelinek <jakub@redhat.com>
757 * semantics.c (finish_omp_for): Don't call
758 fold_build_cleanup_point_expr if processing_template_decl.
760 2008-01-04 Paolo Carlini <pcarlini@suse.de>
761 Jakub Jelinek <jakub@redhat.com>
764 * error.c (dump_template_argument): Deal with TREE_LIST.
766 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
768 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
769 long" in C++0x mode; change the warning to note that "long long"
770 is only unsupported in C++98 mode.
772 2007-12-20 Jason Merrill <jason@redhat.com>
775 * call.c (standard_conversion): Derived-to-base is considered a
778 2007-12-19 Jakub Jelinek <jakub@redhat.com>
781 * parser.c (cp_parser_omp_parallel): For non-combined parallel
782 call cp_parser_statement rather than
783 cp_parser_already_scoped_statement.
785 2007-12-18 Jason Merrill <jason@redhat.com>
788 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
790 (dependent_type_p_r): Handle the domain of an array.
792 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
793 Jakub Jelinek <jakub@redhat.com>
798 * pt.c (template_template_parm_bindings_ok_p): New; verifies
799 bindings of template template parameters after all template
800 arguments have been deduced.
801 (coerce_template_parms): Don't complain when COMPLAIN doesn't
803 (fn_type_unification): Use template_template_parm_bindings_ok_p.
804 (unify): Deal with variadic, bound template template parameters.
805 (get_class_bindings): Use template_template_parm_bindings_ok_p.
807 2007-12-18 Jakub Jelinek <jakub@redhat.com>
810 * decl.c (grokdeclarator): Reject friend sfk_constructor
813 2007-12-17 Jakub Jelinek <jakub@redhat.com>
816 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
819 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
822 * cp-lang.c (cp_classify_record): New.
823 (LANG_HOOKS_CLASSIFY_RECORD): Override.
825 2007-12-11 Jakub Jelinek <jakub@redhat.com>
828 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
831 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
832 dynamic_cast in a template.
834 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
837 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
838 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
840 2007-12-10 Jakub Jelinek <jakub@redhat.com>
843 * error.c (dump_type_prefix, dump_type_suffix): Handle
847 * error.c (dump_expr): Handle ABS_EXPR.
849 2007-12-09 Jakub Jelinek <jakub@redhat.com>
853 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
854 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
855 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
856 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
857 flag_use_repository and repo_emit_p returned 2.
859 2007-12-06 Jakub Jelinek <jakub@redhat.com>
862 * tree.c (stabilize_call, stabilize_init): Do nothing if
863 processing_template_decl.
865 2007-12-05 Jakub Jelinek <jakub@redhat.com>
868 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
869 error instead of assertion failure.
870 * parser.c (cp_parser_decltype): If closing paren is not found,
871 return error_mark_node.
873 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
876 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
878 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
879 since arg_assoc_template_arg will deal with them (better).
881 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
884 * pt.c (tsubst_exception_specification): Handle substitutions into
885 member templates, where tsubst_pack_expansion returns a
888 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
891 * pt.c (unify_pack_expansion): If we didn't deduce any actual
892 bindings for the template parameter pack, don't try to keep the
893 empty deduced arguments.
894 (unify): If a parameter is a template-id whose template argument
895 list contains a pack expansion that is not at the end, then we
896 cannot unify against that template-id.
898 2007-12-02 Paolo Carlini <pcarlini@suse.de>
901 * pt.c (current_template_args): Use error_operand_p.
903 2007-12-02 Paolo Carlini <pcarlini@suse.de>
906 * error.c (dump_decl): Handle TREE_BINFO.
908 2007-12-01 Ollie Wild <aaw@google.com>
911 * typeck.c (build_binary_op): Add conversion of pointers to function
912 members appearing as operands to the equality operators.
914 2007-11-30 Jakub Jelinek <jakub@redhat.com>
917 * error.c (dump_expr): Handle OBJ_TYPE_REF.
919 2007-11-29 Jakub Jelinek <jakub@redhat.com>
922 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
924 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
929 * parser.c (cp_parser_decltype): Don't call finish_id_expression
931 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
934 2007-11-27 Jakub Jelinek <jakub@redhat.com>
936 PR tree-optimization/34181
937 * method.c (use_thunk): Don't inline the call in the thunk.
940 * tree.c (decl_linkage): Static data members and static member
941 functions in anonymous ns classes are lk_external.
943 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
946 * decl.c (start_preparsed_function): Pass
947 processing_template_decl for the new allocate_struct_function
950 2007-11-25 Richard Guenther <rguenther@suse.de>
952 * decl.c (poplevel): Use BLOCK_CHAIN.
954 2007-11-24 Ollie Wild <aaw@google.com>
956 * typeck.c (delta_from_ptrmemfunc): New function.
957 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
958 (build_binary_op): Call delta_from_ptrmemfunc.
960 2007-11-23 Jakub Jelinek <jakub@redhat.com>
964 * decl.c (cp_finish_decl): Disallow variable or field
965 definitions if extern "Java" aggregates.
966 (grokparms): Disallow parameters with extern "Java"
968 (check_function_type): Disallow function return values
969 with extern "Java" aggregates.
970 * init.c (build_new_1): Disallow placement new with
971 extern "Java" aggregates.
973 2007-11-23 Mark Mitchell <mark@codesourcery.com>
974 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
977 * call.c (convert_like_real): Build a zero constant when __null is
978 converted to an integer type.
980 2007-11-22 Jakub Jelinek <jakub@redhat.com>
983 * decl2.c (cp_write_global_declarations): Issue error about static
984 data members in anonymous namespace which are declared and used,
987 2007-11-20 Jakub Jelinek <jakub@redhat.com>
990 * parser.c (cp_parser_class_head): Reject function template ids.
993 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
994 when processing_template_decl to build_array_type.
997 * pt.c (more_specialized_fn): Don't segfault if one or
998 both argument list end with ellipsis.
1000 2007-11-18 Jakub Jelinek <jakub@redhat.com>
1003 * semantics.c (finish_call_expr): Set
1004 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
1005 or OVERLOAD with all noreturn functions.
1007 2007-11-16 Jakub Jelinek <jakub@redhat.com>
1010 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
1013 2007-11-13 Jakub Jelinek <jakub@redhat.com>
1020 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
1021 set to error_mark_node the outermost POINTER_TYPE to the pack if
1022 it is seen in a POINTER_TYPE.
1023 (push_template_decl_real): If check_for_bare_parameter_packs
1024 fails for function return type, set the return type to
1025 integer_type_node. If check_for_bare_parameter_packs failed
1026 for non-function, return error_mark_node.
1029 * call.c (build_new_op): Call resolve_args before calling
1032 2007-11-11 Tom Tromey <tromey@redhat.com>
1035 * lex.c (handle_pragma_implementation): Use cpp_included_before.
1037 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1040 * pt.c (redeclare_class_template): Update error message. Use a
1041 note to show the previous declaration.
1042 (tsubst_friend_class): Use the location of the friend template as
1043 the input location before calling redeclare_class_template.
1045 2007-11-11 Jakub Jelinek <jakub@redhat.com>
1048 * semantics.c (finish_pseudo_destructor_expr): Handle
1049 object == error_mark_node.
1051 2007-11-10 Jakub Jelinek <jakub@redhat.com>
1054 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
1055 is not scalar type, let finish_class_member_access_expr handle
1056 diagnostics. Pass BIT_NOT_EXPR argument to
1057 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
1059 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
1062 * decl.c (cp_complete_array_type): If any of the initializer
1063 elements are pack expansions, don't compute the array size yet.
1065 2007-11-08 Andrew Pinski <pinskia@gmail.com>
1068 * tree.c (decl_linkage): Fields have no linkage.
1070 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
1072 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
1074 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
1079 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
1080 Be careful with ERROR_MARK_NODEs.
1081 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
1084 2007-11-07 Jakub Jelinek <jakub@redhat.com>
1087 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
1090 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
1094 * tree.c (c_build_qualified_type): Define bridge to
1095 cp_build_qualified_type.
1097 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
1108 * typeck.c (check_return_expr): Pass address of retval to
1109 check_for_bare_parameter_packs.
1110 * class.c (build_base_field): Tolerate bases that have no layout
1112 (end_of_base): Ditto.
1113 * tree.c (canonical_type_variant): Be careful with
1115 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
1117 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
1118 which states whether parameter packs should be replaced with
1120 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
1121 possible. If set_packs_to_error is set true, replace the parameter
1122 pack with ERROR_MARK_NODE. Manage our own pointer sets.
1123 (uses_parameter_packs): Don't set parameter packs to
1125 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
1126 which may be modified (if it is a parameter pack). Instructs
1127 find_parameter_packs_r to replace parameter packs with
1128 ERROR_MARK_NODE (so that they won't cause errors later on).
1129 (process_template_parm): Pass pointer to
1130 check_for_bare_parameter_packs.
1131 (process_partial_specialization): Replace pack expansions before
1132 the end of the template argument list with ERROR_MARK_NODE.
1133 (push_template_decl_real): Pass pointer to
1134 check_for_bare_parameter_packs. Replace parameter packs not at the
1135 end of the template parameter list with ERROR_MARK_NODE.
1136 (convert_template_argument): Be more careful about using DECL_NAME
1137 on only declarations.
1138 (unify): Can't unify against ERROR_MARK_NODE.
1139 * semantics.c (finish_cond): Pass pointer to
1140 check_for_bare_parameter_packs.
1141 (finish_expr_stmt): Ditto.
1142 (finish_for_expr): Ditto.
1143 (finish_switch_cond): Pass pointer to
1144 check_for_bare_parameter_packs, and call it before we put the
1145 condition into the statement.
1146 (finish_mem_initializers): Pass pointer to
1147 check_for_bare_parameter_packs.
1148 (finish_member_declaration): Ditto.
1149 * parser.c (cp_parser_base_clause): Ditto.
1151 2007-11-06 Jakub Jelinek <jakub@redhat.com>
1154 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
1155 with the final TREE_READONLY flag in place. processing_template_decl
1156 is known to be 0 in this part of function.
1159 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
1160 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
1161 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
1162 * semantics.c (finish_omp_atomic): Revert most of the
1163 2007-02-05 changes, just keep the new representation of
1164 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
1166 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
1169 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
1172 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
1177 * typeck.c (merge_types): Don't lose rvalue references when
1179 * call.c (build_over_call): Don't elide move constructors just
1180 because the copy constructor is trivial (!).
1181 (compare_ics): If comparing cv-qualifiers fails, we can still order
1182 based on binding lvalues vs. rvalues.
1184 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
1187 * pt.c (unify_pack_expansion): bring handling of function call
1188 arguments into line with type_unification_real.
1190 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1192 * typeck.c (build_binary_op): Use pedwarn instead of error for
1195 2007-11-05 Jakub Jelinek <jakub@redhat.com>
1198 * parser.c (cp_parser_unary_expression): For &&label call
1199 cp_parser_non_integral_constant_expression and return error_mark_node
1200 if it returned true.
1203 * decl.c (grokdeclarator): Don't call build_memfn_type if type
1204 is neither FUNCTION_TYPE nor METHOD_TYPE.
1206 2007-11-02 Jakub Jelinek <jakub@redhat.com>
1209 * parser.c (cp_parser_nested_name_specifier_opt): Use
1210 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
1211 typedef of currently open class.
1213 2007-11-02 Paolo Carlini <pcarlini@suse.de>
1216 * error.c (dump_expr): Deal specially with statements.
1218 2007-11-01 Jason Merrill <jason@redhat.com>
1221 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
1223 (lookup_template_class): Use it to get the outer template args
1224 for instantiating one.
1227 * pt.c (reduce_template_parm_level): tsubst the parameters
1228 of a template template parm.
1230 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
1233 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
1235 2007-11-01 Jakub Jelinek <jakub@redhat.com>
1238 * parser.c (cp_parser_postfix_dot_deref_expression): If
1239 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
1240 first and if that succeeds and type is SCALAR_TYPE_P, create
1244 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
1245 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
1246 as for std::type_info.
1248 2007-10-31 Paolo Carlini <pcarlini@suse.de>
1251 * cxx-pretty-print.c (pp_cxx_typeid_expression,
1252 pp_cxx_delete_expression): Change to static linkage.
1253 * cxx-pretty-print.h: Adjust declarations.
1254 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
1255 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
1256 MODOP_EXPR): Forward to pp_expression.
1258 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
1261 2007-10-31 Christian Bruel <christian.bruel@st.com>
1262 Mark Mitchell <mark@codesourcery.com>
1265 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
1266 if retval is volatile.
1268 2007-10-30 Jakub Jelinek <jakub@redhat.com>
1271 * decl2.c (build_offset_ref_call_from_tree): Call
1272 build_non_dependent_expr on object prior to building ADDR_EXPR from it
1273 if FN is DOTSTAR_EXPR.
1275 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
1279 * pt.c (find_parameter_packs_r): Fix typo in comment.
1280 (convert_template_argument): Look at the pattern of a pack
1281 expansion to determine what kind of entity we're converting.
1282 (coerce_template_parameter_pack): When we have coerced a non-type
1283 template parameter pack, substitute into the type of that pack.
1284 (tsubst_pack_expansion): When our substitution of a parameter pack
1285 is a "trivial" substitution of itself, just substitute into the
1286 pack expansion rather than actually expanding.
1288 2007-10-29 Jakub Jelinek <jakub@redhat.com>
1291 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
1292 for non-integral type bitfields. Return true if bitfield is correct, false
1293 error has been diagnosed.
1294 (check_field_decls): If check_bitfield_decl returned false, call also
1297 2007-10-28 Paolo Carlini <pcarlini@suse.de>
1298 Mark Mitchell <mark@codesourcery.com>
1301 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
1302 class member error out and return.
1304 2007-10-27 Jakub Jelinek <jakub@redhat.com>
1306 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
1307 to current_function_decl rather than 0.
1310 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
1312 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
1314 2007-10-27 Jason Merrill <jason@redhat.com>
1317 * call.c (convert_default_arg): Detect recursion.
1319 2007-10-27 Jakub Jelinek <jakub@redhat.com>
1322 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
1323 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
1325 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
1327 * error.c (dump_expr): Handle OFFSETOF_EXPR.
1329 2007-10-26 Jason Merrill <jason@redhat.com>
1332 * pt.c (get_template_info): New fn.
1333 (template_class_depth): Use it.
1334 (push_template_decl_real): Check that the template args of the
1335 definition match the args of the previous declaration.
1337 2007-10-26 Paolo Carlini <pcarlini@suse.de>
1340 * decl2.c (coerce_new_type): Do not allow a default argument for
1341 the first parameter.
1343 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
1346 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
1347 don't see the leading '('. Only lookup names if we get an
1350 2007-10-26 Jakub Jelinek <jakub@redhat.com>
1353 * parser.c (cp_parser_parenthesized_expression_list): Set
1354 greater_than_is_operator_p to true in between the parens.
1356 2007-10-26 Paolo Carlini <pcarlini@suse.de>
1359 * decl.c (grokdeclarator): In case of conflicting specifiers
1360 just return error_mark_node.
1362 2007-10-26 Ollie Wild <aaw@google.com>
1364 * expr.c (cxx_expand_expr): Removed.
1365 * cp-tree.h (exx_expand_expr): Removed.
1366 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
1369 2007-10-25 Paolo Carlini <pcarlini@suse.de>
1372 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
1374 2007-10-23 Jason Merrill <jason@redhat.com>
1376 PR c++/25950 (DR 391)
1377 * call.c (struct conversion): Remove check_copy_constructor_p.
1378 (reference_binding): Always bind a reference directly to a
1379 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
1381 (check_constructor_callable): Remove.
1382 (convert_like_real): Don't call it.
1383 (initialize_reference): Don't call check_constructor_callable.
1384 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
1385 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
1386 conversions if LOOKUP_NO_TEMP_BIND.
1387 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
1388 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
1390 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
1392 2007-10-22 Jakub Jelinek <jakub@redhat.com>
1395 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
1396 before checking if its type is integral.
1398 2007-10-22 Jason Merrill <jason@redhat.com>
1401 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
1402 * pt.c (apply_late_template_attributes): Splice out dependent
1403 attributes from DECL_ATTRIBUTES.
1405 * decl.c (cxx_maybe_build_cleanup): Use build_address.
1407 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1409 * typeck.c (build_binary_op) : Use appropriate warning option
1410 instead of unnamed warning.
1412 2007-10-16 Paolo Carlini <pcarlini@suse.de>
1415 * pt.c (current_template_args): Do not change TREE_LIST elements
1416 with a TREE_VALUE of error_mark_node.
1418 2007-10-16 Mark Mitchell <mark@codesourcery.com>
1420 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
1421 * decl.c (start_decl): Tidy.
1422 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
1424 (grokdeclarator): Clarify comment.
1426 2007-10-14 Andrew Pinski <pinskia@gmail.com>
1429 * decl.c (grokfndecl): Return NULL after the "definition of
1430 implicitly-declared" error happened.
1432 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
1435 * call.c (build_user_type_conversion_1): Do not consider conversion
1436 functions to convert a (possibly cv-qualified) object to the (possibly
1437 cv-qualified) same object type (or a reference to it), to a (possibly
1438 cv-qualified) base class of that type (or a reference to it).
1440 2007-10-12 Paolo Carlini <pcarlini@suse.de>
1442 * pt.c (tsubst): Use template_parm_level_and_index.
1444 2007-10-12 Jakub Jelinek <jakub@redhat.com>
1447 * parser.c (cp_parser_compound_statement): Handle label-declarations
1448 at the beginning of the compound statement.
1449 (cp_parser_block_declaration): Issue diagnostics about __label__
1450 not at the beginning of a block.
1452 2007-10-11 Paolo Carlini <pcarlini@suse.de>
1455 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
1456 to convert_template_argument.
1457 (coerce_template_parms): Return error_mark_node after fixed-length
1459 (tsubst_decl): Check for error_mark_node the return value of the
1460 first tsubst in 'case VAR_DECL'.
1462 2007-10-08 Ollie Wild <aaw@google.com>
1464 * typeck2.c (digest_init): Call cplus_expand_constant after
1465 convert_for_initialization.
1466 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
1467 * expr.c (cplus_expand_constant): Updated function description.
1469 2007-10-04 Jason Merrill <jason@redhat.com>
1472 * call.c (initialize_reference): Handle local static reference
1475 2007-10-03 Jason Merrill <jason@redhat.com>
1478 * name-lookup.c (push_namespace_with_attrs): Fold back into...
1479 (push_namespace): Here.
1480 (handle_namespace_attrs): New fn for the attr code.
1481 (leave_scope): Don't pop_visibility.
1482 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
1483 * parser.c (cp_parser_namespace_definition): Call
1484 handle_namespace_attrs and pop_visibility as appropriate.
1487 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
1489 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
1491 * decl.c (duplicate_decls): Preserve linkage flags for mere
1492 redeclarations of gnu_inline definitions.
1494 2007-10-03 Jason Merrill <jason@redhat.com>
1497 * decl.c (wrap_cleanups_r): New fn.
1498 (wrap_temporary_cleanups): New fn.
1499 (initialize_local_var): Call it.
1501 2007-09-29 Jason Merrill <jason@redhat.com>
1504 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
1505 constant to not have DECL_EXTERNAL if it's file-local.
1507 2007-09-28 Ollie Wild <aaw@google.com>
1510 2007-09-27 Ollie Wild <aaw@google.com>
1512 * typeck2.c (digest_init): Call cplus_expand_constant after
1513 convert_for_initialization.
1514 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
1515 * expr.c (cplus_expand_constant): Updated function description.
1517 2007-09-28 Jason Merrill <jason@redhat.com>
1520 * class.c (layout_empty_base): Take rli parameter, update
1521 rli->record_align if empty base has user-specified alignment.
1522 (build_base_field): Pass rli to it.
1524 2007-09-28 Paolo Carlini <pcarlini@suse.de>
1527 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
1529 2007-09-28 Paolo Carlini <pcarlini@suse.de>
1532 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
1533 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
1534 (dump_parameters): Just call dump_type for argument packs too.
1536 2007-09-28 Jakub Jelinek <jakub@redhat.com>
1539 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
1540 qualification by creating qualified PACK_EXPANSION_PATTERN and
1541 then calling make_pack_expansion on it.
1543 2007-09-27 Ollie Wild <aaw@google.com>
1545 * typeck2.c (digest_init): Call cplus_expand_constant after
1546 convert_for_initialization.
1547 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
1548 * expr.c (cplus_expand_constant): Updated function description.
1550 2007-09-27 Jason Merrill <jason@redhat.com>
1553 * decl2.c (is_late_template_attribute): Don't crash on unknown
1556 2007-09-27 Paolo Carlini <pcarlini@suse.de>
1559 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
1560 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
1561 spaces in the formatting.
1562 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
1564 2007-09-27 Jakub Jelinek <jakub@redhat.com>
1566 * error.c (cxx_print_error_function): Add third argument, pass
1567 it over to lhd_print_error_function.
1568 (cp_print_error_function): If diagnostic->abstract_origin, print
1570 * cp-tree.h (struct diagnostic_info): New forward decl.
1571 (cxx_print_error_function): Add third argument.
1573 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
1576 * name-lookup.c (pushtag): Do not create an implicit typedef before
1577 the associated type declaration is known to be valid.
1579 2007-09-25 Jakub Jelinek <jakub@redhat.com>
1581 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
1582 rather than pointers.
1584 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
1587 * search.c (check_final_overrider): Fail if
1588 targetm.comp_type_attributes returns 0.
1590 2007-09-24 Jason Merrill <jason@redhat.com>
1593 * pt.c (resolve_typename_type): Don't look things up in the original
1594 template if it would mean losing template arguments.
1596 2007-09-24 Jakub Jelinek <jakub@redhat.com>
1599 * cp-tree.h (cxx_type_hash_eq): New prototype.
1600 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
1601 * tree.c (cxx_type_hash_eq): New function.
1603 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
1606 * tree.c (cp_build_qualified_type_real): Build a canonical
1607 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
1609 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
1613 * tree.c (cplus_array_compare): Compare pointers, not types.
1614 (build_cplus_array_type_1): Store new array type into the hash
1615 table before building the canonical type; build the canonical type
1617 (cp_build_qualified_type_real): Put all of the array types with
1618 cv-qualified element types into the C++ array hash table, built as
1619 variants of the unqualified versions.
1621 2007-09-23 Jason Merrill <jason@redhat.com>
1624 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
1625 for deprecation warnings.
1627 2007-09-22 Jason Merrill <jason@redhat.com>
1630 * call.c (build_over_call): Warn about deprecated virtuals.
1633 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
1634 (MAYBE_TAGGED_TYPE_P): Remove.
1635 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
1636 instead of calling is_late_template_attribute again.
1637 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
1638 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
1639 Don't crash on typedefs from non-template classes.
1640 * decl2.c (grokfield): Don't sorry about attrs on template parms.
1641 (is_late_template_attribute): All attributes applied to template
1642 parms or typename types are dependent. Static.
1643 (splice_template_attributes): Pass decl through.
1644 (save_template_attributes): Likewise.
1646 2007-09-20 Jakub Jelinek <jakub@redhat.com>
1649 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
1650 returned from tsubst_pack_expansion.
1651 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
1652 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
1654 2007-09-20 Paolo Carlini <pcarlini@suse.de>
1657 * semantics.c (finish_id_expression): Use consistently
1658 context_for_name_lookup.
1659 * decl.c (fixup_anonymous_aggr): Fix error message for
1660 anonymous struct (vs union).
1662 2007-09-19 Jason Merrill <jason@redhat.com>
1665 * pt.c (tsubst): Handle typedefs by looking for the specialization.
1666 (retrieve_specialization): Only tagged types use
1667 DECL_TEMPLATE_INSTANTIATIONS.
1668 (instantiate_class_template): Push nested classes too.
1669 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
1671 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
1672 * init.c (is_aggr_type): Remove redundant tests.
1673 * class.c (push_nested_class): Use CLASS_TYPE_P.
1675 2007-09-20 Paolo Carlini <pcarlini@suse.de>
1678 * init.c (build_zero_init): If, recursively, build_zero_init
1679 returns a NULL_TREE, do not append it to the VEC of constructors.
1681 2007-09-18 Jason Merrill <jason@redhat.com>
1684 * pt.c (apply_late_template_attributes): Set processing_template_decl.
1685 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
1686 ATTR_FLAG_TYPE_IN_PLACE.
1687 (tsubst): Do unqualified lookup to find typedefs from current class.
1688 [ARRAY_TYPE]: Propagate alignment info.
1689 * decl2.c (is_late_template_attribute): Only defer handling of
1690 attribute aligned if the expression is dependent.
1691 (save_template_attributes): If we're deferring any attributes,
1692 make this a naming typedef.
1694 2007-09-18 Paolo Carlini <pcarlini@suse.de>
1696 PR c++/33462 (again)
1697 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
1698 va_arg instead of __builtin_va_arg.
1700 2007-09-18 Paolo Carlini <pcarlini@suse.de>
1703 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
1704 (pp_cxx_primary_expression): Use it.
1705 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
1706 * error.c (dump_expr): Use it.
1708 2007-09-18 Paolo Carlini <pcarlini@suse.de>
1711 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
1712 out case TYPEID_EXPR to...
1713 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
1714 and pp_cxx_right_paren.
1715 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
1716 * error.c (dump_expr): Use it.
1718 2007-09-18 Paolo Carlini <pcarlini@suse.de>
1721 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
1722 (pp_cxx_primary_expression): Use it.
1723 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
1724 * error.c (dump_expr): Use it.
1726 2007-09-16 Paolo Carlini <pcarlini@suse.de>
1729 * init.c (build_new): Remove warning for zero-element
1732 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
1735 * call.c (maybe_handle_implicit_object): Set this_p, clear
1736 rvaluedness_matches_p.
1737 (compare_ics): Do not compare rvaluedness matching when one of the
1738 operands is an implicit object.
1740 2007-09-14 Jason Merrill <jason@redhat.com>
1742 PR c++/17743, c++/19163
1743 * decl2.c (is_late_template_attribute): New fn.
1744 (splice_template_attributes, save_template_attributes): New fns.
1745 (cplus_decl_attributes): Call save_template_attributes.
1746 * pt.c (apply_late_template_attributes): New fn.
1747 (instantiate_class_template, tsubst_decl): Use it.
1748 * cp-tree.h: Declare is_late_template_attribute.
1750 2007-09-13 Tom Tromey <tromey@redhat.com>
1752 * parser.c (cp_lexer_new_main): Don't use
1753 c_lex_return_raw_strings.
1754 (cp_lexer_get_preprocessor_token): Update. Add special case when
1757 2007-09-11 Jan Hubicka <jh@suse.cz>
1759 * method.c (use_thunk): Use tree_rest_of_compilation
1760 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1761 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
1762 * cp-tree.h (expand_body): Kill.
1763 (emit_associated_thunks): Declare.
1764 * semantics.c (emit_associated_thunks): Export.
1765 (expand_body): Kill.
1767 2007-09-09 David Daney <ddaney@avtrex.com>
1770 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
1771 to calculate cookie_ptr.
1773 2007-09-08 Jason Merrill <jason@redhat.com>
1776 * pt.c (most_specialized_class): Set processing_template_decl
1777 while tsubsting partial spec args.
1779 2007-09-06 Jason Merrill <jason@redhat.com>
1781 * decl2.c (get_guard): Copy visibility from the guarded variable.
1783 2007-09-06 Jan Hubicka <jh@suse.cz>
1785 * semantics.c (expand_body): Do not mark arguments of clones used.
1787 2007-09-06 Paolo Carlini <pcarlini@suse.de>
1790 * decl.c (cp_finish_decl): When processing_template_decl,
1791 deal correctly with init as TREE_LIST.
1793 2007-09-06 Tom Tromey <tromey@redhat.com>
1795 * decl.c (finish_function): Put return's location on line zero of
1798 2007-09-05 Jason Merrill <jason@redhat.com>
1801 * except.c (prepare_eh_type): Use type_decays_to.
1804 * init.c (build_delete): Use build_headof to get the address of the
1805 complete object if we aren't using the deleting destructor.
1806 * rtti.c (build_headof): No longer static.
1807 * cp-tree.h: Declare it.
1809 2007-09-06 Jakub Jelinek <jakub@redhat.com>
1811 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
1812 decl if a prototype for XX is provided with throw().
1815 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
1816 on __*_chk non-__builtin_* decls.
1818 2007-09-05 Paolo Carlini <pcarlini@suse.de>
1821 * semantics.c (finish_id_expression): Use context_for_name_lookup
1822 insted of DECL_CONTEXT, to see through anonymous structs and unions.
1823 * class.c (finish_struct_anon): Deal correctly with anonymous
1824 structs (vs unions, as GNU extension) in error messages.
1826 2007-09-05 Jan Hubicka <jh@suse.cz>
1828 * cp/sematics.c (expand_body): Remove unnecesary import_export_decl
1829 call, DECL_EXTERNAL checks and current_function_decl saving.
1831 2007-09-05 Paolo Carlini <pcarlini@suse.de>
1833 PR c++/29731 (again)
1834 * parser.c (cp_parser_primary_expression): Return error_mark_node
1835 when a statement-expression is found in a template-argument list.
1837 2007-09-04 Jason Merrill <jason@redhat.com>
1839 * except.c (initialize_handler_parm): Use
1840 fold_build_cleanup_point_expr.
1843 * call.c (reference_binding): Don't look for user-defined conversions
1847 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
1848 the MUST_NOT_THROW_EXPR.
1850 2007-09-04 Richard Sandiford <richard@codesourcery.com>
1852 * decl.c (cp_finish_decl): Call determine_visibility before
1853 make_rtl_for_nonlocal_decl.
1855 2007-09-04 Jason Merrill <jason@redhat.com>
1858 * pt.c (most_specialized_class): Substitute outer template
1859 arguments into the arguments of a member template partial
1861 (strip_innermost_template_args): New fn.
1863 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
1865 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
1867 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1869 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
1870 * decl.c (cp_make_fname_decl): Likewise,
1871 * parser.c (cp_parser_string_literal): Likewise,
1872 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
1873 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
1876 2007-09-02 Paolo Carlini <pcarlini@suse.de>
1879 * typeck.c (build_unary_op): Fix error message for
1880 Boolean expression as operand to operator--.
1882 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1884 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
1885 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
1888 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
1891 * init.c (build_default_init): Make extern.
1892 * cp-tree.h (build_default_init): Declare here.
1893 * pt.c (tsubst_expr): When the instantiation of the initializer of
1894 a variable results in an empty list, default-initialize the
1896 (tsubst_copy_and_build): When the instantiation of the initializer
1897 in a new expression results in an empty initializer list,
1898 default-initialize it.
1900 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
1902 * mangle.c (write_type): Change mangling of rvalue reference from
1905 2007-08-31 Jakub Jelinek <jakub@redhat.com>
1907 * decl.c (duplicate_decls): Remove duplicated line.
1909 2007-08-31 Paolo Carlini <pcarlini@suse.de>
1912 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
1913 BOUND_TEMPLATE_TEMPLATE_PARM.
1915 2007-08-31 Paolo Carlini <pcarlini@suse.de>
1918 * search.c (lookup_member): Check the name argument for
1921 2007-08-31 Paolo Carlini <pcarlini@suse.de>
1924 * parser.c (cp_parser_trait_expr): Check rerurn value of
1927 2007-08-30 Ollie Wild <aaw@google.com>
1929 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
1930 convert_ptrmem for pointer to member conversions.
1931 (convert_to_pointer_force): Update cp_convert_to_pointer call.
1932 (ocp_convert): Update cp_convert_to_pointer call.
1933 * typeck.c (convert_ptrmem): Add conditional for null pointers to
1935 (build_static_cast_1): Check can_convert for conversions in either
1937 (get_delta_difference_1): New function.
1938 (get_delta_difference): Refactor to call get_delta_difference_1.
1940 2007-08-30 Jakub Jelinek <jakub@redhat.com>
1942 * decl.c (start_preparsed_function): Set
1943 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
1945 2007-08-28 Paolo Carlini <pcarlini@suse.de>
1948 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
1949 BOUND_TEMPLATE_TEMPLATE_PARM.
1951 2007-08-28 Jakub Jelinek <jakub@redhat.com>
1955 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
1956 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
1958 2007-08-27 Jason Merrill <jason@redhat.com>
1961 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
1962 Look inside STMT_EXPR.
1963 * semantics.c (stmt_expr_value_expr): New fn.
1964 * cp-tree.h: Declare it.
1967 * decl.c (groktypename): Ignore attributes applied to class type.
1969 2007-08-28 Richard Guenther <rguenther@suse.de>
1971 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
1973 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
1975 * error.c (dump_expr): Handle COMPLEX_CST.
1976 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
1977 (pp_cxx_expression): Likewise.
1979 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
1981 * decl.c (GNU_INLINE_P): New.
1982 (duplicate_decls): Handle gnu_inline. Merge attributes and
1983 some flags in overriding definitions.
1984 (redeclaration_error_message): Handle gnu_inline.
1985 (start_preparsed_function): Likewise.
1987 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1989 * call.c (sufficient_parms_p): Constify.
1990 * class.c (same_signature_p): Likewise.
1991 * cp-gimplify.c (is_invisiref_parm,
1992 cxx_omp_privatize_by_reference): Likewise.
1993 * cp-objcp-common.c (has_c_linkage): Likewise.
1994 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
1995 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
1996 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
1997 num_artificial_parms_for, comp_template_parms,
1998 template_parameter_pack_p, any_dependent_template_arguments_p,
1999 any_type_dependent_arguments_p, any_value_dependent_elements_p,
2000 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
2001 zero_init_p, member_p, cp_lvalue_kind,
2002 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
2003 varargs_function_p, is_dummy_object, special_function_kind,
2004 string_conv_p, type_unknown_p, comp_except_specs, compparms,
2005 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
2006 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
2007 cp_has_mutable_p, at_least_as_qualified_p,
2008 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
2009 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
2010 * except.c (nothrow_libfn_p): Likewise.
2011 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
2013 * pt.c (comp_template_parms, template_parameter_pack_p,
2014 any_type_dependent_arguments_p, any_value_dependent_elements_p,
2015 any_dependent_template_arguments_p): Likewise.
2016 * repo.c (repo_export_class_p): Likewise.
2017 * semantics.c (anon_aggr_type_p): Likewise.
2018 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
2019 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
2020 varargs_function_p, member_p, is_dummy_object, pod_type_p,
2021 zero_init_p, special_function_p): Likewise.
2022 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
2023 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
2024 compparms, invalid_nonstatic_memfn_p,
2025 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
2026 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
2027 cp_has_mutable_p, lvalue_or_else): Likewise.
2029 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
2031 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
2032 * cp-objcp-common.c (cp_tree_size): Ditto.
2033 * tree.c (cp_walk_subtrees): Ditto
2034 * cp-tree.def (TINST_LEVEL): Go away.
2035 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
2036 move together with other non-tree structs.
2037 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
2038 (union lang_tree_node): Eliminate tinst_level field.
2039 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
2040 (current_instantiation, outermost_tinst_level): Return
2041 a "struct tinst_level *".
2043 * error.c (print_instantiation_partial_context): Change second
2044 parameter to a "struct tinst_level *". Replace accessor macros
2046 (print_instantiation_full_context): Likewise.
2047 * lex.c (in_main_input_context): Likewise.
2049 * pt.c (struct pending_templates): New.
2050 (pending_templates, last_pending_template): Use it as a type.
2051 (current_tinst_level): Change typo to "struct tinst_level *"
2052 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
2053 (add_pending_template): Construct a "struct pending_template".
2054 Replace TINST_LEVEL accessor macros with field access.
2055 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
2056 (pop_tinst_level): Likewise.
2057 (instantiate_pending_templates): Likewise. Factor common code used
2058 when an instantiation has been done.
2059 (outermost_tinst_level): Replace tree_last with loop.
2060 (current_instantiation): Return a "struct tinst_level *".
2062 2007-08-24 Ollie Wild <aaw@google.com>
2064 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
2065 * name-lookup.h (cp_binding_level): Remove vtables member.
2067 2007-08-24 Richard Guenther <rguenther@suse.de>
2069 * tree.c (cp_cannot_inline_tree_fn): Remove.
2070 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
2071 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
2074 2007-08-24 Jakub Jelinek <jakub@redhat.com>
2077 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
2078 error_mark_node right away if build_expr_type_conversion
2082 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
2083 is error_mark_node rather than NULL_TREE.
2084 * pt.c (check_explicit_specialization): Likewise.
2087 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
2088 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
2090 2007-08-22 Jason Merrill <jason@redhat.com>
2093 * pt.c (outermost_tinst_level): New function.
2094 * lex.c (in_main_input_context): New function.
2095 * cp-tree.h: Declare it.
2096 * decl2.c (constrain_class_visibility): Use it to avoid warning
2097 about uses of the anonymous namespace in the main input file.
2099 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2101 * init.c (build_new_1): Use get_target_expr instead of save_expr.
2103 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
2106 * class.c (finish_struct_1): Warn when a class has virtual
2107 functions and accessible non-virtual destructor.
2109 2007-08-20 Richard Guenther <rguenther@suse.de>
2113 * call.c (build_new_method_call): Convert initializer to
2115 * init.c (build_aggr_init): Do not fiddle with types.
2116 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
2117 * except.c (build_throw): Do not drop qualifiers for the
2119 * typeck.c (get_member_function_from_ptrfunc): Do not
2120 fiddle with types, instead convert.
2121 (build_ptrmemfunc1): Convert to the target type for
2123 (gfc_trans_allocate): Convert result to target type.
2124 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
2125 pointer-to-member structures shall have alias set zero as well.
2127 2007-08-20 Richard Guenther <rguenther@suse.de>
2129 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
2131 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
2132 (nonstatic_local_decl_p): Likewise.
2133 * tree.c (cp_auto_var_in_fn_p): Remove.
2134 * decl.c (nonstatic_local_decl_p): Remove.
2136 2007-08-20 Richard Guenther <rguenther@suse.de>
2138 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
2140 * tree.h (cp_walk_tree): New define to walk_tree_1 with
2141 cp_walk_subtrees lh parameter.
2142 (cp_walk_tree_without_duplicates): New define to
2143 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
2144 * tree.c (count_trees): Call
2145 cp_walk_tree_without_duplicates.
2146 (verify_stmt_tree): Call cp_walk_tree.
2147 (break_out_target_exprs): Likewise.
2148 (WALK_SUBTREE): Likewise.
2149 * cp-gimplify.c (cp_genericize): Likewise.
2150 * cp-pt.c (find_parameter_packs_r): Likewise.
2151 (uses_parameter_packs): Likewise.
2152 (make_pack_expansion): Likewise.
2153 (check_for_bare_parameter_packs): Likewise.
2154 (for_each_template_parm): Likewise.
2155 * decl.c (check_default_argument): Call
2156 cp_walk_tree_without_duplicates.
2157 * except.c (build_throw): Likewise.
2158 * decl2.c (type_visibility): Likewise.
2159 * semantics.c (expand_or_defer_fn): Likewise.
2160 (finalize_nrv): Call cp_walk_tree.
2162 2007-08-20 Jakub Jelinek <jakub@redhat.com>
2165 * init.c (build_new_1): Rename placement_var variable to placement_expr.
2166 Initialize it with save_expr rather than get_temp_regvar.
2168 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
2171 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
2174 2007-08-17 Ollie Wild <aaw@google.com>
2177 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
2178 declarations into appropriate slots for comparison. Fix type
2181 2007-08-17 Paolo Carlini <pcarlini@suse.de>
2184 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
2185 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
2187 2007-08-17 Paolo Carlini <pcarlini@suse.de>
2190 * parser.c (cp_parser_class_head): Improve error message.
2192 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
2194 * pt.c (instantiate_decl): Set input_location
2195 for the function end.
2197 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2199 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
2201 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
2202 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
2203 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
2204 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2205 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
2206 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
2207 * typeck.c (cp_type_quals): Likewise.
2208 * typeck2.c (cxx_incomplete_type_diagnostic,
2209 cxx_incomplete_type_error): Likewise.
2211 2007-08-16 Paolo Carlini <pcarlini@suse.de>
2214 * pt.c (tsubst_friend_function): When check_classfn
2215 returns error_mark_node likewise return it.
2217 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2220 * typeck.c (check_return_expr): Don't NRV optimize vars in
2222 * decl.c (finish_function): Comment fix.
2224 2007-08-15 Paolo Carlini <pcarlini@suse.de>
2227 * pt.c (push_template_decl_real): Depending on TYPE_P
2228 use either TYPE_CONTEXT or DECL_CONTEXT.
2230 2007-08-14 Mark Mitchell <mark@codesourcery.com>
2232 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
2233 constructors and destructors return this.
2235 2007-08-14 Paolo Carlini <pcarlini@suse.de>
2238 * decl2.c (check_classfn): Return error_mark_node in case of error;
2239 in that case, do not call add_method.
2240 * decl.c (start_decl): Deal with check_classfn returning
2242 (grokfndecl): Likewise.
2243 * pt.c (tsubst_friend_function): Likewise.
2245 2007-08-14 Andrew Pinski <pinskia@gmail.com>
2248 * typeck.c (build_binary_op): Disallow vector float types with
2249 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
2251 2007-08-11 Ian Lance Taylor <iant@google.com>
2253 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
2255 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
2257 2007-08-10 Ollie Wild <aaw@google.com>
2259 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
2261 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
2263 (unqualified_namespace_lookup): Fix ambiguous_decl call.
2264 (lookup_using_namespace): Fix ambiguous_decl call.
2265 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
2267 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2269 * call.c (name_as_c_string): Use CONST_CAST.
2270 * decl.c (build_decl): Likewise.
2271 * parser.c (cp_parser_string_literal): Likewise.
2273 2007-08-10 Paolo Carlini <pcarlini@suse.de>
2276 * error.c (dump_expr): Consistently use the *_cxx_*
2277 variants of the pretty-print functions.
2279 2007-08-10 Paolo Carlini <pcarlini@suse.de>
2282 * decl.c (check_special_function_return_type): Just error
2283 on return type specified for conversion operator.
2285 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
2287 * typeck2.c (readonly_error): Handle general expressions.
2288 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
2290 2007-08-06 Dan Hipschman <dsh@google.com>
2292 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
2293 access function name.
2295 2007-08-04 Alfred Minarik <a.minarik@aon.at>
2298 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
2299 * g++spec.c (lang_specific_driver): Check them.
2301 2007-08-06 Paolo Carlini <pcarlini@suse.de>
2304 * pt.c (inline_needs_template_parms): Fix comment; change return type
2307 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
2310 2007-03-26 Dirk Mueller <dmueller@suse.de>
2312 * parser.c (cp_parser_member_declaration): Pedwarn
2313 about stray semicolons after member declarations.
2315 2007-08-02 Lee Millward <lee.millward@gmail.com>
2320 * parser.c (cp_parser_asm_definition): Detect and discard asm
2321 statements with invalid inputs or outputs.
2322 (cp_parser_asm_operand_list): Return error mark node if any
2323 of the operands are invalid. Adjust documentation.
2325 2007-08-02 Nick Clifton <nickc@redhat.com>
2327 * typeck.c: Change copyright header to refer to version 3 of the
2328 GNU General Public License and to point readers at the COPYING3
2329 file and the FSF's license web page.
2330 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
2331 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
2332 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
2333 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
2334 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
2335 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
2336 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
2337 name-lookup.h, parser.c: Likewise.
2339 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2342 * call.c (magic_varargs_p): Honor the "type generic" attribute.
2344 2007-07-30 Paolo Carlini <pcarlini@suse.de>
2347 * semantics.c (finish_label_stmt): Reject the __label__
2348 extension outside function scopes.
2350 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2352 * parser.c (eof_token): Un-constify.
2353 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
2354 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
2357 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
2359 * pt.c, tree.c, typeck2.c: Fix comment typos.
2361 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
2362 Mark Mitchell <mark@codesourcery.com>
2365 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
2366 hidden due to friend declarations in local classes.
2368 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
2370 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
2371 * cp-tree.def (DECLTYPE_TYPE): New.
2372 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
2373 (dump_type_prefix): Ditto.
2374 (dump_type_suffix): Ditto.
2375 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
2376 * mangle.c (write_type): Handle DECLTYPE_TYPE.
2377 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
2379 (DECLTYPE_TYPE_EXPR): New.
2380 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
2381 (finish_declared_type): Declare.
2382 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
2383 DECLTYPE_TYPE nodes.
2384 (pp_cxx_type_id): Ditto.
2385 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
2386 (tsubst): Substitute into a DECLTYPE_TYPE node.
2387 (tsubst_copy): Ditto.
2388 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
2390 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
2391 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
2392 structural equality (because we can't hash the expressions).
2393 (finish_declared_type): New.
2394 * lex.c (reswords): Add "decltype" keyword.
2395 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
2396 (cp_parser_postfix_expression): Add member_access_only_p to
2397 restrict postfix expression to member access expressions.
2398 (cp_parser_unary_expression): Update call to
2399 cp_parser_postfix_expression to reflect new parameter.
2400 (cp_parser_declared_type): New.
2401 (cp_parser_simple_type_specifier): Parse decltype types.
2403 2007-07-27 Mark Mitchell <mark@codesourcery.com>
2406 * call.c (convert_for_arg_passing): Only widen bitfields to their
2407 declared types if necessary.
2409 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2411 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
2414 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2416 * decl.c (typename_hash, typename_compare): Constify.
2417 * mangle.c (hash_type, compare_type): Likewise.
2418 * pt.c (eq_local_specializations, hash_local_specialization):
2420 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
2421 list_hash): Likewise.
2422 * typeck2.c (pat_compare): Likewise.
2424 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
2426 * method.c (implicitly_declare_fn): Increase alignment if member
2427 function pointer format requires it.
2429 2007-07-24 Paolo Carlini <pcarlini@suse.de>
2432 * typeck.c (check_return_expr): Do not pass a null argument
2435 2007-07-24 Paolo Carlini <pcarlini@suse.de>
2438 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
2441 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
2444 * typeck.c (convert_arguments): Only use default args if we have
2448 * typeck.c (structural_comptypes): No need to check
2449 resolve_typename_type return value here.
2450 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
2451 * pt.c (resolve_typename_type): Follow typename typedefs. Return
2452 original type rather than error_mark_node in case of failure.
2453 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
2454 resolve_typename_type result check.
2455 (cp_parser_direct_declarator, cp_parser_head,
2456 cp_parser_constructor_declarator_p): Likewise.
2458 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
2460 * pt.c (template_parms_variadic_p): Remove.
2461 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
2463 2007-07-12 Jakub Jelinek <jakub@redhat.com>
2466 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
2467 argument to dump_aggr_init_expr_args instead of false.
2469 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
2471 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
2472 canonical types; otherwise, fall back to structural type
2473 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
2474 internal compiler error if the canonical types are wrong.
2476 2007-07-11 Paolo Carlini <pcarlini@suse.de>
2479 * parser.c (cp_parser_make_indirect_declarator): When the
2480 the code argument is ERROR_MARK return cp_error_declarator.
2482 2007-07-09 Geoffrey Keating <geoffk@apple.com>
2485 * decl.c (cxx_init_decl_processing): Don't set
2486 force_align_functions_log.
2487 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
2488 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
2489 FUNCTION_DECL, return its alignment.
2491 2007-07-09 Richard Guenther <rguenther@suse.de>
2493 * decl.c (start_preparsed_function): Do not promote return type.
2495 2007-07-08 Paolo Carlini <pcarlini@suse.de>
2498 * pt.c (unify): Never pass error_mark_node to template_decl_level.
2500 2007-07-07 Mark Mitchell <mark@codesourcery.com>
2503 * pt.c (resolve_overloaded_unification): Robustify. Return a
2505 (type_unification_real): Adjust accordingly.
2507 2007-07-06 Richard Guenther <rguenther@suse.de>
2509 * init.c (build_new_1): Use the correct pointer type.
2510 * typeck2.c (build_m_component_ref): Likewise.
2512 2007-07-05 Mark Mitchell <mark@codesourcery.com>
2515 * init.c (build_zero_init): Always build an initializer for
2517 * typeck2.c (build_functional_cast): Use build_zero_init.
2520 * init.c (build_new_1): Always pass the allocation function to
2521 build_op_delete_call.
2522 * call.c (build_op_delete_call): Handle operator delete with a
2523 variable-argument list. Do not issue an error when no matching
2524 deallocation function is available for a new operator.
2527 * cp-tree.h (any_value_dependent_elements_p): Declare it.
2528 * decl.c (value_dependent_init_p): New function.
2529 (cp_finish_decl): Use it.
2530 * pt.c (value_dependent_expression_p): Use
2531 any_value_dependent_elements_p.
2532 * parser.c (cp_parser_primary_expression): Add comment about
2533 treating dependent qualified names as integral
2534 constant-expressions.
2536 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
2538 * decl.c (build_ptrmemfunc_type): Always use structural equality
2539 tests when comparing pointer-to-member-function types, because the
2540 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
2543 2007-07-03 Mark Mitchell <mark@codesourcery.com>
2545 * init.c (build_new): Tweak comment.
2547 2007-06-29 Dave Brolley <brolley@redhat.com>
2550 * parser.c (cp_parser_new_type_id): Don't reduce a named array
2551 type to its base type and number of elements here.
2552 * init.c (build_new): Call complete_type_or_else to ensure that the
2553 type is complete and to issue a diagnostic if it is not.
2554 (build_new_1): Don't call complete_type_or_else here.
2556 2007-07-03 Richard Guenther <rguenther@suse.de>
2559 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
2562 2007-07-02 Simon Baldwin <simonb@google.com>
2564 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
2565 for inner-style nested forward declarations that don't declare
2568 2007-07-02 Jakub Jelinek <jakub@redhat.com>
2571 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2572 DECL_P in not a variable and appears more than once error messages.
2574 2007-07-01 Ollie Wild <aaw@google.com>
2576 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
2577 (select_decl): Remove function.
2578 (unqualified_namespace_lookup): Populate binding by calling
2579 ambiguous_decl. Remove select_decl call.
2580 (lookup_qualified_name): Remove select_decl call.
2581 * decl.c (lookup_and_check_tag): Check for ambiguous references.
2582 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
2583 generation when name lookup is ambiguous.
2585 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
2588 * init.c (build_new_1): Use structural equality on the copy of the
2591 2007-06-28 Geoffrey Keating <geoffk@apple.com>
2593 * decl2.c (determine_visibility): Implement
2594 flag_visibility_ms_compat effect on type info.
2595 * decl.c (cxx_init_decl_processing): Implement
2596 global effect of flag_visibility_ms_compat.
2598 2007-06-28 Geoffrey Keating <geoffk@apple.com>
2600 * decl2.c (start_objects): Mark constructor-running function
2603 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
2606 * decl.c (grokdeclarator): Reset friendp for member functions declared
2607 friend of their own class.
2609 2007-06-23 Mark Mitchell <mark@codesourcery.com>
2611 * decl2.c (determine_visibility): Don't look for dllexport here.
2612 (determine_visibility_from_class): Tidy.
2614 2007-06-18 Simon Baldwin <simonb@google.com>
2617 * parser.c (cp_parser_single_declaration): Added check for storage
2618 class other than sc_none in parsed declaration, and a flag to indicate
2619 if the call is part of an explicit template specialization parse.
2620 * (cp_parser_explicit_specialization): Specialization check flag added
2621 to call to cp_parser_single_declaration(), set true.
2622 * (cp_parser_template_declaration_after_export): Specialization check
2623 flag added to call to cp_parser_single_declaration(), set false.
2624 * pt.c (check_explicit_specialization): Added code to copy visiblity
2625 and linkage from the templated function to the explicit specialization.
2627 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
2629 * typeck.c (build_binary_op): For templates build the
2630 expression in pieces to avoid the assert in build2_stat.
2631 (get_member_function_from_ptrfunc):
2632 Change over to using POINTER_PLUS_EXPR and convert
2633 the second operand to sizetype.
2634 * typeck2.c (build_m_component_ref): Likewise.
2635 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
2636 instead of PLUS_EXPR for pointers.
2637 (build_new_1): Likewise.
2638 (build_vec_delete_1): Likewise.
2639 (build_vec_delete): Likewise.
2640 * class.c (build_base_path): Likewise.
2641 (build_base_path): Likewise.
2642 (convert_to_base_statically): Likewise.
2643 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
2644 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
2645 instead of PLUS_EXPR.
2646 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
2647 instead of PLUS_EXPR for pointers.
2648 * call.c (build_special_member_call): Likewise.
2649 * rtti.c (build_headof): Likewise.
2650 Use sizetype instead of ptrdiff_type_node.
2651 (tinfo_base_init): Create a POINTER_PLUS_EXPR
2652 instead of PLUS_EXPR for pointers.
2653 * except.c (expand_start_catch_block): Do a
2654 NEGATIVE and then a POINTER_PLUS_EXPR instead
2656 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
2657 PLUS_EXPR on pointer types over to use
2658 POINTER_PLUS_EXPR and remove the conversion
2659 to the pointer types.
2660 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
2661 adding to a pointer type. Use size_int instead of
2662 ssize_int. Convert the index to sizetype before
2663 adding it to the pointer.
2665 2007-06-15 Mark Mitchell <mark@codesourcery.com>
2667 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
2668 (DECL_ANON_UNION_VAR_P): New macro.
2669 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
2670 than DECL_VAR_MARKED_P, to keep track of which variables we have
2672 * decl.c (redeclaration_error_message): Complain about redeclaring
2673 anonymous union members at namespace scope.
2674 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
2676 2007-06-14 Geoff Keating <geoffk@apple.com>
2678 * decl2.c (determine_visibility): Ensure that functions with
2679 hidden types as parameters are hidden.
2682 * decl2.c (determine_visibility): Remove duplicate code for
2685 2007-06-12 Ian Lance Taylor <iant@google.com>
2688 * init.c (avoid_placement_new_aliasing): New static function.
2689 (build_new_1): Call it.
2691 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
2693 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
2694 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
2696 2007-06-08 Jakub Jelinek <jakub@redhat.com>
2699 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
2700 on init, the non-decl cond operand and increment value.
2702 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
2705 * decl.c (check_initializer): Report an error when a brace enclosed
2706 initializer is used for a non-aggregate type in C++98.
2707 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
2709 (grokdeclarator): Likewise.
2710 (move_fn_p): Likewise.
2711 * typeck.c (check_return_expr): Likewise.
2712 * call.c (reference_binding): Likewise.
2713 * error.c (cp_cpp_error): Likewise.
2714 * pt.c (check_default_tmpl_args): Likewise.
2716 * lex.c (init_reswords): Likewise.
2717 * parser.c (p_parser_primary_expression): Likewise.
2718 (TOKEN_PRECEDENCE): Likewise.
2719 (cp_parser_init_declarator): Likewise.
2720 (cp_parser_ptr_operator): Likewise.
2721 (cp_parser_parameter_declaration): Likewise.
2722 (cp_parser_enclosed_template_argument_list): Likewise.
2723 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
2724 (cp_parser_next_token_ends_template_argument_p): Likewise.
2726 2007-06-04 Simon Baldwin <simonb@google.com>
2728 * decl.c (grokdeclarator): Readability change. Moved case labels
2729 into direct switch statement scope.
2731 2007-06-04 Paolo Carlini <pcarlini@suse.de>
2733 * call.c (convert_like_real): Remove pointless code.
2735 2007-05-31 Mark Mitchell <mark@codesourcery.com>
2737 * decl.c (get_atexit_fn_ptr_type): New function.
2738 (get_atexit_node): Use it.
2739 (start_cleanup_fn): Likewise.
2740 (register_dtor_fn): Use the object's destructor, instead of a
2741 separate cleanup function, where possible.
2742 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
2743 (atexit_fn_ptr_type_node): New macro.
2744 * decl2.c (build_cleanup): Use build_address.
2746 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
2748 * typeck.c (build_binary_op): Include types in error.
2750 2007-05-31 Jakub Jelinek <jakub@redhat.com>
2753 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
2754 needs runtime initialization.
2756 2007-05-31 Paolo Carlini <pcarlini@suse.de>
2759 * semantics.c (finish_trait_expr): Complete the types.
2761 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
2762 Douglas Gregor <doug.gregor@gmail.com>
2763 Pedro Lamarao <pedro.lamarao@mndfck.org>
2764 Howard Hinnant <howard.hinnant@gmail.com>
2768 * typeck.c (comptypes): Don't consider rvalue and lvalue
2769 reference types to be equivalent.
2770 (check_return_expr): Move from certain lvalues when returning
2772 * decl.c (grokdeclarator): Implement reference collapsing.
2773 (copy_fn_p): Don't consider constructors taking rvalue references
2774 to be copy constructors.
2776 * call.c (conversion): New "rvaluedness_matches_p" member.
2777 (convert_class_to_reference): Require reference type as first
2778 parameter instead of base type.
2779 (reference_binding): Add logic to handle rvalue references.
2780 (implicit_conversion): Update inaccurate comment.
2781 (convert_like_real): Disable creation of temporaries that are
2782 impossible to initialize for types with move constructors.
2783 (build_over_call): Elide move constructors when possible.
2784 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
2785 (maybe_handle_ref_bind): Return conversion instead of type node.
2786 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
2787 determine preferred conversion sequences.
2788 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
2789 (LOOKUP_PREFER_RVALUE): New.
2790 (DECL_MOVE_CONSTRUCTOR_P): New.
2791 (struct cp_declarator): Add "reference" member for reference
2792 types, with new "rvalue_ref" flag.
2793 (cp_build_reference_type): Declare.
2794 (move_fn_p): Declare.
2795 * error.c (dump_type_prefix): Format rvalue reference types
2796 correctly in error messages.
2797 * except.c (build_throw): Move from certain lvalues when
2799 * mangle.c (write_type): Mangle rvalue references differently
2800 than regular references.
2801 * parser.c (make_reference_declarator): Add boolean parameter for
2803 (cp_parser_make_indirect_declarator): New.
2804 (cp_parser_new_declarator_opt): Call
2805 cp_parser_make_indirect_declarator.
2806 (cp_parser_conversion_declarator_opt): Ditto.
2807 (cp_parser_declarator): Ditto.
2808 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
2810 * pt.c (tsubst): Implement reference collapsing.
2811 (maybe_adjust_types_for_deduction): Implement special template
2812 parameter deduction rule for rvalue references.
2813 (type_unification_real): Update calls to
2814 maybe_adjust_types_for_deduction.
2815 (try_one_overload): Ditto.
2816 (unify_pack_expansion): Ditto.
2817 * tree.c (lvalue_p_1): Handle rvalue reference types.
2818 (cp_build_reference_type): New.
2820 2007-05-30 Jakub Jelinek <jakub@redhat.com>
2823 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
2824 variables that need runtime initialization.
2826 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
2829 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
2830 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
2831 case POSTDECREMENT_EXPR>): Return the error_mark_node
2832 if either the real or imaginary parts would an
2835 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
2836 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2839 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
2840 token is a closing brace, false if there are no tokens left.
2841 (cp_parser_namespace_alias_definition): Only consume the next token if
2842 it is a closing brace.
2844 * parser.c (cp_parser_class_specifier): Likewise.
2846 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
2848 * semantics.c (finish_member_declaration): Fix a typo in the
2851 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
2863 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
2864 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
2865 * pt.c (check_for_bare_parameter_packs): Return bool indicated
2866 whether everything was okay. Fix indentation.
2867 (push_template_decl_real): Check for bare parameter packs in
2868 function parameters; where errors occur, mark the parameter types
2869 with ERROR_MARK_NODEs to avert ICEs.
2870 (coerce_template_parameter_pack): New.
2871 (coerce_template_parms): Moved parameter pack coercion into
2872 coerce_template_parameter_pack, and permit it anywhere in the
2873 template parameter list (not just at the end). Parameter and
2874 argument indices can vary (somewhat) separately now, so add
2875 PARM_IDX and ARG_IDX.
2876 (fn_type_unification): Don't set an argument pack as incomplete if
2877 no argument pack was deduced.
2878 (type_unification_real): If a type parameter is a parameter pack
2879 and has not otherwise been deduced, it will be deduced to an empty
2881 (more_specialized_fn): Use the actual lengths of the argument
2882 lists when comparing against expansions.
2883 * semantics.c (finish_member_declaration): If a field's type has
2884 bare parameter packs, error and set its type to ERROR_MARK_NODE.
2886 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
2889 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
2891 2007-05-22 Ollie Wild <aaw@google.com>
2893 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
2894 (unqualified_namespace_lookup): Adds check for hidden types.
2896 2007-05-22 Ollie Wild <aaw@google.com>
2898 * decl.c (duplicate_decls): Verify namespace names are unique.
2900 2007-05-21 Mark Mitchell <mark@codesourcery.com>
2902 * decl.c (cxx_maybe_build_cleanup): Handle
2903 __attribute__((cleanup)).
2905 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2907 * cvt.c (cp_convert_and_check): Don't check warnings if the
2910 2007-05-18 Geoffrey Keating <geoffk@apple.com>
2912 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
2914 2007-05-14 Paolo Carlini <pcarlini@suse.de>
2917 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
2918 type only if is a class type (5.2.8/4).
2920 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
2922 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
2923 * decl.c (grokdeclarator): Use unsigned_type_for instead of
2924 c_common_unsigned_type.
2926 2007-05-11 Silvius Rus <rus@google.com>
2928 * cp/typeck.c (build_indirect_ref): Add call to
2929 strict_aliasing_warning.
2930 (build_reinterpret_cast_1): Condition call to
2931 strict_aliasing_warning.
2933 2007-05-11 Jan Hubicka <jh@suse.cz>
2935 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
2936 * decl2.c (start_objects): ctors and dtors are no longer public.
2937 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
2939 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
2941 * typeck.c (build_unary_op): Remove code that used to
2942 handle non lvalue increments/decrements.
2944 2007-05-07 Mike Stump <mrs@apple.com>
2946 * parser.c (check_empty_body): Add.
2947 (cp_parser_iteration_statement): Add call to check_empty_body.
2949 2007-05-05 Geoffrey Keating <geoffk@apple.com>
2952 * mangle.c (write_mangled_name): Mangle static variable names.
2953 (write_unqualified_name): Use local-source-name for
2954 namespace-scope static variables.
2956 2007-05-04 Dirk Mueller <dmueller@suse.de>
2958 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
2961 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
2964 * decl2.c (constrain_class_visibility):
2965 Use strip_pointer_or_array_types instead of strip_array_types.
2967 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
2970 * decl.c (reshape_init_r): Don't reshape the first element if it
2971 is a pointer to member function.
2973 2007-04-27 Simon Baldwin <simonb@google.com>
2975 * decl.c (grokparms): Changed message format from %qD to %qE.
2977 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
2979 * error.c (maybe_warn_variadic_templates): Variadic templates are
2980 now in C++0x, so only warn about them in C++98 mode.
2982 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
2985 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
2986 integeral types from vectors types.
2988 2007-04-26 Jakub Jelinek <jakub@redhat.com>
2991 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
2992 for type dependent OMP_CLAUSE_DECLs.
2994 2007-04-24 Mark Mitchell <mark@codesourcery.com>
2997 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
2998 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
2999 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
3000 * init.c (build_zero_init): Adjust, as
3001 COMPLEX_TYPE is now a SCALAR_TYPE.
3002 * typeck2.c (digest_init): Allow brace-enclosed initializers for
3003 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
3005 2007-04-25 Paolo Carlini <pcarlini@suse.de>
3007 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
3008 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
3009 (trait_expr_value): Adjust.
3011 2007-04-23 Simon Baldwin <simonb@google.com>
3013 * decl.c (grokparms): Added new error for duplicate function
3014 parameters names in function prototypes, to match gcc behavior.
3016 2007-04-23 Jan Hubicka <jh@suse.cz>
3018 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
3021 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
3023 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
3024 instead of checking GIMPLE_STMT_P in chain_next.
3026 2007-04-17 Mark Mitchell <mark@codesourcery.com>
3029 * call.c (convert_for_arg_passing): Convert bitfields to their
3032 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
3035 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
3037 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
3040 * cp/decl2.c (constrain_class_visibility):
3041 Do not warn about the use of anonymous namespace in the main input file.
3043 2007-04-15 Mark Mitchell <mark@codesourcery.com>
3045 * cp-tree.h (current_template_parms): Fix typo in comment.
3047 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
3049 * cp-tree.h, error.c: Fix comment typos.
3051 2007-04-13 Jason Merrill <jason@redhat.com>
3054 * call.c (reference_binding): Add c_cast_p parm. If true,
3055 add quals to TO as needed to make it reference-compatible.
3057 2007-04-11 Jan Hubicka <jh@suse.cz>
3059 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
3060 that we are not processing template_decl.
3062 2007-04-09 Mark Mitchell <mark@codesourcery.com>
3065 * class.c (build_base_path): Ensure that the converted pointer has
3066 the same cv-qualification as the input.
3068 2007-04-09 Paolo Carlini <pcarlini@suse.de>
3070 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
3072 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
3074 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
3076 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
3077 * tree.c (cp_add_pending_fn_decls): Remove.
3078 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
3080 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
3082 Revert change removing staticp.
3084 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
3086 * cp-objcp-common.c (cxx_staticp): Remove.
3087 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
3088 * cp-tree.h (cxx_staticp):
3090 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
3092 * class.c (check_for_override): Don't remove dllmport attribute
3095 2007-04-03 Jakub Jelinek <jakub@redhat.com>
3098 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
3099 type issue error and return early.
3101 2007-03-30 Jason Merrill <jason@redhat.com>
3104 * typeck.c (cp_type_readonly): New fn.
3105 * cp-tree.h: Declare it.
3106 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
3107 (cp_finish_decl): Not here.
3109 2007-03-31 Richard Guenther <rguenther@suse.de>
3111 * optimize.c (maybe_clone_body): Replace splay-tree usage by
3114 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
3119 * parser.c (declarator_can_be_parameter_pack): New.
3120 (cp_parser_template_parameter): Only parse the `...' if the
3121 declarator can be a parameter pack.
3122 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
3124 * pt.c (find_parameter_packs_r): Look into the bounds on integer
3125 types (they could be used as array bounds).
3126 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
3127 (tsubst_pack_expansion): Handle failure to expand parameter
3130 2007-03-30 Paolo Carlini <pcarlini@suse.de>
3133 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
3134 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
3135 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
3136 (CLASS_TYPE_NON_UNION_P): Add.
3137 (struct lang_type_class): Add has_complex_dflt.
3138 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
3139 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
3140 * cp-tree.def: Add TRAIT_EXPR.
3141 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
3142 * lex.c (struct resword): Add __has_nothrow_assign,
3143 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
3144 __has_trivial_constructor, __has_trivial_copy,
3145 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
3146 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
3147 __is_pod, __is_polymorphic, __is_union.
3148 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
3149 (cp_parser_trait_expr): New.
3150 * semantics.c (finish_trait_expr, trait_expr_value
3151 classtype_has_nothrow_copy_or_assign_p): New.
3152 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
3154 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
3155 * class.c (check_bases, check_field_decl, check_bases_and_members):
3156 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
3157 * pt.c (uses_template_parms, tsubst_copy_and_build,
3158 value_dependent_expression_p, type_dependent_expression_p): Deal with
3160 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
3162 2007-03-29 Richard Guenther <rguenther@suse.de>
3164 * tree.c (cp_walk_subtrees): Do not set input_location.
3166 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
3169 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
3172 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
3174 * parser.c (struct cp_parser): Update comment for
3175 greater_than_is_operator_p.
3176 (cp_parser_primary_expression): In C++0x mode, a cast operator can
3177 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
3178 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
3179 !GREATER_THAN_IS_OPERATOR_P.
3180 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
3181 `>>' operators that will become two `>' tokens in C++0x.
3182 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
3183 mode, allowing it to terminate default arguments.
3184 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
3185 `>>' like two consecutive `>' tokens.
3186 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
3187 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
3188 ends a template argument.
3190 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
3192 * decl.c (redeclaration_error_message): Complain when redeclaring
3193 a friend function with default template arguments (C++0x mode only).
3194 * cp-tree.h (check_default_tmpl_args): Declare.
3195 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
3196 template arguments in function templates. Add support for checking
3197 the default template arguments of friend templates.
3198 (push_template_decl_real): Fix call to check_default_tmpl_args.
3199 (type_unification_real): If a template parameter has not been
3200 deduced but provides a default template argument, substitute into
3201 that default template argument.
3202 * parser.c (cp_parser_init_declarator): When declaring (but not
3203 defining!) a function template in C++0x mode, check for default
3206 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
3209 * decl.c (grokdeclarator): Deal with cv-qualified function type
3210 typedefs in the same way for member and non-member functions.
3212 2007-03-26 Dirk Mueller <dmueller@suse.de>
3214 * parser.c (cp_parser_member_declaration): Pedwarn
3215 about stray semicolons after member declarations.
3217 2007-03-26 Paolo Carlini <pcarlini@suse.de>
3220 * pt.c (instantiate_decl): Set in_system_header.
3222 2007-03-22 Mark Mitchell <mark@codesourcery.com>
3224 * cp-tree.h (current_tempalte_parms): Improve documentation.
3225 * pt.c (current_template_args): Likewise.
3228 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
3229 not consume tokens when failing.
3231 2007-03-22 Jim Wilson <wilson@specifix.com>
3232 Mark Mitchell <mark@codesourcery.com>
3235 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
3236 consistent with FROM.
3238 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3240 * error.c (dump_expr): Handle dependent names that designate types.
3241 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
3243 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
3245 * cp-tree.def, parser.c, pt.c: Fix comment typos.
3247 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3249 * cvt.c (cp_convert_and_check) : Define.
3250 * cp-tree.h (cp_convert_and_check): Declare.
3251 * call.c (convert_conversion_warnings): Rename to
3252 conversion_null_warnings. The warning for floating-point to
3253 integer is handled by convert_and_check in convert_like_real.
3254 (convert_like_real): convert_conversion_warnings was renamed as
3255 conversion_null_warnings.
3256 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
3257 overflow and changes of value during conversion.
3259 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3262 * parser.c (cp_parser_statement): If 'namespace' is found, this
3263 only can be a namespace alias definition, so parse it now.
3264 (cp_parser_namespace_alias_definition): if we find an open brace
3265 instead of '=', then this is actually a misplaced namespace
3268 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3271 * decl.c (cxx_init_decl_processing): Move command-line options
3272 processing to c-opts.c.
3274 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
3276 * ptree.c (cxx_print_type): Use formatting markup for integers
3277 when printing template parameter index/level/orig level.
3278 (cxx_print_xnode): Ditto.
3279 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
3280 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
3281 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
3283 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
3284 rather than a HOST_WIDE_INT.
3285 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
3286 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
3288 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
3289 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
3290 IN_BASE_INITIALIZER bool bitfields.
3291 (struct cp_declarator): Make KIND a 4-bit field. Make
3292 PARAMETER_PACK_P a bool bitfield just after KIND.
3293 * pt.c (uses_parameter_packs): Destroy the pointer set.
3294 (make_pack_expansion): Ditto.
3295 (check_for_bare_parameter_packs): Ditto.
3296 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
3298 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
3301 * call.c (convert_default_arg): Instead of copying the node,
3304 2007-03-15 Dirk Mueller <dmueller@suse.de>
3307 * call.c (convert_conversion_warnings): New..
3308 (convert_like_real): .. factored out from here.
3309 (convert_conversion_warnings): Add warning about
3310 false being converted to NULL in argument passing.
3312 2007-03-14 Dirk Mueller <dmueller@suse.de>
3314 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
3315 (finish_do_body): Warn about empty body in do/while statement.
3317 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3319 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
3321 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3324 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
3327 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
3329 * cp/repo.c (init_repo): Initialize random_seed saved options.
3330 (finish_repo): Adjust.
3332 2007-03-13 Mark Mitchell <mark@codesourcery.com>
3335 * Make-lang.in (doc/g++.1): Use $< to specify the location from
3338 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
3340 * decl.c (compute_array_index_type): New warning flag warn_vla.
3342 2007-03-12 Mark Mitchell <mark@codesourcery.com>
3345 * call.c (convert_default_arg): Copy non-constant arguments.
3347 2007-03-11 Mark Mitchell <mark@codesourcery.com>
3350 * parser.c (cp_parser_postfix_expression): Disallow compound
3351 literals in constant expressions.
3354 * semantics.c (finish_typeof): Use unlowered_expr_type.
3356 2007-03-10 Mark Mitchell <mark@codesourcery.com>
3359 * cp-tree.h (unlowered_expr_type): New function.
3360 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
3361 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
3362 (unlowered_expr_type): New function.
3363 (build_unary_op): Disallow predecrements of bool bitfields.
3364 * call.c (build_conditional_expr): Use unlowered_expr_type.
3365 * pt.c (type_unification_real): Likewise.
3367 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
3370 * typeck.c (check_return_expr): Check for bare parameter packs.
3371 (comptypes): Compare template parameter packs and
3372 type pack expansions.
3373 * decl.c (grokdeclarator): Deal with the declaration of function
3375 (grokparms): Verify that the (optional) function parameter pack is
3376 at the end of the parameter list.
3377 (xref_basetypes): Handle pack expansions in the base class.
3378 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
3379 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
3380 (NONTYPE_ARGUMENT_PACK): New.
3381 (TYPE_PACK_EXPANSION): New.
3382 (EXPR_PACK_EXPANSION): New.
3383 (ARGUMENT_PACK_SELECT): New.
3384 * cp-objcp-common.c (cp_tree_size): Compute size of
3385 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
3386 ARGUMENT_PACK_SELECT.
3387 * error.c (dump_template_argument): Print template argument packs.
3388 (dump_template_argument_list): Ditto.
3389 (dump_template_parameter): Dump `...' for template type parameter
3391 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
3392 (dump_parameters): Print function parameter packs.
3393 (dump_template_parms): Print template argument packs.
3394 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
3395 (maybe_warn_variadic_templates): New.
3396 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
3397 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
3398 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
3400 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
3401 (write_template_arg): Write argument packs as separate arguments.
3402 * cp-tree.h (struct template_parm_index_s): Add flag that
3403 indicates that the template parameter is actually a parameter
3405 (struct tree_argument_pack_select): New.
3406 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
3407 (union lang_tree_node): Add argument_pack_select.
3408 (FUNCTION_PARAMETER_PACK_P): New.
3409 (PACK_EXPANSION_P): New.
3410 (PACK_EXPANSION_PATTERN): New.
3411 (SET_PACK_EXPANSION_PATTERN): New.
3412 (PACK_EXPANSION_PARAMETER_PACKS): New.
3413 (ARGUMENT_PACK_P): New.
3414 (ARGUMENT_PACK_ARGS): New.
3415 (SET_ARGUMENT_PACK_ARGS): New.
3416 (ARGUMENT_PACK_INCOMPLETE_P): New.
3417 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
3418 (TEMPLATE_PARM_PARAMETER_PACK): New.
3419 (TEMPLATE_TYPE_PARAMETER_PACK): New.
3420 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
3421 (ARGUMENT_PACK_SELECT_INDEX): New.
3422 (ARGUMENT_PACK_SELECT_ARG): New.
3423 (struct cp_declarator): Add parameter_pack_p flag.
3424 (maybe_warn_variadic_templates): Declare.
3425 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
3426 indicate a template parameter pack.
3427 (uses_parameter_packs): Declare.
3428 (template_parameter_pack_p): Declare.
3429 (template_parms_variadic_p): Declare.
3430 (make_pack_expansion): Declare.
3431 (check_for_bare_parameter_packs): Declare.
3432 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
3433 sizeof... expressions.
3434 (pp_cxx_expression): Print pack expansions and non-type argument
3436 (pp_cxx_exception_specification): Print pack expansions.
3437 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
3438 (pp_cxx_ctor_initializer): Print pack expansions.
3439 (pp_cxx_type_id): Print pack expansions.
3440 (pp_cxx_template_argument_list): Print argument packs.
3441 (pp_cxx_template_parameter): Print ellipsis for template parameter
3443 * pt.c (comp_template_parms): Compare template parameter packs.
3444 (template_parameter_pack_p): New.
3445 (template_parms_variadic_p): New.
3446 (template_args_variadic_p): New.
3447 (make_ith_pack_parameter_name): New.
3448 (struct find_parameter_pack_data): New.
3449 (find_parameter_packs_r): New.
3450 (uses_parameter_packs): New.
3451 (make_pack_expansion): New.
3452 (check_for_bare_parameter_packs): New.
3453 (expand_template_argument_pack): New.
3454 (reduce_template_parm_level): Propagate parameter pack flag.
3455 (process_template_parm): Add is_parameter_pack parameter to state
3456 when the parameter is actually a parameter pack. Create template
3457 parameter packs when is_parameter_pack is true.
3458 (current_template_args): The argument for a template parameter
3459 pack is an argument pack containing a single pack expansion.
3460 (process_partial_specialization): When checking that non-type
3461 argument expressions do not involve template parameters, loop over
3462 the arguments in argument packs separately.
3463 (push_template_decl_real): Check that the type of the declaration
3464 does not have any bare parameter packs. Check that primary
3465 templates have no more than one parameter pack, and that it comes
3466 at the end of the template parameter list.
3467 (convert_template_argument): Handle coercions for pack expansion
3468 expressions by coercing the pattern then rebuilding the expansion.
3469 (coerce_template_parms): When coercing the arguments for a
3470 variadic template, pack "extra" arguments into an argument pack.
3471 (coerce_template_template_parms): Cannot coerce between parameter
3472 packs and non-pack parameters.
3473 (template_args_equal): Compare PACK_EXPANSION_P expressions.
3474 (comp_template_args): Expand all template arguments packs before
3475 comparing template argument lists.
3476 (mangle_class_name_for_template): Make argument packs as separate
3478 (for_each_template_parm_r): No need to handle BASELINK.
3479 (instantiate_class_template): Handle pack expansions in the base
3481 (tsubst_pack_expansion): New.
3482 (tsubst_template_args): Handle substitutions of argument packs and
3483 pack expansion into template argument lists.
3484 (tsubst_decl): Expand function parameter packs into separate
3485 function parameters.
3486 (tsubst_arg_types): Expand a type pack expansion into separate
3488 (tsubst_exception_specification): Handle pack expansions in
3489 exception specifiers.
3490 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
3491 replacing a template parameter with its argument. If we encounter
3492 a substitution for an argument pack, just return the parameter
3494 (tsubst_copy): sizeof(X...) returns the number of elements in
3495 parameter pack X. See through ARGUMENT_PACK_SELECT when the
3496 PARM_DECL is a parameter pack.
3497 (tsubst_expr): Expression pack expansions and argument packs
3498 cannot show up here; they will all be handled through function
3499 calls, sizeof, and template argument lists.
3500 (tsubst_copy_and_build): sizeof(X...) returns the number of
3501 elements in parameter pack X. Handle pack expansions in TREE_LIST
3502 and CONSTRUCTOR nodes.
3503 (fn_type_unification): Handle "incomplete" explicit template
3504 argument lists that specify some of the arguments for a template
3506 (type_unification_real): Unify arguments against pack expansions.
3507 (template_parm_level_and_index): New, helper function.
3508 (unify_pack_expansion): New.
3509 (unify): Unify argument packs on an argument-by-argument basis,
3510 handling variadic argument packs as well.
3511 (more_specialized_fn): Handle unification of function parameter
3512 packs. All things being equal, prefer non-variadic function
3513 templates to variadic function templates.
3514 (more_specialized_class): Prefer the variadic class template
3515 partial specialization that binds fewer arguments to a parameter
3517 (regenerate_decl_from_template): Expand function parameter packs
3518 into separate parameters.
3519 (instantiate_decl): Ditto.
3520 (tsubst_initializer_list): Handle pack expansions for base-class
3522 (dependent_type_p_r): Determine dependent types in argument packs
3523 and pack expansions.
3524 (value_dependent_expression_p): Determine value-dependence of
3525 non-type argument packs.
3526 (dependent_template_arg_p): Handle argument packs.
3527 * semantics.c (finish_cond): Check for bare parameter packs.
3528 (finish_expr_stmt): Ditto.
3529 (finish_for_expr): Ditto.
3530 (finish_switch_cond): Ditto.
3531 (finish_mem_initializers): Ditto.
3532 * name-lookup.c (arg_assoc_type): Handle pack expansions and
3534 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
3535 * parser.c (make_declarator): Declarator is not an expansion.
3536 (make_pointer_declarator): Transfer parameter pack flag to outer
3538 (make_reference_declarator): Ditto.
3539 (make_ptrmem_declarator): Ditto.
3540 (make_call_declarator): Ditto.
3541 (make_array_declarator): Ditto.
3542 (cp_parser_postfix_expression): Allow pack expansion expressions
3543 in the argument list for a call expression.
3544 (cp_parser_parenthesized_expression_list): Add new parameter
3545 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
3546 into separate arguments."
3547 (cp_parser_new_placement): Allow pack expansion expressions.
3548 (cp_parser_new_initializer): Ditto.
3549 (cp_parser_mem_initializer_list): Allow ellipsis to create a
3550 base-class initializer expansion.
3551 (cp_parser_mem_initializer): Ditto.
3552 (cp_parser_template_parameter_list): Keep track of whether the
3553 template parameter is a template parameter pack.
3554 (cp_parser_template_parameter): Parse the ellipsis to indicate a
3555 template parameter pack.
3556 (cp_parser_type_parameter): Ditto.
3557 (cp_parser_template_argument_list): Parse the ellipsis to indicate
3559 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
3560 this declarator is a parameter pack.
3561 (cp_parser_parameter_declaration): The ellipsis does not end the
3562 parameter declaration, because it might be a parameter pack. Parse
3563 the ellipsis to indicate a parameter pack.
3564 (cp_parser_initializer): Allow pack expansions.
3565 (cp_parser_initializer_list): Allow ellipsis to create an
3566 initializer expansion.
3567 (cp_parser_base_clause): Allow ellipsis to create a base specifier
3569 (cp_parser_type_id_list): Allow ellipsis to create an exception
3570 specifier expansion.
3571 (cp_parser_attribute_list): Don't allow pack expansions.
3572 (cp_parser_functional_cast): Allow pack expansions.
3573 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
3574 compute the length of a parameter pack.
3575 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
3576 end a template argument.
3577 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
3578 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
3581 2007-03-09 Dirk Mueller <dmueller@suse.de>
3583 * cp/call.c (build_new_op): Call warn_logical_operator.
3585 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
3588 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
3591 * pt.c (any_template_arguments_need_structural_equality_p):
3594 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
3596 * decl.c (grokdeclarator): Disable warnings for anonymous
3599 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
3601 * typeck2.c (readonly_error): Always emit a hard error.
3602 Remove last argument.
3603 * cp-tree.h (readonly_error): Adjust prototype.
3604 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
3605 * typeck.c (build_unary_op): Likewise.
3606 (build_modify_expr): Likewise.
3608 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
3611 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
3613 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3616 * parser.c (struct cp_parser): New IN_IF_STMT.
3617 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
3618 returning if parsing the body of an 'if' statement or issuing an
3619 error and continuing.
3620 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
3622 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
3624 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
3627 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
3630 2007-03-02 Geoffrey Keating <geoffk@apple.com>
3632 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
3633 Objective-C++. Don't exit early if -shared-libgcc needs to be
3636 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3638 * typeck.c (common_base_type): Delete unused function.
3640 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
3642 * Make-lang.in: Add dummy lang.install-pdf target.
3644 2007-03-01 Simon Baldwin <simonb@google.com>
3647 * decl.c (check_tag_decl): Added new warning for typedef ignored
3648 when it precedes an otherwise valid non-typedef declaration.
3650 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
3652 * typeck.c (build_function_call): Store converted arguments
3653 in a stack-allocated array instead of building a list.
3654 (convert_arguments): Store arguments in the array passed in as an
3655 argument, and return the actual number of arguments.
3656 * call.c (build_call): Delete, and replace with...
3657 (build_call_n, build_call_a): New.
3658 (build_op_delete_call): Rewrite to avoid constructing argument lists.
3659 (build_over_call): Store converted arguments in a stack-allocated
3660 array instead of building a list.
3661 (build_cxx_call): Pass arguments in an array instead of as a list.
3662 (build_java_interface_fn_ref): Rewrite to avoid constructing
3664 * tree.h: Update declarations to reflect above changes.
3665 * method.c (use_thunk): Use a stack-allocated array to hold
3666 the arguments instead of a list.
3667 * rtti.c (throw_bad_cast): Update call to cxx_call.
3668 (throw_bad_typeid): Likewise.
3669 (build_dynamic_cast_1): Likewise.
3670 * init.c (build_builtin_delete_call): Use build_call_n.
3671 * decl.c (expand_static_init): Likewise.
3672 * except.c (cp_protect_cleanup_actions): Likewise.
3673 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
3674 (gimplify_must_not_throw_expr): Likewise.
3675 (cxx_omp_apply_fn): Use build_call_a.
3677 2007-02-26 Mark Mitchell <mark@codesourcery.com>
3679 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
3680 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
3682 2007-02-25 Mark Mitchell <mark@codesourcery.com>
3684 * cp-tree.h (static_ctors): Remove.
3685 * cp-tree.h (static_dtors): Likewise.
3686 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
3687 refactoring of tree_map hierarchy.
3688 (decl_shadowed_for_var_insert): Likewise.
3689 * semantics.c (expand_body): Use c_expand_body.
3690 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
3691 * decl2.c (static_ctors): Remove.
3692 (static_dtors): Likewise.
3693 (generate_ctor_or_dtor_function): Pass NULL_TREE to
3694 objc_generate_static_init_call. Do not call static_[cd]tors.
3695 (generate_ctor_and_dtor_functions_for_priority): Do not check for
3697 (cp_write_global_declarations): Likewise.
3699 2007-02-23 Richard Guenther <rguenther@suse.de>
3701 * class.c (note_name_declared_in_class): Make declaration
3702 changes meaning a pedwarn.
3704 2007-02-22 Michael Matz <matz@suse.de>
3707 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
3708 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
3709 dump_function_decl): Guard emitting outer scopes by new flag.
3710 * cp-lang.c (cxx_dwarf_name): New function.
3711 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
3712 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
3714 (push_template_decl_real, lookup_template_class): Remove calls
3717 2007-02-19 Mark Mitchell <mark@codesourcery.com>
3719 * call.c (build_new_method_call): Ensure that explicit calls of
3720 destructors have type "void".
3722 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3724 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
3725 and -Walways-true with -Waddress.
3726 * cvt.c (convert_to_void): Replace unconditional warning with
3729 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
3731 * decl.c, tree.c: Fix comment typos.
3733 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
3736 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
3737 statement expression if we had an error mark node.
3739 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
3740 Brooks Moses <brooks.moses@codesourcery.com>
3741 Lee Millward <lee.millward@codesourcery.com>
3743 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
3744 Change class to tcc_vl_exp.
3746 * call.c (build_call): Use build_call_list instead
3748 (build_over_call): Likewise.
3749 (build_new_method_call): Use build_min_non_dep_call_list
3750 instead of build_min_non_dep.
3752 * error.c (dump_call_expr_args): New function.
3753 (dump_aggr_init_expr_args): New function.
3754 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
3755 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
3757 * cvt.c (convert_to_void): Use build_call_array instead
3758 of build3; use new AGGR_INIT_EXPR accessor macros.
3760 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
3761 instead of TREE_CODE_LENGTH.
3763 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
3764 AGGR_INIT_EXPR accessor macros.
3766 * cp-gimplify.c (cp_gimplify_init_expr): Use
3767 AGGR_INIT_EXPR_SLOT to set the slot operand.
3769 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
3770 (AGGR_INIT_EXPR_SLOT): New macro.
3771 (AGGR_INIT_EXPR_ARG): New macro.
3772 (aggr_init_expr_nargs): New macro.
3773 (AGGR_INIT_EXPR_ARGP): New macro.
3774 (aggr_init_expr_arg_iterator): New.
3775 (init_aggr_init_expr_arg_iterator): New.
3776 (next_aggr_init_expr_arg): New.
3777 (first_aggr_init_expr_arg): New.
3778 (more_aggr_init_expr_args_p): New.
3779 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
3780 (stabilize_aggr_init): New declaration.
3781 (build_min_non_dep_call_list): Likewise.
3783 * tree.c (process_aggr_init_operands): New function.
3784 (build_aggr_init_array) New function.
3785 (build_cplus_new): Update to use new CALL_EXPR and
3786 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
3787 build_aggr_init_array.
3788 (build_min_non_dep_call_list) New function.
3789 (build_min_nt): Assert input code parameter is not a variable
3790 length expression class.
3791 (build_min, build_min_non_dep): Likewise.
3792 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
3793 to check for equality instead of recursing. Handle tcc_vl_exp
3795 (stabilize_call): Update to only handle CALL_EXPRs, not
3796 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
3797 (stabilize_aggr_init): New function.
3798 (stabilize_init): Use it.
3800 * cxx-pretty-print.c (pp_cxx_postfix_expression)
3801 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
3802 AGGR_INIT_EXPR accessor macros and argument iterators.
3804 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
3805 build_vl_exp. Iterate through the operands, recursively
3806 processing each one.
3807 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
3808 CALL_EXPR accessor macros.
3809 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
3810 tree code classes. Use TREE_OPERAND_LENGTH instead of
3813 * semantics.c (finish_call_expr): Use build_nt_call_list
3814 instead of build_nt.
3815 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
3816 accessor macros. Use build_call_array to construct the
3817 CALL_EXPR node instead of build3
3819 * decl2.c (build_offset_ref_call_from_tree): Use
3820 build_nt_call_list and build_min_non_dep_call_list instead
3821 of build_min_nt and build_min_non_dep.
3823 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
3824 Use build_nt_call_list instead of build_min_nt.
3826 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3829 * call.c (build_conditional_expr): Improve error message.
3831 2007-02-13 Dirk Mueller <dmueller@suse.de>
3833 * friend.c (do_friend): Annotate warning about friend
3834 declarations in templates with OPT_Wnon_template_friend.
3835 Convert informal message from warning() to inform().
3837 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
3838 Mark Mitchell <mark@codesourcery.com>
3841 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
3842 instantiations for variables.
3844 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3847 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
3848 Check warn_unused_value just once.
3850 2007-02-11 Mark Mitchell <mark@codesourcery.com>
3853 * pt.c (determine_specialization): Use skip_artificial_parms_for.
3854 (fn_type_unificiation): Likewise.
3855 (get_bindings): Likewise.
3857 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
3860 * decl.c (finish_function): Use DECL_REPLACEABLE.
3861 * tree.c (cp_cannot_inline_tree_fn): Likewise.
3863 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
3865 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
3867 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
3869 * decl.c (grokvardecl): Don't error if !have_tls.
3870 (grokdeclarator): Likewise.
3871 * parser.c (cp_parser_omp_threadprivate): Likewise.
3873 2007-02-07 Jakub Jelinek <jakub@redhat.com>
3876 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
3877 parameters and result decls in omp clauses.
3878 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
3881 2007-02-05 Dirk Mueller <dmueller@suse.de>
3884 * parser.c (cp_parser_class_specifier): Always initialize bases.
3886 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
3888 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
3889 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
3890 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
3892 * semantics.c (finish_omp_atomic): Store a whole expression node
3893 in operand 1, and integer_zero_node in operand 0, for dependent
3894 OMP_ATOMIC. Rewrite to make flow easier to understand.
3896 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3898 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
3900 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
3902 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
3903 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
3905 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
3907 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
3908 keyword warning to -Wc++0x-compat.
3910 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3912 * decl.c (grokdeclarator): Update documentation.
3914 2007-02-02 Jakub Jelinek <jakub@redhat.com>
3917 * decl.c (grokdeclarator): If __thread is used together with
3918 a storage class other than extern and static, clear thread_p
3919 after issuing diagnostics and fall through to checking the
3922 2007-01-30 Roger Sayle <roger@eyesopen.com>
3924 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
3925 calculating the size of an array (to avoid recursive errors).
3927 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3930 * typeck.c (build_binary_op): Fix logic for warning. Move warning
3932 * call.c (convert_like_real): Don't warn when converting to
3935 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3937 * decl.c (pop_label): Replace warning with call to
3938 warn_for_unused_label.
3940 2007-01-28 Andrew Pinski <pinskia@gmail.com>
3943 * semantics.c (finish_pseudo_destructor_expr): Check the
3944 destrutor name by calling check_dtor_name.
3946 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
3948 * lex.c (D_CPP0X): Rename.
3950 (reswords): D_CPP0X -> D_CXX0X.
3951 (init_reswords): Ditto.
3952 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
3953 of C++0x keywords as identifiers.
3955 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
3958 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
3961 2007-01-23 Ian Lance Taylor <iant@google.com>
3963 * typeck.c (convert_for_assignment): Only warn about a = b = c
3964 when converting to bool.
3966 2007-01-23 Roger Sayle <roger@eyesopen.com>
3968 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
3970 * typeck.c (ignore_overflows): Remove the remaining uses of
3971 TREE_CONSTANT_OVERFLOW.
3973 2007-01-20 Jan Hubicka <jh@suse.cz>
3975 * decl2.c (start_objects, start_static_storage_duration_function):
3976 Do not make the functions uninlinable.
3978 2007-01-17 Ian Lance Taylor <iant@google.com>
3980 * class.c (add_method): Call VEC_reserve_exact rather than passing
3981 a negative size to VEC_reserve.
3983 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
3986 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
3988 2007-01-10 Mark Mitchell <mark@codesourcery.com>
3991 * decl.c (make_typename_type): If the qualified name is not a
3992 type, issue an error.
3993 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
3996 2007-01-08 Geoffrey Keating <geoffk@apple.com>
3998 * rtti.c: Include target.h.
3999 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
4000 don't emit typeinfo for fundamental types as weak.
4001 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
4003 2007-01-08 Richard Guenther <rguenther@suse.de>
4005 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
4007 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
4009 * call.c (standard_conversion): Pass flag to
4010 vector_types_convertible_p to disallow emission of note.
4011 * typeck.c (convert_for_assignment): Pass flag to
4012 vector_types_convertible_p to allow emission of note.
4013 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
4014 to disallow emission of note.
4016 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4019 * typeck.c (build_binary_op): Call overflow_warning if
4020 TREE_OVERFLOW_P is true for the result and not for any of the
4023 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
4026 * class.c (add_method): Don't wait until template
4027 instantiation time to complain about duplicate methods.
4029 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4032 * semantics.c (finish_unary_op_expr): Warn only if result
4033 overflowed and operands did not.
4035 2007-01-05 Ian Lance Taylor <iant@google.com>
4037 * typeck.c (build_binary_op): Warn about comparing a non-weak
4040 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
4042 * pt.c (tsubst): Propagate the need for structural equality checks
4043 when reducing the level of template parameters.
4045 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
4047 * pt.c: Fix a comment typo.
4049 2007-01-02 Ian Lance Taylor <iant@google.com>
4051 * semantics.c (maybe_convert_cond): Optionally warn when using an
4052 assignment as a condition.
4053 * typeck.c (convert_for_assignment): Optionally warn about
4054 assigning the result of an assignment to a bool.
4056 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
4058 * pt.c (canonical_template_parms): Correct typo in comment.
4060 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
4062 * typeck.c (structural_comptypes): Renamed from "comptypes".
4063 (comptypes): Use canonical type information to perform fast type
4064 comparison. When VERIFY_CANONICAL_TYPES, verify that the
4065 canonical type comparison returns the same results as we would see
4066 from the current, structural check. Support COMPARE_STRUCTURAL
4067 when we need structural checks.
4068 * decl.c (typename_compare): Fix comment.
4069 (build_typename_type): TYPENAME_TYPE nodes require structural
4070 equality checks, because they resolve different based on the
4072 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
4073 require structural equality checks (for now).
4074 (build_ptrmemfunc_type): Build the canonical pointer to member
4076 (compute_array_index_type): Whenever we build a new index type
4077 to represent the size of an array in a template, we need to mark
4078 this index type as requiring structural equality. This goes for
4079 arrays with value-dependent sizes with the current ABI, or all
4081 * tree.c (cplus_array_hash): New.
4082 (struct cplus_array_info): New.
4083 (cplus_array_compare): New.
4084 (cplus_array_htab): New.
4085 (build_cplus_array_type_1): Use a hash table to cache the array
4086 types we build. Build the canonical array type for each array
4088 (cp_build_qualified_type_real): When building a cv-qualified array
4089 type, use the hash table of array types and build canonical array
4091 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
4092 use structural equality (for now).
4093 * cp-tree.h (COMPARE_STRUCTURAL): New.
4094 * pt.c (canonical_template_parms): New.
4095 (canonical_type_parameter): New.
4096 (process_template_parm): Find the canonical type parameter.
4097 (lookup_template_class): When we have named the primary template
4098 type, set the canonical type for our template class to the primary
4099 template type. If any of the template arguments need structural
4100 equality checks, the template class needs structural equality
4102 (tsubst): When reducing the level of a template template
4103 parameter, we require structural equality tests for the resulting
4104 parameter because its template parameters have not had their types
4105 canonicalized. When reducing a template type parameter, find the
4106 canonical reduced type parameter.
4107 (any_template_arguments_need_structural_equality_p): New.