[opensuse-packaging] New default warning for -Wall (-Wstrict-prototypes)
We will include -Wstrict-prototypes in RPM_OPT_FLAGS via enabling it for -Wall soon, which will warn about non-prototypes like void foo(); which cause problems if foo is called before its definition is reached and arguments with default argument promotions applied do not match the argument types. For example void foo(); { .. foo(1.0); .. } void foo(float x) { ... } will call foo with a double argument. Note that void foo(); is not a valid prototype for a function with zero arguments in C, but void foo(void); is. The above case will probably cause a lot of extra warnings. Thanks, Richard. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Richard Guenther wrote:
We will include -Wstrict-prototypes in RPM_OPT_FLAGS via enabling it for -Wall soon, which will warn about non-prototypes like
Will there also be a rpmlint check for these warnings ? -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o Package Maintainer Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9, CR prusnak[at]suse.cz http://www.suse.cz --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Mittwoch 23 Januar 2008 schrieb Pavol Rusnak:
Richard Guenther wrote:
We will include -Wstrict-prototypes in RPM_OPT_FLAGS via enabling it for -Wall soon, which will warn about non-prototypes like
Will there also be a rpmlint check for these warnings ?
rpmlint does not compile the sources, so no - there can't be a rpmlint check. Greetings, Stephan -- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Wed, 23 Jan 2008, Stephan Kulow wrote:
Am Mittwoch 23 Januar 2008 schrieb Pavol Rusnak:
Richard Guenther wrote:
We will include -Wstrict-prototypes in RPM_OPT_FLAGS via enabling it for -Wall soon, which will warn about non-prototypes like
Will there also be a rpmlint check for these warnings ?
rpmlint does not compile the sources, so no - there can't be a rpmlint check.
There might be adjustments to the autobuild checks that parse the log file, but for now we'll just see what happens ;) Richard. -- Richard Guenther <rguenther@suse.de> Novell / SUSE Labs SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Wednesday 23 January 2008, Richard Guenther wrote:
We will include -Wstrict-prototypes in RPM_OPT_FLAGS via enabling it for -Wall soon, which will warn about non-prototypes like There might be adjustments to the autobuild checks that parse the log file, but for now we'll just see what happens ;)
Note that I consider the autobuild logfile parser to be deprecated in the longer future, so I would rather have a -Werror=strict-prototypes in the RPM_OPT_FLAGS than yet another custom weird hack. Greetings, Dirk -- RPMLINT information under http://en.opensuse.org/Packaging/RpmLint --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Dienstag 29 Januar 2008 schrieb Dirk Mueller:
On Wednesday 23 January 2008, Richard Guenther wrote:
We will include -Wstrict-prototypes in RPM_OPT_FLAGS via enabling it for -Wall soon, which will warn about non-prototypes like
There might be adjustments to the autobuild checks that parse the log file, but for now we'll just see what happens ;)
Note that I consider the autobuild logfile parser to be deprecated in the longer future, so I would rather have a -Werror=strict-prototypes in the RPM_OPT_FLAGS than yet another custom weird hack.
But the warning is not fatal. It would mean way too many fallouts for false positives. Greetings, Stephan -- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Tuesday 29 January 2008, Stephan Kulow wrote:
But the warning is not fatal. It would mean way too many fallouts for false positives.
Well, it was just a general topic, but while we're talking on this specifically: by definition there can't be false positives for -Wstrict-prototypes. And the reason for them being turned on is (iirc) that the incorrect prototypes cause ABI issues (parameters passed incorrectly) and crashes. Therefore if we support an architecture where is indeed an ABI problem (think SLE), then we should weed them out of the source. Note that I'm not advocating to do that now - evaluation of the fallout has to happen first (in BETA IMHO). I just said that rather than implementing the failure in the autobuild check, it should be triggered by using the right gcc option for it. Greetings, Dirk -- RPMLINT information under http://en.opensuse.org/Packaging/RpmLint --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Tue, 29 Jan 2008, Dirk Mueller wrote:
On Tuesday 29 January 2008, Stephan Kulow wrote:
But the warning is not fatal. It would mean way too many fallouts for false positives.
Well, it was just a general topic, but while we're talking on this specifically: by definition there can't be false positives for -Wstrict-prototypes. And the reason for them being turned on is (iirc)
The most common "false positive" is void foo(); for declaring a function which takes no parameters (which is not a correct prototype for C, but is for C++). Richard. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (4)
-
Dirk Mueller
-
Pavol Rusnak
-
Richard Guenther
-
Stephan Kulow