From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnnuI-0000Wa-KZ for qemu-devel@nongnu.org; Tue, 14 Mar 2017 10:58:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnnuE-0000Ph-4w for qemu-devel@nongnu.org; Tue, 14 Mar 2017 10:58:38 -0400 References: <20170314144453.5027-1-andreas@grapentin.org> From: Eric Blake Message-ID: <4be0bc1d-0942-50fd-53e2-769415c22e7b@redhat.com> Date: Tue, 14 Mar 2017 09:58:31 -0500 MIME-Version: 1.0 In-Reply-To: <20170314144453.5027-1-andreas@grapentin.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vLTl6VPsrQ3bx5eU0G6RoKK3cmI9ORXDp" Subject: Re: [Qemu-devel] [PATCH 0/1] Developer Conveniences - check for _Static_assert and use in QEMU_BUILD_BUG_ON List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas Grapentin , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vLTl6VPsrQ3bx5eU0G6RoKK3cmI9ORXDp From: Eric Blake To: Andreas Grapentin , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org Message-ID: <4be0bc1d-0942-50fd-53e2-769415c22e7b@redhat.com> Subject: Re: [Qemu-devel] [PATCH 0/1] Developer Conveniences - check for _Static_assert and use in QEMU_BUILD_BUG_ON References: <20170314144453.5027-1-andreas@grapentin.org> In-Reply-To: <20170314144453.5027-1-andreas@grapentin.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/14/2017 09:44 AM, Andreas Grapentin wrote: >=20 > (as taken from here: http://wiki.qemu-project.org/Contribute/BiteSizedT= asks) >=20 A single patch can be sent without a cover letter if desired (0/N cover letters are only mandatory on patch series). In fact, much of the information you give here: >=20 > I added a configure check for C11's _Static_assert, and based on the ou= tcome, > QEMU_BUILD_BUG_ON will now produce slightly more readable results on fa= ilures. >=20 > Systems without C11 conforming compilers will still have the old messag= es, as > verified by intentionally breaking the configure check. >=20 > the following example output was generated by inverting the condition i= n > QEMU_BUILD_BUG_ON: >=20 > without _Static_assert: >=20 =2E.. > with _Static_assert: >=20 >> In file included from /home/andi/research/qemu-shared-memory/qemu/incl= ude/qemu/osdep.h:36:0, >> from /home/andi/research/qemu-shared-memory/qemu/qga/= commands.c:13: >> /home/andi/research/qemu-shared-memory/qemu/qga/commands.c: In functio= n =E2=80=98qmp_guest_exec_status=E2=80=99: >> /home/andi/research/qemu-shared-memory/qemu/include/qemu/compiler.h:94= :30: error: static assertion failed: "sizeof(*&gei->finished) > sizeof(vo= id *)" >> #define QEMU_BUILD_BUG_ON(x) _Static_assert((x), #x) >> ^ should be in the commit message of the actual patch (right now, your 1/1 message has a rather blank commit message). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --vLTl6VPsrQ3bx5eU0G6RoKK3cmI9ORXDp 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJYyAUXAAoJEKeha0olJ0Nqw2sH/iHxTOeEclSM8wwtODmO6W7e 525V9ABn6gSkP4ukdfT3KCWqBmJk6Bz/kLNtcoILoB3VnMFCgpAhT+qqiIVG3Oof Hgupht2ihTC0PugyTrC7jBswr/ign7QEqNaE3lGTDXuGdvBAFMpybuGbc9iF/GS8 ha4Xsp4Jg0iSxLg3H2eqFuYR6Nz0PR8P8yq1GRAUjw9j//cJMx64qdUDPDkreTBA uOsWKQ1Sgw5mUQbAklTn8Ux3IWoFDUG5/7ztSkUSarDHzBbXuGK+sfcnLKlOCigK HsGqZNdk4i+9KKaIzEUF3Z0syxPj9z0OYvZLZlgd8Y6hBSb87EkGCMGx72XUzMM= =sQkm -----END PGP SIGNATURE----- --vLTl6VPsrQ3bx5eU0G6RoKK3cmI9ORXDp--