From nobody Mon Jul 01 21:53:09 2024 X-Original-To: dev-commits-src-all@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 4WCftG1ds8z5QCXR; Mon, 01 Jul 2024 21:53:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WCftF6Xl1z45X7; Mon, 1 Jul 2024 21:53:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719870789; 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: in-reply-to:in-reply-to:references:references; bh=AtOkBmnVaU4pD2ESbEIigjZO+nEKEPOZpblcqeqlrv4=; b=jC5UQ/1EHmwfPbHbi3oT3ZuPGshzgGG3f1ZsLE7veFahMFc2c07/btb6UwBKQrkDol5zHi UPAMjsnhJ6so7Cy37qiWa9mblsUJh8HmTBln/CirNQuJEx90gcWLal6LnNa64ZsJVV3Kvz 9F9jRTBtB75E4/DMMxqjXXRm1KM5oSPkhUVQXQFCyFRRXGSgQ64n8YlHRZ4Zfr5YqeiF0g pv+o5eABF5IqgU2CeFZG2XCn/jH8YmWbtpCi4UqBuXB9yXb507SGqOMoxacVH7xIyO/Amx noyM3iovjqLr94LCv7NyuyGk2MMPxajCnAI6v6aX1V7tySFp4xBK7OWCrHMpSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719870789; a=rsa-sha256; cv=none; b=SXjgj4PmkytMczZoDCaCz/NaKSHXRRmMxify+bam4gt+Hk4LtJfRkI7YT19/QwK0munLjw L70UjnoPlA269xtQIkKJ5NZ6mO3gglyeF7oLfdowPBWQBlIJ+Izc01clVRRBiZmOWwvTry UcpN7G1dmhDLJxcbvC6jq1+XTdoKwpXPcBuxtn9Klzs2C2CyYxRrO6dR6KHmNVr7v07V8A Tas+OQC0UCo8M6B7NNJx/nFrJw7mq8J6v1PDduJZWTk9LMZog/GDxz93rgW0ag54C39W0j 6h9Puaa0Uf73VdcGt+5zYOOWpvaAeCENurhaXhWOyxhpccCAnT5a73v2zw8GGw== 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=1719870789; 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: in-reply-to:in-reply-to:references:references; bh=AtOkBmnVaU4pD2ESbEIigjZO+nEKEPOZpblcqeqlrv4=; b=uYTx2tKfENRdmV6oyNvU7V5zqJTnlDqUErXfhFB/oDvex25zAy5Blb3/YeEFWXZtAXEfqz tOx0N7d4ZTHUh/yOVREZxAKWbKHJ0NXf0dceT6QS5LpTmeYQYZW+0XuSBBAEyjwRWuxLuy jHGsI5rgxOAD7erIvIGWB1PlhN5tTkHmPf4YKrD+ihjrmKBhz7iVMQrZasl8XQzZX83f/f AVfy0uQ7VuHgwBtHLP/6yRf09hyJdShM+NwDehN0SBtiir1+gSBEwDHS5khbwXsA5KC2bC Sy70m13wpJVeEMUZd9rDA7A8j0W9eVnqER3/pZWC789g4g8L3wIxZzGEhVnjCw== Received: from [IPV6:2601:5c0:4200:b830:198e:c253:cce:4f0] (unknown [IPv6:2601:5c0:4200:b830:198e:c253:cce:4f0]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WCftF4fRfzWHd; Mon, 1 Jul 2024 21:53:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <4ecc814d-5df1-4db8-b9e0-4919895c5e6a@FreeBSD.org> Date: Mon, 1 Jul 2024 17:53:09 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 67d1a1cd9e77 - main - cdefs.h: Remove support for pre gcc 4.0 Content-Language: en-US To: Warner Losh , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202406210241.45L2fOkP057010@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202406210241.45L2fOkP057010@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/20/24 7:41 PM, Warner Losh wrote: > 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 > @@ -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 Does this still work with external GCC? I didn't think printf0 was supported by external GCC (or maybe I had to readd it in the port and that's what I remember). Ah, yes, printf0 is a local patch in the devel/freebsd-gccX ports, but is not available in stock GCC (e.g. lang/gcc does not support it). -- John Baldwin