diff options
author | Nick Clifton <nickc@cambridge.redhat.com> | 2002-04-17 16:26:28 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 2002-04-17 16:26:28 +0000 |
commit | 169ce44d8d6eabff9575df22e79f1365c5f1a9fb (patch) | |
tree | 31bdf22d765296883c32bbc3d748a1a218b87e48 /gcc/gcc.c | |
parent | b30d21159d82a20b665f08be437c0687b1bce814 (diff) | |
download | gcc-169ce44d8d6eabff9575df22e79f1365c5f1a9fb.zip gcc-169ce44d8d6eabff9575df22e79f1365c5f1a9fb.tar.gz gcc-169ce44d8d6eabff9575df22e79f1365c5f1a9fb.tar.bz2 |
gcc.c (read_specs): Detect and fail if an attempt is made to rename a spec string to an already...
2002-04-17 Nick Clifton <nickc@cambridge.redhat.com>
* gcc.c (read_specs): Detect and fail if an attempt is made to
rename a spec string to an already existing string.
From-SVN: r52426
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1862,8 +1862,9 @@ read_specs (filename, main_p) { int name_len; struct spec_list *sl; + struct spec_list *newsl; - /* Get original name */ + /* Get original name. */ p1 += sizeof "%rename"; while (*p1 == ' ' || *p1 == '\t') p1++; @@ -1909,6 +1910,11 @@ read_specs (filename, main_p) if (strcmp (p1, p2) == 0) continue; + for (newsl = specs; newsl; newsl = newsl->next) + if (strcmp (newsl->name, p2) == 0) + fatal ("%s: attempt to rename spec '%s' to already defined spec '%s'", + filename, p1, p2); + if (verbose_flag) { notice ("rename spec %s to %s\n", p1, p2); |