diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-10-29 12:47:58 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-10-29 12:47:58 +0000 |
commit | 7539b48162fd8642dd14d8d9c2c9dd63a6ad3a1f (patch) | |
tree | 369683b3e1535dc00a1cfb9bf1a1878e59f108b3 /gcc/xcoffout.c | |
parent | 7da2602f122232ef9675ceb80e35199b40ef55a1 (diff) | |
download | gcc-7539b48162fd8642dd14d8d9c2c9dd63a6ad3a1f.tar.gz |
(xcoff_declare_function): Deal with names created via the __asm__
construct that start with a leading '*'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10542 138bc75d-0d04-0410-961f-82ee72b054a4
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 |