brintos

brintos / llvm-project-archived public Read only

0
0
Text · 368 B · 7bd08c4 Raw
10 lines · c
1// RUN: %clang_cc1 -Werror=return-type -triple i686-pc-openbsd -fsyntax-only -verify -ffreestanding %s2 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-error {{non-void function does not return a value in all control paths}}10