[LLVMbugs] [Bug 15508] New: clang/C: should issue a warning instead of an error when 'main' function have different signatures
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Mar 13 14:51:09 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=15508
Bug ID: 15508
Summary: clang/C: should issue a warning instead of an error
when 'main' function have different signatures
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: viniciustinti at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Since the C standard does not explicit says that this is not allowed it would
be better if Clang simply issue a warning when building the following code:
#include <stdio.h>
#include <stdlib.h>
int main(int this, int that, int another) {
return 0;
}
With GCC:
$ gcc -c main.c -o main.o
OK
With Clang:
$ clang -c main.c -o main.o
main.c:4:5: error: second parameter of 'main' (argument array) must be of type
'char **'
int main(int this, int that, int another) {
^
main.c:4:5: error: third parameter of 'main' (environment) must be of type
'char **'
2 errors generated.
--
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/20130313/ee95fee5/attachment.html>
More information about the llvm-bugs
mailing list