projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98342bd
)
Add missing definition of SIZE_MAX
author
Eric Botcazou
<ebotcazou@adacore.com>
Sun, 31 Jan 2021 22:23:31 +0000
(23:23 +0100)
committer
Eric Botcazou
<ebotcazou@adacore.com>
Sun, 31 Jan 2021 22:25:56 +0000
(23:25 +0100)
If the stdint.h system file follows the ISO C99 specification, it might
not define SIZE_MAX in C++ by default, so provide a local fallback.
gcc/
* system.h (SIZE_MAX): Define if not already defined.
gcc/system.h
patch
|
blob
|
history
diff --git
a/gcc/system.h
b/gcc/system.h
index 5dd1c34c3a369cd49ff6ac483e0a26f904a8bd59..a3f5948aaeec3b6c8350a57259113b022f06a16e 100644
(file)
--- a/
gcc/system.h
+++ b/
gcc/system.h
@@
-535,6
+535,10
@@
extern void *realloc (void *, size_t);
#include <inttypes.h>
#endif
+#ifndef SIZE_MAX
+# define SIZE_MAX INTTYPE_MAXIMUM (size_t)
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif