[LLVMbugs] [Bug 13448] New: Undefined value bug being lost through printf

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jul 24 11:36:55 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13448

             Bug #: 13448
           Summary: Undefined value bug being lost through printf
           Product: clang
           Version: 3.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: andre at andred.ca
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


The following code:

#include <stdio.h>
int main() {
int test;
return test;
}

generates "Garbage return value"

however:

#include <stdio.h>
int main() {
int test;
printf("%d\n", test);
return test;
}

generates no bugs

Should they not both generate bugs?  And if anything, the second generate
"Undefined value passed into printf", as well as the "Garbage return value"

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list