diff options
Diffstat (limited to 'test/Sema/freemain.c')
-rw-r--r-- | test/Sema/freemain.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Sema/freemain.c b/test/Sema/freemain.c new file mode 100644 index 000000000000..a2364df259bf --- /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}} |