]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/unifdef/tests/if3-kDU.c
Add 'contrib/unifdef/' from commit '0da44885831dc0a43c4ca6ff04a2430993cc0a80'
[FreeBSD/FreeBSD.git] / contrib / unifdef / tests / if3-kDU.c
1 /* Copyright 2004, 2008 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 0
9 /* This code is commented out. "#if 0 then" */
10 #else
11 /* This code is passed through. "#if 0 else" */
12 #endif
13
14 #if 1
15 /* This code is passed through. "#if 1 then" */
16 #else
17 /* This code is passed through. "#if 1 else" */
18 #endif
19
20 #if ! defined(BAR)
21 int foo() { return 0; }
22 #else
23 #error BAR defined
24 #endif
25
26 int main()
27 {
28   foo();
29 }