From b0afb8fe0ff1d87165af9df61501197a06240dda Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Sun, 28 Dec 2025 12:13:40 +0100 Subject: Sync with Gnulib stable-202507 code (a8ac9f9ce5) --- gl/cdefs.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'gl/cdefs.h') diff --git a/gl/cdefs.h b/gl/cdefs.h index d38382ad..dce5739d 100644 --- a/gl/cdefs.h +++ b/gl/cdefs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2024 Free Software Foundation, Inc. +/* Copyright (C) 1992-2025 Free Software Foundation, Inc. Copyright The GNU Toolchain Authors. This file is part of the GNU C Library. @@ -83,7 +83,7 @@ # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct # define __NTHNL(fct) __attribute__ ((__nothrow__)) fct # else -# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major >= 4) +# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major__ >= 4) # if __cplusplus >= 201103L # define __THROW noexcept (true) # else @@ -277,10 +277,10 @@ */ #endif -/* GCC and clang have various useful declarations that can be made with - the '__attribute__' syntax. All of the ways we use this do fine if - they are omitted for compilers that don't understand it. */ -#if !(defined __GNUC__ || defined __clang__) +/* GCC, clang, and compatible compilers have various useful declarations + that can be made with the '__attribute__' syntax. All of the ways we use + this do fine if they are omitted for compilers that don't understand it. */ +#if !(defined __GNUC__ || defined __clang__ || defined __TINYC__) # define __attribute__(xyz) /* Ignore */ #endif @@ -482,7 +482,7 @@ run in pedantic mode if the uses are carefully marked using the `__extension__' keyword. But this is not generally available before version 2.8. */ -#if !(__GNUC_PREREQ (2,8) || defined __clang__) +#if ! (__GNUC_PREREQ (2,8) || defined __clang__ || 0x5150 <= __SUNPRO_C) # define __extension__ /* Ignore */ #endif @@ -497,7 +497,7 @@ # endif #endif -/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is +/* ISO C99 also allows declaring arrays as non-overlapping. The syntax is array_name[restrict] GCC 3.1 and clang support this. This syntax is not usable in C++ mode. */ -- cgit v1.2.3-74-g34f1