specs whitespace intolerance
Jim Wilson
wilson@cygnus.com
Thu May 7 20:50:00 GMT 1998
In egcs-2.91.27, if the final blank line of the specs file
is omitted, the compiler front end inserts a specious newline
in the back-end command line after the first argument, confusing
exec and the back end.
I checked in this patch to fix it.
Thu May 7 20:41:56 1998 Jim Wilson <wilson@cygnus.com>
* gcc.c (read_specs): Handle missing blank line at end of specs file.
Index: gcc.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/gcc.c,v
retrieving revision 1.30
diff -p -r1.30 gcc.c
*** gcc.c 1998/05/06 12:56:47 1.30
--- gcc.c 1998/05/08 03:40:49
*************** read_specs (filename, main_p)
*** 1567,1574 ****
fatal ("specs file malformed after %d characters", p - buffer);
p1 = p;
! /* Find next blank line. */
! while (*p1 && !(*p1 == '\n' && p1[1] == '\n'))
p1++;
/* Specs end at the blank line and do not include the newline. */
--- 1567,1574 ----
fatal ("specs file malformed after %d characters", p - buffer);
p1 = p;
! /* Find next blank line or end of string. */
! while (*p1 && !(*p1 == '\n' && (p1[1] == '\n' || p1[1] == '\0')))
p1++;
/* Specs end at the blank line and do not include the newline. */
More information about the Gcc-bugs
mailing list