URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 148 |
Rev 158 |
#include <stddef.h>
|
#include <stddef.h>
|
#include <stdint.h>
|
#include <stdint.h>
|
#include <stdlib.h>
|
#include <stdlib.h>
|
|
|
int main () {
|
int main () {
|
size_t s;
|
size_t s;
|
|
|
s = SIZE_MAX;
|
s = SIZE_MAX;
|
/* If SIZE_MAX is truncated when assigning to "s", then SIZE_MAX is
|
/* If SIZE_MAX is truncated when assigning to "s", then SIZE_MAX is
|
too big. */
|
too big. */
|
if (s != SIZE_MAX)
|
if (s != SIZE_MAX)
|
abort ();
|
abort ();
|
/* If SIZE_MAX + 1 is not zero, then SIZE_MAX is not big enough. */
|
/* If SIZE_MAX + 1 is not zero, then SIZE_MAX is not big enough. */
|
if (++s != 0)
|
if (++s != 0)
|
abort ();
|
abort ();
|
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.