From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6EE832035BA0B for ; Mon, 18 Dec 2017 17:06:45 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Dec 2017 17:11:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,423,1508828400"; d="scan'208";a="159946524" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga004.jf.intel.com with ESMTP; 18 Dec 2017 17:11:30 -0800 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 18 Dec 2017 17:11:30 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 18 Dec 2017 17:11:29 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by shsmsx102.ccr.corp.intel.com ([169.254.2.175]) with mapi id 14.03.0319.002; Tue, 19 Dec 2017 09:10:28 +0800 From: "Gao, Liming" To: "Gao, Liming" , Zenith432 , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH 4/4] BaseTools: resolve initialization order errors in VfrFormPkg.h Thread-Index: AQHTcPxXLC5iLYc3mUGY2brabaCBKqM8efjQ//++V4CAAftZgIALq/Hw Date: Tue, 19 Dec 2017 01:10:27 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E193CDC@SHSMSX104.ccr.corp.intel.com> References: <1263998052.1770898.1512830709571.ref@mail.yahoo.com> <1263998052.1770898.1512830709571@mail.yahoo.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E18E283@SHSMSX104.ccr.corp.intel.com> <227fb275-6c49-48e9-f5b3-a00c7fcac909@users.sourceforge.net> <4A89E2EF3DFEDB4C8BFDE51014F606A14E18FDC2@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E18FDC2@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 4/4] BaseTools: resolve initialization order errors in VfrFormPkg.h X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Dec 2017 01:06:46 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable We have verified this change with VS2015 compiler. There is no issue found.= =20 Reviewed-by: Liming Gao Thanks Liming > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ga= o, Liming > Sent: Monday, December 11, 2017 10:22 PM > To: Zenith432 ; edk2-devel@lists.01.org > Subject: Re: [edk2] [PATCH 4/4] BaseTools: resolve initialization order e= rrors in VfrFormPkg.h >=20 > For VfrCompiler change, we will help verify VS tool chain. I think it is = a good enhancement. >=20 > For UefiLib.h issue, I agree this is an issue. For short term, we disable= this warning. For long term, I expect to find one compatible > solution or the well discussed solution to reduce its impact. So, I ask t= he question on GCC and VS compiler behavior for BOOLEAN data > type in function. >=20 > Thanks > Liming > > -----Original Message----- > > From: Zenith432 [mailto:zenith432@users.sourceforge.net] > > Sent: Monday, December 11, 2017 12:02 AM > > To: Gao, Liming ; edk2-devel@lists.01.org > > Subject: Re: [edk2] [PATCH 4/4] BaseTools: resolve initialization order= errors in VfrFormPkg.h > > > > On 10/12/2017 03:52 PM, Gao, Liming wrote: > > > I think these patches resolves CLANG build issues in BaseTools. Do yo= u verify them with GCC or VS tool chain? > > > > > GCC 7.2 does not give any of the warnings generated by clang while comp= iling BaseTools. > > After applying the 4 BaseTools patches, it still does not give any warn= ings (or errors). > > I don't have VS toolchain to try on. > > > > For VfrFormPkg.h, there is simpler solution to surround all the offendi= ng code in > > > > #pragma clang diagnostic push > > #pragma clang diagnostic ignored "-Wuninitialized" > > > > #pragma clang diagnostic pop > > > > I sent you this option last week, you said you prefer to resolve the re= ason for the "-Wuninitialized". > > The reason is the attempt in 100 or so derived classes to force an init= ialization order different than C++. It's > > undefined behavior. Any resolution for the undefined behavior involves= changing those 100 derived classes, so a massive > > code change. The existing code works, it's just an attempt to get arou= nd standard C++ initialization order. Clang > > wants to give pedantic warnings, but can be silenced if the "undefined = behavioral" code is known to work. > > > > The other 3 BaseTools patches are rather small. > > > > Also, with the VA_START(Args, BOOLEAN) bug (bug 741), there is an optio= n of silencing clang locally around the offending > > statement > > #pragma clang diagnostic push > > #pragma clang diagnostic ignored "-Wvarargs" > > VA_START(Args, Iso639Language); > > #pragma clang diagnostic pop > > > > And then remove global silencing of this warning in tools_def.txt. Tha= t way any other not yet considered warnings will > > be caught in the future. > > > > It's up to you how to go about it... big code changes, silencing warni= ng locally or silencing warning globally. > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel