Blame src/gl/_Noreturn.h

Packit aea12f
/* A C macro for declaring that a function does not return.
Packit Service 991b93
   Copyright (C) 2011-2020 Free Software Foundation, Inc.
Packit aea12f
Packit aea12f
   This program is free software: you can redistribute it and/or modify it
Packit aea12f
   under the terms of the GNU General Public License as published
Packit aea12f
   by the Free Software Foundation; either version 3 of the License, or
Packit aea12f
   (at your option) any later version.
Packit aea12f
Packit aea12f
   This program is distributed in the hope that it will be useful,
Packit aea12f
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit aea12f
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit aea12f
   General Public License for more details.
Packit aea12f
Packit aea12f
   You should have received a copy of the GNU General Public License
Packit aea12f
   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
Packit aea12f
Packit aea12f
#ifndef _Noreturn
Packit aea12f
# if (defined __cplusplus \
Packit aea12f
      && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
Packit Service 991b93
          || (defined _MSC_VER && 1900 <= _MSC_VER)) \
Packit Service 991b93
      && 0)
Packit Service 991b93
    /* [[noreturn]] is not practically usable, because with it the syntax
Packit Service 991b93
         extern _Noreturn void func (...);
Packit Service 991b93
       would not be valid; such a declaration would only be valid with 'extern'
Packit Service 991b93
       and '_Noreturn' swapped, or without the 'extern' keyword.  However, some
Packit Service 991b93
       AIX system header files and several gnulib header files use precisely
Packit Service 991b93
       this syntax with 'extern'.  */
Packit aea12f
#  define _Noreturn [[noreturn]]
Packit aea12f
# elif ((!defined __cplusplus || defined __clang__)                     \
Packit aea12f
        && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0)  \
Packit Service 991b93
            || 4 < __GNUC__ + (7 <= __GNUC_MINOR__) \
Packit Service 991b93
            || (defined __apple_build_version__ \
Packit Service 991b93
                ? 6000000 <= __apple_build_version__ \
Packit Service 991b93
                : 3 < __clang_major__ + (5 <= __clang_minor__))))
Packit aea12f
   /* _Noreturn works as-is.  */
Packit aea12f
# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
Packit aea12f
#  define _Noreturn __attribute__ ((__noreturn__))
Packit aea12f
# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
Packit aea12f
#  define _Noreturn __declspec (noreturn)
Packit aea12f
# else
Packit aea12f
#  define _Noreturn
Packit aea12f
# endif
Packit aea12f
#endif