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]
Other format: [Raw text]

Re: How to make GCC stop on first error


(This question is more appropriate for gcc-help, this list is for gcc
development.)

From the manual page:

-Wfatal-errors This option causes the compiler to abort compilation on the first error occurred rather than trying to keep going and printing fur‐ ther error messages.

Cheers,

Manuel.

On 28/03/07, Francesco Montorsi <f18m_cpp217828@yahoo.it> wrote:
Hi all,
    I wonder if there is some option/flag I can feed to gcc to avoid
that  it continues compiling my source files after it encounters the
first error... I've searched in gcc docs without success.

This is very annoying when e.g. the first error is due to not finding a
required header file: after that gcc goes on and spits out tons of
errors about missing declarations for those things which are declared in
  the not-found header file.

btw stopping on the first error is the default behaviour of many other
compilers (e.g. M$, borland, watcom compilers on win32)...

Thanks,
Francesco




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