diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-10-29 07:47:58 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-10-29 07:47:58 -0500 |
commit | 4255aa9bc28042141d56526567ae596c5e15a302 (patch) | |
tree | 369683b3e1535dc00a1cfb9bf1a1878e59f108b3 /gcc/xcoffout.c | |
parent | 2d43e08975235eb5d3407cfd320685dcb909e4bb (diff) | |
download | gcc-4255aa9bc28042141d56526567ae596c5e15a302.tar.gz |
(xcoff_declare_function): Deal with names created via the __asm__
construct that start with a leading '*'.
From-SVN: r10542
Diffstat (limited to 'gcc/xcoffout.c')
-rw-r--r-- | gcc/xcoffout.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/gcc/xcoffout.c b/gcc/xcoffout.c index bf8775b762a..14ebce8e259 100644 --- a/gcc/xcoffout.c +++ b/gcc/xcoffout.c @@ -462,16 +462,19 @@ xcoffout_declare_function (file, decl, name) char *n = name; int i; - for (i = 0; name[i]; ++i) - { - if (name[i] == '[') - { - n = (char *) alloca (i + 1); - strncpy (n, name, i); - n[i] = '\0'; - break; - } - } + if (*n == '*') + n++; + else + for (i = 0; name[i]; ++i) + { + if (name[i] == '[') + { + n = (char *) alloca (i + 1); + strncpy (n, name, i); + n[i] = '\0'; + break; + } + } /* Any pending .bi or .ei must occur before the .function pseudo op. Otherwise debuggers will think that the function is in the previous |