1 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
6 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
7 is error_mark_node, return an error early.
8 (find_parameter_packs_r): Pass the pointer set along to recursive
9 calls of cp_walk_subtrees; don't try to manage the pointer set
11 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
12 (make_pack_expansion): Ditto.
13 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
14 a second pass through the tree with find_parameter_packs_r; that
15 second pass no longer does anything.
16 (push_template_decl_real): If we have an erroneous declaration,
17 set its type to error_mark_node before returning an error.
19 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
22 * pt.c (tsubst_initializer_list): Deal with the use of
23 VOID_TYPE_NODE to indicate value-initialization of the bases.
25 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
26 Jason Merrill <jason@redhat.com>
30 * class.c (type_has_user_nondefault_constructor): New fn.
31 * cp-tree.h: Declare it.
32 * init.c (emit_mem_initializers): Use it for -W warning about
33 missing base initializer.
35 2008-02-14 Paolo Carlini <pcarlini@suse.de>
38 * pt.c (determine_specialization): In case of function templates,
39 when the type of DECL does not match FN there is no match.
41 2008-02-13 Jakub Jelinek <jakub@redhat.com>
42 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
45 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
46 are not identifier :: ~, return before calling cp_parser_type_name.
48 2008-02-13 Jason Merrill <jason@redhat.com>
50 PR c++/34962, c++/34937, c++/34939
51 * decl2.c (is_late_template_attribute): Always defer attributes
55 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
58 2008-02-12 Jason Merrill <jason@redhat.com>
61 * call.c (convert_like_real): Pass LOOKUP_ONLYCONVERTING to build_temp
62 if we're doing conversions to call a user-defined conversion function.
64 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
67 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
70 2008-02-12 Jakub Jelinek <jakub@redhat.com>
73 * init.c (build_new_1): Don't create placement_expr before
74 constructing alloc_call. Verify that the pointer is passed by
75 value to operator new.
77 2008-02-11 Jason Merrill <jason@redhat.com>
80 * pt.c (tsubst): Don't look up a template typedef in an explicit
83 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
86 * tree.c (cp_build_qualified_type_real): When building a
87 cv-qualified array type, build it as a unique type with
88 build_cplus_array_type_1 and then adopt the unqualified type's
91 2008-02-11 Paolo Carlini <pcarlini@suse.de>
94 * decl.c (groktypename): Check grokdeclarator return.
96 2008-02-10 Jason Merrill <jason@redhat.com>
99 * decl2.c (cp_write_global_declarations): Don't write out static
100 data members with DECL_IN_AGGR_P set.
102 2008-02-08 Jason Merrill <jason@redhat.com>
105 * tree.c (build_target_expr_with_type): Handle void initializer.
106 (bot_manip): Remap slot before recursing.
108 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
111 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
113 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
116 * tree.c: Include tree-flow.h.
117 (build_target_expr): Check type compatibility.
118 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
119 * call.c (convert_like_real): Convert bitfield to expected type.
121 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
125 * typeck.c (structural_comptypes): Call cp_comptypes.
126 (comptypes): New; called from the C/C++ common bits to perform
128 (cp_comptypes): Renamed from comptypes, which is already used,
129 with a different signature, by the C++ front end.
130 (build_reinterpret_cast_1): Call cp_comptypes.
131 (ptr_reasonably_similar): Ditto.
132 * decl.c (decls_match): Ditto.
133 * cvt.c (convert_to_reference): Ditto.
134 * cp-tree.h (same_type_p): Ditto.
135 (same_or_base_type_p): Ditto.
136 (comptypes): Rename to cp_comptypes.
137 * pt.c (canonical_type_parameter): Call cp_comptypes.
139 2008-02-05 Jakub Jelinek <jakub@redhat.com>
142 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
143 value dependent expression.
145 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
148 * decl2.c (save_template_attributes): When we're modifying the
149 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
150 all of the other variants to add those same attributes. Otherwise,
151 the main variant will be inconsistent with those other variants.
153 2008-02-04 Richard Guenther <rguenther@suse.de>
156 * decl.c (record_builtin_java_type): Make jboolean a
157 integer type again where its mode doesn't match that of bool.
159 2008-02-02 Jason Merrill <jason@redhat.com>
160 Mark Mitchell <mark@codesourcery.com>
163 * init.c (build_value_init_1): New function.
164 (build_value_init): New function.
165 * typeck2.c (build_functional_cast): Call it.
166 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
168 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
169 TYPE_HAS_CONSTRUCTOR.
170 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
171 add_implicitly_declared_members): Adjust.
172 (check_field_decls): Adjust. Remove warnings about reference/const
173 in class without constructor.
174 (check_bases_and_members): Adjust. Give those warnings here instead.
175 * decl.c (fixup_anonymous_aggr): Adjust.
176 (check_initializer): Adjust, clarify logic slightly.
177 (grok_special_member_properties): Adjust, only set if user-provided.
178 * rtti.c (create_tinfo_types): Don't set.
179 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
180 Use same_type_ignoring_top_level_qualifiers_p.
181 * pt.c (check_explicit_specialization): Adjust.
182 (instantiate_class_template): Adjust.
184 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
185 Jakub Jelinek <jakub@redhat.com>
189 * typeck.c (structural_comptypes): Handle comparisons of
190 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
192 * mangle.c (write_builtin_type): Map down to the canonical type,
193 which will be one of the predefined type nodes.
195 2008-01-29 Michael Meissner <michael.meissner@amd.com>
198 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
199 bits to allow for expansion of the number of middle end tree
202 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
213 * typeck.c (check_return_expr): Tweak call to
214 check_for_bare_parameter_packs.
215 * class.c (add_method): Be careful with error_mark_nodes.
216 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
218 * pt.c (struct find_parameter_pack_data): Remove
220 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
221 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
222 (make_pack_expansion): Ditto.
223 (check_for_bare_parameter_packs): Parameter is now a tree, not a
225 (process_template_parm): Tweak call to
226 check_for_bare_parameter_packs.
227 (push_template_decl_real): Tweak calls to
228 check_for_bare_parameter_packs. If bare parameter packs are found
229 in the list of exceptions, clear out that list after giving an
231 * semantics.c (finish_cond): Tweak call to
232 check_for_bare_parameter_packs.
233 (finish_expr_stmt): Ditto.
234 (finish_for_expr): Ditto.
235 (finish_switch_cond): Ditto.
236 (finish_mem_initializers): Ditto.
237 (finish_member_declaration): Ditto.
238 (finish_static_assert): Check for bare parameter packs in the
240 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
241 attributes of a declaration.
242 * parser.c (cp_parser_using_declaration): Tweak call to
243 check_for_bare_parameter_packs.
244 (cp_parser_base_clause): Ditto.
246 2008-01-28 Jason Merrill <jason@redhat.com>
249 * class.c (build_base_path): Fix !want_pointer case.
251 2008-01-27 Jason Merrill <jason@redhat.com>
254 * class.c (build_base_path): Fix previous change.
256 2008-01-26 Jakub Jelinek <jakub@redhat.com>
259 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
262 2008-01-26 Richard Guenther <rguenther@suse.de>
265 * typeck.c (build_binary_op): Remove code to shorten compares.
267 2008-01-25 Richard Guenther <rguenther@suse.de>
270 * decl.c (record_builtin_java_type): Make __java_boolean
272 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
273 after TYPE_MAIN_VARIANT check.
275 2008-01-25 Jason Merrill <jason@redhat.com>
278 * class.c (build_base_path): Don't mess with virtual access if
280 * call.c (standard_conversion): Don't check whether source type
283 * decl2.c (is_late_template_attribute): Don't defer attribute
284 visibility just because the type is dependent.
286 2008-01-25 Jason Merrill <jason@redhat.com>
287 Mark Mitchell <mark@codesourcery.com>
290 * call.c (standard_conversion): Allow conversion from integer/real
292 (compare_ics): Such a conversion is worse than a normal arithmetic
295 2008-01-25 Richard Guenther <rguenther@suse.de>
298 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
301 2008-01-24 Paolo Carlini <pcarlini@suse.de>
304 * pt.c (push_template_decl_real): Return error_mark_node in case
305 of template definition of non-template.
307 2008-01-24 Jason Merrill <jason@redhat.com>
310 * decl2.c (is_late_template_attribute): Defer any attribute with
311 dependent args. Also defer type attributes if the type is dependent.
313 2008-01-22 Jakub Jelinek <jakub@redhat.com>
314 Alexandre Oliva <aoliva@redhat.com>
317 * call.c (reference_binding): For bitfields use the declared bitfield
319 (add_builtin_candidates): Likewise.
320 * class.c (layout_class_type): For bitfields copy over the
323 2008-01-22 Jason Merrill <jason@redhat.com>
326 * decl.c (groktypename): Also ignore attributes on dependent
327 possibly-class types.
330 * friend.c (do_friend): Check for prior declaration of a friend
331 function of a local class.
332 * name-lookup.c (lookup_name_innermost_nonclass_level):
334 * name-lookup.h: Declare it.
336 2008-01-22 Tom Tromey <tromey@redhat.com>
339 * init.c (build_new_1): Only disallow Java aggregates.
341 2008-01-22 Jakub Jelinek <jakub@redhat.com>
344 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
345 if decl or init is error_mark_node.
348 * error.c (dump_expr): Handle VECTOR_CST.
350 2008-01-21 Jason Merrill <jason@redhat.com>
353 * pt.c (tsubst_aggr_type): Make sure our context is complete.
356 * pt.c (retrieve_local_specialization): Robustify.
357 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
360 * pt.c (tsubst): Only call retrieve_local_specialization if the
361 original typedef was in a function template.
364 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
366 2008-01-21 Richard Guenther <rguenther@suse.de>
369 * error.c (cp_print_error_function): Deal with recursive
372 2008-01-20 Paolo Carlini <pcarlini@suse.de>
375 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
377 2008-01-20 Paolo Carlini <pcarlini@suse.de>
381 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
382 on non-IS_AGGR_TYPE scope.
383 (constructor_name_p): Assert IS_AGGR_TYPE.
385 2008-01-18 Ian Lance Taylor <iant@google.com>
388 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
389 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
390 DECL_IS_OPERATOR_NEW flag.
392 2008-01-16 Richard Guenther <rguenther@suse.de>
395 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
396 for conversions to type variants.
398 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
400 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
401 declaration and code. Update copyright year.
403 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
406 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
407 know we have a class type.
409 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
412 * pt.c (coerce_template_parameter_pack): When substituting into
413 the type of a non-type template parameter pack. use the
414 deduced/substituted arguments.
415 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
416 can be a parameter pack with the ellipsis following it. When we
417 have an erroneous declaration, allow it to be a parameter pack.
418 (cp_parser_template_parameter): Complain about default
419 arguments on non-type template parameter packs, and parse them
420 using the new cp_parser_default_argument.
421 (cp_parser_parameter_declaration): Complain about parameter packs
422 with default arguments. Move parsing of default arguments into a
423 new function, cp_parser_default_argument.
424 (cp_parser_default_argument): New; extracted from
425 cp_parser_parameter_declaration.
427 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
433 * typeck.c (check_return_expr): If there are bare parameter packs
434 in the return value, set it to error_mark_node.
435 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
436 * pt.c (find_parameter_packs_r): Look at the type of
437 IDENTIFIER_NODEs (e.g., for user-defined conversions).
438 (check_for_bare_parameter_packs): Flip the result: now returns
439 TRUE when there were bare parameter packs, FALSE otherwise.
440 (push_template_decl_real): Deal with flipped result of
441 check_for_bare_parameter_packs.
442 * semantics.c (finish_cond): If there are bare parameter packs in
443 the conditional, set it to error_mark_node.
444 (finish_expr_stmt): If there are bare parameter packs in the
445 expression, set it to error_mark_node.
446 (finish_for_expr): Ditto.
447 (finish_switch_cond): If there are bare parameter packs in
448 the conditional, set it to error_mark_node.
449 (finish_mem_initializers): If there are bare parameter packs in
450 the member initializer, set it to error_mark_node.
451 (finish_member_declaration): Check the attributes of the
452 declaration for bare parameter packs, and remove the attributes if
453 any have bare parameter packs.
454 * parser.c (cp_parser_using_declaration): Check the using
455 declaration for bare parameter packs.
456 (cp_parser_base_clause): If there are bare parameter packs in a
457 base specifier, don't add it to the chain.
459 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
462 * error.c (dump_simple_decl): Display ellipsis for template
463 non-type parameter packs.
464 (dump_decl): Display ellipsis for template type parameter packs.
465 (dump_template_decl): Display ellipsis for template template
467 * pt.c (redeclare_class_template): When redeclaring a class
468 template, check for collisions between template parameters and
469 template parameter packs.
471 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
474 * pt.c (process_partial_specialization): Don't mark template
475 parameters that occur in non-deduced contexts.
476 (struct pair_fn_data): Add include_nondeduced_p.
477 (for_each_template_parm_r): Only visit non-deduced contexts if
478 include_nondeduced_p is set.
479 (for_each_template_parm): Added parameter include_nondeduced_p,
480 which states whether template parameters found in non-deduced
481 contexts should be visited.
482 (uses_template_parms): Visit all template parameters, even those
483 in non-deduced contexts.
485 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
488 * pt.c (check_default_tmpl_args): Check for parameter packs that
489 aren't at the end of a primary template.
490 (push_template_decl_real): Remove check for parameter packs that
491 aren't at the end of a primary template; that now happens in
492 check_default_tmpl_args.
493 * semantics.c (finish_template_template_parm): Use
494 check_default_tmpl_args to check for errors in the template
497 2008-01-12 Doug Kwan <dougkwan@google.com>
499 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
500 instead of OPT_Wreturn_type in warning due to ignored return type
502 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
503 instead of OPT_Wreturn_type in warning due to ignored return type
506 2008-01-08 Jakub Jelinek <jakub@redhat.com>
509 * semantics.c (finish_omp_for): Don't call
510 fold_build_cleanup_point_expr if processing_template_decl.
512 2008-01-04 Paolo Carlini <pcarlini@suse.de>
513 Jakub Jelinek <jakub@redhat.com>
516 * error.c (dump_template_argument): Deal with TREE_LIST.
518 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
520 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
521 long" in C++0x mode; change the warning to note that "long long"
522 is only unsupported in C++98 mode.
524 2007-12-20 Jason Merrill <jason@redhat.com>
527 * call.c (standard_conversion): Derived-to-base is considered a
530 2007-12-19 Jakub Jelinek <jakub@redhat.com>
533 * parser.c (cp_parser_omp_parallel): For non-combined parallel
534 call cp_parser_statement rather than
535 cp_parser_already_scoped_statement.
537 2007-12-18 Jason Merrill <jason@redhat.com>
540 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
542 (dependent_type_p_r): Handle the domain of an array.
544 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
545 Jakub Jelinek <jakub@redhat.com>
550 * pt.c (template_template_parm_bindings_ok_p): New; verifies
551 bindings of template template parameters after all template
552 arguments have been deduced.
553 (coerce_template_parms): Don't complain when COMPLAIN doesn't
555 (fn_type_unification): Use template_template_parm_bindings_ok_p.
556 (unify): Deal with variadic, bound template template parameters.
557 (get_class_bindings): Use template_template_parm_bindings_ok_p.
559 2007-12-18 Jakub Jelinek <jakub@redhat.com>
562 * decl.c (grokdeclarator): Reject friend sfk_constructor
565 2007-12-17 Jakub Jelinek <jakub@redhat.com>
568 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
571 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
574 * cp-lang.c (cp_classify_record): New.
575 (LANG_HOOKS_CLASSIFY_RECORD): Override.
577 2007-12-11 Jakub Jelinek <jakub@redhat.com>
580 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
583 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
584 dynamic_cast in a template.
586 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
589 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
590 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
592 2007-12-10 Jakub Jelinek <jakub@redhat.com>
595 * error.c (dump_type_prefix, dump_type_suffix): Handle
599 * error.c (dump_expr): Handle ABS_EXPR.
601 2007-12-09 Jakub Jelinek <jakub@redhat.com>
605 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
606 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
607 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
608 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
609 flag_use_repository and repo_emit_p returned 2.
611 2007-12-06 Jakub Jelinek <jakub@redhat.com>
614 * tree.c (stabilize_call, stabilize_init): Do nothing if
615 processing_template_decl.
617 2007-12-05 Jakub Jelinek <jakub@redhat.com>
620 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
621 error instead of assertion failure.
622 * parser.c (cp_parser_decltype): If closing paren is not found,
623 return error_mark_node.
625 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
628 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
630 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
631 since arg_assoc_template_arg will deal with them (better).
633 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
636 * pt.c (tsubst_exception_specification): Handle substitutions into
637 member templates, where tsubst_pack_expansion returns a
640 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
643 * pt.c (unify_pack_expansion): If we didn't deduce any actual
644 bindings for the template parameter pack, don't try to keep the
645 empty deduced arguments.
646 (unify): If a parameter is a template-id whose template argument
647 list contains a pack expansion that is not at the end, then we
648 cannot unify against that template-id.
650 2007-12-02 Paolo Carlini <pcarlini@suse.de>
653 * pt.c (current_template_args): Use error_operand_p.
655 2007-12-02 Paolo Carlini <pcarlini@suse.de>
658 * error.c (dump_decl): Handle TREE_BINFO.
660 2007-12-01 Ollie Wild <aaw@google.com>
663 * typeck.c (build_binary_op): Add conversion of pointers to function
664 members appearing as operands to the equality operators.
666 2007-11-30 Jakub Jelinek <jakub@redhat.com>
669 * error.c (dump_expr): Handle OBJ_TYPE_REF.
671 2007-11-29 Jakub Jelinek <jakub@redhat.com>
674 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
676 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
681 * parser.c (cp_parser_decltype): Don't call finish_id_expression
683 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
686 2007-11-27 Jakub Jelinek <jakub@redhat.com>
688 PR tree-optimization/34181
689 * method.c (use_thunk): Don't inline the call in the thunk.
692 * tree.c (decl_linkage): Static data members and static member
693 functions in anonymous ns classes are lk_external.
695 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
698 * decl.c (start_preparsed_function): Pass
699 processing_template_decl for the new allocate_struct_function
702 2007-11-25 Richard Guenther <rguenther@suse.de>
704 * decl.c (poplevel): Use BLOCK_CHAIN.
706 2007-11-24 Ollie Wild <aaw@google.com>
708 * typeck.c (delta_from_ptrmemfunc): New function.
709 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
710 (build_binary_op): Call delta_from_ptrmemfunc.
712 2007-11-23 Jakub Jelinek <jakub@redhat.com>
716 * decl.c (cp_finish_decl): Disallow variable or field
717 definitions if extern "Java" aggregates.
718 (grokparms): Disallow parameters with extern "Java"
720 (check_function_type): Disallow function return values
721 with extern "Java" aggregates.
722 * init.c (build_new_1): Disallow placement new with
723 extern "Java" aggregates.
725 2007-11-23 Mark Mitchell <mark@codesourcery.com>
726 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
729 * call.c (convert_like_real): Build a zero constant when __null is
730 converted to an integer type.
732 2007-11-22 Jakub Jelinek <jakub@redhat.com>
735 * decl2.c (cp_write_global_declarations): Issue error about static
736 data members in anonymous namespace which are declared and used,
739 2007-11-20 Jakub Jelinek <jakub@redhat.com>
742 * parser.c (cp_parser_class_head): Reject function template ids.
745 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
746 when processing_template_decl to build_array_type.
749 * pt.c (more_specialized_fn): Don't segfault if one or
750 both argument list end with ellipsis.
752 2007-11-18 Jakub Jelinek <jakub@redhat.com>
755 * semantics.c (finish_call_expr): Set
756 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
757 or OVERLOAD with all noreturn functions.
759 2007-11-16 Jakub Jelinek <jakub@redhat.com>
762 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
765 2007-11-13 Jakub Jelinek <jakub@redhat.com>
772 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
773 set to error_mark_node the outermost POINTER_TYPE to the pack if
774 it is seen in a POINTER_TYPE.
775 (push_template_decl_real): If check_for_bare_parameter_packs
776 fails for function return type, set the return type to
777 integer_type_node. If check_for_bare_parameter_packs failed
778 for non-function, return error_mark_node.
781 * call.c (build_new_op): Call resolve_args before calling
784 2007-11-11 Tom Tromey <tromey@redhat.com>
787 * lex.c (handle_pragma_implementation): Use cpp_included_before.
789 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
792 * pt.c (redeclare_class_template): Update error message. Use a
793 note to show the previous declaration.
794 (tsubst_friend_class): Use the location of the friend template as
795 the input location before calling redeclare_class_template.
797 2007-11-11 Jakub Jelinek <jakub@redhat.com>
800 * semantics.c (finish_pseudo_destructor_expr): Handle
801 object == error_mark_node.
803 2007-11-10 Jakub Jelinek <jakub@redhat.com>
806 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
807 is not scalar type, let finish_class_member_access_expr handle
808 diagnostics. Pass BIT_NOT_EXPR argument to
809 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
811 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
814 * decl.c (cp_complete_array_type): If any of the initializer
815 elements are pack expansions, don't compute the array size yet.
817 2007-11-08 Andrew Pinski <pinskia@gmail.com>
820 * tree.c (decl_linkage): Fields have no linkage.
822 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
824 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
826 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
831 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
832 Be careful with ERROR_MARK_NODEs.
833 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
836 2007-11-07 Jakub Jelinek <jakub@redhat.com>
839 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
842 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
846 * tree.c (c_build_qualified_type): Define bridge to
847 cp_build_qualified_type.
849 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
860 * typeck.c (check_return_expr): Pass address of retval to
861 check_for_bare_parameter_packs.
862 * class.c (build_base_field): Tolerate bases that have no layout
864 (end_of_base): Ditto.
865 * tree.c (canonical_type_variant): Be careful with
867 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
869 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
870 which states whether parameter packs should be replaced with
872 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
873 possible. If set_packs_to_error is set true, replace the parameter
874 pack with ERROR_MARK_NODE. Manage our own pointer sets.
875 (uses_parameter_packs): Don't set parameter packs to
877 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
878 which may be modified (if it is a parameter pack). Instructs
879 find_parameter_packs_r to replace parameter packs with
880 ERROR_MARK_NODE (so that they won't cause errors later on).
881 (process_template_parm): Pass pointer to
882 check_for_bare_parameter_packs.
883 (process_partial_specialization): Replace pack expansions before
884 the end of the template argument list with ERROR_MARK_NODE.
885 (push_template_decl_real): Pass pointer to
886 check_for_bare_parameter_packs. Replace parameter packs not at the
887 end of the template parameter list with ERROR_MARK_NODE.
888 (convert_template_argument): Be more careful about using DECL_NAME
889 on only declarations.
890 (unify): Can't unify against ERROR_MARK_NODE.
891 * semantics.c (finish_cond): Pass pointer to
892 check_for_bare_parameter_packs.
893 (finish_expr_stmt): Ditto.
894 (finish_for_expr): Ditto.
895 (finish_switch_cond): Pass pointer to
896 check_for_bare_parameter_packs, and call it before we put the
897 condition into the statement.
898 (finish_mem_initializers): Pass pointer to
899 check_for_bare_parameter_packs.
900 (finish_member_declaration): Ditto.
901 * parser.c (cp_parser_base_clause): Ditto.
903 2007-11-06 Jakub Jelinek <jakub@redhat.com>
906 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
907 with the final TREE_READONLY flag in place. processing_template_decl
908 is known to be 0 in this part of function.
911 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
912 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
913 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
914 * semantics.c (finish_omp_atomic): Revert most of the
915 2007-02-05 changes, just keep the new representation of
916 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
918 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
921 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
924 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
929 * typeck.c (merge_types): Don't lose rvalue references when
931 * call.c (build_over_call): Don't elide move constructors just
932 because the copy constructor is trivial (!).
933 (compare_ics): If comparing cv-qualifiers fails, we can still order
934 based on binding lvalues vs. rvalues.
936 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
939 * pt.c (unify_pack_expansion): bring handling of function call
940 arguments into line with type_unification_real.
942 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
944 * typeck.c (build_binary_op): Use pedwarn instead of error for
947 2007-11-05 Jakub Jelinek <jakub@redhat.com>
950 * parser.c (cp_parser_unary_expression): For &&label call
951 cp_parser_non_integral_constant_expression and return error_mark_node
955 * decl.c (grokdeclarator): Don't call build_memfn_type if type
956 is neither FUNCTION_TYPE nor METHOD_TYPE.
958 2007-11-02 Jakub Jelinek <jakub@redhat.com>
961 * parser.c (cp_parser_nested_name_specifier_opt): Use
962 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
963 typedef of currently open class.
965 2007-11-02 Paolo Carlini <pcarlini@suse.de>
968 * error.c (dump_expr): Deal specially with statements.
970 2007-11-01 Jason Merrill <jason@redhat.com>
973 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
975 (lookup_template_class): Use it to get the outer template args
976 for instantiating one.
979 * pt.c (reduce_template_parm_level): tsubst the parameters
980 of a template template parm.
982 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
985 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
987 2007-11-01 Jakub Jelinek <jakub@redhat.com>
990 * parser.c (cp_parser_postfix_dot_deref_expression): If
991 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
992 first and if that succeeds and type is SCALAR_TYPE_P, create
996 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
997 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
998 as for std::type_info.
1000 2007-10-31 Paolo Carlini <pcarlini@suse.de>
1003 * cxx-pretty-print.c (pp_cxx_typeid_expression,
1004 pp_cxx_delete_expression): Change to static linkage.
1005 * cxx-pretty-print.h: Adjust declarations.
1006 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
1007 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
1008 MODOP_EXPR): Forward to pp_expression.
1010 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
1013 2007-10-31 Christian Bruel <christian.bruel@st.com>
1014 Mark Mitchell <mark@codesourcery.com>
1017 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
1018 if retval is volatile.
1020 2007-10-30 Jakub Jelinek <jakub@redhat.com>
1023 * decl2.c (build_offset_ref_call_from_tree): Call
1024 build_non_dependent_expr on object prior to building ADDR_EXPR from it
1025 if FN is DOTSTAR_EXPR.
1027 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
1031 * pt.c (find_parameter_packs_r): Fix typo in comment.
1032 (convert_template_argument): Look at the pattern of a pack
1033 expansion to determine what kind of entity we're converting.
1034 (coerce_template_parameter_pack): When we have coerced a non-type
1035 template parameter pack, substitute into the type of that pack.
1036 (tsubst_pack_expansion): When our substitution of a parameter pack
1037 is a "trivial" substitution of itself, just substitute into the
1038 pack expansion rather than actually expanding.
1040 2007-10-29 Jakub Jelinek <jakub@redhat.com>
1043 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
1044 for non-integral type bitfields. Return true if bitfield is correct, false
1045 error has been diagnosed.
1046 (check_field_decls): If check_bitfield_decl returned false, call also
1049 2007-10-28 Paolo Carlini <pcarlini@suse.de>
1050 Mark Mitchell <mark@codesourcery.com>
1053 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
1054 class member error out and return.
1056 2007-10-27 Jakub Jelinek <jakub@redhat.com>
1058 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
1059 to current_function_decl rather than 0.
1062 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
1064 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
1066 2007-10-27 Jason Merrill <jason@redhat.com>
1069 * call.c (convert_default_arg): Detect recursion.
1071 2007-10-27 Jakub Jelinek <jakub@redhat.com>
1074 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
1075 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
1077 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
1079 * error.c (dump_expr): Handle OFFSETOF_EXPR.
1081 2007-10-26 Jason Merrill <jason@redhat.com>
1084 * pt.c (get_template_info): New fn.
1085 (template_class_depth): Use it.
1086 (push_template_decl_real): Check that the template args of the
1087 definition match the args of the previous declaration.
1089 2007-10-26 Paolo Carlini <pcarlini@suse.de>
1092 * decl2.c (coerce_new_type): Do not allow a default argument for
1093 the first parameter.
1095 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
1098 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
1099 don't see the leading '('. Only lookup names if we get an
1102 2007-10-26 Jakub Jelinek <jakub@redhat.com>
1105 * parser.c (cp_parser_parenthesized_expression_list): Set
1106 greater_than_is_operator_p to true in between the parens.
1108 2007-10-26 Paolo Carlini <pcarlini@suse.de>
1111 * decl.c (grokdeclarator): In case of conflicting specifiers
1112 just return error_mark_node.
1114 2007-10-26 Ollie Wild <aaw@google.com>
1116 * expr.c (cxx_expand_expr): Removed.
1117 * cp-tree.h (exx_expand_expr): Removed.
1118 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
1121 2007-10-25 Paolo Carlini <pcarlini@suse.de>
1124 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
1126 2007-10-23 Jason Merrill <jason@redhat.com>
1128 PR c++/25950 (DR 391)
1129 * call.c (struct conversion): Remove check_copy_constructor_p.
1130 (reference_binding): Always bind a reference directly to a
1131 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
1133 (check_constructor_callable): Remove.
1134 (convert_like_real): Don't call it.
1135 (initialize_reference): Don't call check_constructor_callable.
1136 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
1137 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
1138 conversions if LOOKUP_NO_TEMP_BIND.
1139 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
1140 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
1142 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
1144 2007-10-22 Jakub Jelinek <jakub@redhat.com>
1147 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
1148 before checking if its type is integral.
1150 2007-10-22 Jason Merrill <jason@redhat.com>
1153 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
1154 * pt.c (apply_late_template_attributes): Splice out dependent
1155 attributes from DECL_ATTRIBUTES.
1157 * decl.c (cxx_maybe_build_cleanup): Use build_address.
1159 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1161 * typeck.c (build_binary_op) : Use appropriate warning option
1162 instead of unnamed warning.
1164 2007-10-16 Paolo Carlini <pcarlini@suse.de>
1167 * pt.c (current_template_args): Do not change TREE_LIST elements
1168 with a TREE_VALUE of error_mark_node.
1170 2007-10-16 Mark Mitchell <mark@codesourcery.com>
1172 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
1173 * decl.c (start_decl): Tidy.
1174 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
1176 (grokdeclarator): Clarify comment.
1178 2007-10-14 Andrew Pinski <pinskia@gmail.com>
1181 * decl.c (grokfndecl): Return NULL after the "definition of
1182 implicitly-declared" error happened.
1184 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
1187 * call.c (build_user_type_conversion_1): Do not consider conversion
1188 functions to convert a (possibly cv-qualified) object to the (possibly
1189 cv-qualified) same object type (or a reference to it), to a (possibly
1190 cv-qualified) base class of that type (or a reference to it).
1192 2007-10-12 Paolo Carlini <pcarlini@suse.de>
1194 * pt.c (tsubst): Use template_parm_level_and_index.
1196 2007-10-12 Jakub Jelinek <jakub@redhat.com>
1199 * parser.c (cp_parser_compound_statement): Handle label-declarations
1200 at the beginning of the compound statement.
1201 (cp_parser_block_declaration): Issue diagnostics about __label__
1202 not at the beginning of a block.
1204 2007-10-11 Paolo Carlini <pcarlini@suse.de>
1207 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
1208 to convert_template_argument.
1209 (coerce_template_parms): Return error_mark_node after fixed-length
1211 (tsubst_decl): Check for error_mark_node the return value of the
1212 first tsubst in 'case VAR_DECL'.
1214 2007-10-08 Ollie Wild <aaw@google.com>
1216 * typeck2.c (digest_init): Call cplus_expand_constant after
1217 convert_for_initialization.
1218 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
1219 * expr.c (cplus_expand_constant): Updated function description.
1221 2007-10-04 Jason Merrill <jason@redhat.com>
1224 * call.c (initialize_reference): Handle local static reference
1227 2007-10-03 Jason Merrill <jason@redhat.com>
1230 * name-lookup.c (push_namespace_with_attrs): Fold back into...
1231 (push_namespace): Here.
1232 (handle_namespace_attrs): New fn for the attr code.
1233 (leave_scope): Don't pop_visibility.
1234 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
1235 * parser.c (cp_parser_namespace_definition): Call
1236 handle_namespace_attrs and pop_visibility as appropriate.
1239 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
1241 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
1243 * decl.c (duplicate_decls): Preserve linkage flags for mere
1244 redeclarations of gnu_inline definitions.
1246 2007-10-03 Jason Merrill <jason@redhat.com>
1249 * decl.c (wrap_cleanups_r): New fn.
1250 (wrap_temporary_cleanups): New fn.
1251 (initialize_local_var): Call it.
1253 2007-09-29 Jason Merrill <jason@redhat.com>
1256 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
1257 constant to not have DECL_EXTERNAL if it's file-local.
1259 2007-09-28 Ollie Wild <aaw@google.com>
1262 2007-09-27 Ollie Wild <aaw@google.com>
1264 * typeck2.c (digest_init): Call cplus_expand_constant after
1265 convert_for_initialization.
1266 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
1267 * expr.c (cplus_expand_constant): Updated function description.
1269 2007-09-28 Jason Merrill <jason@redhat.com>
1272 * class.c (layout_empty_base): Take rli parameter, update
1273 rli->record_align if empty base has user-specified alignment.
1274 (build_base_field): Pass rli to it.
1276 2007-09-28 Paolo Carlini <pcarlini@suse.de>
1279 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
1281 2007-09-28 Paolo Carlini <pcarlini@suse.de>
1284 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
1285 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
1286 (dump_parameters): Just call dump_type for argument packs too.
1288 2007-09-28 Jakub Jelinek <jakub@redhat.com>
1291 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
1292 qualification by creating qualified PACK_EXPANSION_PATTERN and
1293 then calling make_pack_expansion on it.
1295 2007-09-27 Ollie Wild <aaw@google.com>
1297 * typeck2.c (digest_init): Call cplus_expand_constant after
1298 convert_for_initialization.
1299 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
1300 * expr.c (cplus_expand_constant): Updated function description.
1302 2007-09-27 Jason Merrill <jason@redhat.com>
1305 * decl2.c (is_late_template_attribute): Don't crash on unknown
1308 2007-09-27 Paolo Carlini <pcarlini@suse.de>
1311 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
1312 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
1313 spaces in the formatting.
1314 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
1316 2007-09-27 Jakub Jelinek <jakub@redhat.com>
1318 * error.c (cxx_print_error_function): Add third argument, pass
1319 it over to lhd_print_error_function.
1320 (cp_print_error_function): If diagnostic->abstract_origin, print
1322 * cp-tree.h (struct diagnostic_info): New forward decl.
1323 (cxx_print_error_function): Add third argument.
1325 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
1328 * name-lookup.c (pushtag): Do not create an implicit typedef before
1329 the associated type declaration is known to be valid.
1331 2007-09-25 Jakub Jelinek <jakub@redhat.com>
1333 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
1334 rather than pointers.
1336 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
1339 * search.c (check_final_overrider): Fail if
1340 targetm.comp_type_attributes returns 0.
1342 2007-09-24 Jason Merrill <jason@redhat.com>
1345 * pt.c (resolve_typename_type): Don't look things up in the original
1346 template if it would mean losing template arguments.
1348 2007-09-24 Jakub Jelinek <jakub@redhat.com>
1351 * cp-tree.h (cxx_type_hash_eq): New prototype.
1352 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
1353 * tree.c (cxx_type_hash_eq): New function.
1355 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
1358 * tree.c (cp_build_qualified_type_real): Build a canonical
1359 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
1361 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
1365 * tree.c (cplus_array_compare): Compare pointers, not types.
1366 (build_cplus_array_type_1): Store new array type into the hash
1367 table before building the canonical type; build the canonical type
1369 (cp_build_qualified_type_real): Put all of the array types with
1370 cv-qualified element types into the C++ array hash table, built as
1371 variants of the unqualified versions.
1373 2007-09-23 Jason Merrill <jason@redhat.com>
1376 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
1377 for deprecation warnings.
1379 2007-09-22 Jason Merrill <jason@redhat.com>
1382 * call.c (build_over_call): Warn about deprecated virtuals.
1385 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
1386 (MAYBE_TAGGED_TYPE_P): Remove.
1387 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
1388 instead of calling is_late_template_attribute again.
1389 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
1390 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
1391 Don't crash on typedefs from non-template classes.
1392 * decl2.c (grokfield): Don't sorry about attrs on template parms.
1393 (is_late_template_attribute): All attributes applied to template
1394 parms or typename types are dependent. Static.
1395 (splice_template_attributes): Pass decl through.
1396 (save_template_attributes): Likewise.
1398 2007-09-20 Jakub Jelinek <jakub@redhat.com>
1401 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
1402 returned from tsubst_pack_expansion.
1403 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
1404 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
1406 2007-09-20 Paolo Carlini <pcarlini@suse.de>
1409 * semantics.c (finish_id_expression): Use consistently
1410 context_for_name_lookup.
1411 * decl.c (fixup_anonymous_aggr): Fix error message for
1412 anonymous struct (vs union).
1414 2007-09-19 Jason Merrill <jason@redhat.com>
1417 * pt.c (tsubst): Handle typedefs by looking for the specialization.
1418 (retrieve_specialization): Only tagged types use
1419 DECL_TEMPLATE_INSTANTIATIONS.
1420 (instantiate_class_template): Push nested classes too.
1421 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
1423 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
1424 * init.c (is_aggr_type): Remove redundant tests.
1425 * class.c (push_nested_class): Use CLASS_TYPE_P.
1427 2007-09-20 Paolo Carlini <pcarlini@suse.de>
1430 * init.c (build_zero_init): If, recursively, build_zero_init
1431 returns a NULL_TREE, do not append it to the VEC of constructors.
1433 2007-09-18 Jason Merrill <jason@redhat.com>
1436 * pt.c (apply_late_template_attributes): Set processing_template_decl.
1437 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
1438 ATTR_FLAG_TYPE_IN_PLACE.
1439 (tsubst): Do unqualified lookup to find typedefs from current class.
1440 [ARRAY_TYPE]: Propagate alignment info.
1441 * decl2.c (is_late_template_attribute): Only defer handling of
1442 attribute aligned if the expression is dependent.
1443 (save_template_attributes): If we're deferring any attributes,
1444 make this a naming typedef.
1446 2007-09-18 Paolo Carlini <pcarlini@suse.de>
1448 PR c++/33462 (again)
1449 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
1450 va_arg instead of __builtin_va_arg.
1452 2007-09-18 Paolo Carlini <pcarlini@suse.de>
1455 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
1456 (pp_cxx_primary_expression): Use it.
1457 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
1458 * error.c (dump_expr): Use it.
1460 2007-09-18 Paolo Carlini <pcarlini@suse.de>
1463 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
1464 out case TYPEID_EXPR to...
1465 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
1466 and pp_cxx_right_paren.
1467 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
1468 * error.c (dump_expr): Use it.
1470 2007-09-18 Paolo Carlini <pcarlini@suse.de>
1473 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
1474 (pp_cxx_primary_expression): Use it.
1475 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
1476 * error.c (dump_expr): Use it.
1478 2007-09-16 Paolo Carlini <pcarlini@suse.de>
1481 * init.c (build_new): Remove warning for zero-element
1484 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
1487 * call.c (maybe_handle_implicit_object): Set this_p, clear
1488 rvaluedness_matches_p.
1489 (compare_ics): Do not compare rvaluedness matching when one of the
1490 operands is an implicit object.
1492 2007-09-14 Jason Merrill <jason@redhat.com>
1494 PR c++/17743, c++/19163
1495 * decl2.c (is_late_template_attribute): New fn.
1496 (splice_template_attributes, save_template_attributes): New fns.
1497 (cplus_decl_attributes): Call save_template_attributes.
1498 * pt.c (apply_late_template_attributes): New fn.
1499 (instantiate_class_template, tsubst_decl): Use it.
1500 * cp-tree.h: Declare is_late_template_attribute.
1502 2007-09-13 Tom Tromey <tromey@redhat.com>
1504 * parser.c (cp_lexer_new_main): Don't use
1505 c_lex_return_raw_strings.
1506 (cp_lexer_get_preprocessor_token): Update. Add special case when
1509 2007-09-11 Jan Hubicka <jh@suse.cz>
1511 * method.c (use_thunk): Use tree_rest_of_compilation
1512 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1513 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
1514 * cp-tree.h (expand_body): Kill.
1515 (emit_associated_thunks): Declare.
1516 * semantics.c (emit_associated_thunks): Export.
1517 (expand_body): Kill.
1519 2007-09-09 David Daney <ddaney@avtrex.com>
1522 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
1523 to calculate cookie_ptr.
1525 2007-09-08 Jason Merrill <jason@redhat.com>
1528 * pt.c (most_specialized_class): Set processing_template_decl
1529 while tsubsting partial spec args.
1531 2007-09-06 Jason Merrill <jason@redhat.com>
1533 * decl2.c (get_guard): Copy visibility from the guarded variable.
1535 2007-09-06 Jan Hubicka <jh@suse.cz>
1537 * semantics.c (expand_body): Do not mark arguments of clones used.
1539 2007-09-06 Paolo Carlini <pcarlini@suse.de>
1542 * decl.c (cp_finish_decl): When processing_template_decl,
1543 deal correctly with init as TREE_LIST.
1545 2007-09-06 Tom Tromey <tromey@redhat.com>
1547 * decl.c (finish_function): Put return's location on line zero of
1550 2007-09-05 Jason Merrill <jason@redhat.com>
1553 * except.c (prepare_eh_type): Use type_decays_to.
1556 * init.c (build_delete): Use build_headof to get the address of the
1557 complete object if we aren't using the deleting destructor.
1558 * rtti.c (build_headof): No longer static.
1559 * cp-tree.h: Declare it.
1561 2007-09-06 Jakub Jelinek <jakub@redhat.com>
1563 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
1564 decl if a prototype for XX is provided with throw().
1567 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
1568 on __*_chk non-__builtin_* decls.
1570 2007-09-05 Paolo Carlini <pcarlini@suse.de>
1573 * semantics.c (finish_id_expression): Use context_for_name_lookup
1574 insted of DECL_CONTEXT, to see through anonymous structs and unions.
1575 * class.c (finish_struct_anon): Deal correctly with anonymous
1576 structs (vs unions, as GNU extension) in error messages.
1578 2007-09-05 Jan Hubicka <jh@suse.cz>
1580 * cp/sematics.c (expand_body): Remove unnecesary import_export_decl
1581 call, DECL_EXTERNAL checks and current_function_decl saving.
1583 2007-09-05 Paolo Carlini <pcarlini@suse.de>
1585 PR c++/29731 (again)
1586 * parser.c (cp_parser_primary_expression): Return error_mark_node
1587 when a statement-expression is found in a template-argument list.
1589 2007-09-04 Jason Merrill <jason@redhat.com>
1591 * except.c (initialize_handler_parm): Use
1592 fold_build_cleanup_point_expr.
1595 * call.c (reference_binding): Don't look for user-defined conversions
1599 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
1600 the MUST_NOT_THROW_EXPR.
1602 2007-09-04 Richard Sandiford <richard@codesourcery.com>
1604 * decl.c (cp_finish_decl): Call determine_visibility before
1605 make_rtl_for_nonlocal_decl.
1607 2007-09-04 Jason Merrill <jason@redhat.com>
1610 * pt.c (most_specialized_class): Substitute outer template
1611 arguments into the arguments of a member template partial
1613 (strip_innermost_template_args): New fn.
1615 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
1617 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
1619 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1621 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
1622 * decl.c (cp_make_fname_decl): Likewise,
1623 * parser.c (cp_parser_string_literal): Likewise,
1624 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
1625 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
1628 2007-09-02 Paolo Carlini <pcarlini@suse.de>
1631 * typeck.c (build_unary_op): Fix error message for
1632 Boolean expression as operand to operator--.
1634 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1636 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
1637 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
1640 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
1643 * init.c (build_default_init): Make extern.
1644 * cp-tree.h (build_default_init): Declare here.
1645 * pt.c (tsubst_expr): When the instantiation of the initializer of
1646 a variable results in an empty list, default-initialize the
1648 (tsubst_copy_and_build): When the instantiation of the initializer
1649 in a new expression results in an empty initializer list,
1650 default-initialize it.
1652 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
1654 * mangle.c (write_type): Change mangling of rvalue reference from
1657 2007-08-31 Jakub Jelinek <jakub@redhat.com>
1659 * decl.c (duplicate_decls): Remove duplicated line.
1661 2007-08-31 Paolo Carlini <pcarlini@suse.de>
1664 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
1665 BOUND_TEMPLATE_TEMPLATE_PARM.
1667 2007-08-31 Paolo Carlini <pcarlini@suse.de>
1670 * search.c (lookup_member): Check the name argument for
1673 2007-08-31 Paolo Carlini <pcarlini@suse.de>
1676 * parser.c (cp_parser_trait_expr): Check rerurn value of
1679 2007-08-30 Ollie Wild <aaw@google.com>
1681 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
1682 convert_ptrmem for pointer to member conversions.
1683 (convert_to_pointer_force): Update cp_convert_to_pointer call.
1684 (ocp_convert): Update cp_convert_to_pointer call.
1685 * typeck.c (convert_ptrmem): Add conditional for null pointers to
1687 (build_static_cast_1): Check can_convert for conversions in either
1689 (get_delta_difference_1): New function.
1690 (get_delta_difference): Refactor to call get_delta_difference_1.
1692 2007-08-30 Jakub Jelinek <jakub@redhat.com>
1694 * decl.c (start_preparsed_function): Set
1695 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
1697 2007-08-28 Paolo Carlini <pcarlini@suse.de>
1700 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
1701 BOUND_TEMPLATE_TEMPLATE_PARM.
1703 2007-08-28 Jakub Jelinek <jakub@redhat.com>
1707 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
1708 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
1710 2007-08-27 Jason Merrill <jason@redhat.com>
1713 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
1714 Look inside STMT_EXPR.
1715 * semantics.c (stmt_expr_value_expr): New fn.
1716 * cp-tree.h: Declare it.
1719 * decl.c (groktypename): Ignore attributes applied to class type.
1721 2007-08-28 Richard Guenther <rguenther@suse.de>
1723 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
1725 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
1727 * error.c (dump_expr): Handle COMPLEX_CST.
1728 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
1729 (pp_cxx_expression): Likewise.
1731 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
1733 * decl.c (GNU_INLINE_P): New.
1734 (duplicate_decls): Handle gnu_inline. Merge attributes and
1735 some flags in overriding definitions.
1736 (redeclaration_error_message): Handle gnu_inline.
1737 (start_preparsed_function): Likewise.
1739 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1741 * call.c (sufficient_parms_p): Constify.
1742 * class.c (same_signature_p): Likewise.
1743 * cp-gimplify.c (is_invisiref_parm,
1744 cxx_omp_privatize_by_reference): Likewise.
1745 * cp-objcp-common.c (has_c_linkage): Likewise.
1746 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
1747 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
1748 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
1749 num_artificial_parms_for, comp_template_parms,
1750 template_parameter_pack_p, any_dependent_template_arguments_p,
1751 any_type_dependent_arguments_p, any_value_dependent_elements_p,
1752 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
1753 zero_init_p, member_p, cp_lvalue_kind,
1754 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
1755 varargs_function_p, is_dummy_object, special_function_kind,
1756 string_conv_p, type_unknown_p, comp_except_specs, compparms,
1757 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
1758 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
1759 cp_has_mutable_p, at_least_as_qualified_p,
1760 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
1761 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
1762 * except.c (nothrow_libfn_p): Likewise.
1763 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
1765 * pt.c (comp_template_parms, template_parameter_pack_p,
1766 any_type_dependent_arguments_p, any_value_dependent_elements_p,
1767 any_dependent_template_arguments_p): Likewise.
1768 * repo.c (repo_export_class_p): Likewise.
1769 * semantics.c (anon_aggr_type_p): Likewise.
1770 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
1771 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
1772 varargs_function_p, member_p, is_dummy_object, pod_type_p,
1773 zero_init_p, special_function_p): Likewise.
1774 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
1775 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
1776 compparms, invalid_nonstatic_memfn_p,
1777 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
1778 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
1779 cp_has_mutable_p, lvalue_or_else): Likewise.
1781 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
1783 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
1784 * cp-objcp-common.c (cp_tree_size): Ditto.
1785 * tree.c (cp_walk_subtrees): Ditto
1786 * cp-tree.def (TINST_LEVEL): Go away.
1787 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
1788 move together with other non-tree structs.
1789 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
1790 (union lang_tree_node): Eliminate tinst_level field.
1791 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
1792 (current_instantiation, outermost_tinst_level): Return
1793 a "struct tinst_level *".
1795 * error.c (print_instantiation_partial_context): Change second
1796 parameter to a "struct tinst_level *". Replace accessor macros
1798 (print_instantiation_full_context): Likewise.
1799 * lex.c (in_main_input_context): Likewise.
1801 * pt.c (struct pending_templates): New.
1802 (pending_templates, last_pending_template): Use it as a type.
1803 (current_tinst_level): Change typo to "struct tinst_level *"
1804 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
1805 (add_pending_template): Construct a "struct pending_template".
1806 Replace TINST_LEVEL accessor macros with field access.
1807 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
1808 (pop_tinst_level): Likewise.
1809 (instantiate_pending_templates): Likewise. Factor common code used
1810 when an instantiation has been done.
1811 (outermost_tinst_level): Replace tree_last with loop.
1812 (current_instantiation): Return a "struct tinst_level *".
1814 2007-08-24 Ollie Wild <aaw@google.com>
1816 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
1817 * name-lookup.h (cp_binding_level): Remove vtables member.
1819 2007-08-24 Richard Guenther <rguenther@suse.de>
1821 * tree.c (cp_cannot_inline_tree_fn): Remove.
1822 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
1823 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
1826 2007-08-24 Jakub Jelinek <jakub@redhat.com>
1829 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
1830 error_mark_node right away if build_expr_type_conversion
1834 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
1835 is error_mark_node rather than NULL_TREE.
1836 * pt.c (check_explicit_specialization): Likewise.
1839 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
1840 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
1842 2007-08-22 Jason Merrill <jason@redhat.com>
1845 * pt.c (outermost_tinst_level): New function.
1846 * lex.c (in_main_input_context): New function.
1847 * cp-tree.h: Declare it.
1848 * decl2.c (constrain_class_visibility): Use it to avoid warning
1849 about uses of the anonymous namespace in the main input file.
1851 2007-08-21 Jakub Jelinek <jakub@redhat.com>
1853 * init.c (build_new_1): Use get_target_expr instead of save_expr.
1855 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
1858 * class.c (finish_struct_1): Warn when a class has virtual
1859 functions and accessible non-virtual destructor.
1861 2007-08-20 Richard Guenther <rguenther@suse.de>
1865 * call.c (build_new_method_call): Convert initializer to
1867 * init.c (build_aggr_init): Do not fiddle with types.
1868 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
1869 * except.c (build_throw): Do not drop qualifiers for the
1871 * typeck.c (get_member_function_from_ptrfunc): Do not
1872 fiddle with types, instead convert.
1873 (build_ptrmemfunc1): Convert to the target type for
1875 (gfc_trans_allocate): Convert result to target type.
1876 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
1877 pointer-to-member structures shall have alias set zero as well.
1879 2007-08-20 Richard Guenther <rguenther@suse.de>
1881 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
1883 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
1884 (nonstatic_local_decl_p): Likewise.
1885 * tree.c (cp_auto_var_in_fn_p): Remove.
1886 * decl.c (nonstatic_local_decl_p): Remove.
1888 2007-08-20 Richard Guenther <rguenther@suse.de>
1890 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
1892 * tree.h (cp_walk_tree): New define to walk_tree_1 with
1893 cp_walk_subtrees lh parameter.
1894 (cp_walk_tree_without_duplicates): New define to
1895 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
1896 * tree.c (count_trees): Call
1897 cp_walk_tree_without_duplicates.
1898 (verify_stmt_tree): Call cp_walk_tree.
1899 (break_out_target_exprs): Likewise.
1900 (WALK_SUBTREE): Likewise.
1901 * cp-gimplify.c (cp_genericize): Likewise.
1902 * cp-pt.c (find_parameter_packs_r): Likewise.
1903 (uses_parameter_packs): Likewise.
1904 (make_pack_expansion): Likewise.
1905 (check_for_bare_parameter_packs): Likewise.
1906 (for_each_template_parm): Likewise.
1907 * decl.c (check_default_argument): Call
1908 cp_walk_tree_without_duplicates.
1909 * except.c (build_throw): Likewise.
1910 * decl2.c (type_visibility): Likewise.
1911 * semantics.c (expand_or_defer_fn): Likewise.
1912 (finalize_nrv): Call cp_walk_tree.
1914 2007-08-20 Jakub Jelinek <jakub@redhat.com>
1917 * init.c (build_new_1): Rename placement_var variable to placement_expr.
1918 Initialize it with save_expr rather than get_temp_regvar.
1920 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
1923 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
1926 2007-08-17 Ollie Wild <aaw@google.com>
1929 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
1930 declarations into appropriate slots for comparison. Fix type
1933 2007-08-17 Paolo Carlini <pcarlini@suse.de>
1936 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
1937 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
1939 2007-08-17 Paolo Carlini <pcarlini@suse.de>
1942 * parser.c (cp_parser_class_head): Improve error message.
1944 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
1946 * pt.c (instantiate_decl): Set input_location
1947 for the function end.
1949 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1951 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
1953 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
1954 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
1955 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
1956 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
1957 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
1958 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
1959 * typeck.c (cp_type_quals): Likewise.
1960 * typeck2.c (cxx_incomplete_type_diagnostic,
1961 cxx_incomplete_type_error): Likewise.
1963 2007-08-16 Paolo Carlini <pcarlini@suse.de>
1966 * pt.c (tsubst_friend_function): When check_classfn
1967 returns error_mark_node likewise return it.
1969 2007-08-15 Jakub Jelinek <jakub@redhat.com>
1972 * typeck.c (check_return_expr): Don't NRV optimize vars in
1974 * decl.c (finish_function): Comment fix.
1976 2007-08-15 Paolo Carlini <pcarlini@suse.de>
1979 * pt.c (push_template_decl_real): Depending on TYPE_P
1980 use either TYPE_CONTEXT or DECL_CONTEXT.
1982 2007-08-14 Mark Mitchell <mark@codesourcery.com>
1984 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
1985 constructors and destructors return this.
1987 2007-08-14 Paolo Carlini <pcarlini@suse.de>
1990 * decl2.c (check_classfn): Return error_mark_node in case of error;
1991 in that case, do not call add_method.
1992 * decl.c (start_decl): Deal with check_classfn returning
1994 (grokfndecl): Likewise.
1995 * pt.c (tsubst_friend_function): Likewise.
1997 2007-08-14 Andrew Pinski <pinskia@gmail.com>
2000 * typeck.c (build_binary_op): Disallow vector float types with
2001 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
2003 2007-08-11 Ian Lance Taylor <iant@google.com>
2005 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
2007 * cp/cp-tree.h (cxx_get_alias_set): Update declaration.
2009 2007-08-10 Ollie Wild <aaw@google.com>
2011 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
2013 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
2015 (unqualified_namespace_lookup): Fix ambiguous_decl call.
2016 (lookup_using_namespace): Fix ambiguous_decl call.
2017 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
2019 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2021 * call.c (name_as_c_string): Use CONST_CAST.
2022 * decl.c (build_decl): Likewise.
2023 * parser.c (cp_parser_string_literal): Likewise.
2025 2007-08-10 Paolo Carlini <pcarlini@suse.de>
2028 * error.c (dump_expr): Consistently use the *_cxx_*
2029 variants of the pretty-print functions.
2031 2007-08-10 Paolo Carlini <pcarlini@suse.de>
2034 * decl.c (check_special_function_return_type): Just error
2035 on return type specified for conversion operator.
2037 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
2039 * typeck2.c (readonly_error): Handle general expressions.
2040 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
2042 2007-08-06 Dan Hipschman <dsh@google.com>
2044 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
2045 access function name.
2047 2007-08-04 Alfred Minarik <a.minarik@aon.at>
2050 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
2051 * g++spec.c (lang_specific_driver): Check them.
2053 2007-08-06 Paolo Carlini <pcarlini@suse.de>
2056 * pt.c (inline_needs_template_parms): Fix comment; change return type
2059 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
2062 2007-03-26 Dirk Mueller <dmueller@suse.de>
2064 * parser.c (cp_parser_member_declaration): Pedwarn
2065 about stray semicolons after member declarations.
2067 2007-08-02 Lee Millward <lee.millward@gmail.com>
2072 * parser.c (cp_parser_asm_definition): Detect and discard asm
2073 statements with invalid inputs or outputs.
2074 (cp_parser_asm_operand_list): Return error mark node if any
2075 of the operands are invalid. Adjust documentation.
2077 2007-08-02 Nick Clifton <nickc@redhat.com>
2079 * typeck.c: Change copyright header to refer to version 3 of the
2080 GNU General Public License and to point readers at the COPYING3
2081 file and the FSF's license web page.
2082 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
2083 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
2084 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
2085 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
2086 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
2087 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
2088 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
2089 name-lookup.h, parser.c: Likewise.
2091 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2094 * call.c (magic_varargs_p): Honor the "type generic" attribute.
2096 2007-07-30 Paolo Carlini <pcarlini@suse.de>
2099 * semantics.c (finish_label_stmt): Reject the __label__
2100 extension outside function scopes.
2102 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2104 * parser.c (eof_token): Un-constify.
2105 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
2106 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
2109 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
2111 * pt.c, tree.c, typeck2.c: Fix comment typos.
2113 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
2114 Mark Mitchell <mark@codesourcery.com>
2117 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
2118 hidden due to friend declarations in local classes.
2120 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
2122 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
2123 * cp-tree.def (DECLTYPE_TYPE): New.
2124 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
2125 (dump_type_prefix): Ditto.
2126 (dump_type_suffix): Ditto.
2127 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
2128 * mangle.c (write_type): Handle DECLTYPE_TYPE.
2129 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
2131 (DECLTYPE_TYPE_EXPR): New.
2132 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
2133 (finish_declared_type): Declare.
2134 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
2135 DECLTYPE_TYPE nodes.
2136 (pp_cxx_type_id): Ditto.
2137 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
2138 (tsubst): Substitute into a DECLTYPE_TYPE node.
2139 (tsubst_copy): Ditto.
2140 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
2142 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
2143 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
2144 structural equality (because we can't hash the expressions).
2145 (finish_declared_type): New.
2146 * lex.c (reswords): Add "decltype" keyword.
2147 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
2148 (cp_parser_postfix_expression): Add member_access_only_p to
2149 restrict postfix expression to member access expressions.
2150 (cp_parser_unary_expression): Update call to
2151 cp_parser_postfix_expression to reflect new parameter.
2152 (cp_parser_declared_type): New.
2153 (cp_parser_simple_type_specifier): Parse decltype types.
2155 2007-07-27 Mark Mitchell <mark@codesourcery.com>
2158 * call.c (convert_for_arg_passing): Only widen bitfields to their
2159 declared types if necessary.
2161 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2163 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
2166 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2168 * decl.c (typename_hash, typename_compare): Constify.
2169 * mangle.c (hash_type, compare_type): Likewise.
2170 * pt.c (eq_local_specializations, hash_local_specialization):
2172 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
2173 list_hash): Likewise.
2174 * typeck2.c (pat_compare): Likewise.
2176 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
2178 * method.c (implicitly_declare_fn): Increase alignment if member
2179 function pointer format requires it.
2181 2007-07-24 Paolo Carlini <pcarlini@suse.de>
2184 * typeck.c (check_return_expr): Do not pass a null argument
2187 2007-07-24 Paolo Carlini <pcarlini@suse.de>
2190 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
2193 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
2196 * typeck.c (convert_arguments): Only use default args if we have
2200 * typeck.c (structural_comptypes): No need to check
2201 resolve_typename_type return value here.
2202 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
2203 * pt.c (resolve_typename_type): Follow typename typedefs. Return
2204 original type rather than error_mark_node in case of failure.
2205 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
2206 resolve_typename_type result check.
2207 (cp_parser_direct_declarator, cp_parser_head,
2208 cp_parser_constructor_declarator_p): Likewise.
2210 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
2212 * pt.c (template_parms_variadic_p): Remove.
2213 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
2215 2007-07-12 Jakub Jelinek <jakub@redhat.com>
2218 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
2219 argument to dump_aggr_init_expr_args instead of false.
2221 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
2223 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
2224 canonical types; otherwise, fall back to structural type
2225 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
2226 internal compiler error if the canonical types are wrong.
2228 2007-07-11 Paolo Carlini <pcarlini@suse.de>
2231 * parser.c (cp_parser_make_indirect_declarator): When the
2232 the code argument is ERROR_MARK return cp_error_declarator.
2234 2007-07-09 Geoffrey Keating <geoffk@apple.com>
2237 * decl.c (cxx_init_decl_processing): Don't set
2238 force_align_functions_log.
2239 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
2240 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
2241 FUNCTION_DECL, return its alignment.
2243 2007-07-09 Richard Guenther <rguenther@suse.de>
2245 * decl.c (start_preparsed_function): Do not promote return type.
2247 2007-07-08 Paolo Carlini <pcarlini@suse.de>
2250 * pt.c (unify): Never pass error_mark_node to template_decl_level.
2252 2007-07-07 Mark Mitchell <mark@codesourcery.com>
2255 * pt.c (resolve_overloaded_unification): Robustify. Return a
2257 (type_unification_real): Adjust accordingly.
2259 2007-07-06 Richard Guenther <rguenther@suse.de>
2261 * init.c (build_new_1): Use the correct pointer type.
2262 * typeck2.c (build_m_component_ref): Likewise.
2264 2007-07-05 Mark Mitchell <mark@codesourcery.com>
2267 * init.c (build_zero_init): Always build an initializer for
2269 * typeck2.c (build_functional_cast): Use build_zero_init.
2272 * init.c (build_new_1): Always pass the allocation function to
2273 build_op_delete_call.
2274 * call.c (build_op_delete_call): Handle operator delete with a
2275 variable-argument list. Do not issue an error when no matching
2276 deallocation function is available for a new operator.
2279 * cp-tree.h (any_value_dependent_elements_p): Declare it.
2280 * decl.c (value_dependent_init_p): New function.
2281 (cp_finish_decl): Use it.
2282 * pt.c (value_dependent_expression_p): Use
2283 any_value_dependent_elements_p.
2284 * parser.c (cp_parser_primary_expression): Add comment about
2285 treating dependent qualified names as integral
2286 constant-expressions.
2288 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
2290 * decl.c (build_ptrmemfunc_type): Always use structural equality
2291 tests when comparing pointer-to-member-function types, because the
2292 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
2295 2007-07-03 Mark Mitchell <mark@codesourcery.com>
2297 * init.c (build_new): Tweak comment.
2299 2007-06-29 Dave Brolley <brolley@redhat.com>
2302 * parser.c (cp_parser_new_type_id): Don't reduce a named array
2303 type to its base type and number of elements here.
2304 * init.c (build_new): Call complete_type_or_else to ensure that the
2305 type is complete and to issue a diagnostic if it is not.
2306 (build_new_1): Don't call complete_type_or_else here.
2308 2007-07-03 Richard Guenther <rguenther@suse.de>
2311 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
2314 2007-07-02 Simon Baldwin <simonb@google.com>
2316 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
2317 for inner-style nested forward declarations that don't declare
2320 2007-07-02 Jakub Jelinek <jakub@redhat.com>
2323 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2324 DECL_P in not a variable and appears more than once error messages.
2326 2007-07-01 Ollie Wild <aaw@google.com>
2328 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
2329 (select_decl): Remove function.
2330 (unqualified_namespace_lookup): Populate binding by calling
2331 ambiguous_decl. Remove select_decl call.
2332 (lookup_qualified_name): Remove select_decl call.
2333 * decl.c (lookup_and_check_tag): Check for ambiguous references.
2334 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
2335 generation when name lookup is ambiguous.
2337 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
2340 * init.c (build_new_1): Use structural equality on the copy of the
2343 2007-06-28 Geoffrey Keating <geoffk@apple.com>
2345 * decl2.c (determine_visibility): Implement
2346 flag_visibility_ms_compat effect on type info.
2347 * decl.c (cxx_init_decl_processing): Implement
2348 global effect of flag_visibility_ms_compat.
2350 2007-06-28 Geoffrey Keating <geoffk@apple.com>
2352 * decl2.c (start_objects): Mark constructor-running function
2355 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
2358 * decl.c (grokdeclarator): Reset friendp for member functions declared
2359 friend of their own class.
2361 2007-06-23 Mark Mitchell <mark@codesourcery.com>
2363 * decl2.c (determine_visibility): Don't look for dllexport here.
2364 (determine_visibility_from_class): Tidy.
2366 2007-06-18 Simon Baldwin <simonb@google.com>
2369 * parser.c (cp_parser_single_declaration): Added check for storage
2370 class other than sc_none in parsed declaration, and a flag to indicate
2371 if the call is part of an explicit template specialization parse.
2372 * (cp_parser_explicit_specialization): Specialization check flag added
2373 to call to cp_parser_single_declaration(), set true.
2374 * (cp_parser_template_declaration_after_export): Specialization check
2375 flag added to call to cp_parser_single_declaration(), set false.
2376 * pt.c (check_explicit_specialization): Added code to copy visiblity
2377 and linkage from the templated function to the explicit specialization.
2379 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
2381 * typeck.c (build_binary_op): For templates build the
2382 expression in pieces to avoid the assert in build2_stat.
2383 (get_member_function_from_ptrfunc):
2384 Change over to using POINTER_PLUS_EXPR and convert
2385 the second operand to sizetype.
2386 * typeck2.c (build_m_component_ref): Likewise.
2387 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
2388 instead of PLUS_EXPR for pointers.
2389 (build_new_1): Likewise.
2390 (build_vec_delete_1): Likewise.
2391 (build_vec_delete): Likewise.
2392 * class.c (build_base_path): Likewise.
2393 (build_base_path): Likewise.
2394 (convert_to_base_statically): Likewise.
2395 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
2396 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
2397 instead of PLUS_EXPR.
2398 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
2399 instead of PLUS_EXPR for pointers.
2400 * call.c (build_special_member_call): Likewise.
2401 * rtti.c (build_headof): Likewise.
2402 Use sizetype instead of ptrdiff_type_node.
2403 (tinfo_base_init): Create a POINTER_PLUS_EXPR
2404 instead of PLUS_EXPR for pointers.
2405 * except.c (expand_start_catch_block): Do a
2406 NEGATIVE and then a POINTER_PLUS_EXPR instead
2408 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
2409 PLUS_EXPR on pointer types over to use
2410 POINTER_PLUS_EXPR and remove the conversion
2411 to the pointer types.
2412 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
2413 adding to a pointer type. Use size_int instead of
2414 ssize_int. Convert the index to sizetype before
2415 adding it to the pointer.
2417 2007-06-15 Mark Mitchell <mark@codesourcery.com>
2419 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
2420 (DECL_ANON_UNION_VAR_P): New macro.
2421 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
2422 than DECL_VAR_MARKED_P, to keep track of which variables we have
2424 * decl.c (redeclaration_error_message): Complain about redeclaring
2425 anonymous union members at namespace scope.
2426 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
2428 2007-06-14 Geoff Keating <geoffk@apple.com>
2430 * decl2.c (determine_visibility): Ensure that functions with
2431 hidden types as parameters are hidden.
2434 * decl2.c (determine_visibility): Remove duplicate code for
2437 2007-06-12 Ian Lance Taylor <iant@google.com>
2440 * init.c (avoid_placement_new_aliasing): New static function.
2441 (build_new_1): Call it.
2443 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
2445 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
2446 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
2448 2007-06-08 Jakub Jelinek <jakub@redhat.com>
2451 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
2452 on init, the non-decl cond operand and increment value.
2454 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
2457 * decl.c (check_initializer): Report an error when a brace enclosed
2458 initializer is used for a non-aggregate type in C++98.
2459 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
2461 (grokdeclarator): Likewise.
2462 (move_fn_p): Likewise.
2463 * typeck.c (check_return_expr): Likewise.
2464 * call.c (reference_binding): Likewise.
2465 * error.c (cp_cpp_error): Likewise.
2466 * pt.c (check_default_tmpl_args): Likewise.
2468 * lex.c (init_reswords): Likewise.
2469 * parser.c (p_parser_primary_expression): Likewise.
2470 (TOKEN_PRECEDENCE): Likewise.
2471 (cp_parser_init_declarator): Likewise.
2472 (cp_parser_ptr_operator): Likewise.
2473 (cp_parser_parameter_declaration): Likewise.
2474 (cp_parser_enclosed_template_argument_list): Likewise.
2475 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
2476 (cp_parser_next_token_ends_template_argument_p): Likewise.
2478 2007-06-04 Simon Baldwin <simonb@google.com>
2480 * decl.c (grokdeclarator): Readability change. Moved case labels
2481 into direct switch statement scope.
2483 2007-06-04 Paolo Carlini <pcarlini@suse.de>
2485 * call.c (convert_like_real): Remove pointless code.
2487 2007-05-31 Mark Mitchell <mark@codesourcery.com>
2489 * decl.c (get_atexit_fn_ptr_type): New function.
2490 (get_atexit_node): Use it.
2491 (start_cleanup_fn): Likewise.
2492 (register_dtor_fn): Use the object's destructor, instead of a
2493 separate cleanup function, where possible.
2494 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
2495 (atexit_fn_ptr_type_node): New macro.
2496 * decl2.c (build_cleanup): Use build_address.
2498 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
2500 * typeck.c (build_binary_op): Include types in error.
2502 2007-05-31 Jakub Jelinek <jakub@redhat.com>
2505 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
2506 needs runtime initialization.
2508 2007-05-31 Paolo Carlini <pcarlini@suse.de>
2511 * semantics.c (finish_trait_expr): Complete the types.
2513 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
2514 Douglas Gregor <doug.gregor@gmail.com>
2515 Pedro Lamarao <pedro.lamarao@mndfck.org>
2516 Howard Hinnant <howard.hinnant@gmail.com>
2520 * typeck.c (comptypes): Don't consider rvalue and lvalue
2521 reference types to be equivalent.
2522 (check_return_expr): Move from certain lvalues when returning
2524 * decl.c (grokdeclarator): Implement reference collapsing.
2525 (copy_fn_p): Don't consider constructors taking rvalue references
2526 to be copy constructors.
2528 * call.c (conversion): New "rvaluedness_matches_p" member.
2529 (convert_class_to_reference): Require reference type as first
2530 parameter instead of base type.
2531 (reference_binding): Add logic to handle rvalue references.
2532 (implicit_conversion): Update inaccurate comment.
2533 (convert_like_real): Disable creation of temporaries that are
2534 impossible to initialize for types with move constructors.
2535 (build_over_call): Elide move constructors when possible.
2536 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
2537 (maybe_handle_ref_bind): Return conversion instead of type node.
2538 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
2539 determine preferred conversion sequences.
2540 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
2541 (LOOKUP_PREFER_RVALUE): New.
2542 (DECL_MOVE_CONSTRUCTOR_P): New.
2543 (struct cp_declarator): Add "reference" member for reference
2544 types, with new "rvalue_ref" flag.
2545 (cp_build_reference_type): Declare.
2546 (move_fn_p): Declare.
2547 * error.c (dump_type_prefix): Format rvalue reference types
2548 correctly in error messages.
2549 * except.c (build_throw): Move from certain lvalues when
2551 * mangle.c (write_type): Mangle rvalue references differently
2552 than regular references.
2553 * parser.c (make_reference_declarator): Add boolean parameter for
2555 (cp_parser_make_indirect_declarator): New.
2556 (cp_parser_new_declarator_opt): Call
2557 cp_parser_make_indirect_declarator.
2558 (cp_parser_conversion_declarator_opt): Ditto.
2559 (cp_parser_declarator): Ditto.
2560 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
2562 * pt.c (tsubst): Implement reference collapsing.
2563 (maybe_adjust_types_for_deduction): Implement special template
2564 parameter deduction rule for rvalue references.
2565 (type_unification_real): Update calls to
2566 maybe_adjust_types_for_deduction.
2567 (try_one_overload): Ditto.
2568 (unify_pack_expansion): Ditto.
2569 * tree.c (lvalue_p_1): Handle rvalue reference types.
2570 (cp_build_reference_type): New.
2572 2007-05-30 Jakub Jelinek <jakub@redhat.com>
2575 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
2576 variables that need runtime initialization.
2578 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
2581 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
2582 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
2583 case POSTDECREMENT_EXPR>): Return the error_mark_node
2584 if either the real or imaginary parts would an
2587 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
2588 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2591 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
2592 token is a closing brace, false if there are no tokens left.
2593 (cp_parser_namespace_alias_definition): Only consume the next token if
2594 it is a closing brace.
2596 * parser.c (cp_parser_class_specifier): Likewise.
2598 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
2600 * semantics.c (finish_member_declaration): Fix a typo in the
2603 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
2615 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
2616 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
2617 * pt.c (check_for_bare_parameter_packs): Return bool indicated
2618 whether everything was okay. Fix indentation.
2619 (push_template_decl_real): Check for bare parameter packs in
2620 function parameters; where errors occur, mark the parameter types
2621 with ERROR_MARK_NODEs to avert ICEs.
2622 (coerce_template_parameter_pack): New.
2623 (coerce_template_parms): Moved parameter pack coercion into
2624 coerce_template_parameter_pack, and permit it anywhere in the
2625 template parameter list (not just at the end). Parameter and
2626 argument indices can vary (somewhat) separately now, so add
2627 PARM_IDX and ARG_IDX.
2628 (fn_type_unification): Don't set an argument pack as incomplete if
2629 no argument pack was deduced.
2630 (type_unification_real): If a type parameter is a parameter pack
2631 and has not otherwise been deduced, it will be deduced to an empty
2633 (more_specialized_fn): Use the actual lengths of the argument
2634 lists when comparing against expansions.
2635 * semantics.c (finish_member_declaration): If a field's type has
2636 bare parameter packs, error and set its type to ERROR_MARK_NODE.
2638 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
2641 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
2643 2007-05-22 Ollie Wild <aaw@google.com>
2645 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
2646 (unqualified_namespace_lookup): Adds check for hidden types.
2648 2007-05-22 Ollie Wild <aaw@google.com>
2650 * decl.c (duplicate_decls): Verify namespace names are unique.
2652 2007-05-21 Mark Mitchell <mark@codesourcery.com>
2654 * decl.c (cxx_maybe_build_cleanup): Handle
2655 __attribute__((cleanup)).
2657 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2659 * cvt.c (cp_convert_and_check): Don't check warnings if the
2662 2007-05-18 Geoffrey Keating <geoffk@apple.com>
2664 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
2666 2007-05-14 Paolo Carlini <pcarlini@suse.de>
2669 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
2670 type only if is a class type (5.2.8/4).
2672 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
2674 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
2675 * decl.c (grokdeclarator): Use unsigned_type_for instead of
2676 c_common_unsigned_type.
2678 2007-05-11 Silvius Rus <rus@google.com>
2680 * cp/typeck.c (build_indirect_ref): Add call to
2681 strict_aliasing_warning.
2682 (build_reinterpret_cast_1): Condition call to
2683 strict_aliasing_warning.
2685 2007-05-11 Jan Hubicka <jh@suse.cz>
2687 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
2688 * decl2.c (start_objects): ctors and dtors are no longer public.
2689 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
2691 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
2693 * typeck.c (build_unary_op): Remove code that used to
2694 handle non lvalue increments/decrements.
2696 2007-05-07 Mike Stump <mrs@apple.com>
2698 * parser.c (check_empty_body): Add.
2699 (cp_parser_iteration_statement): Add call to check_empty_body.
2701 2007-05-05 Geoffrey Keating <geoffk@apple.com>
2704 * mangle.c (write_mangled_name): Mangle static variable names.
2705 (write_unqualified_name): Use local-source-name for
2706 namespace-scope static variables.
2708 2007-05-04 Dirk Mueller <dmueller@suse.de>
2710 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
2713 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
2716 * decl2.c (constrain_class_visibility):
2717 Use strip_pointer_or_array_types instead of strip_array_types.
2719 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
2722 * decl.c (reshape_init_r): Don't reshape the first element if it
2723 is a pointer to member function.
2725 2007-04-27 Simon Baldwin <simonb@google.com>
2727 * decl.c (grokparms): Changed message format from %qD to %qE.
2729 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
2731 * error.c (maybe_warn_variadic_templates): Variadic templates are
2732 now in C++0x, so only warn about them in C++98 mode.
2734 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
2737 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
2738 integeral types from vectors types.
2740 2007-04-26 Jakub Jelinek <jakub@redhat.com>
2743 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
2744 for type dependent OMP_CLAUSE_DECLs.
2746 2007-04-24 Mark Mitchell <mark@codesourcery.com>
2749 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
2750 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
2751 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
2752 * init.c (build_zero_init): Adjust, as
2753 COMPLEX_TYPE is now a SCALAR_TYPE.
2754 * typeck2.c (digest_init): Allow brace-enclosed initializers for
2755 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
2757 2007-04-25 Paolo Carlini <pcarlini@suse.de>
2759 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
2760 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
2761 (trait_expr_value): Adjust.
2763 2007-04-23 Simon Baldwin <simonb@google.com>
2765 * decl.c (grokparms): Added new error for duplicate function
2766 parameters names in function prototypes, to match gcc behavior.
2768 2007-04-23 Jan Hubicka <jh@suse.cz>
2770 * cp/decl2.c (finish_objects): Do not call target constructor/destructor
2773 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
2775 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
2776 instead of checking GIMPLE_STMT_P in chain_next.
2778 2007-04-17 Mark Mitchell <mark@codesourcery.com>
2781 * call.c (convert_for_arg_passing): Convert bitfields to their
2784 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
2787 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
2789 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
2792 * cp/decl2.c (constrain_class_visibility):
2793 Do not warn about the use of anonymous namespace in the main input file.
2795 2007-04-15 Mark Mitchell <mark@codesourcery.com>
2797 * cp-tree.h (current_template_parms): Fix typo in comment.
2799 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
2801 * cp-tree.h, error.c: Fix comment typos.
2803 2007-04-13 Jason Merrill <jason@redhat.com>
2806 * call.c (reference_binding): Add c_cast_p parm. If true,
2807 add quals to TO as needed to make it reference-compatible.
2809 2007-04-11 Jan Hubicka <jh@suse.cz>
2811 * cp/class.c (convert_to_base_statically): Fold produced tree; verify
2812 that we are not processing template_decl.
2814 2007-04-09 Mark Mitchell <mark@codesourcery.com>
2817 * class.c (build_base_path): Ensure that the converted pointer has
2818 the same cv-qualification as the input.
2820 2007-04-09 Paolo Carlini <pcarlini@suse.de>
2822 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
2824 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
2826 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
2828 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
2829 * tree.c (cp_add_pending_fn_decls): Remove.
2830 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
2832 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
2834 Revert change removing staticp.
2836 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
2838 * cp-objcp-common.c (cxx_staticp): Remove.
2839 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
2840 * cp-tree.h (cxx_staticp):
2842 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
2844 * class.c (check_for_override): Don't remove dllmport attribute
2847 2007-04-03 Jakub Jelinek <jakub@redhat.com>
2850 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
2851 type issue error and return early.
2853 2007-03-30 Jason Merrill <jason@redhat.com>
2856 * typeck.c (cp_type_readonly): New fn.
2857 * cp-tree.h: Declare it.
2858 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
2859 (cp_finish_decl): Not here.
2861 2007-03-31 Richard Guenther <rguenther@suse.de>
2863 * optimize.c (maybe_clone_body): Replace splay-tree usage by
2866 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
2871 * parser.c (declarator_can_be_parameter_pack): New.
2872 (cp_parser_template_parameter): Only parse the `...' if the
2873 declarator can be a parameter pack.
2874 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
2876 * pt.c (find_parameter_packs_r): Look into the bounds on integer
2877 types (they could be used as array bounds).
2878 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
2879 (tsubst_pack_expansion): Handle failure to expand parameter
2882 2007-03-30 Paolo Carlini <pcarlini@suse.de>
2885 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
2886 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
2887 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
2888 (CLASS_TYPE_NON_UNION_P): Add.
2889 (struct lang_type_class): Add has_complex_dflt.
2890 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
2891 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
2892 * cp-tree.def: Add TRAIT_EXPR.
2893 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
2894 * lex.c (struct resword): Add __has_nothrow_assign,
2895 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
2896 __has_trivial_constructor, __has_trivial_copy,
2897 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
2898 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
2899 __is_pod, __is_polymorphic, __is_union.
2900 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
2901 (cp_parser_trait_expr): New.
2902 * semantics.c (finish_trait_expr, trait_expr_value
2903 classtype_has_nothrow_copy_or_assign_p): New.
2904 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
2906 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
2907 * class.c (check_bases, check_field_decl, check_bases_and_members):
2908 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
2909 * pt.c (uses_template_parms, tsubst_copy_and_build,
2910 value_dependent_expression_p, type_dependent_expression_p): Deal with
2912 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
2914 2007-03-29 Richard Guenther <rguenther@suse.de>
2916 * tree.c (cp_walk_subtrees): Do not set input_location.
2918 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
2921 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
2924 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
2926 * parser.c (struct cp_parser): Update comment for
2927 greater_than_is_operator_p.
2928 (cp_parser_primary_expression): In C++0x mode, a cast operator can
2929 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
2930 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
2931 !GREATER_THAN_IS_OPERATOR_P.
2932 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
2933 `>>' operators that will become two `>' tokens in C++0x.
2934 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
2935 mode, allowing it to terminate default arguments.
2936 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
2937 `>>' like two consecutive `>' tokens.
2938 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
2939 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
2940 ends a template argument.
2942 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
2944 * decl.c (redeclaration_error_message): Complain when redeclaring
2945 a friend function with default template arguments (C++0x mode only).
2946 * cp-tree.h (check_default_tmpl_args): Declare.
2947 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
2948 template arguments in function templates. Add support for checking
2949 the default template arguments of friend templates.
2950 (push_template_decl_real): Fix call to check_default_tmpl_args.
2951 (type_unification_real): If a template parameter has not been
2952 deduced but provides a default template argument, substitute into
2953 that default template argument.
2954 * parser.c (cp_parser_init_declarator): When declaring (but not
2955 defining!) a function template in C++0x mode, check for default
2958 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
2961 * decl.c (grokdeclarator): Deal with cv-qualified function type
2962 typedefs in the same way for member and non-member functions.
2964 2007-03-26 Dirk Mueller <dmueller@suse.de>
2966 * parser.c (cp_parser_member_declaration): Pedwarn
2967 about stray semicolons after member declarations.
2969 2007-03-26 Paolo Carlini <pcarlini@suse.de>
2972 * pt.c (instantiate_decl): Set in_system_header.
2974 2007-03-22 Mark Mitchell <mark@codesourcery.com>
2976 * cp-tree.h (current_tempalte_parms): Improve documentation.
2977 * pt.c (current_template_args): Likewise.
2980 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
2981 not consume tokens when failing.
2983 2007-03-22 Jim Wilson <wilson@specifix.com>
2984 Mark Mitchell <mark@codesourcery.com>
2987 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
2988 consistent with FROM.
2990 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2992 * error.c (dump_expr): Handle dependent names that designate types.
2993 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
2995 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
2997 * cp-tree.def, parser.c, pt.c: Fix comment typos.
2999 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3001 * cvt.c (cp_convert_and_check) : Define.
3002 * cp-tree.h (cp_convert_and_check): Declare.
3003 * call.c (convert_conversion_warnings): Rename to
3004 conversion_null_warnings. The warning for floating-point to
3005 integer is handled by convert_and_check in convert_like_real.
3006 (convert_like_real): convert_conversion_warnings was renamed as
3007 conversion_null_warnings.
3008 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
3009 overflow and changes of value during conversion.
3011 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3014 * parser.c (cp_parser_statement): If 'namespace' is found, this
3015 only can be a namespace alias definition, so parse it now.
3016 (cp_parser_namespace_alias_definition): if we find an open brace
3017 instead of '=', then this is actually a misplaced namespace
3020 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3023 * decl.c (cxx_init_decl_processing): Move command-line options
3024 processing to c-opts.c.
3026 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
3028 * ptree.c (cxx_print_type): Use formatting markup for integers
3029 when printing template parameter index/level/orig level.
3030 (cxx_print_xnode): Ditto.
3031 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
3032 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
3033 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
3035 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
3036 rather than a HOST_WIDE_INT.
3037 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
3038 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
3040 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
3041 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
3042 IN_BASE_INITIALIZER bool bitfields.
3043 (struct cp_declarator): Make KIND a 4-bit field. Make
3044 PARAMETER_PACK_P a bool bitfield just after KIND.
3045 * pt.c (uses_parameter_packs): Destroy the pointer set.
3046 (make_pack_expansion): Ditto.
3047 (check_for_bare_parameter_packs): Ditto.
3048 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
3050 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
3053 * call.c (convert_default_arg): Instead of copying the node,
3056 2007-03-15 Dirk Mueller <dmueller@suse.de>
3059 * call.c (convert_conversion_warnings): New..
3060 (convert_like_real): .. factored out from here.
3061 (convert_conversion_warnings): Add warning about
3062 false being converted to NULL in argument passing.
3064 2007-03-14 Dirk Mueller <dmueller@suse.de>
3066 * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
3067 (finish_do_body): Warn about empty body in do/while statement.
3069 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3071 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
3073 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3076 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
3079 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
3081 * cp/repo.c (init_repo): Initialize random_seed saved options.
3082 (finish_repo): Adjust.
3084 2007-03-13 Mark Mitchell <mark@codesourcery.com>
3087 * Make-lang.in (doc/g++.1): Use $< to specify the location from
3090 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
3092 * decl.c (compute_array_index_type): New warning flag warn_vla.
3094 2007-03-12 Mark Mitchell <mark@codesourcery.com>
3097 * call.c (convert_default_arg): Copy non-constant arguments.
3099 2007-03-11 Mark Mitchell <mark@codesourcery.com>
3102 * parser.c (cp_parser_postfix_expression): Disallow compound
3103 literals in constant expressions.
3106 * semantics.c (finish_typeof): Use unlowered_expr_type.
3108 2007-03-10 Mark Mitchell <mark@codesourcery.com>
3111 * cp-tree.h (unlowered_expr_type): New function.
3112 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
3113 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
3114 (unlowered_expr_type): New function.
3115 (build_unary_op): Disallow predecrements of bool bitfields.
3116 * call.c (build_conditional_expr): Use unlowered_expr_type.
3117 * pt.c (type_unification_real): Likewise.
3119 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
3122 * typeck.c (check_return_expr): Check for bare parameter packs.
3123 (comptypes): Compare template parameter packs and
3124 type pack expansions.
3125 * decl.c (grokdeclarator): Deal with the declaration of function
3127 (grokparms): Verify that the (optional) function parameter pack is
3128 at the end of the parameter list.
3129 (xref_basetypes): Handle pack expansions in the base class.
3130 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
3131 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
3132 (NONTYPE_ARGUMENT_PACK): New.
3133 (TYPE_PACK_EXPANSION): New.
3134 (EXPR_PACK_EXPANSION): New.
3135 (ARGUMENT_PACK_SELECT): New.
3136 * cp-objcp-common.c (cp_tree_size): Compute size of
3137 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
3138 ARGUMENT_PACK_SELECT.
3139 * error.c (dump_template_argument): Print template argument packs.
3140 (dump_template_argument_list): Ditto.
3141 (dump_template_parameter): Dump `...' for template type parameter
3143 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
3144 (dump_parameters): Print function parameter packs.
3145 (dump_template_parms): Print template argument packs.
3146 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
3147 (maybe_warn_variadic_templates): New.
3148 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
3149 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
3150 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
3152 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
3153 (write_template_arg): Write argument packs as separate arguments.
3154 * cp-tree.h (struct template_parm_index_s): Add flag that
3155 indicates that the template parameter is actually a parameter
3157 (struct tree_argument_pack_select): New.
3158 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
3159 (union lang_tree_node): Add argument_pack_select.
3160 (FUNCTION_PARAMETER_PACK_P): New.
3161 (PACK_EXPANSION_P): New.
3162 (PACK_EXPANSION_PATTERN): New.
3163 (SET_PACK_EXPANSION_PATTERN): New.
3164 (PACK_EXPANSION_PARAMETER_PACKS): New.
3165 (ARGUMENT_PACK_P): New.
3166 (ARGUMENT_PACK_ARGS): New.
3167 (SET_ARGUMENT_PACK_ARGS): New.
3168 (ARGUMENT_PACK_INCOMPLETE_P): New.
3169 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
3170 (TEMPLATE_PARM_PARAMETER_PACK): New.
3171 (TEMPLATE_TYPE_PARAMETER_PACK): New.
3172 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
3173 (ARGUMENT_PACK_SELECT_INDEX): New.
3174 (ARGUMENT_PACK_SELECT_ARG): New.
3175 (struct cp_declarator): Add parameter_pack_p flag.
3176 (maybe_warn_variadic_templates): Declare.
3177 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
3178 indicate a template parameter pack.
3179 (uses_parameter_packs): Declare.
3180 (template_parameter_pack_p): Declare.
3181 (template_parms_variadic_p): Declare.
3182 (make_pack_expansion): Declare.
3183 (check_for_bare_parameter_packs): Declare.
3184 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
3185 sizeof... expressions.
3186 (pp_cxx_expression): Print pack expansions and non-type argument
3188 (pp_cxx_exception_specification): Print pack expansions.
3189 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
3190 (pp_cxx_ctor_initializer): Print pack expansions.
3191 (pp_cxx_type_id): Print pack expansions.
3192 (pp_cxx_template_argument_list): Print argument packs.
3193 (pp_cxx_template_parameter): Print ellipsis for template parameter
3195 * pt.c (comp_template_parms): Compare template parameter packs.
3196 (template_parameter_pack_p): New.
3197 (template_parms_variadic_p): New.
3198 (template_args_variadic_p): New.
3199 (make_ith_pack_parameter_name): New.
3200 (struct find_parameter_pack_data): New.
3201 (find_parameter_packs_r): New.
3202 (uses_parameter_packs): New.
3203 (make_pack_expansion): New.
3204 (check_for_bare_parameter_packs): New.
3205 (expand_template_argument_pack): New.
3206 (reduce_template_parm_level): Propagate parameter pack flag.
3207 (process_template_parm): Add is_parameter_pack parameter to state
3208 when the parameter is actually a parameter pack. Create template
3209 parameter packs when is_parameter_pack is true.
3210 (current_template_args): The argument for a template parameter
3211 pack is an argument pack containing a single pack expansion.
3212 (process_partial_specialization): When checking that non-type
3213 argument expressions do not involve template parameters, loop over
3214 the arguments in argument packs separately.
3215 (push_template_decl_real): Check that the type of the declaration
3216 does not have any bare parameter packs. Check that primary
3217 templates have no more than one parameter pack, and that it comes
3218 at the end of the template parameter list.
3219 (convert_template_argument): Handle coercions for pack expansion
3220 expressions by coercing the pattern then rebuilding the expansion.
3221 (coerce_template_parms): When coercing the arguments for a
3222 variadic template, pack "extra" arguments into an argument pack.
3223 (coerce_template_template_parms): Cannot coerce between parameter
3224 packs and non-pack parameters.
3225 (template_args_equal): Compare PACK_EXPANSION_P expressions.
3226 (comp_template_args): Expand all template arguments packs before
3227 comparing template argument lists.
3228 (mangle_class_name_for_template): Make argument packs as separate
3230 (for_each_template_parm_r): No need to handle BASELINK.
3231 (instantiate_class_template): Handle pack expansions in the base
3233 (tsubst_pack_expansion): New.
3234 (tsubst_template_args): Handle substitutions of argument packs and
3235 pack expansion into template argument lists.
3236 (tsubst_decl): Expand function parameter packs into separate
3237 function parameters.
3238 (tsubst_arg_types): Expand a type pack expansion into separate
3240 (tsubst_exception_specification): Handle pack expansions in
3241 exception specifiers.
3242 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
3243 replacing a template parameter with its argument. If we encounter
3244 a substitution for an argument pack, just return the parameter
3246 (tsubst_copy): sizeof(X...) returns the number of elements in
3247 parameter pack X. See through ARGUMENT_PACK_SELECT when the
3248 PARM_DECL is a parameter pack.
3249 (tsubst_expr): Expression pack expansions and argument packs
3250 cannot show up here; they will all be handled through function
3251 calls, sizeof, and template argument lists.
3252 (tsubst_copy_and_build): sizeof(X...) returns the number of
3253 elements in parameter pack X. Handle pack expansions in TREE_LIST
3254 and CONSTRUCTOR nodes.
3255 (fn_type_unification): Handle "incomplete" explicit template
3256 argument lists that specify some of the arguments for a template
3258 (type_unification_real): Unify arguments against pack expansions.
3259 (template_parm_level_and_index): New, helper function.
3260 (unify_pack_expansion): New.
3261 (unify): Unify argument packs on an argument-by-argument basis,
3262 handling variadic argument packs as well.
3263 (more_specialized_fn): Handle unification of function parameter
3264 packs. All things being equal, prefer non-variadic function
3265 templates to variadic function templates.
3266 (more_specialized_class): Prefer the variadic class template
3267 partial specialization that binds fewer arguments to a parameter
3269 (regenerate_decl_from_template): Expand function parameter packs
3270 into separate parameters.
3271 (instantiate_decl): Ditto.
3272 (tsubst_initializer_list): Handle pack expansions for base-class
3274 (dependent_type_p_r): Determine dependent types in argument packs
3275 and pack expansions.
3276 (value_dependent_expression_p): Determine value-dependence of
3277 non-type argument packs.
3278 (dependent_template_arg_p): Handle argument packs.
3279 * semantics.c (finish_cond): Check for bare parameter packs.
3280 (finish_expr_stmt): Ditto.
3281 (finish_for_expr): Ditto.
3282 (finish_switch_cond): Ditto.
3283 (finish_mem_initializers): Ditto.
3284 * name-lookup.c (arg_assoc_type): Handle pack expansions and
3286 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
3287 * parser.c (make_declarator): Declarator is not an expansion.
3288 (make_pointer_declarator): Transfer parameter pack flag to outer
3290 (make_reference_declarator): Ditto.
3291 (make_ptrmem_declarator): Ditto.
3292 (make_call_declarator): Ditto.
3293 (make_array_declarator): Ditto.
3294 (cp_parser_postfix_expression): Allow pack expansion expressions
3295 in the argument list for a call expression.
3296 (cp_parser_parenthesized_expression_list): Add new parameter
3297 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
3298 into separate arguments."
3299 (cp_parser_new_placement): Allow pack expansion expressions.
3300 (cp_parser_new_initializer): Ditto.
3301 (cp_parser_mem_initializer_list): Allow ellipsis to create a
3302 base-class initializer expansion.
3303 (cp_parser_mem_initializer): Ditto.
3304 (cp_parser_template_parameter_list): Keep track of whether the
3305 template parameter is a template parameter pack.
3306 (cp_parser_template_parameter): Parse the ellipsis to indicate a
3307 template parameter pack.
3308 (cp_parser_type_parameter): Ditto.
3309 (cp_parser_template_argument_list): Parse the ellipsis to indicate
3311 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
3312 this declarator is a parameter pack.
3313 (cp_parser_parameter_declaration): The ellipsis does not end the
3314 parameter declaration, because it might be a parameter pack. Parse
3315 the ellipsis to indicate a parameter pack.
3316 (cp_parser_initializer): Allow pack expansions.
3317 (cp_parser_initializer_list): Allow ellipsis to create an
3318 initializer expansion.
3319 (cp_parser_base_clause): Allow ellipsis to create a base specifier
3321 (cp_parser_type_id_list): Allow ellipsis to create an exception
3322 specifier expansion.
3323 (cp_parser_attribute_list): Don't allow pack expansions.
3324 (cp_parser_functional_cast): Allow pack expansions.
3325 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
3326 compute the length of a parameter pack.
3327 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
3328 end a template argument.
3329 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
3330 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
3333 2007-03-09 Dirk Mueller <dmueller@suse.de>
3335 * cp/call.c (build_new_op): Call warn_logical_operator.
3337 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
3340 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
3343 * pt.c (any_template_arguments_need_structural_equality_p):
3346 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
3348 * decl.c (grokdeclarator): Disable warnings for anonymous
3351 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
3353 * typeck2.c (readonly_error): Always emit a hard error.
3354 Remove last argument.
3355 * cp-tree.h (readonly_error): Adjust prototype.
3356 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
3357 * typeck.c (build_unary_op): Likewise.
3358 (build_modify_expr): Likewise.
3360 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
3363 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
3365 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3368 * parser.c (struct cp_parser): New IN_IF_STMT.
3369 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
3370 returning if parsing the body of an 'if' statement or issuing an
3371 error and continuing.
3372 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
3374 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
3376 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
3379 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
3382 2007-03-02 Geoffrey Keating <geoffk@apple.com>
3384 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
3385 Objective-C++. Don't exit early if -shared-libgcc needs to be
3388 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3390 * typeck.c (common_base_type): Delete unused function.
3392 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
3394 * Make-lang.in: Add dummy lang.install-pdf target.
3396 2007-03-01 Simon Baldwin <simonb@google.com>
3399 * decl.c (check_tag_decl): Added new warning for typedef ignored
3400 when it precedes an otherwise valid non-typedef declaration.
3402 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
3404 * typeck.c (build_function_call): Store converted arguments
3405 in a stack-allocated array instead of building a list.
3406 (convert_arguments): Store arguments in the array passed in as an
3407 argument, and return the actual number of arguments.
3408 * call.c (build_call): Delete, and replace with...
3409 (build_call_n, build_call_a): New.
3410 (build_op_delete_call): Rewrite to avoid constructing argument lists.
3411 (build_over_call): Store converted arguments in a stack-allocated
3412 array instead of building a list.
3413 (build_cxx_call): Pass arguments in an array instead of as a list.
3414 (build_java_interface_fn_ref): Rewrite to avoid constructing
3416 * tree.h: Update declarations to reflect above changes.
3417 * method.c (use_thunk): Use a stack-allocated array to hold
3418 the arguments instead of a list.
3419 * rtti.c (throw_bad_cast): Update call to cxx_call.
3420 (throw_bad_typeid): Likewise.
3421 (build_dynamic_cast_1): Likewise.
3422 * init.c (build_builtin_delete_call): Use build_call_n.
3423 * decl.c (expand_static_init): Likewise.
3424 * except.c (cp_protect_cleanup_actions): Likewise.
3425 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
3426 (gimplify_must_not_throw_expr): Likewise.
3427 (cxx_omp_apply_fn): Use build_call_a.
3429 2007-02-26 Mark Mitchell <mark@codesourcery.com>
3431 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
3432 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
3434 2007-02-25 Mark Mitchell <mark@codesourcery.com>
3436 * cp-tree.h (static_ctors): Remove.
3437 * cp-tree.h (static_dtors): Likewise.
3438 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
3439 refactoring of tree_map hierarchy.
3440 (decl_shadowed_for_var_insert): Likewise.
3441 * semantics.c (expand_body): Use c_expand_body.
3442 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
3443 * decl2.c (static_ctors): Remove.
3444 (static_dtors): Likewise.
3445 (generate_ctor_or_dtor_function): Pass NULL_TREE to
3446 objc_generate_static_init_call. Do not call static_[cd]tors.
3447 (generate_ctor_and_dtor_functions_for_priority): Do not check for
3449 (cp_write_global_declarations): Likewise.
3451 2007-02-23 Richard Guenther <rguenther@suse.de>
3453 * class.c (note_name_declared_in_class): Make declaration
3454 changes meaning a pedwarn.
3456 2007-02-22 Michael Matz <matz@suse.de>
3459 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
3460 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
3461 dump_function_decl): Guard emitting outer scopes by new flag.
3462 * cp-lang.c (cxx_dwarf_name): New function.
3463 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
3464 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
3466 (push_template_decl_real, lookup_template_class): Remove calls
3469 2007-02-19 Mark Mitchell <mark@codesourcery.com>
3471 * call.c (build_new_method_call): Ensure that explicit calls of
3472 destructors have type "void".
3474 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3476 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
3477 and -Walways-true with -Waddress.
3478 * cvt.c (convert_to_void): Replace unconditional warning with
3481 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
3483 * decl.c, tree.c: Fix comment typos.
3485 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
3488 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
3489 statement expression if we had an error mark node.
3491 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
3492 Brooks Moses <brooks.moses@codesourcery.com>
3493 Lee Millward <lee.millward@codesourcery.com>
3495 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
3496 Change class to tcc_vl_exp.
3498 * call.c (build_call): Use build_call_list instead
3500 (build_over_call): Likewise.
3501 (build_new_method_call): Use build_min_non_dep_call_list
3502 instead of build_min_non_dep.
3504 * error.c (dump_call_expr_args): New function.
3505 (dump_aggr_init_expr_args): New function.
3506 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
3507 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
3509 * cvt.c (convert_to_void): Use build_call_array instead
3510 of build3; use new AGGR_INIT_EXPR accessor macros.
3512 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
3513 instead of TREE_CODE_LENGTH.
3515 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
3516 AGGR_INIT_EXPR accessor macros.
3518 * cp-gimplify.c (cp_gimplify_init_expr): Use
3519 AGGR_INIT_EXPR_SLOT to set the slot operand.
3521 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
3522 (AGGR_INIT_EXPR_SLOT): New macro.
3523 (AGGR_INIT_EXPR_ARG): New macro.
3524 (aggr_init_expr_nargs): New macro.
3525 (AGGR_INIT_EXPR_ARGP): New macro.
3526 (aggr_init_expr_arg_iterator): New.
3527 (init_aggr_init_expr_arg_iterator): New.
3528 (next_aggr_init_expr_arg): New.
3529 (first_aggr_init_expr_arg): New.
3530 (more_aggr_init_expr_args_p): New.
3531 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
3532 (stabilize_aggr_init): New declaration.
3533 (build_min_non_dep_call_list): Likewise.
3535 * tree.c (process_aggr_init_operands): New function.
3536 (build_aggr_init_array) New function.
3537 (build_cplus_new): Update to use new CALL_EXPR and
3538 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
3539 build_aggr_init_array.
3540 (build_min_non_dep_call_list) New function.
3541 (build_min_nt): Assert input code parameter is not a variable
3542 length expression class.
3543 (build_min, build_min_non_dep): Likewise.
3544 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
3545 to check for equality instead of recursing. Handle tcc_vl_exp
3547 (stabilize_call): Update to only handle CALL_EXPRs, not
3548 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
3549 (stabilize_aggr_init): New function.
3550 (stabilize_init): Use it.
3552 * cxx-pretty-print.c (pp_cxx_postfix_expression)
3553 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
3554 AGGR_INIT_EXPR accessor macros and argument iterators.
3556 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
3557 build_vl_exp. Iterate through the operands, recursively
3558 processing each one.
3559 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
3560 CALL_EXPR accessor macros.
3561 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
3562 tree code classes. Use TREE_OPERAND_LENGTH instead of
3565 * semantics.c (finish_call_expr): Use build_nt_call_list
3566 instead of build_nt.
3567 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
3568 accessor macros. Use build_call_array to construct the
3569 CALL_EXPR node instead of build3
3571 * decl2.c (build_offset_ref_call_from_tree): Use
3572 build_nt_call_list and build_min_non_dep_call_list instead
3573 of build_min_nt and build_min_non_dep.
3575 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
3576 Use build_nt_call_list instead of build_min_nt.
3578 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3581 * call.c (build_conditional_expr): Improve error message.
3583 2007-02-13 Dirk Mueller <dmueller@suse.de>
3585 * friend.c (do_friend): Annotate warning about friend
3586 declarations in templates with OPT_Wnon_template_friend.
3587 Convert informal message from warning() to inform().
3589 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
3590 Mark Mitchell <mark@codesourcery.com>
3593 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
3594 instantiations for variables.
3596 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3599 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
3600 Check warn_unused_value just once.
3602 2007-02-11 Mark Mitchell <mark@codesourcery.com>
3605 * pt.c (determine_specialization): Use skip_artificial_parms_for.
3606 (fn_type_unificiation): Likewise.
3607 (get_bindings): Likewise.
3609 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
3612 * decl.c (finish_function): Use DECL_REPLACEABLE.
3613 * tree.c (cp_cannot_inline_tree_fn): Likewise.
3615 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
3617 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
3619 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
3621 * decl.c (grokvardecl): Don't error if !have_tls.
3622 (grokdeclarator): Likewise.
3623 * parser.c (cp_parser_omp_threadprivate): Likewise.
3625 2007-02-07 Jakub Jelinek <jakub@redhat.com>
3628 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
3629 parameters and result decls in omp clauses.
3630 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
3633 2007-02-05 Dirk Mueller <dmueller@suse.de>
3636 * parser.c (cp_parser_class_specifier): Always initialize bases.
3638 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
3640 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
3641 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
3642 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
3644 * semantics.c (finish_omp_atomic): Store a whole expression node
3645 in operand 1, and integer_zero_node in operand 0, for dependent
3646 OMP_ATOMIC. Rewrite to make flow easier to understand.
3648 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3650 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
3652 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
3654 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
3655 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
3657 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
3659 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
3660 keyword warning to -Wc++0x-compat.
3662 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3664 * decl.c (grokdeclarator): Update documentation.
3666 2007-02-02 Jakub Jelinek <jakub@redhat.com>
3669 * decl.c (grokdeclarator): If __thread is used together with
3670 a storage class other than extern and static, clear thread_p
3671 after issuing diagnostics and fall through to checking the
3674 2007-01-30 Roger Sayle <roger@eyesopen.com>
3676 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
3677 calculating the size of an array (to avoid recursive errors).
3679 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3682 * typeck.c (build_binary_op): Fix logic for warning. Move warning
3684 * call.c (convert_like_real): Don't warn when converting to
3687 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3689 * decl.c (pop_label): Replace warning with call to
3690 warn_for_unused_label.
3692 2007-01-28 Andrew Pinski <pinskia@gmail.com>
3695 * semantics.c (finish_pseudo_destructor_expr): Check the
3696 destrutor name by calling check_dtor_name.
3698 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
3700 * lex.c (D_CPP0X): Rename.
3702 (reswords): D_CPP0X -> D_CXX0X.
3703 (init_reswords): Ditto.
3704 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
3705 of C++0x keywords as identifiers.
3707 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
3710 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
3713 2007-01-23 Ian Lance Taylor <iant@google.com>
3715 * typeck.c (convert_for_assignment): Only warn about a = b = c
3716 when converting to bool.
3718 2007-01-23 Roger Sayle <roger@eyesopen.com>
3720 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
3722 * typeck.c (ignore_overflows): Remove the remaining uses of
3723 TREE_CONSTANT_OVERFLOW.
3725 2007-01-20 Jan Hubicka <jh@suse.cz>
3727 * decl2.c (start_objects, start_static_storage_duration_function):
3728 Do not make the functions uninlinable.
3730 2007-01-17 Ian Lance Taylor <iant@google.com>
3732 * class.c (add_method): Call VEC_reserve_exact rather than passing
3733 a negative size to VEC_reserve.
3735 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
3738 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
3740 2007-01-10 Mark Mitchell <mark@codesourcery.com>
3743 * decl.c (make_typename_type): If the qualified name is not a
3744 type, issue an error.
3745 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
3748 2007-01-08 Geoffrey Keating <geoffk@apple.com>
3750 * rtti.c: Include target.h.
3751 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
3752 don't emit typeinfo for fundamental types as weak.
3753 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
3755 2007-01-08 Richard Guenther <rguenther@suse.de>
3757 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
3759 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
3761 * call.c (standard_conversion): Pass flag to
3762 vector_types_convertible_p to disallow emission of note.
3763 * typeck.c (convert_for_assignment): Pass flag to
3764 vector_types_convertible_p to allow emission of note.
3765 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
3766 to disallow emission of note.
3768 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3771 * typeck.c (build_binary_op): Call overflow_warning if
3772 TREE_OVERFLOW_P is true for the result and not for any of the
3775 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
3778 * class.c (add_method): Don't wait until template
3779 instantiation time to complain about duplicate methods.
3781 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3784 * semantics.c (finish_unary_op_expr): Warn only if result
3785 overflowed and operands did not.
3787 2007-01-05 Ian Lance Taylor <iant@google.com>
3789 * typeck.c (build_binary_op): Warn about comparing a non-weak
3792 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
3794 * pt.c (tsubst): Propagate the need for structural equality checks
3795 when reducing the level of template parameters.
3797 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
3799 * pt.c: Fix a comment typo.
3801 2007-01-02 Ian Lance Taylor <iant@google.com>
3803 * semantics.c (maybe_convert_cond): Optionally warn when using an
3804 assignment as a condition.
3805 * typeck.c (convert_for_assignment): Optionally warn about
3806 assigning the result of an assignment to a bool.
3808 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
3810 * pt.c (canonical_template_parms): Correct typo in comment.
3812 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
3814 * typeck.c (structural_comptypes): Renamed from "comptypes".
3815 (comptypes): Use canonical type information to perform fast type
3816 comparison. When VERIFY_CANONICAL_TYPES, verify that the
3817 canonical type comparison returns the same results as we would see
3818 from the current, structural check. Support COMPARE_STRUCTURAL
3819 when we need structural checks.
3820 * decl.c (typename_compare): Fix comment.
3821 (build_typename_type): TYPENAME_TYPE nodes require structural
3822 equality checks, because they resolve different based on the
3824 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
3825 require structural equality checks (for now).
3826 (build_ptrmemfunc_type): Build the canonical pointer to member
3828 (compute_array_index_type): Whenever we build a new index type
3829 to represent the size of an array in a template, we need to mark
3830 this index type as requiring structural equality. This goes for
3831 arrays with value-dependent sizes with the current ABI, or all
3833 * tree.c (cplus_array_hash): New.
3834 (struct cplus_array_info): New.
3835 (cplus_array_compare): New.
3836 (cplus_array_htab): New.
3837 (build_cplus_array_type_1): Use a hash table to cache the array
3838 types we build. Build the canonical array type for each array
3840 (cp_build_qualified_type_real): When building a cv-qualified array
3841 type, use the hash table of array types and build canonical array
3843 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
3844 use structural equality (for now).
3845 * cp-tree.h (COMPARE_STRUCTURAL): New.
3846 * pt.c (canonical_template_parms): New.
3847 (canonical_type_parameter): New.
3848 (process_template_parm): Find the canonical type parameter.
3849 (lookup_template_class): When we have named the primary template
3850 type, set the canonical type for our template class to the primary
3851 template type. If any of the template arguments need structural
3852 equality checks, the template class needs structural equality
3854 (tsubst): When reducing the level of a template template
3855 parameter, we require structural equality tests for the resulting
3856 parameter because its template parameters have not had their types
3857 canonicalized. When reducing a template type parameter, find the
3858 canonical reduced type parameter.
3859 (any_template_arguments_need_structural_equality_p): New.