summaryrefslogtreecommitdiffstats
path: root/ccan/ccan/check_type/_info
blob: cc426734928192eb677e1a3129d8eb1dc696104b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "config.h"
#include <stdio.h>
#include <string.h>

/**
 * check_type - routines for compile time type checking
 *
 * C has fairly weak typing: ints get automatically converted to longs, signed
 * to unsigned, etc.  There are some cases where this is best avoided, and
 * these macros provide methods for evoking warnings (or build errors) when
 * a precise type isn't used.
 *
 * On compilers which don't support typeof() these routines are less effective,
 * since they have to use sizeof() which can only distiguish between types of
 * different size.
 *
 * License: CC0 (Public domain)
 * Author: Rusty Russell <rusty@rustcorp.com.au>
 */
int main(int argc, char *argv[])
{
	if (argc != 2)
		return 1;

	if (strcmp(argv[1], "depends") == 0) {
#if !HAVE_TYPEOF
		printf("ccan/build_assert\n");
#endif
		return 0;
	}

	return 1;
}