Bugzilla – Bug 233655
Enable "comparison with string literal" gcc warnings?
Last modified: 2008-07-09 06:34:11 UTC
I wonder whether we should we enable "comparison with string literal" gcc warnings (RPM_OPT_FLAGS) and even trigger a fatal build error? I think we could safe David's resources (rebuilding each package and filing bugreports) and Novell's resources (bugreport handling) as well.
*** Bug 233328 has been marked as a duplicate of this bug. ***
-Wstring-literal-comparison is introduced with gcc4.2, which we do not use yet in abuild. as soon as we switch to it, we can of course enable it.
unfortunately it was so far not possible to test 4.2 in BETA, so this might take a while.
(In reply to comment #0) > I wonder whether we should we enable "comparison with string literal" gcc > warnings (RPM_OPT_FLAGS) and even trigger a fatal build error? I think we could > safe David's resources (rebuilding each package and filing bugreports) and > Novell's resources (bugreport handling) as well. Fame at last ;-> I've got plenty of spare time. Also, only about 90% of the warnings are worth fixing, so I wouldn't recommend making it a fatal error, because of the about 10% where it doesn't seem to be a problem.
*** Bug 235553 has been marked as a duplicate of this bug. ***
These are now enabled and working in BETA (which has gcc4.2) and will also be active in Factory once the new GCC is put there.
*** Bug 229369 has been marked as a duplicate of this bug. ***
*** Bug 231180 has been marked as a duplicate of this bug. ***
*** Bug 225904 has been marked as a duplicate of this bug. ***
(In reply to comment #0) > I wonder whether we should we enable "comparison with string literal" gcc > warnings (RPM_OPT_FLAGS) and even trigger a fatal build error? I suspect that you could do very similar things for the "x is used uninitialized" gcc warning message. I can't think of any scenario where you would want to read from a local variable that the gcc compiler is sure contains rubbish.
I suggest to open another bugreport for this request.
we already warn for those. I have so-far post poned making those hard errors, since last time we had discussions because they triggered too often.
*** Bug 233016 has been marked as a duplicate of this bug. ***
*** Bug 228963 has been marked as a duplicate of this bug. ***
*** Bug 231181 has been marked as a duplicate of this bug. ***
*** Bug 224662 has been marked as a duplicate of this bug. ***
*** Bug 228222 has been marked as a duplicate of this bug. ***
*** Bug 229785 has been marked as a duplicate of this bug. ***
*** Bug 225435 has been marked as a duplicate of this bug. ***