aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/freemain.c
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2009-10-14 18:03:49 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2009-10-14 18:03:49 +0000
commit4c8b24812ddcd1dedaca343a6d4e76f91f398981 (patch)
tree137ebebcae16fb0ce7ab4af456992bbd8d22fced /test/Sema/freemain.c
parent5362a71c02e7d448a8ce98cf00c47e353fba5d04 (diff)
Notes
Diffstat (limited to 'test/Sema/freemain.c')
-rw-r--r--test/Sema/freemain.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Sema/freemain.c b/test/Sema/freemain.c
new file mode 100644
index 0000000000000..a2364df259bfa
--- /dev/null
+++ b/test/Sema/freemain.c
@@ -0,0 +1,9 @@
+// RUN: clang-cc -fsyntax-only -verify -ffreestanding %s
+
+// Tests that -ffreestanding disables all special treatment of main().
+
+void* allocate(long size);
+
+void* main(void* context, long size) {
+ if (context) return allocate(size);
+} // expected-warning {{control may reach end of non-void function}}