[LLVMbugs] [Bug 21276] New: Missing '-Wreturn-type' warning for 'main' having no return statement in C89 mode

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Oct 14 09:24:28 PDT 2014


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

            Bug ID: 21276
           Summary: Missing '-Wreturn-type' warning for 'main' having no
                    return statement in C89 mode
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mimomorin at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Clang does not emit "control reaches end of non-void function [-Wreturn-type]"
warning for 'main' having no return statement in C89 mode (-std=c89, gnu89). 

Clang adds implicit-return-zero in C89 mode. But, since the C89 standard does
not require it, wouldn't it be better to emit warning?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141014/a909ce54/attachment.html>


More information about the llvm-bugs mailing list