From ee18fe39d375b10f99c0d5b428da50157fbbce83 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 8 Sep 2009 14:12:54 -0400 Subject: [PATCH] cp-tree.h (enum overload_flags): Remove OP_FLAG. * cp-tree.h (enum overload_flags): Remove OP_FLAG. * method.c (lazily_declare_fn): Check for dtorness in ABI warning. From-SVN: r151528 --- gcc/cp/ChangeLog | 5 +++-- gcc/cp/cp-tree.h | 2 +- gcc/cp/decl2.c | 2 +- gcc/cp/method.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 20ce7581844..ebf4518a546 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,12 +1,13 @@ 2009-09-03 Jason Merrill + * cp-tree.h (enum overload_flags): Remove OP_FLAG. + * method.c (lazily_declare_fn): Check for dtorness in ABI warning. + * name-lookup.c (is_class_level): Remove. (push_binding_level, leave_scope, resume_scope): Adjust. (pushlevel_class): Adjust. (poplevel_class): Make sure we're on class_binding_level. -2009-09-02 Jason Merrill - * decl.c (grokmethod): Rename from start_method. (finish_method): Remove. * cp-tree.h: Adjust. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 4f0386815d1..ea3b4bf3d14 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -3804,7 +3804,7 @@ extern int at_eof; TREE_PURPOSE slot. */ extern GTY(()) tree static_aggregates; -enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG }; +enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, TYPENAME_FLAG }; /* These are uses as bits in flags passed to various functions to control their behavior. Despite the LOOKUP_ prefix, many of these diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index cc4317aa7b4..e57c825c94f 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -254,7 +254,7 @@ maybe_retrofit_in_chrg (tree fn) FUNCTION is a FUNCTION_DECL. It was created by `grokdeclarator'. FLAGS contains bits saying what's special about today's - arguments. 1 == DESTRUCTOR. 2 == OPERATOR. + arguments. DTOR_FLAG == DESTRUCTOR. If FUNCTION is a destructor, then we must add the `auto-delete' field as a second parameter. There is some hair associated with the fact diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 4563e8f6b5c..6acf1bb4b71 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -1161,7 +1161,7 @@ lazily_declare_fn (special_function_kind sfk, tree type) /* G++ 3.2 put the implicit destructor at the *beginning* of the TYPE_METHODS list, which cause the destructor to be emitted in an incorrect location in the vtable. */ - if (warn_abi && DECL_VIRTUAL_P (fn)) + if (warn_abi && sfk == sfk_destructor && DECL_VIRTUAL_P (fn)) warning (OPT_Wabi, "vtable layout for class %qT may not be ABI-compliant" "and may change in a future version of GCC due to " "implicit virtual destructor",