diff options
author | David Edelsohn <edelsohn@gnu.org> | 2004-12-13 19:44:03 +0000 |
---|---|---|
committer | David Edelsohn <dje@gcc.gnu.org> | 2004-12-13 14:44:03 -0500 |
commit | 143b6bc3190ea8dfb60bdc611c207d0e15be1cdb (patch) | |
tree | c47272d6b31ce804b8376821ad0f84e9fe0e513b /gcc | |
parent | 9940eedb50c92541a324c2af07f4bf8f9fd6f312 (diff) | |
download | gcc-143b6bc3190ea8dfb60bdc611c207d0e15be1cdb.zip gcc-143b6bc3190ea8dfb60bdc611c207d0e15be1cdb.tar.gz gcc-143b6bc3190ea8dfb60bdc611c207d0e15be1cdb.tar.bz2 |
xcoffout.c (xcoffout_declare_function): Always strip storage class encoding.
* xcoffout.c (xcoffout_declare_function): Always strip storage
class encoding.
From-SVN: r92101
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/xcoffout.c | 22 |
2 files changed, 14 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5ed662d..96a1648 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-12-13 David Edelsohn <edelsohn@gnu.org> + + * xcoffout.c (xcoffout_declare_function): Always strip storage + class encoding. + 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu> PR target/18964 diff --git a/gcc/xcoffout.c b/gcc/xcoffout.c index f79755a..a2d8a33 100644 --- a/gcc/xcoffout.c +++ b/gcc/xcoffout.c @@ -405,22 +405,18 @@ xcoffout_end_block (unsigned int line, unsigned int n) void xcoffout_declare_function (FILE *file, tree decl, const char *name) { - int i; + size_t len; if (*name == '*') name++; - else - for (i = 0; name[i]; ++i) - { - if (name[i] == '[') - { - char *n = alloca (i + 1); - strncpy (n, name, i); - n[i] = '\0'; - name = n; - break; - } - } + len = strlen (name); + if (name[len - 1] == ']') + { + char *n = alloca (len - 3); + strncpy (n, name, len - 4); + n[len - 4] = '\0'; + name = n; + } /* Any pending .bi or .ei must occur before the .function pseudo op. Otherwise debuggers will think that the function is in the previous |