This code should warn that foo is used uninitialized, but it doesn't.. gcc 4.3
and gcc 4.4 both fail to report a warning

extern void do_something(void **foo);
extern int cond(void);

int main(int argc, char *argv[])
{
void *foo;
if (cond())
    do_something(&foo);
*argv = foo;
return 0;
}


-- 
           Summary: missing unitialized warning on simple testcase
           Product: gcc
           Version: 4.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: m dot b dot lankhorst at gmail dot com


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

Reply via email to