diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CXX/basic/basic.start/basic.start.main/p2.cpp | 2 | ||||
-rw-r--r-- | clang/test/Sema/c89.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/CXX/basic/basic.start/basic.start.main/p2.cpp b/clang/test/CXX/basic/basic.start/basic.start.main/p2.cpp index 5c7d60c1df4..42e87e5431f 100644 --- a/clang/test/CXX/basic/basic.start/basic.start.main/p2.cpp +++ b/clang/test/CXX/basic/basic.start/basic.start.main/p2.cpp @@ -62,6 +62,8 @@ main( // expected-error {{first parameter of 'main' (argument count) must be of ) { } +const int main(); // expected-error {{'main' must return 'int'}} + #elif TEST7 // expected-no-diagnostics diff --git a/clang/test/Sema/c89.c b/clang/test/Sema/c89.c index b746d383f30..c9e81f1c41c 100644 --- a/clang/test/Sema/c89.c +++ b/clang/test/Sema/c89.c @@ -111,6 +111,8 @@ const array_of_pointer_to_CI mine3; void main() {} /* expected-error {{'main' must return 'int'}} */ +const int main() {} /* expected-error {{'main' must return 'int'}} */ + long long ll1 = /* expected-warning {{'long long' is an extension when C99 mode is not enabled}} */ -42LL; /* expected-warning {{'long long' is an extension when C99 mode is not enabled}} */ unsigned long long ull1 = /* expected-warning {{'long long' is an extension when C99 mode is not enabled}} */ |