Date: Tue, 4 Aug 2015 12:23:14 -0600 From: Warner Losh <imp@bsdimp.com> To: Ed Schouten <ed@nuxi.nl> Cc: Bruce Evans <brde@optusnet.com.au>, John-Mark Gurney <jmg@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r286103 - head/share/man/man9 Message-ID: <2B9D4FA9-FDB2-405D-B8C0-BE9918941159@bsdimp.com> In-Reply-To: <CABh_MKmneTxb=djUdmSYPM2dnwuy1AzpNrvsCnPN0-NkvqsEXg@mail.gmail.com> References: <201507310328.t6V3S3LC087650@repo.freebsd.org> <20150731152253.Y1843@besplex.bde.org> <CABh_MKmneTxb=djUdmSYPM2dnwuy1AzpNrvsCnPN0-NkvqsEXg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_75426D4E-E6AF-483A-A501-151C65AC5939 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Aug 4, 2015, at 12:19 PM, Ed Schouten <ed@nuxi.nl> wrote: >=20 > 2015-07-31 8:21 GMT+02:00 Bruce Evans <brde@optusnet.com.au>: >> For gcc before 4.6, >> the ifdef reduces to using __COUNTER__ as the second variable if >> __COUNTER__ is supported, else nothing. So for the undocumented >> subset of compilers that support __COUNTER__ all cases work, and >> for the complementary subset no cases work (the macro is null). >=20 > I was wondering: could we solve this by not using a typedef, but an > external declaration: >=20 > extern int __whatever[expr ? 1 : -1]; >=20 > I think we can safely repeat this multiple times without triggering > any compiler errors. There=E2=80=99s at least one compiler in common use that warns about extern int fred[1]; extern int fred[1]; being a repeated declaration (despite being legal C). Warner --Apple-Mail=_75426D4E-E6AF-483A-A501-151C65AC5939 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----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVwQMSAAoJEGwc0Sh9sBEAnB8P/0Ha/x+2+ZkoK2ALA7O1wDDO C5a1J7JsqmDdkLid1NzcqHZFeOFt6BWiajSw4auIw96f7FAdI3VMR9CCj8DHivfS PFqfLx2SDV6Yb0kE1m456gb8Kgzcq2l8YJWtkGaSO+Lm/vMkUsK63YH0L6uyVX65 6moEk0gJeiodnYMqsLakj3nllpGX4Ozspjy529ra7/RnIxAU72fbX0OBiNGfNJhR xcydjHr/N2SOket8++xUoINhlc3PTGUO9zL7Q3Ftm+FZJMI0JsIogdjGmS0Zvy2i Zogldh72SIRKwr6KGMz5eddH2upqk4d5PTjjMsIHNt6dikbUcLoqNKc2Up6ieQ39 9LhDWf7PorNqStBwXgM+zddpAFeC8BJYDDyvkQ6f9AZYGbtiC1IA1V81XeMqNH6+ efGfbeShmTIB+E7QaoVxYF8V5tZZOKxz/XJCBzesDwP2ixjoFgOH13qh5VgZsBMF ecpRMy/q0zJ05XhVLBvFoTiEAcuDihXBaWh1oRnh/fUXbSrKg7pkOXVoeT83ziKa xG87UYBnejAxMgGQY9JhMbpNn/BxtCwZir1Vyp74cVHKh6j3SWC7dRB03lHs5D71 xYiSU4YcfK8S9YKsYPq9HMDNDvtUMSyq7wETZ0dQ4AQxs8l2Mr+Pz9XIWjmot5n7 DKZYiB2NyAxDo2sQVLty =lanK -----END PGP SIGNATURE----- --Apple-Mail=_75426D4E-E6AF-483A-A501-151C65AC5939--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2B9D4FA9-FDB2-405D-B8C0-BE9918941159>