36 lines · c
1/*===---- stdnoreturn.h - Standard header for noreturn macro ---------------===2 *3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4 * See https://llvm.org/LICENSE.txt for license information.5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6 *7 *===-----------------------------------------------------------------------===8 */9 10#ifndef __STDNORETURN_H11#define __STDNORETURN_H12 13#if defined(__MVS__) && __has_include_next(<stdnoreturn.h>)14#include_next <stdnoreturn.h>15#else16 17#define noreturn _Noreturn18#define __noreturn_is_defined 119 20#endif /* __MVS__ */21 22#if (defined(__STDC_VERSION__) && __STDC_VERSION__ > 201710L) && \23 !defined(_CLANG_DISABLE_CRT_DEPRECATION_WARNINGS)24/* The noreturn macro is deprecated in C23. We do not mark it as such because25 including the header file in C23 is also deprecated and we do not want to26 issue a confusing diagnostic for code which includes <stdnoreturn.h>27 followed by code that writes [[noreturn]]. The issue with such code is not28 with the attribute, or the use of 'noreturn', but the inclusion of the29 header. */30/* FIXME: We should be issuing a deprecation warning here, but cannot yet due31 * to system headers which include this header file unconditionally.32 */33#endif34 35#endif /* __STDNORETURN_H */36