This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/38037] false uninitialized warnings when using a pointer as a guard



------- Comment #3 from edwintorok at gmail dot com  2008-11-06 21:01 -------
Same happens if I use int instead of a pointer:
/* testcase */
/* gcc -O2 -Wall -c foo.c */
int get(void);
int use(int);
void foo(int bar)
{
        int foobar;

        if(!bar)
                foobar = get();

        if(use(bar))
                return;

        if(!bar)
                use(foobar);
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38037


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]