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] - Rev 258

Go to most recent revision | Compare with Previous | Blame | View Log

#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
 
int main () {
  size_t s;
 
  s = SIZE_MAX;
  /* If SIZE_MAX is truncated when assigning to "s", then SIZE_MAX is
     too big.  */
  if (s != SIZE_MAX)
    abort ();
  /* If SIZE_MAX + 1 is not zero, then SIZE_MAX is not big enough.  */
  if (++s != 0)
    abort ();
 
  return 0;
}
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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