aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Sema/freemain.c
blob: 7bd08c4ed7904d68e63b46b9bd0d0b416eda9075 (plain)
1
2
3
4
5
6
7
8
9
// RUN: %clang_cc1 -Werror=return-type -triple i686-pc-openbsd -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-error {{non-void function does not return a value in all control paths}}