Inaccuracies

Christof Brass brass@infopuls.com
Sun Jan 9 10:15:00 GMT 2000


Hi Everyone

I started reading the compiler sources because I didn't 
find a documentation for the specs file. At present I'm 
reading gcc.c. There is no version information in my 
copy of the file. I assume that my comment applies still 
to the newest version but the line numbers may vary. 
I include a copy of the original line to help find the location.
Since I started reading only this morning more suggestions 
might come.

Please let me know if I should have sent this message 
to a different address or if my comment is not suitable.

>From my point of view the routine read_specs in gcc.c 
contains two inaccuracies:

Line 1416
    /* Advance P in BUFFER to the next nonblank nocomment line.  */
Should read
    /* Advance p in BUFFER to the next nonblank nocomment line.  */

Line 1426
    while (*p && *p != '\n') p++;
    p++;												/* Skip '\n' */
Should be made robust by checking against EOB
    while (*p && *p != '\n') p++;
    if (*p == 0) break;
    p++;												/* Skip '\n' */

Regards

Christof


More information about the Gcc-bugs mailing list