xref: /freebsd/contrib/unifdef/tests/if1.c (revision f81cdf24ba5436367377f7c8e8f51f6df2a75ca7)
1 /* Copyright 2004 Bob Proulx <bob@proulx.com>
2 Distributed under the two-clause BSD licence;
3 see the COPYING file for details. */
4 
5 #include <stdio.h>
6 #include <stdlib.h>
7 
8 #if FOO
9 int foo() { return 0; }
10 #else
11 #error FOO not defined
12 #endif
13 
14 #if BAR
15 int foo() { return 0; }
16 #elif FOO
17 int bar() { return 0; }
18 #else
19 #error FOO not defined
20 #endif
21 
22 int main()
23 {
24   foo();
25   bar();
26 }
27