Fix regression 2722
Nathan Sidwell
nathan@codesourcery.com
Wed May 16 05:26:00 GMT 2001
Hi,
I've installed this obvious patch which Jakub posted a while back
plus a tweak of my own to make things more obvious.
built & tested on i686-pc-linux-gnu. Installed on both branch and
mainline
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
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.
Index: gcc.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/gcc.c,v
retrieving revision 1.227
diff -c -3 -p -r1.227 gcc.c
*** gcc.c 2001/05/15 01:45:10 1.227
--- gcc.c 2001/05/16 09:58:10
*************** give_switch (switchnum, omit_first_word,
*** 5289,5307 ****
if (suffix_subst)
{
unsigned length = strlen (arg);
while (length-- && !IS_DIR_SEPARATOR (arg[length]))
if (arg[length] == '.')
{
((char *)arg)[length] = 0;
break;
}
do_spec_1 (arg, 1, NULL);
! if (!arg[length])
! {
! ((char *)arg)[length] = '.';
! do_spec_1 (suffix_subst, 1, NULL);
! }
}
else
do_spec_1 (arg, 1, NULL);
--- 5289,5307 ----
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 (dot)
! ((char *)arg)[length] = '.';
! do_spec_1 (suffix_subst, 1, NULL);
}
else
do_spec_1 (arg, 1, NULL);
More information about the Gcc-patches
mailing list