http://llvm.org/bugs/show_bug.cgi?id=4720
Summary: clang should not error on different main
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: OpenBSD
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Recent versions of clang now error on main defined differently,
this is not in keeping with the behaviour of gcc.
clang:
../../../../kern/init_main.c:137:5: error: first argument of 'main' should be
of type 'int'
int main(void *);
^
../../../../kern/init_main.c:184:1: error: first argument of 'main' should be
of type 'int'
main(void *framep)
^
gcc:
../../../../kern/init_main.c:185: warning: first argument of `main' should be
`int'
../../../../kern/init_main.c:185: warning: `main' takes only zero or two
arguments
The gcc warning can be disabled with -Wno-main, clang does not recognise this
option. With this recent change clang can no longer compile the OpenBSD kernel
and likely other code besides.
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs