From owner-svn-src-head@FreeBSD.ORG Fri Jun 19 16:24:43 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 038B844B; Fri, 19 Jun 2015 16:24:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (unknown [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B6C54D11; Fri, 19 Jun 2015 16:24:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::7477:15ef:f45d:3378] (unknown [IPv6:2001:7b8:3a7:0:7477:15ef:f45d:3378]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id A9A7C18A9D; Fri, 19 Jun 2015 18:24:39 +0200 (CEST) Subject: Re: svn commit: r268137 - head/sys/sys Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_7CDE3707-9B66-4E2F-AEF3-D6C1201C1118"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5 From: Dimitry Andric In-Reply-To: <55842F16.5040608@FreeBSD.org> Date: Fri, 19 Jun 2015 18:24:28 +0200 Cc: David Chisnall , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201407020845.s628jRG5031824@svn.freebsd.org> <5BE3492F-86A0-4CE3-A27C-8DB5EB662C64@FreeBSD.org> <55842F16.5040608@FreeBSD.org> To: Pedro Giffuni X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2015 16:24:43 -0000 --Apple-Mail=_7CDE3707-9B66-4E2F-AEF3-D6C1201C1118 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 19 Jun 2015, at 17:02, Pedro Giffuni wrote: >=20 >> On 19/06/2015 05:16 a.m., David Chisnall wrote: >>> I only just caught this (having seen the fallout from NetBSD doing = the same thing in a shipping release and the pain that it=E2=80=99s = caused): >>>=20 >>> __weak is a reserved keyword in Objective-C, please pick another = name for this. This in cdefs.h makes it impossible to include any = FreeBSD standard headers in Objective-C programs (of which we have a = couple of hundred in ports) if they use any of the modern Objective-C = language modes. ... > Closely related to this, we are redefining _Noreturn, which is a = reserved keyword in C11. No, sys/cdefs.h has: 254 /* 255 * Keywords added in C11. 256 */ 257 258 #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L || = defined(lint) [...] 284 #if defined(__cplusplus) && __cplusplus >=3D 201103L 285 #define _Noreturn [[noreturn]] 286 #else 287 #define _Noreturn __dead2 288 #endif [...] 320 #endif /* __STDC_VERSION__ || __STDC_VERSION__ < 201112L */ So the whole block redefining all the _Xxx identifiers is skipped for C11 and higher. E.g.: $ cpp -std=3Dc99 #include _Noreturn void foo(void); ^D # 1 "" # 1 "" 1 # 1 "" 3 # 306 "" 3 # 1 "" 1 # 1 "" 2 # 1 "" 2 # 1 "/usr/include/sys/cdefs.h" 1 3 4 # 2 "" 2 __attribute__((__noreturn__)) void foo(void); $ cpp -std=3Dc11 #include _Noreturn void foo(void); ^D # 1 "" # 1 "" 1 # 1 "" 3 # 306 "" 3 # 1 "" 1 # 1 "" 2 # 1 "" 2 # 1 "/usr/include/sys/cdefs.h" 1 3 4 # 2 "" 2 _Noreturn void foo(void); -Dimitry --Apple-Mail=_7CDE3707-9B66-4E2F-AEF3-D6C1201C1118 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.27 iEYEARECAAYFAlWEQkcACgkQsF6jCi4glqOLEwCgm0iYzbR1RXTBj9C1aKoAwc7v /mQAn05toJtilS594omNeeYlgl+tfHH1 =Lgl0 -----END PGP SIGNATURE----- --Apple-Mail=_7CDE3707-9B66-4E2F-AEF3-D6C1201C1118--