From nobody Fri Jun 21 02:41:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W51nx0c54z5PHGY; Fri, 21 Jun 2024 02:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W51nw4tXxz4c2s; Fri, 21 Jun 2024 02:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718937684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9yJdhlMaNoXiARCM+ZttkjINkSmQt2brTUPvlL8uexA=; b=wnaO/jl+/94aCyXySI3/CLD4xiaWIUCNeUr6lwDMn29Bo1ii2VWjRLY9xp6pDe5IJE9C0/ 64XIBwhqy2BqJWg1w1tuhVVmlDr+XjsV6xQLwg04LPfryRky+OHyieD8AJPTP7XCAO+k++ J2pfguPBLK1rLaAUrKkWzJXVsflIPe9fgcIaPVpV9guLHAMWVYNB+dR80C9QckfWcgQtiK Mvl1j6Bo7qkopIlXGKVXbERf+13IQkUme9WvXClWB4b/xYYNekiMGpyijyez5GxoszZ44h ywb2fDDoN5pWvXkZ5TojXDFTfLe8cdZBX1+yoOL/Q/IsyosDJ9+ttJZiy7/mNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718937684; a=rsa-sha256; cv=none; b=Gdv7K3b/jBBWiQ09Lz273L62vE1UwFY34H0dfq7a4vWfHYT06hgOqQffeLgHcqk9hnXGdu 07cdA7pOI/7d0s9KuHUoNCD/PkVouQ5tbZQOPGdRTQUxKZp9qmGuKO+k1Yj7T8MCMAq31A 09pqwR9zM6XN11rbpzdCU1vGKjaqofC+2GjJLcXzy1/YyGWJ/o2C37Gp+WMrs+TnQnCJOo u+D8Lb956nW5NN2TPWx9O0qlupf1SLAbYTyovRVerJ+Qad83FBAaVwaJYOSZNF+fYhCX8w BsPBA4zZX/2aVh80bZdgD9+SPAfnLUi0PbdJblLuhPKa+NHNhh0/vdlwa1uxpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718937684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9yJdhlMaNoXiARCM+ZttkjINkSmQt2brTUPvlL8uexA=; b=PGOOxV46fKHpIseNQ6OCjGkHTojdnSdVhZuluz2V9SqnU4EC2S6y8zFZYk27d+wF0jL5hx xs7M++C4qXkgSOVgTiB2tTZAfAgpNqUj1wUAOBNxaAR71blHYKxu7IyAY/qDlSm9G3gUwx FsWy2DmMR9fndhkeT7TRgf6gJFDlFVV9kP2BRmweERo+Rufi8AuKspbYcUCEPgINmY7Z3s pGlUdosz9Ys6UelkjOsCMbYRIi3fhZuhBEjjxsZgTEsa1Z8Wk8AcoHkSUcebmGDr2ZgJid TmmtEnpp6ZWxAfUa/OmA+dy3NDuyMUgxNzybBr72v5aNchY8idSE8HFj6m1sJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W51nw4TsCzrDx; Fri, 21 Jun 2024 02:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45L2fONo057013; Fri, 21 Jun 2024 02:41:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45L2fOkP057010; Fri, 21 Jun 2024 02:41:24 GMT (envelope-from git) Date: Fri, 21 Jun 2024 02:41:24 GMT Message-Id: <202406210241.45L2fOkP057010@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 67d1a1cd9e77 - main - cdefs.h: Remove support for pre gcc 4.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67d1a1cd9e772e2ef94003579f4fbc271d38be7d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=67d1a1cd9e772e2ef94003579f4fbc271d38be7d commit 67d1a1cd9e772e2ef94003579f4fbc271d38be7d Author: Warner Losh AuthorDate: 2024-06-20 23:02:56 +0000 Commit: Warner Losh CommitDate: 2024-06-21 02:41:08 +0000 cdefs.h: Remove support for pre gcc 4.0 All supported compilers support the gcc 3 attribute extensions. Remove the #else clauses for this. Also, latter-day pcc compilers also define __GNUC__, so there's not need to also test for __PCC__. Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D45654 Sponsored by: Netflix --- sys/sys/cdefs.h | 42 ++++-------------------------------------- 1 file changed, 4 insertions(+), 38 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 88019819eb35..a6ecdca5d8b9 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -151,13 +151,9 @@ #endif /* !(__STDC__ || __cplusplus) */ /* - * Compiler-dependent macros to help declare dead (non-returning) and - * pure (no side effects) functions, and unused variables. They are - * null except for versions of gcc that are known to support the features - * properly (old versions of gcc-2 supported the dead and pure features - * in a different (wrong) way). If we do not provide an implementation - * for a given compiler, let the compile fail if it is told to use - * a feature that we cannot live without. + * Compiler-dependent macros to help declare dead (non-returning) and pure (no + * side effects) functions, and unused variables. These attributes are supported + * by all current compilers, even pcc. */ #define __weak_symbol __attribute__((__weak__)) #define __dead2 __attribute__((__noreturn__)) @@ -266,7 +262,7 @@ __has_extension(c_generic_selections) #define __generic(expr, t, yes, no) \ _Generic(expr, t: yes, default: no) -#elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus) +#elif !defined(__cplusplus) #define __generic(expr, t, yes, no) \ __builtin_choose_expr( \ __builtin_types_compatible_p(__typeof((0, (expr))), t), yes, no) @@ -290,19 +286,8 @@ #define __malloc_like __attribute__((__malloc__)) #define __pure __attribute__((__pure__)) -#if __GNUC_PREREQ__(3, 1) #define __always_inline __attribute__((__always_inline__)) -#else -#define __always_inline -#endif - -#if __GNUC_PREREQ__(3, 1) #define __noinline __attribute__ ((__noinline__)) -#else -#define __noinline -#endif - -#if __GNUC_PREREQ__(3, 4) #define __fastcall __attribute__((__fastcall__)) #define __result_use_check __attribute__((__warn_unused_result__)) #ifdef __clang__ @@ -316,10 +301,6 @@ #else #define __result_use_or_ignore_check #endif /* !__clang__ */ -#else -#define __fastcall -#define __result_use_check -#endif #if __GNUC_PREREQ__(4, 1) #define __returns_twice __attribute__((__returns_twice__)) @@ -408,15 +389,10 @@ * assign pointer x to a local variable, to check that its type is * compatible with member m. */ -#if __GNUC_PREREQ__(3, 1) #define __containerof(x, s, m) ({ \ const volatile __typeof(((s *)0)->m) *__x = (x); \ __DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, m));\ }) -#else -#define __containerof(x, s, m) \ - __DEQUALIFY(s *, (const volatile char *)(x) - __offsetof(s, m)) -#endif /* * Compiler-dependent macros to declare that functions take printf-like @@ -434,14 +410,8 @@ #define __strftimelike(fmtarg, firstvararg) \ __attribute__((__format__ (__strftime__, fmtarg, firstvararg))) -/* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ -#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \ - defined(__GNUC__) #define __printf0like(fmtarg, firstvararg) \ __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) -#else -#define __printf0like(fmtarg, firstvararg) -#endif #define __strong_reference(sym,aliassym) \ extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym))) @@ -534,11 +504,7 @@ #endif #if !defined(_STANDALONE) && !defined(_KERNEL) -#if defined(__GNUC__) || defined(__PCC__) #define __RENAME(x) __asm(__STRING(x)) -#else -#define __RENAME(x) no renaming support for compiler in use -#endif /* __GNUC__ */ #else /* _STANDALONE || _KERNEL */ #define __RENAME(x) no renaming in kernel/standalone environment #endif