how to make gcc stop when there is a warning
lopezibanez@gmail.com
lopezibanez@gmail.com
Fri May 12 08:28:00 GMT 2006
Richard, if the documentation would have said explicitly that Werror
"makes warnings to prevent compilation", would you have understood it
better?
One proposal:
-Werror makes all warnings into errors, preventing compilation (see
also -Wfatal-errors).
On 12/05/06, Richard Guenther <richard.guenther@gmail.com> wrote:
> On 5/12/06, D. Ensign <densign@stanford.edu> wrote:
> > > > I'd like to tell gcc to quit when a warning is encountered
> > > > (or even if a specific warning is encountered). Is there a way to do
> > > > this?
> > >
> > > Yes. -Werror. If you can tell us why you weren't able to find it in
> > > the documentation, perhaps we can address that!
> >
> > Partly, because I never learned to read. Partly, I'm impatient. Partly, because when any
> > search containing "warning" is extremely unhelpful when you actually LIKE the warnings.
> > Partly, the man page says, "Make all warnings into errors" for -Werror when perhaps it
> > should say, "Treat warnings as errors: stop compilation immediately," or something like
> > that. The latter might, however, have something to do with my not being able to read.
>
> Use -Werror -Wfatal-errors (that will stop after the first error, not
> trying to continue).
>
> Richard.
>
More information about the Gcc
mailing list