From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIAqO-0003iM-0B for qemu-devel@nongnu.org; Wed, 29 Jun 2016 04:27:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIAqJ-0003DI-0Z for qemu-devel@nongnu.org; Wed, 29 Jun 2016 04:27:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIAqI-0003DB-R5 for qemu-devel@nongnu.org; Wed, 29 Jun 2016 04:27:30 -0400 References: <1467157426-6461-1-git-send-email-mdroth@linux.vnet.ibm.com> From: Thomas Huth Message-ID: <5773866E.7000302@redhat.com> Date: Wed, 29 Jun 2016 10:27:26 +0200 MIME-Version: 1.0 In-Reply-To: <1467157426-6461-1-git-send-email-mdroth@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] configure: mark qemu-ga VSS includes as system headers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth , qemu-devel@nongnu.org Cc: Stefan Weil , Paolo Bonzini On 29.06.2016 01:43, Michael Roth wrote: > As of e4650c81, we do w32 builds with -Werror enabled. Unfortunately > for cases where we enable VSS support in qemu-ga, we still have > warnings generated by VSS includes that ship as part of the Microsoft > VSS SDK. >=20 > We can selectively address a number of these warnings using >=20 > #pragma GCC diagnostic ignored ... >=20 > but at least one of these: >=20 > warning: =E2=80=98typedef=E2=80=99 was ignored in this declaration >=20 > resulting from declarations of the form: >=20 > typedef struct Blah { ... }; >=20 > does not provide a specific command-line/pragma option to disable > warnings of the sort. >=20 > To allow VSS builds to succeed, the next-best option is disabling > these warnings on a per-file basis. pragmas like #pragma GCC > system_header can be used to declare subsequent includes/declarations > as being exempt from normal warnings, but this must be done within > a header file. >=20 > Since we don't control the VSS SDK, we'd need to rely on a > intermediate header include to accomplish this, and > since different objects in the VSS link target rely on different > headers from the VSS SDK, this would become somewhat of a rat's nest > (though not totally unmanageable). >=20 > The next step up in granularity is just marking the entire VSS > SDK include path as system headers via -isystem. This is a bit more > heavy-handed, but since this SDK hasn't changed since 2005, there's > likely little to be gained from selectively disabling warnings > anyway, so we implement that approach here. >=20 > This fixes the -Werror failures in both the configure test and the > qga build due to shared reliance on $vss_win32_include. For the > same reason, this also enforces a new dependency on -isystem support > in the C/C++ compiler when building QGA with VSS enabled. Did we ever support any non-GCC-based compiler for building QGA? I don't think so, but in the worst case, we could later add a check whether the compiler supports that parameter, too... Anyway, I think your patch is a nice and clean way to deal with the error messages from these headers, so: Reviewed-by: Thomas Huth