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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to