xref: /freebsd/contrib/unifdef/tests/if3-k.expout (revision fb3ef04d2028110f06d68b09009f1f2ca0f4128e)
1*fb3ef04dSDag-Erling Smørgrav/* Copyright 2004, 2008 Bob Proulx <bob@proulx.com>
2*fb3ef04dSDag-Erling SmørgravDistributed under the two-clause BSD licence;
3*fb3ef04dSDag-Erling Smørgravsee the COPYING file for details. */
4*fb3ef04dSDag-Erling Smørgrav
5*fb3ef04dSDag-Erling Smørgrav#include <stdio.h>
6*fb3ef04dSDag-Erling Smørgrav#include <stdlib.h>
7*fb3ef04dSDag-Erling Smørgrav
8*fb3ef04dSDag-Erling Smørgrav/* This code is passed through. "#if 0 else" */
9*fb3ef04dSDag-Erling Smørgrav
10*fb3ef04dSDag-Erling Smørgrav/* This code is passed through. "#if 1 then" */
11*fb3ef04dSDag-Erling Smørgrav
12*fb3ef04dSDag-Erling Smørgrav#if ! defined(BAR)
13*fb3ef04dSDag-Erling Smørgravint foo() { return 0; }
14*fb3ef04dSDag-Erling Smørgrav#else
15*fb3ef04dSDag-Erling Smørgrav#error BAR defined
16*fb3ef04dSDag-Erling Smørgrav#endif
17*fb3ef04dSDag-Erling Smørgrav
18*fb3ef04dSDag-Erling Smørgravint main()
19*fb3ef04dSDag-Erling Smørgrav{
20*fb3ef04dSDag-Erling Smørgrav  foo();
21*fb3ef04dSDag-Erling Smørgrav}
22