This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/20644] bogus uninitialized warning on unused variable
- From: "h dot b dot furuseth at usit dot uio dot no" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Nov 2005 19:52:51 -0000
- Subject: [Bug middle-end/20644] bogus uninitialized warning on unused variable
- References: <bug-20644-1186@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from h dot b dot furuseth at usit dot uio dot no 2005-11-02 19:52 -------
I think I'd appreciate that warning when writing portable code:
The warning can be useful if the 1 is replaced with a macro
which may or may not expand to 1, or an enum defined in an #ifdef,
or an implementation-dependent expression like ((char)-1 < 0).
But of course, it depends on how many false positives the warning
tends to give for normal programs.
Maybe there could be a warning option to turn on and off some
warnings that do not apply with the particular #defines and
constants being used. (And also turn on/off -Wunreachable
for this case.)
--
h dot b dot furuseth at usit dot uio dot no changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |h dot b dot furuseth at usit
| |dot uio dot no
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20644