[LLVMbugs] [Bug 2150] New: No warning when reaching end of a non-void function.

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Mar 13 07:13:54 PDT 2008


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

           Summary: No warning when reaching end of a non-void function.
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: richard.smith at antixlabs.com
                CC: llvmbugs at cs.uiuc.edu


$ cat foo.c
int foo() {}
$ gcc foo.c -c -Wall
foo.c: In function ‘foo’:
foo.c:1: warning: control reaches end of non-void function
$ llvm-gcc foo.c -c -Wall
$

In gcc that warning comes out of the tree optimisation passes, which llvm does
not use. It would be nice if it did an equivalent check, though.


-- 
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