diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/class.c | 2 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 5 | ||||
-rw-r--r-- | gcc/cp/lex.c | 15 |
4 files changed, 13 insertions, 16 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8f0617f..c9224cf 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2000-08-28 Jason Merrill <jason@redhat.com> + + * lex.c (file_name_nondirectory): Move to toplev.c. + + * cp-tree.h (LOCAL_CLASS_P): New macro. + * class.c (finish_struct_1): Use it. + 2000-08-27 Alex Samuel <samuel@codesourcery.com> * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 2834154..dfbdc94 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -5200,7 +5200,7 @@ finish_struct_1 (t) maybe_suppress_debug_info (t); /* Finish debugging output for this type. */ - rest_of_type_compilation (t, toplevel_bindings_p ()); + rest_of_type_compilation (t, ! LOCAL_CLASS_P (t)); } /* When T was built up, the member declarations were added in reverse diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index aa77ab1..cc50469 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -2224,6 +2224,11 @@ struct lang_decl (DECL_CONTEXT (NODE) \ && TREE_CODE (DECL_CONTEXT (NODE)) == FUNCTION_DECL) +/* 1 iff NODE is function-local, but for types. */ +#define LOCAL_CLASS_P(NODE) \ + (TYPE_CONTEXT (NODE) \ + && TREE_CODE (TYPE_CONTEXT (NODE)) == FUNCTION_DECL) + /* For a NAMESPACE_DECL: the list of using namespace directives The PURPOSE is the used namespace, the value is the namespace that is the common ancestor. */ diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 964bd56..94679b4 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -96,21 +96,6 @@ static int is_extended_char PARAMS ((int)); static int is_extended_char_1 PARAMS ((int)); static void init_operators PARAMS ((void)); -/* Given a file name X, return the nondirectory portion. - Keep in mind that X can be computed more than once. */ -char * -file_name_nondirectory (x) - const char *x; -{ - char *tmp = (char *) rindex (x, '/'); - if (DIR_SEPARATOR != '/' && ! tmp) - tmp = (char *) rindex (x, DIR_SEPARATOR); - if (tmp) - return (char *) (tmp + 1); - else - return (char *) x; -} - /* This obstack is needed to hold text. It is not safe to use TOKEN_BUFFER because `check_newline' calls `yylex'. */ struct obstack inline_text_obstack; |