source: trunk/libs/newlib/src/newlib/testsuite/newlib.stdlib/size_max.c @ 567

Last change on this file since 567 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 343 bytes
Line 
1#include <stddef.h>
2#include <stdint.h>
3#include <stdlib.h>
4
5int main () {
6  size_t s;
7
8  s = SIZE_MAX;
9  /* If SIZE_MAX is truncated when assigning to "s", then SIZE_MAX is
10     too big.  */
11  if (s != SIZE_MAX)
12    abort ();
13  /* If SIZE_MAX + 1 is not zero, then SIZE_MAX is not big enough.  */
14  if (++s != 0)
15    abort ();
16
17  return 0;
18}
Note: See TracBrowser for help on using the repository browser.