Blame gnulib/tests/_Noreturn.h

Packit Service a2ae7a
/* A C macro for declaring that a function does not return.
Packit Service a2ae7a
   Copyright (C) 2011-2019 Free Software Foundation, Inc.
Packit Service a2ae7a
Packit Service a2ae7a
   This program is free software: you can redistribute it and/or modify it
Packit Service a2ae7a
   under the terms of the GNU General Public License as published
Packit Service a2ae7a
   by the Free Software Foundation; either version 3 of the License, or
Packit Service a2ae7a
   (at your option) any later version.
Packit Service a2ae7a
Packit Service a2ae7a
   This program is distributed in the hope that it will be useful,
Packit Service a2ae7a
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service a2ae7a
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service a2ae7a
   General Public License for more details.
Packit Service a2ae7a
Packit Service a2ae7a
   You should have received a copy of the GNU General Public License
Packit Service a2ae7a
   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
Packit Service a2ae7a
Packit Service a2ae7a
#ifndef _Noreturn
Packit Service a2ae7a
# if (defined __cplusplus \
Packit Service a2ae7a
      && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
Packit Service a2ae7a
          || (defined _MSC_VER && 1900 <= _MSC_VER)))
Packit Service a2ae7a
#  define _Noreturn [[noreturn]]
Packit Service a2ae7a
# elif ((!defined __cplusplus || defined __clang__)                     \
Packit Service a2ae7a
        && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0)  \
Packit Service a2ae7a
            || 4 < __GNUC__ + (7 <= __GNUC_MINOR__)))
Packit Service a2ae7a
   /* _Noreturn works as-is.  */
Packit Service a2ae7a
# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
Packit Service a2ae7a
#  define _Noreturn __attribute__ ((__noreturn__))
Packit Service a2ae7a
# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
Packit Service a2ae7a
#  define _Noreturn __declspec (noreturn)
Packit Service a2ae7a
# else
Packit Service a2ae7a
#  define _Noreturn
Packit Service a2ae7a
# endif
Packit Service a2ae7a
#endif