xref: /freebsd/contrib/unifdef/tests/if4-k.expout (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1/* Copyright 2004, 2008 Bob Proulx <bob@proulx.com>
2Distributed under the two-clause BSD licence;
3see the COPYING file for details. */
4
5#include <stdio.h>
6#include <stdlib.h>
7
8/* This code is passed through. "#if 0 else" */
9
10/* This code is passed through. "#if 1 then" */
11
12#if defined(FOO) || defined(FOOB)
13int foo1() { return 0; }
14#else
15#error FOO or FOOB not defined
16#endif
17
18#if defined(FOOB) || defined(FOO)
19int foo2() { return 0; }
20#else
21#error FOO or FOOB not defined
22#endif
23
24#if defined(FOO) && defined(FOOB)
25int foo3() { return 0; }
26#else
27#error FOO and FOOB not defined
28#endif
29
30#if defined(FOOB) && defined(FOO)
31int foo4() { return 0; }
32#else
33#error FOO and FOOB not defined
34#endif
35
36int main()
37{
38  foo1();
39  foo2();
40  foo3();
41  foo4();
42}
43