curl-library
Re: gcc warnings in non-debug builds
Date: Thu, 2 Oct 2008 16:22:50 +0200
Hi friends,
The new --enable-warnings configure option is in CVS.
Its use is quite obvious, so I'll skip that unless someone wants to
know something.
But as usual, when one 'touches' something there are always 'things'
surrounding that still need some minor adjustments ;-)
First one is related with --enable/disable-debug. Besides controlling
the definition of CURLDEBUG, it is also the 'knob' to the compiler
optimization flags.
I suppose that with --enable-debug we want CFLAGS with '-g -O2' for
debug builds to actually exercise the '-O2' optimizations and be able
to properly 'dbg' coredumps. True?
But what do we really want for --disable-debug builds CFLAGS? Only '-O2'?
Second issue. For gcc builds, shouldn't some warnings, like
missing-prototypes and missing-declarations, be converted to errors
and used for both debug and release builds? Or is 'Werror=xxx'
unreliable on some systems?
-- -=[Yang]=-Received on 2008-10-02