From owner-svn-src-all@freebsd.org Thu Jun 28 19:05:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 606A910244A1; Thu, 28 Jun 2018 19:05:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 03508897C9; Thu, 28 Jun 2018 19:05:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id B2C0A1680A; Thu, 28 Jun 2018 19:05:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id C0A5E1D94; Thu, 28 Jun 2018 19:05:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id oSB4rGbiY1zW; Thu, 28 Jun 2018 19:05:00 +0000 (UTC) Subject: Re: svn commit: r335765 - head/sys/sys DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com EE7011D8E To: dab@freebsd.org Cc: Justin Hibbits , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201806281701.w5SH15eP011261@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Autocrypt: addr=bdrewery@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFJphmsBCADiFgmS4bIzwZijrS31SjEMzg+n5zNellgM+HkShwehpqCiyhXdWrvH6dTZ a6u50pbUIX7doTR7W7PQHCjCTqtpwvcj0eulZva+iHFp+XrbgSFHn+VVXgkYP2MFySyZRFab D2qqzJBEJofhpv4HvY6uQI5K99pMqKr1Z/lHqsijYYu4RH2OfwB5PinId7xeldzWEonVoCr+ rfxzO/UrgA6v/3layGZcKNHFjmc3NqoN1DXtdaEHqtjIozzbndVkH6lkFvIpIrI6i5ox8pwp VxsxLCr/4Musd5CWgHiet5kSw2SzNeA8FbxdLYCpXNVu+uBACEbCUP+CSNy3NVfEUxsBABEB AAHNJEJyeWFuIERyZXdlcnkgPGJkcmV3ZXJ5QEZyZWVCU0Qub3JnPsLAgAQTAQoAKgIbAwUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZAQUCWujOIgUJCmB7NwAKCRA113G7bkaXz/xpB/9b /UWIPbieY1IeIuHF2pyYPE7Hytkh3HVsxMA0F5Ma2AYQsXZZeKNKWrF7RPyDyDwUklLHJkhm k3EfClBbHxf08kMIm1vWCJRtgxic9knY/bzYGiWMpHjg3cSd1XfrYH1autYqTZAjDwIkgOjU dR//Tbn4V36sY7y2jz+kdMVWvK53U32aZqiwBbCn4DPe1wSZcUs17mV/0uZdIoGdj74B1orN A/0py5vHYo6HcbBNoaR8pKRLf5VZNRsxqGIMhTucx4SJWcHpuRBWYyvJSFzwvxdK4ZD4Yqoc kFGPVtOXktVMai9exrLvP3G77fKMu8DI6j4QRU4wCesnHuIfRPFuzsBNBFJphmsBCACiVFPf kNfaFtUSuY0395ueo/rMyHPGPQ2iwvERFCpeFGSQSgagpenNHLpFQKTg/dl6FOoST5tqyxMq fyHGHDzzU51bvA/IfaGoNi/BIhTe/toZNMRvpcI3PLjiGcnJnuwCCbAVOAGdb+t5cZtpNdOI cKYmrYG3u9RiBpe6dTF+qLrD/8Bs1wjhduQ8fcNNgnkXu8xDH4ZxY0lIc3QgvYWp9vimlQe6 iKjUd2/DX28ETZcD5h6pYV331KMPTrEI0p0yvFijUZce8c1XHFyL1j9sBAha5qpszJl6Uq5i LolhKRcGfcdmtD72vHQjUYglUyudSJUVyo2gMYjdbiFKzJulABEBAAHCwGUEGAEKAA8CGwwF AlrozigFCQpgez0ACgkQNddxu25Gl8+m5Af/R3VEdxNMAcDIes9ADhQyofj20SPV3eCJ3HYR OebTSuNdOudGt4AAyA8Ks94u9hiIp5IGsc6RDsT9W7O2vgXhd6eV3eiY5Oif5xLIYrIDVu1Y 1GyRxRrPEn/QOqDN6uFZCPwK1aOapGcYCrO9lB0gMuTVfgHanU61rgC9tMX0OoAOyRd+V3/M 8lDNhjJdF/IpO3SdYzKfkwduy4qamw4Gphcx/RfYQvYLq/eDkP8d50PphWdboqWBwNRHayro W/07OGzfxM5fJ5mBsXPQcO2QcRjkyHf6xCM6Hi1qQL4OnXMNE/ZTX0lnOj1/pH93TlzSHZMP TaiiA/MBD3vGsXBmBg== Organization: FreeBSD Message-ID: <698a08ad-23e3-6ccd-ff72-b2b78444d176@FreeBSD.org> Date: Thu, 28 Jun 2018 12:04:59 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IWnms8G3WcVcgr51gXrDJHJUx8WOaSil1" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2018 19:05:06 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --IWnms8G3WcVcgr51gXrDJHJUx8WOaSil1 Content-Type: multipart/mixed; boundary="nIkdth3M1QNLo714JeLjdjtKuXRxU1QHP"; protected-headers="v1" From: Bryan Drewery To: dab@freebsd.org Cc: Justin Hibbits , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <698a08ad-23e3-6ccd-ff72-b2b78444d176@FreeBSD.org> Subject: Re: svn commit: r335765 - head/sys/sys References: <201806281701.w5SH15eP011261@repo.freebsd.org> In-Reply-To: --nIkdth3M1QNLo714JeLjdjtKuXRxU1QHP Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 6/28/2018 11:45 AM, Justin Hibbits wrote: > Hi David, >=20 > On Thu, Jun 28, 2018 at 12:01 PM David Bright wrote: >> >> Author: dab >> Date: Thu Jun 28 17:01:04 2018 >> New Revision: 335765 >> URL: https://svnweb.freebsd.org/changeset/base/335765 >> >> Log: >> Remove potential identifier conflict in the EV_SET macro. >> >> PR43905 pointed out a problem with the EV_SET macro if the passed >> struct kevent pointer were specified with an expression with side >> effects (e.g., "kevp++"). This was fixed in rS110241, but by using a= >> local block that defined an internal variable (named "kevp") to get >> the pointer value once. This worked, but could cause issues if an >> existing variable named "kevp" is in scope. To avoid that issue, >> jilles@ pointed out that "C99 compound literals and designated >> initializers allow doing this cleanly using a macro". This change >> incorporates that suggestion, essentially verbatim from jilles@ >> comment on PR43905, except retaining the old definition for pre-C99 = or >> non-STDC (e.g., C++) compilers. >> >> PR: 43905 >> Submitted by: Jilles Tjoelker (jilles@) >> Reported by: Lamont Granquist >> Reviewed by: jmg (no comments), jilles >> MFC after: 1 week >> Sponsored by: Dell EMC >> Differential Revision: https://bugs.freebsd.org/bugzilla/show= _bug.cgi?id=3D43905 >> >> Modified: >> head/sys/sys/event.h >> >> Modified: head/sys/sys/event.h >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/sys/event.h Thu Jun 28 15:30:51 2018 (r3357= 64) >> +++ head/sys/sys/event.h Thu Jun 28 17:01:04 2018 (r3357= 65) >> @@ -49,7 +49,26 @@ >> #define EVFILT_EMPTY (-13) /* empty send socket buf */ >> #define EVFILT_SYSCOUNT 13 >> >> +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >=3D 199901L >> #define EV_SET(kevp_, a, b, c, d, e, f) do { \ >> + *(kevp_) =3D (struct kevent){ \ >> + .ident =3D (a), \ >> + .filter =3D (b), \ >> + .flags =3D (c), \ >> + .fflags =3D (d), \ >> + .data =3D (e), \ >> + .udata =3D (f), \ >> + .ext[0] =3D 0, \ >> + .ext[1] =3D 0, \ >> + .ext[2] =3D 0, \ >> + .ext[3] =3D 0, \ >> + }; \ >> +} while(0) >> +#else /* Pre-C99 or not STDC (e.g., C++) */ >> +/* The definition of the local variable kevp could possibly conflict >> + * with a user-defined value passed in parameters a-f. >> + */ >> +#define EV_SET(kevp_, a, b, c, d, e, f) do { \ >> struct kevent *kevp =3D (kevp_); \ >> (kevp)->ident =3D (a); \ >> (kevp)->filter =3D (b); \ >> @@ -62,6 +81,7 @@ >> (kevp)->ext[2] =3D 0; \ >> (kevp)->ext[3] =3D 0; \ >> } while(0) >> +#endif >> >> struct kevent { >> __uintptr_t ident; /* identifier for this event *= / >> >=20 > This breaks gcc builds, with the following errors: >=20 > 18:02:13 /usr/src/bin/pwait/pwait.c: In function 'main': > 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: initialized field ove= rwritten > 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: (near initialization > for '(anonymous).ext') > 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: initialized field ove= rwritten > 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: (near initialization > for '(anonymous).ext') > 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: initialized field ove= rwritten > 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: (near initialization > for '(anonymous).ext') > 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: initialized field ove= rwritten > 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: (near initialization > for '(anonymous).ext') > 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: initialized field ove= rwritten > 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: (near initialization > for '(anonymous).ext') > 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: initialized field ove= rwritten > 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: (near initialization > for '(anonymous).ext') >=20 > This can be seen in the tinderbox (https://ci.freebsd.org/tinderbox) >=20 > I encountered this as a failure in building usr.sbin/camdd, which > shows the same type of error. I think in this case it may break ports and other external builds too. If possible please try to fix the macro to avoid the issue. I didn't analyze it to see if it is feasible though. --=20 Regards, Bryan Drewery --nIkdth3M1QNLo714JeLjdjtKuXRxU1QHP-- --IWnms8G3WcVcgr51gXrDJHJUx8WOaSil1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJbNTFbAAoJEDXXcbtuRpfPDDQH/3JAx65MBLV1V+jXD55fZzBA RMMPBrRovpZo5oqCMVgqSYXtyAWe+MzV5o0HyO9rLnNAAYugnuWxQ5Rqs0k97o8Z qV9tDgEpXaoyhBulloaG141+j+aexka2VIcxLG6xBhT1PiqgCe5WbaVNrVmzy/dh nOaz9BVWubZ91DW9QSQlhX3JLm4w3As9q53UlAVaE8PqA57HSSoDDiZ1MKoQXUd5 z9Bm83lyCErU5qLJx2WmhJJagKULvI9npo5itNp7Du1074i395jFP7Dlj3u3pSq2 AZganhV3D0v4Hv3C6FCUtxQJYxZ3mtU+Gd+cLOvYsvcomKwWogOn9U8kbai9eI8= =swI8 -----END PGP SIGNATURE----- --IWnms8G3WcVcgr51gXrDJHJUx8WOaSil1--