[Bug c++/13959] un-init local variable detection enhancement request
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Feb 1 19:49:00 GMT 2004
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-01 19:49 -------
The reason for might is because there are time where might is true (for an example:
int t( int j)
{
int i;
if(j)
i = 1;
g();
if(j)
return i;
return 1;
}
GCC will warn about i might be uesed uninit, there is already a different bug about that, suspened
never the less which means it most likely not going to be fixed).
As I should have said (but did not because it has been said many times and in other bugs):
Turning on this warning at -O0 increases compile time because you need to know flow
information.
There are large of cases in other software too (I do not persionally care about Redhat Fedora Core).
Compiling with optimization is the only way to get these warnings. If you want to correct all
warnings then do this: -O2 -W -Wall -Werror and then start fixing them until the program can
compile. This is still a dup of 11182 no matter which way you look at it.
*** This bug has been marked as a duplicate of 11182 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13959
More information about the Gcc-bugs
mailing list