Date: Wed, 21 Jan 2015 11:29:02 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Navdeep Parhar <np@FreeBSD.org> Cc: Adrian Chadd <adrian@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, Pedro Giffuni <pfg@FreeBSD.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, Luigi Rizzo <rizzo@iet.unipi.it> Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe Message-ID: <5FC194F0-9D47-4B71-87E7-82EB81CA63D0@FreeBSD.org> In-Reply-To: <20150121081050.GA4505@ox> References: <CA%2BhQ2%2Bh29RObCONCd8Nu_W92CnJ9jHMZdRBqiU9hu78D3SwUDA@mail.gmail.com> <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> <54BEF7CF.9030505@FreeBSD.org> <20150121021905.GA73548@FreeBSD.org> <CAJ-VmokL2jq_Kh2CF30G%2BEk63Gab316i6atEN_7gYA8gzDEYNw@mail.gmail.com> <54BF1EB0.2080901@FreeBSD.org> <20150121055329.GB3307@ox> <98838DA6-1969-4764-83DE-71F7BB568E23@FreeBSD.org> <20150121081050.GA4505@ox>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_B7B5B89E-F8B2-4B2E-8504-13F1DBECE44D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 21 Jan 2015, at 09:10, Navdeep Parhar <np@FreeBSD.org> wrote: >=20 > On Wed, Jan 21, 2015 at 09:00:03AM +0100, Dimitry Andric wrote: >> On 21 Jan 2015, at 06:53, Navdeep Parhar <np@FreeBSD.org> wrote: >>>=20 >>> On Tue, Jan 20, 2015 at 10:36:16PM -0500, Pedro Giffuni wrote: ... >> Alternatively, just use the ${GCC_MS_EXTENSIONS} Makefile macro, = which >> I specifically introduced for this issue. >=20 > Ah, a rose with another name. I'm happy to use this but it's not = clear why > there is a GCC in the macro's name when clang deals with = -fms-extensions > just as well. It's because only gcc (in base) requires this flag to support anonymous unions, whereas clang also supports them without the flag. None of the sources requiring this flag use actual Microsoft C extensions. > (It's not even clear why the longer ${GCC_MS_EXTENSIONS} > should be preferred to -fms-extentions. Isn't this like #define ONE 1 = ?) Using -fms-extensions with clang can lead to other trouble, since it is stricter about conflicts with Microsoft-reserved type names. Last time I ran into this problem, several of our system headers tried to override type names which are reserved by Microsoft, leading to compile errors. Meanwhile, that issue may have been solved, but the crutches are still there. Instead of the macro, you could also use: CFLAGS.gcc+=3D -fms-extensions But note that this flag is probably superfluous with newer gcc's, so using the macro is still a better solution, because the compiler version can be checked in a central location, such as sys/conf/kern.mk. > In any case I'm perfectly fine with any change that doesn't involve a = commit > from me to gcc. Fixing this version of gcc is not really worth the trouble, indeed. -Dimitry --Apple-Mail=_B7B5B89E-F8B2-4B2E-8504-13F1DBECE44D 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.26 iEYEARECAAYFAlS/f3UACgkQsF6jCi4glqMWPwCgwrIw7uS9Jz9jB2p3+dlHvDTI 9xUAoIJFk6l/0A2L61ryz4myYQvnAw0M =FYha -----END PGP SIGNATURE----- --Apple-Mail=_B7B5B89E-F8B2-4B2E-8504-13F1DBECE44D--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5FC194F0-9D47-4B71-87E7-82EB81CA63D0>