SUPPRESS_UNREACHABLE

Macros to suppress compiler warnings for different compilers.

Defines

_SUPPRESS_WARNING_START

Fallback for _SUPPRESS_WARNING_START (no-op)

_SUPPRESS_WARNING_END

Fallback for _SUPPRESS_WARNING_END (no-op)

_SUPPRESS_TEMPORARY_RETURN_CODE

Fallback for _SUPPRESS_TEMPORARY_RETURN_CODE (no-op)

SUPPRESS_UNREACHABLE(CODEBLOCK) _SUPPRESS_WARNING_START                                                      \   _SUPPRESS_TEMPORARY_RETURN_CODE

\

CODEBLOCK                                                                    \

_SUPPRESS_WARNING_END

Mark unreachable code paths that exist only to satisfy compiler return requirements.

Uses compiler intrinsics (__builtin_unreachable / __assume(false)) to inform the compiler that the code path is unreachable, eliminating warnings about returning references to temporaries. The pragma-based approach does not work reliably on GCC due to bug #53431 (_Pragma inside macros fails to suppress warnings during template instantiation).

Parameters:
  • CODEBLOCK – Ignored; kept for backward compatibility with call sites.