Skip to content

Commit

Permalink
Fixed -Wundef warning by first checking if macro is defined (modelica…
Browse files Browse the repository at this point in the history
…#3861)

Co-authored-by: Sean McBride <sean@rogue-research.com>
  • Loading branch information
beutlich and seanm committed Sep 7, 2021
1 parent 4577c01 commit 5b6db4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Modelica/Resources/C-Sources/ModelicaUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ extern "C" {
external Modelica C-code in most compilers, noreturn attributes need to
be present to avoid warnings or errors.
The following macros handle noreturn attributes according to the latest
The following macros handle noreturn attributes according to the
C11/C++11 standard with fallback to GNU, Clang or MSVC extensions if using
an older compiler.
*/
#undef MODELICA_NORETURN
#undef MODELICA_NORETURNATTR
#if __STDC_VERSION__ >= 201112L
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
#define MODELICA_NORETURN _Noreturn
#define MODELICA_NORETURNATTR
#elif defined(__cplusplus) && __cplusplus >= 201103L
Expand Down

0 comments on commit 5b6db4f

Please sign in to comment.