This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: `--syntax-only' after error
>it seems that the idea is accepted. The patch consists in
>adding a single line
>
> flag_syntax_only = 1;
>
>to the `v_error_...()' functions in `toplev.c' - or better to a
>central place like `count_error()'. Since I would have to
>download a recent EGCS snapshot first (I only have egcs-1.1.1
>here) and I am short of disk space and bandwidth, I would prefer
>if someone else could do the actual change.
I don't mind taking care of this. I still have reservations about
it, e.g., it'll probably make *some* types of error detection
stop working after the first error. I believe those types include
errors/warnings stemming from RTL analysis, such as uninitialized-
variable and such. Even a programmer who sees a fatal error in
one routine might want to also see an uninit-var warning in a
subsequent, distinct routine.
Also, I'd like to have some time to look over the pertinent bits
of code to see whether there might be a nesting problem that could
lead to compiler crashes in some cases. (Not worth trying to explain
that here.)
Finally, I think this would make for enough of a user-visible difference
that, IMO, it should not be the default, but be enabled by an option,
which, if it is indeed not on by default, I suggest be called
something like `-ffail-faster'. (Not `-ffail-fast'; that would
do something like call `exit(FAILURE);' upon seeing the first
fatal message, like my Mac's old Think C system used to do.)
Any feedback on the above would be appreciated, and there's quite a
bit of time, as I won't get to this until next week at the earliest,
barring some miracle.
tq vm, (burley)