OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [newlib-1.18.0/] [newlib-1.18.0-or32-1.0rc1/] [newlib/] [testsuite/] [newlib.stdlib/] [size_max.c] - Blame information for rev 345

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
#include <stddef.h>
2
#include <stdint.h>
3
#include <stdlib.h>
4
 
5
int 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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.