freemain.c revision 31bc1d2da58677b95346d1c34ba289e6a178bec3
1// RUN: %clang_cc1 -triple i686-pc-openbsd -fsyntax-only -verify -ffreestanding %s
2
3// Tests that -ffreestanding disables all special treatment of main().
4
5void* allocate(long size);
6
7void* main(void* context, long size) {
8  if (context) return allocate(size);
9} // expected-warning {{control may reach end of non-void function}}
10