Skip to content

Commit

Permalink
Issue #21: _PDCLIB_Noreturn not effective in C++ code. Suggested fix …
Browse files Browse the repository at this point in the history
…applied.

git-svn-id: https://srv183.svn-repos.de/dev34/pdclib/trunk@1000 bcf39385-58cc-4174-9fcf-14f50f90dd47
  • Loading branch information
solar committed May 15, 2021
1 parent 13217c5 commit 068f3b5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions include/pdclib/_PDCLIB_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,14 @@ extern "C" {
#endif

/* noreturn enabled for C11 onward only */
#if __STDC_VERSION__ < 201112L
#define _PDCLIB_Noreturn
#if defined( __cplusplus ) && __cplusplus >= 201103L
#define _PDCLIB_Noreturn [[noreturn]]
#else
#if defined( __STDC_VERSION__ ) >= 201112L
#define _PDCLIB_Noreturn _Noreturn
#else
#define _PDCLIB_Noreturn
#endif
#endif

/* -------------------------------------------------------------------------- */
Expand Down

0 comments on commit 068f3b5

Please sign in to comment.