diff options
author | Jakub Jelinek <jakub@redhat.com> | 2001-05-16 14:23:30 +0200 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2001-05-16 12:23:30 +0000 |
commit | e65677af0f6477991bbd8950d4bb084c0948754f (patch) | |
tree | b0f38966ae642d75c219d57225bb59de69c41571 /gcc/gcc.c | |
parent | 05b7b1c1dc0e6bf935eb4a175bacdea87b51efc0 (diff) | |
download | gcc-e65677af0f6477991bbd8950d4bb084c0948754f.zip gcc-e65677af0f6477991bbd8950d4bb084c0948754f.tar.gz gcc-e65677af0f6477991bbd8950d4bb084c0948754f.tar.bz2 |
gcc.c (give_switch): Don't write before start of string.
* gcc.c (give_switch): Don't write before start of string.
Always append suffix.
Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com>
From-SVN: r42152
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -5289,19 +5289,19 @@ give_switch (switchnum, omit_first_word, include_blanks) if (suffix_subst) { unsigned length = strlen (arg); + int dot = 0; while (length-- && !IS_DIR_SEPARATOR (arg[length])) if (arg[length] == '.') { ((char *)arg)[length] = 0; + dot = 1; break; } do_spec_1 (arg, 1, NULL); - if (!arg[length]) - { - ((char *)arg)[length] = '.'; - do_spec_1 (suffix_subst, 1, NULL); - } + if (dot) + ((char *)arg)[length] = '.'; + do_spec_1 (suffix_subst, 1, NULL); } else do_spec_1 (arg, 1, NULL); |