autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: best way to check for compiler _warnings_?


From: Ralf Wildenhues
Subject: Re: best way to check for compiler _warnings_?
Date: Tue, 2 Nov 2010 06:46:11 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

* Miles Bader wrote on Tue, Nov 02, 2010 at 04:34:43AM CET:
> Ralf Wildenhues writes:
> > Then, dealing with such behavior is tricky in general.  You can use
> > AC_LANG_WERROR, but it has problems if the compiler is verbose by
> > default.  Libtool has a couple of macros that test a compiler without
> > and with some flag and compare output of the two, but even that is of
> > limited reliability if the "normal" part of the output is noisy.  It's
> > a mess.
> 
> Is there something like "AC_GREP_COMPILATION", i.e., that just runs the
> compiler as if for AC_COMPILE_IFELSE, and gives you the output
> untouched?

No.

> Hmm, I suppose I should look at how AC_COMPILE_IFELSE is implemented...

Yes, that is a good idea.

> My thought currently is that I could run the compiler and then grep for
> the option name in the output; if it occurs, it's pretty likely because
> of an error/warning messages, and seems like it might avoid most
> false negatives.

Except then you may run into MSVC which prints its command-line options
(dunno whether on stdout or stderr) ...

Cheers,
Ralf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]