Skip to content

Commit ad40ed3

Browse files
seanmbeutlich
authored andcommitted
Fixed -Wundef warning by first checking if macro is defined
1 parent 4577c01 commit ad40ed3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modelica/Resources/C-Sources/ModelicaUtilities.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ extern "C" {
5656
external Modelica C-code in most compilers, noreturn attributes need to
5757
be present to avoid warnings or errors.
5858
59-
The following macros handle noreturn attributes according to the latest
59+
The following macros handle noreturn attributes according to the
6060
C11/C++11 standard with fallback to GNU, Clang or MSVC extensions if using
6161
an older compiler.
6262
*/
6363
#undef MODELICA_NORETURN
6464
#undef MODELICA_NORETURNATTR
65-
#if __STDC_VERSION__ >= 201112L
65+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
6666
#define MODELICA_NORETURN _Noreturn
6767
#define MODELICA_NORETURNATTR
6868
#elif defined(__cplusplus) && __cplusplus >= 201103L

0 commit comments

Comments
 (0)