From owner-freebsd-toolchain@FreeBSD.ORG Tue Mar 18 17:47:37 2014 Return-Path: Delivered-To: toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 735858D6; Tue, 18 Mar 2014 17:47:37 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2BE563D2; Tue, 18 Mar 2014 17:47:33 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::4de7:6e37:8224:125c] (unknown [IPv6:2001:7b8:3a7:0:4de7:6e37:8224:125c]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 55CDC5C45; Tue, 18 Mar 2014 18:47:24 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_FB56A615-682F-4267-8A3D-9424C4122C06"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: clang 3.4 -fms-extensions __wchar_t conflicts with our __wchar_t From: Dimitry Andric In-Reply-To: <20140318163834.6a9cf12b@kalimero.tijl.coosemans.org> Date: Tue, 18 Mar 2014 18:47:18 +0100 Message-Id: References: <20140318163834.6a9cf12b@kalimero.tijl.coosemans.org> To: Tijl Coosemans X-Mailer: Apple Mail (2.1874) Cc: toolchain@FreeBSD.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Mar 2014 17:47:37 -0000 --Apple-Mail=_FB56A615-682F-4267-8A3D-9424C4122C06 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 18 Mar 2014, at 16:38, Tijl Coosemans wrote: > With -fms-extensions clang 3.4 seems to define a built-in type named > __wchar_t. This conflicts with __wchar_t in /usr/include/machine/_types.h > > > % cat test.c > #include > % cc -c test.c -fms-extensions > In file included from test.c:1: > In file included from /usr/include/sys/types.h:44: > In file included from /usr/include/machine/endian.h:6: > In file included from /usr/include/x86/endian.h:37: > In file included from /usr/include/sys/_types.h:33: > In file included from /usr/include/machine/_types.h:6: > /usr/include/x86/_types.h:145:14: error: cannot combine with previous 'int' > declaration specifier > typedef int __wchar_t; > ^ > 1 error generated. > > > What is the best way to resolve this? Maybe rename the FreeBSD __wchar_t > to ___wchar_t? Maybe just don't use -fms-extensions, at least not in combination with our system headers? It is not needed for the base system anymore, see r260020, r260102 and r260322. E.g. clang does not need -fms-extensions to stop complaining about anonymous unions, like gcc. Otherwise, the only solution is indeed to rename our __wchar_t. The following type names are reserved in Microsoft mode: __int8 __int16 __int32 __wchar_t -Dimitry --Apple-Mail=_FB56A615-682F-4267-8A3D-9424C4122C06 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.22 (Darwin) iEYEARECAAYFAlMohqkACgkQsF6jCi4glqOPYgCfaFnVqbwl7J15z0smzihI8YZe mMYAoOeecAJLH9XUa3gsDFeel2kP6l3B =dBe4 -----END PGP SIGNATURE----- --Apple-Mail=_FB56A615-682F-4267-8A3D-9424C4122C06--