diff --git a/src/include/c.h b/src/include/c.h index 7136102e5ff..13fbeea408e 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -154,7 +154,7 @@ * common style is to put them before the return type. (The MSVC fallback has * the same requirement. The GCC fallback is more flexible.) */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && !defined(__cplusplus) #define pg_noreturn _Noreturn #elif defined(__GNUC__) #define pg_noreturn __attribute__((noreturn))