This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Suggestion for option
- To: "RenE J.V. Bertin" <rjvbertin at hotmail dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Subject: Re: Suggestion for option
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Wed, 25 Jul 2001 14:01:45 -0700
> So, a desirable option would be something like
> -fsyntax-check-after-first-error that switches to syntax/error checking
> only once it is clear that nothing can be compiled anyway. I don't think
> this exists, but it would seem that somebody else must have thought of
> this before!
I've thought of this. In fact, I don't even think it should be an option.
That should be the only way. Once we encounter an error, there is
no point in generating RTL, etc., we are just wasting time.
The only counter-argument is that there are some errors/warnings that we
issue only while generating RTL (which is, in and of itself, wrong, in my
opinion, but many do not agree, and this is an old debate, so I will
not go there). In any case, missing those errors when some other error has
already occurred is a small price to pay to make the edit-compile-edit
cycle faster.
And, we would make the compiler more reliable; there are parts of the RTL
generation code that tend to choke on erroneous input and it is hard to fix
all of them. It is easier simply to guarantee that code will be
valid before it hits the RTL generator.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com