This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/4486: incorrect evaluation of boolean expressions
- From: nathan at gcc dot gnu dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, mvishnu at calix dot com, nobody at gcc dot gnu dot org
- Date: 15 Dec 2001 18:54:36 -0000
- Subject: Re: c++/4486: incorrect evaluation of boolean expressions
- Reply-to: nathan at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, mvishnu at calix dot com, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: incorrect evaluation of boolean expressions
State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Sat Dec 15 10:54:36 2001
State-Changed-Why:
user error. Your synopsis does not match your code. The
code is
bool var = whatever;
for () {
bool var = var && somethingelse;
}
that is causing a read of an uninitalized variable.
with -Wall and -O you should get a warning about that.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4486