diff options
author | Jason Merrill <jason@casey.cygnus.com> | 2000-03-07 08:34:34 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2000-03-07 03:34:34 -0500 |
commit | 7d26bd169890754f5228df0f7f5beb104c4f0081 (patch) | |
tree | bef4420b975640f563780401dc3cc768ec639a60 /gcc/varasm.c | |
parent | 5816f88b4b4cc536bb23d981d55ca32e16eb3400 (diff) | |
download | gcc-7d26bd169890754f5228df0f7f5beb104c4f0081.zip gcc-7d26bd169890754f5228df0f7f5beb104c4f0081.tar.gz gcc-7d26bd169890754f5228df0f7f5beb104c4f0081.tar.bz2 |
cpphash.c (collect_expansion): Also catch ## at start of macro.
* cpphash.c (collect_expansion): Also catch ## at start of macro.
* varasm.c (make_decl_rtl): Don't add a number to members of
local classes.
(make_function_rtl): Likewise.
From-SVN: r32378
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 751ce82..baf06e0 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -522,8 +522,10 @@ make_function_rtl (decl) char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); char *new_name = name; - /* Rename a nested function to avoid conflicts. */ + /* Rename a nested function to avoid conflicts, unless it's a member of + a local class, in which case the class name is already unique. */ if (decl_function_context (decl) != 0 + && ! TYPE_P (DECL_CONTEXT (decl)) && DECL_INITIAL (decl) != 0 && DECL_RTL (decl) == 0) { @@ -765,9 +767,12 @@ make_decl_rtl (decl, asmspec, top_level) if (DECL_RTL (decl) == 0) { /* Can't use just the variable's own name for a variable - whose scope is less than the whole file. + whose scope is less than the whole file, unless it's a member + of a local class (which will already be unambiguous). Concatenate a distinguishing number. */ - if (!top_level && !TREE_PUBLIC (decl) && asmspec == 0) + if (!top_level && !TREE_PUBLIC (decl) + && ! TYPE_P (DECL_CONTEXT (decl)) + && asmspec == 0) { char *label; |