summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/implicit-int.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-27 18:53:28 +0000
committerChris Lattner <sabre@nondot.org>2009-02-27 18:53:28 +0000
commit7b0ec8a9dfe3f46b4677fcafde901c717021e56c (patch)
treeb89b7e8aba9a52bbb70b945226098db342df37b5 /clang/test/Sema/implicit-int.c
parentde39c3efcb27e240bf175b5462c8b6350de0df5f (diff)
downloadbcm5719-llvm-7b0ec8a9dfe3f46b4677fcafde901c717021e56c.tar.gz
bcm5719-llvm-7b0ec8a9dfe3f46b4677fcafde901c717021e56c.zip
upgrade various 'implicit int' warnings from an ext-warn to warning when not
in C89 mode. This makes it enabled by default instead of only enabled with -pedantic. Clang defaults to c99 mode, so people will see this more often than with GCC, but they can always use -std=c89 if they really want c89. llvm-svn: 65647
Diffstat (limited to 'clang/test/Sema/implicit-int.c')
-rw-r--r--clang/test/Sema/implicit-int.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/test/Sema/implicit-int.c b/clang/test/Sema/implicit-int.c
index e4a215fb78f..f15a40fa083 100644
--- a/clang/test/Sema/implicit-int.c
+++ b/clang/test/Sema/implicit-int.c
@@ -1,4 +1,10 @@
-// RUN: clang -fsyntax-only %s
+// RUN: clang -fsyntax-only %s -verify -pedantic
-foo() {
+foo() { // expected-warning {{type specifier missing, defaults to 'int'}}
}
+
+y; // expected-warning {{type specifier missing, defaults to 'int'}}
+
+// rdar://6131634
+void f((x)); // expected-warning {{type specifier missing, defaults to 'int'}}
+
OpenPOWER on IntegriCloud