OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [testsuite/] [newlib.stdlib/] [size_max.c] - Blame information for rev 258

Go to most recent revision | 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.