1 /*
2 Copyright (C) 2008 by CodeSourcery, Inc. All rights reserved.
3
4 Permission to use, copy, modify, and distribute this software
5 is freely granted, provided that this notice is preserved.
6 */
7 #include <stddef.h>
8 #include <stdint.h>
9 #include <stdlib.h>
10
main(void)11 int main (void) {
12 size_t s;
13
14 s = SIZE_MAX;
15 /* If SIZE_MAX is truncated when assigning to "s", then SIZE_MAX is
16 too big. */
17 if (s != SIZE_MAX)
18 abort ();
19 /* If SIZE_MAX + 1 is not zero, then SIZE_MAX is not big enough. */
20 if (++s != 0)
21 abort ();
22
23 exit(0);
24 }
25