From patchwork Sun Nov 9 21:52:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 123841 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0591E385840E for ; Sun, 9 Nov 2025 21:59:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0591E385840E Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=PTY3KfcK X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by sourceware.org (Postfix) with ESMTPS id C57893858C2C for ; Sun, 9 Nov 2025 21:52:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C57893858C2C Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C57893858C2C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762725177; cv=none; b=MiYr0UDp96/vlVfqTCnvG1oHZdFpeE89eoGxgMDWyf5S5jo0sG3bytiZylslCnUeTFad+3SHl4lPra/cBK/zLAkGQqsqfi4/kb7Ax+4ki+gLghoo+kf3hnF/k9t9e9z2mylzY8naruBjcLH3zZqp6oJYwoBSou6b5xV2NV2+auI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762725177; c=relaxed/simple; bh=4Wdh29z1EolmDv4JDkwP7Wmq0VoUNOxuV1BqEQ4166w=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=emKGrqBMX3s/0vjgoENkooGdcjRwMDgegk3qT7urvoYAc0Ebom+0sze7XG0QNp1knD77ArJ4mC8BzQqEY1a5BVIZv9wTGPnUyUYCjwwxTAcf0EhEcCTdBafG4I7f5Wp74E9S+33YejWipODcQznI+cldHUzjYUbMbWOveLuW8rg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C57893858C2C Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 331544421F for ; Sun, 9 Nov 2025 21:52:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DE1CC113D0; Sun, 9 Nov 2025 21:52:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762725177; bh=4Wdh29z1EolmDv4JDkwP7Wmq0VoUNOxuV1BqEQ4166w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PTY3KfcKesnh0PZqii0sPxXvO+XQNWwM9r37U/jygyXVii6kP0u0g/t7lF5vhee3y KAdH74ZPWUy2IW7Jr6f2oW1GDGGZaLJUPlHEj+fgWGnHpmzukOrsl1cTLD2wiiauL2 Zu2Ps/b/kb2+pN+H8FGS3lCoMg9tTwdwhe8n6XImdDq8npM1/RrBhTlnHh0c2muvyq lLbq+qIpQL/EdtVIRl3aD0f4GcSBhMPw266r6UKw3wBaP0hgx3j1mH1yy/NfQmmP/I g8uImbK/9VvOVqULDBboNVUhoJwQFgWppLun7MUUaCQD0gENC36yxcWcB1YExABXtZ RudzePSGn0HKg== Date: Sun, 9 Nov 2025 22:52:54 +0100 From: Alejandro Colomar To: libc-alpha@sourceware.org Cc: Alejandro Colomar Subject: [PATCH v1 04/35] Assume __GNUC__ >= 4 Message-ID: X-Mailer: git-send-email 2.51.0 References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org Signed-off-by: Alejandro Colomar --- math/math.h | 55 ++---------------------------------- math/tgmath.h | 13 ++------- misc/sys/cdefs.h | 41 ++++----------------------- posix/regex.h | 5 +--- stdlib/stdbit.h | 26 ----------------- string/string.h | 2 -- string/strings.h | 3 +- sysdeps/alpha/bits/mathdef.h | 20 ------------- sysdeps/x86/bits/link.h | 6 ---- timezone/private.h | 4 --- 10 files changed, 12 insertions(+), 163 deletions(-) diff --git a/math/math.h b/math/math.h index a51edc59a6..8113e6784c 100644 --- a/math/math.h +++ b/math/math.h @@ -44,24 +44,10 @@ __BEGIN_DECLS /* Value returned on overflow. With IEEE 754 floating point, this is +Infinity, otherwise the largest representable positive value. */ -#if __GNUC_PREREQ (3, 3) # define HUGE_VAL (__builtin_huge_val ()) -#else -/* This may provoke compiler warnings, and may not be rounded to - +Infinity in all IEEE 754 rounding modes, but is the best that can - be done in ISO C while remaining a constant expression. 10,000 is - greater than the maximum (decimal) exponent for all supported - floating-point formats and widths. */ -# define HUGE_VAL 1e10000 -#endif #ifdef __USE_ISOC99 -# if __GNUC_PREREQ (3, 3) # define HUGE_VALF (__builtin_huge_valf ()) # define HUGE_VALL (__builtin_huge_vall ()) -# else -# define HUGE_VALF 1e10000f -# define HUGE_VALL 1e10000L -# endif #endif #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT) # define HUGE_VAL_F16 (__builtin_huge_valf16 ()) @@ -88,33 +74,20 @@ __BEGIN_DECLS #ifdef __USE_ISOC99 /* IEEE positive infinity. */ # ifndef INFINITY -# if __GNUC_PREREQ (3, 3) # define INFINITY (__builtin_inff ()) -# else -# define INFINITY HUGE_VALF -# endif # endif /* IEEE Not A Number. */ # ifndef NAN -# if __GNUC_PREREQ (3, 3) # define NAN (__builtin_nanf ("")) -# else -/* This will raise an "invalid" exception outside static initializers, - but is the best that can be done in ISO C while remaining a - constant expression. */ -# define NAN (0.0f / 0.0f) -# endif # endif #endif /* __USE_ISOC99 */ #if __GLIBC_USE (IEC_60559_BFP_EXT) -/* Signaling NaN macros, if supported. */ -# if __GNUC_PREREQ (3, 3) +/* Signaling NaN macros. */ # define SNANF (__builtin_nansf ("")) # define SNAN (__builtin_nans ("")) # define SNANL (__builtin_nansl ("")) -# endif #endif #if (__HAVE_FLOAT16 \ && __GLIBC_USE (IEC_60559_TYPES_EXT) \ @@ -951,10 +924,8 @@ enum in C++ mode, since libstdc++ provides its own version of signbit in cmath (which undefines signbit). */ # define signbit(x) __builtin_signbitl (x) -# elif __GNUC_PREREQ (4,0) -# define signbit(x) __MATH_TG ((x), __builtin_signbit, (x)) # else -# define signbit(x) __MATH_TG ((x), __signbit, (x)) +# define signbit(x) __MATH_TG ((x), __builtin_signbit, (x)) # endif /* Return nonzero value if X is not +-Inf or NaN. */ @@ -1265,7 +1236,6 @@ iszero (__T __val) #endif #ifdef __USE_ISOC99 -# if __GNUC_PREREQ (3, 1) /* ISO C99 defines some macros to compare number while taking care for unordered numbers. Many FPUs provide special instructions to support these operations. Generic support in GCC for these as builtins went @@ -1278,27 +1248,6 @@ iszero (__T __val) # define islessequal(x, y) __builtin_islessequal(x, y) # define islessgreater(x, y) __builtin_islessgreater(x, y) # define isunordered(x, y) __builtin_isunordered(x, y) -# else -# define isgreater(x, y) \ - (__extension__ ({ __typeof__ (x) __x = (x); __typeof__ (y) __y = (y); \ - !isunordered (__x, __y) && __x > __y; })) -# define isgreaterequal(x, y) \ - (__extension__ ({ __typeof__ (x) __x = (x); __typeof__ (y) __y = (y); \ - !isunordered (__x, __y) && __x >= __y; })) -# define isless(x, y) \ - (__extension__ ({ __typeof__ (x) __x = (x); __typeof__ (y) __y = (y); \ - !isunordered (__x, __y) && __x < __y; })) -# define islessequal(x, y) \ - (__extension__ ({ __typeof__ (x) __x = (x); __typeof__ (y) __y = (y); \ - !isunordered (__x, __y) && __x <= __y; })) -# define islessgreater(x, y) \ - (__extension__ ({ __typeof__ (x) __x = (x); __typeof__ (y) __y = (y); \ - !isunordered (__x, __y) && __x != __y; })) -/* isunordered must always check both operands first for signaling NaNs. */ -# define isunordered(x, y) \ - (__extension__ ({ __typeof__ (x) __u = (x); __typeof__ (y) __v = (y); \ - __u != __v && (__u != __u || __v != __v); })) -# endif #endif #if __GLIBC_USE (IEC_60559_BFP_EXT_C23) diff --git a/math/tgmath.h b/math/tgmath.h index 098760071f..88ff014104 100644 --- a/math/tgmath.h +++ b/math/tgmath.h @@ -195,9 +195,8 @@ constant expressions. All these macros can assume their argument has an arithmetic type (not vector, decimal floating-point or fixed-point), valid to pass to tgmath.h macros. */ -# if __GNUC_PREREQ (3, 1) -/* __builtin_classify_type expands to an integer constant expression - in GCC 3.1 and later. Default conversions applied to the argument +/* __builtin_classify_type expands to an integer constant expression. + Default conversions applied to the argument of __builtin_classify_type mean it always returns 1 for real integer types rather than ever returning different values for character, boolean or enumerated types. */ @@ -208,14 +207,6 @@ # define __complex_integer_type(type) \ (__builtin_classify_type ((type) 0) == 9 \ && __builtin_classify_type (__real__ ((type) 0)) == 1) -# else -/* GCC versions predating __builtin_classify_type are also looser on - what counts as an integer constant expression. */ -# define __floating_type(type) (((type) 1.25) != 1) -# define __real_integer_type(type) (((type) (1.25 + _Complex_I)) == 1) -# define __complex_integer_type(type) \ - (((type) (1.25 + _Complex_I)) == (1 + _Complex_I)) -# endif /* Whether an expression (of arithmetic type) has a real type. */ # define __expr_is_real(E) (__builtin_classify_type (E) != 9) diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index da6ef07a4a..53e4355862 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -72,8 +72,7 @@ gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions as non-throwing using a function attribute since programs can use the -fexceptions options for C code as well. */ -# if !defined __cplusplus \ - && (__GNUC_PREREQ (3, 4) || __glibc_has_attribute (__nothrow__)) +# if !defined __cplusplus # define __THROW __attribute__ ((__nothrow__ __LEAF)) # define __THROWNL __attribute__ ((__nothrow__)) # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct @@ -428,23 +427,10 @@ # define __attribute_maybe_unused__ __attribute__ ((__unused__)) -/* At some point during the gcc 3.1 development the `used' attribute - for functions was introduced. We don't want to use it unconditionally - (although this would be possible) since it generates warnings. */ -#if __GNUC_PREREQ (3,1) || __glibc_has_attribute (__used__) # define __attribute_used__ __attribute__ ((__used__)) # define __attribute_noinline__ __attribute__ ((__noinline__)) -#else -# define __attribute_used__ __attribute__ ((__unused__)) -# define __attribute_noinline__ /* Ignore */ -#endif -/* Since version 3.2, gcc allows marking deprecated functions. */ -#if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__deprecated__) # define __attribute_deprecated__ __attribute__ ((__deprecated__)) -#else -# define __attribute_deprecated__ /* Ignore */ -#endif /* Since version 4.5, gcc also allows one to specify the message printed when a deprecated function is used. clang claims to be gcc 4.2, but @@ -470,11 +456,7 @@ and __attribute_nonnull__ in files shared with Gnulib to avoid collision with a different __nonnull in DragonFlyBSD 5.9. */ #ifndef __attribute_nonnull__ -# if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__) # define __attribute_nonnull__(params) __attribute__ ((__nonnull__ params)) -# else -# define __attribute_nonnull__(params) -# endif #endif #ifndef __nonnull # define __nonnull(params) __attribute_nonnull__ (params) @@ -492,30 +474,20 @@ /* If fortification mode, we warn about unused results of certain function calls which can lead to problems. */ -#if __GNUC_PREREQ (3,4) || __glibc_has_attribute (__warn_unused_result__) -# define __attribute_warn_unused_result__ \ +#define __attribute_warn_unused_result__ \ __attribute__ ((__warn_unused_result__)) -# if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0 -# define __wur __attribute_warn_unused_result__ -# endif +#if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0 +# define __wur __attribute_warn_unused_result__ #else -# define __attribute_warn_unused_result__ /* empty */ -#endif -#ifndef __wur # define __wur /* Ignore */ #endif /* Forces a function to be always inlined. */ -#if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__always_inline__) /* The Linux kernel defines __always_inline in stddef.h (283d7573), and it conflicts with this definition. Therefore undefine it first to allow either header to be included first. */ # undef __always_inline # define __always_inline __inline __attribute__ ((__always_inline__)) -#else -# undef __always_inline -# define __always_inline __inline -#endif /* Associate error messages with the source location of the call site rather than with the source location inside the function. */ @@ -560,12 +532,11 @@ /* ISO C99 also allows to declare 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. */ -#if (__GNUC_PREREQ (3,1) || __clang_major__ >= 3) && !defined __cplusplus +#if !defined __cplusplus # define __restrict_arr __restrict #else -# define __restrict_arr /* Not supported in old GCC. */ +# define __restrict_arr #endif # define __glibc_unlikely(cond) __builtin_expect ((cond), 0) diff --git a/posix/regex.h b/posix/regex.h index 4facb457b1..4e4dcb8515 100644 --- a/posix/regex.h +++ b/posix/regex.h @@ -654,10 +654,7 @@ extern int re_exec (const char *); # ifdef __restrict_arr # define _Restrict_arr_ __restrict_arr # else -# if ((199901L <= __STDC_VERSION__ \ - || 3 < __GNUC__ + (1 <= __GNUC_MINOR__) \ - || __clang_major__ >= 3) \ - && !defined __cplusplus) +# if !defined __cplusplus # define _Restrict_arr_ _Restrict_ # else # define _Restrict_arr_ diff --git a/stdlib/stdbit.h b/stdlib/stdbit.h index 4afa4362d1..63e8c5f1b9 100644 --- a/stdlib/stdbit.h +++ b/stdlib/stdbit.h @@ -72,7 +72,6 @@ extern unsigned int stdc_leading_zeros_ull (unsigned long long int __x) - (unsigned int) (8 * (sizeof (0ULL) - sizeof (x)))) #endif -#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll) static __always_inline unsigned int __clz64_inline (uint64_t __x) { @@ -106,7 +105,6 @@ __clz8_inline (uint8_t __x) # define stdc_leading_zeros_ul(x) (__clz32_inline (x)) # endif # define stdc_leading_zeros_ull(x) (__clz64_inline (x)) -#endif /* Count leading ones. */ extern unsigned int stdc_leading_ones_uc (unsigned char __x) @@ -128,7 +126,6 @@ extern unsigned int stdc_leading_ones_ull (unsigned long long int __x) << 8 * (sizeof (0ULL) - sizeof (x)))) #endif -#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll) static __always_inline unsigned int __clo64_inline (uint64_t __x) { @@ -162,7 +159,6 @@ __clo8_inline (uint8_t __x) # define stdc_leading_ones_ul(x) (__clo32_inline (x)) # endif # define stdc_leading_ones_ull(x) (__clo64_inline (x)) -#endif /* Count trailing zeros. */ extern unsigned int stdc_trailing_zeros_uc (unsigned char __x) @@ -186,7 +182,6 @@ extern unsigned int stdc_trailing_zeros_ull (unsigned long long int __x) : stdc_trailing_zeros_uc (__pacify_uint8 (x))) #endif -#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll) static __always_inline unsigned int __ctz64_inline (uint64_t __x) { @@ -220,7 +215,6 @@ __ctz8_inline (uint8_t __x) # define stdc_trailing_zeros_ul(x) (__ctz32_inline (x)) # endif # define stdc_trailing_zeros_ull(x) (__ctz64_inline (x)) -#endif /* Count trailing ones. */ extern unsigned int stdc_trailing_ones_uc (unsigned char __x) @@ -240,7 +234,6 @@ extern unsigned int stdc_trailing_ones_ull (unsigned long long int __x) # define stdc_trailing_ones(x) (stdc_trailing_ones_ull (x)) #endif -#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll) static __always_inline unsigned int __cto64_inline (uint64_t __x) { @@ -274,7 +267,6 @@ __cto8_inline (uint8_t __x) # define stdc_trailing_ones_ul(x) (__cto32_inline (x)) # endif # define stdc_trailing_ones_ull(x) (__cto64_inline (x)) -#endif /* First leading zero. */ extern unsigned int stdc_first_leading_zero_uc (unsigned char __x) @@ -298,7 +290,6 @@ extern unsigned int stdc_first_leading_zero_ull (unsigned long long int __x) : stdc_first_leading_zero_uc (__pacify_uint8 (x))) #endif -#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll) static __always_inline unsigned int __flz64_inline (uint64_t __x) { @@ -332,7 +323,6 @@ __flz8_inline (uint8_t __x) # define stdc_first_leading_zero_ul(x) (__flz32_inline (x)) # endif # define stdc_first_leading_zero_ull(x) (__flz64_inline (x)) -#endif /* First leading one. */ extern unsigned int stdc_first_leading_one_uc (unsigned char __x) @@ -356,7 +346,6 @@ extern unsigned int stdc_first_leading_one_ull (unsigned long long int __x) : stdc_first_leading_one_uc (__pacify_uint8 (x))) #endif -#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll) static __always_inline unsigned int __flo64_inline (uint64_t __x) { @@ -390,7 +379,6 @@ __flo8_inline (uint8_t __x) # define stdc_first_leading_one_ul(x) (__flo32_inline (x)) # endif # define stdc_first_leading_one_ull(x) (__flo64_inline (x)) -#endif /* First trailing zero. */ extern unsigned int stdc_first_trailing_zero_uc (unsigned char __x) @@ -414,7 +402,6 @@ extern unsigned int stdc_first_trailing_zero_ull (unsigned long long int __x) : stdc_first_trailing_zero_uc (__pacify_uint8 (x))) #endif -#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll) static __always_inline unsigned int __ftz64_inline (uint64_t __x) { @@ -448,7 +435,6 @@ __ftz8_inline (uint8_t __x) # define stdc_first_trailing_zero_ul(x) (__ftz32_inline (x)) # endif # define stdc_first_trailing_zero_ull(x) (__ftz64_inline (x)) -#endif /* First trailing one. */ extern unsigned int stdc_first_trailing_one_uc (unsigned char __x) @@ -472,7 +458,6 @@ extern unsigned int stdc_first_trailing_one_ull (unsigned long long int __x) : stdc_first_trailing_one_uc (__pacify_uint8 (x))) #endif -#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_ctzll) static __always_inline unsigned int __fto64_inline (uint64_t __x) { @@ -506,7 +491,6 @@ __fto8_inline (uint8_t __x) # define stdc_first_trailing_one_ul(x) (__fto32_inline (x)) # endif # define stdc_first_trailing_one_ull(x) (__fto64_inline (x)) -#endif /* Count zeros. */ extern unsigned int stdc_count_zeros_uc (unsigned char __x) @@ -528,7 +512,6 @@ extern unsigned int stdc_count_zeros_ull (unsigned long long int __x) - (unsigned int) (8 * (sizeof (0ULL) - sizeof (x)))) #endif -#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_popcountll) static __always_inline unsigned int __cz64_inline (uint64_t __x) { @@ -562,7 +545,6 @@ __cz8_inline (uint8_t __x) # define stdc_count_zeros_ul(x) (__cz32_inline (x)) # endif # define stdc_count_zeros_ull(x) (__cz64_inline (x)) -#endif /* Count ones. */ extern unsigned int stdc_count_ones_uc (unsigned char __x) @@ -582,7 +564,6 @@ extern unsigned int stdc_count_ones_ull (unsigned long long int __x) # define stdc_count_ones(x) (stdc_count_ones_ull (x)) #endif -#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_popcountll) static __always_inline unsigned int __co64_inline (uint64_t __x) { @@ -616,7 +597,6 @@ __co8_inline (uint8_t __x) # define stdc_count_ones_ul(x) (__co32_inline (x)) # endif # define stdc_count_ones_ull(x) (__co64_inline (x)) -#endif /* Single-bit check. */ extern bool stdc_has_single_bit_uc (unsigned char __x) @@ -691,7 +671,6 @@ extern unsigned int stdc_bit_width_ull (unsigned long long int __x) # define stdc_bit_width(x) (stdc_bit_width_ull (x)) #endif -#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll) static __always_inline unsigned int __bw64_inline (uint64_t __x) { @@ -725,7 +704,6 @@ __bw8_inline (uint8_t __x) # define stdc_bit_width_ul(x) (__bw32_inline (x)) # endif # define stdc_bit_width_ull(x) (__bw64_inline (x)) -#endif /* Bit floor. */ extern unsigned char stdc_bit_floor_uc (unsigned char __x) @@ -745,7 +723,6 @@ extern unsigned long long int stdc_bit_floor_ull (unsigned long long int __x) # define stdc_bit_floor(x) ((__typeof (x)) stdc_bit_floor_ull (x)) #endif -#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll) static __always_inline uint64_t __bf64_inline (uint64_t __x) { @@ -781,7 +758,6 @@ __bf8_inline (uint8_t __x) # define stdc_bit_floor_ul(x) ((unsigned long int) __bf32_inline (x)) # endif # define stdc_bit_floor_ull(x) ((unsigned long long int) __bf64_inline (x)) -#endif /* Bit ceiling. */ extern unsigned char stdc_bit_ceil_uc (unsigned char __x) @@ -801,7 +777,6 @@ extern unsigned long long int stdc_bit_ceil_ull (unsigned long long int __x) # define stdc_bit_ceil(x) ((__typeof (x)) stdc_bit_ceil_ull (x)) #endif -#if __GNUC_PREREQ (3, 4) || __glibc_has_builtin (__builtin_clzll) static __always_inline uint64_t __bc64_inline (uint64_t __x) { @@ -841,7 +816,6 @@ __bc8_inline (uint8_t __x) # define stdc_bit_ceil_ul(x) ((unsigned long int) __bc32_inline (x)) # endif # define stdc_bit_ceil_ull(x) ((unsigned long long int) __bc64_inline (x)) -#endif __END_DECLS diff --git a/string/string.h b/string/string.h index 7c30580437..54faf8ed8e 100644 --- a/string/string.h +++ b/string/string.h @@ -549,12 +549,10 @@ extern char *basename (const char *__filename) __THROW __nonnull ((1)); # endif #endif -#if __GNUC_PREREQ (3,4) # if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function /* Functions with security checks. */ # include # endif -#endif __END_DECLS diff --git a/string/strings.h b/string/strings.h index c5f3aa7d83..7ee9ab08a4 100644 --- a/string/strings.h +++ b/string/strings.h @@ -137,8 +137,7 @@ extern int strncasecmp_l (const char *__s1, const char *__s2, __END_DECLS -#if __GNUC_PREREQ (3,4) && __USE_FORTIFY_LEVEL > 0 \ - && defined __fortify_function +#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function /* Functions with security checks. */ # if defined __USE_MISC || !defined __USE_XOPEN2K8 # include diff --git a/sysdeps/alpha/bits/mathdef.h b/sysdeps/alpha/bits/mathdef.h index b24fed2eed..8775c15bfc 100644 --- a/sysdeps/alpha/bits/mathdef.h +++ b/sysdeps/alpha/bits/mathdef.h @@ -21,24 +21,4 @@ #if defined _COMPLEX_H && !defined _COMPLEX_H_MATHDEF # define _COMPLEX_H_MATHDEF 1 -# if !__GNUC_PREREQ(3,4) - -/* Due to an ABI change, we need to remap the complex float symbols. */ -# define _Mdouble_ float -# define __MATHCALL(function, args) \ - __MATHDECL (_Complex float, function, args) -# define __MATHDECL(type, function, args) \ - __MATHDECL_1(type, function##f, args, __c1_##function##f); \ - __MATHDECL_1(type, __##function##f, args, __c1_##function##f) -# define __MATHDECL_1(type, function, args, alias) \ - extern type function args __asm__(#alias) __THROW - -# include - -# undef _Mdouble_ -# undef __MATHCALL -# undef __MATHDECL -# undef __MATHDECL_1 - -# endif /* GNUC before 3.4 */ #endif /* COMPLEX_H */ diff --git a/sysdeps/x86/bits/link.h b/sysdeps/x86/bits/link.h index 1f149569d3..57cd2150c8 100644 --- a/sysdeps/x86/bits/link.h +++ b/sysdeps/x86/bits/link.h @@ -64,22 +64,16 @@ __END_DECLS #else /* Registers for entry into PLT on x86-64. */ -# if __GNUC_PREREQ (4,0) typedef float La_x86_64_xmm __attribute__ ((__vector_size__ (16))); typedef float La_x86_64_ymm __attribute__ ((__vector_size__ (32), __aligned__ (16))); typedef double La_x86_64_zmm __attribute__ ((__vector_size__ (64), __aligned__ (16))); -# else -typedef float La_x86_64_xmm __attribute__ ((__mode__ (__V4SF__))); -# endif typedef union { -# if __GNUC_PREREQ (4,0) La_x86_64_ymm ymm[2]; La_x86_64_zmm zmm[1]; -# endif La_x86_64_xmm xmm[4]; } La_x86_64_vector __attribute__ ((__aligned__ (16))); diff --git a/timezone/private.h b/timezone/private.h index c7150f349b..fcd71a044d 100644 --- a/timezone/private.h +++ b/timezone/private.h @@ -497,11 +497,7 @@ typedef unsigned long uintmax_t; # endif #endif #ifndef ATTRIBUTE_DEPRECATED -# if 3 < __GNUC__ + (2 <= __GNUC_MINOR__) # define ATTRIBUTE_DEPRECATED __attribute__((deprecated)) -# else -# define ATTRIBUTE_DEPRECATED /* empty */ -# endif #endif #if HAVE___HAS_C_ATTRIBUTE