diff options
Diffstat (limited to 'rts/include/Stg.h')
-rw-r--r-- | rts/include/Stg.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rts/include/Stg.h b/rts/include/Stg.h index 46f71c0241..981e72e808 100644 --- a/rts/include/Stg.h +++ b/rts/include/Stg.h @@ -25,6 +25,12 @@ #pragma once +// Ensure that we don't get a -Wundef warning for __STDC_VERSION if compiling +// with a C++ compiler. See #20394. +#if defined(__cplusplus) +#define __STDC_VERSION__ 0 +#endif + #if !(__STDC_VERSION__ >= 199901L) && !(__cplusplus >= 201103L) # error __STDC_VERSION__ does not advertise C99, C++11 or later #endif |