+2001-05-16 Jakub Jelinek <jakub@redhat.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+
+ * gcc.c (give_switch): Don't write before start of string.
+ Always append suffix.
+
2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
* cpplex.c (_cpp_lex_token, '/' case): Comments can't appear
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);