This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Suggestion for option


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]