[Bug c/38037] false uninitialized warnings when using a pointer as a guard
edwintorok at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Nov 6 21:01:00 GMT 2008
------- Comment #2 from edwintorok at gmail dot com 2008-11-06 20:59 -------
/* testcase
* gcc -Wall -O2 -c foo.c
*/
char *get(void);
int use(const char *);
void foo(const char *bar)
{
char *foobar;
if(!bar)
foobar = get();
if(use(bar))
return;
if(!bar)
use(foobar);
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38037
More information about the Gcc-bugs
mailing list