From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=74.6.134.201; helo=sonic315-27.consmr.mail.bf2.yahoo.com; envelope-from=zenith432@users.sourceforge.net; receiver=edk2-devel@lists.01.org Received: from sonic315-27.consmr.mail.bf2.yahoo.com (sonic315-27.consmr.mail.bf2.yahoo.com [74.6.134.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 17A9720356262 for ; Sun, 10 Dec 2017 07:57:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1512921719; bh=pIGwc4EmoMwS0lOCY+BB2OyqxgBgzRCTnHfccS7nKTw=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=HD9LyM3ul7XYArg3oATcCzbAgtJ4YedKmCWelyYaeRbe/te9p+hR7ukUVm201hL8hCNLu01IRpjZvAGUVxvTKRfiGpLThyt4A0nBetgRtKHt/fO5ieu8nE9HN3PRz02vqXECKyp2rLu33eO9M1TZqa859nJmX0hau06G+B6uWT1h64OJaN3Dr5zRktGZhK6ZeLBUwEax0lP/AKrQbzEJSDtoVoBShtLXGuxw18i7rm9LosX2gRxuf8LXhcZw9dEv3CmWO85rGJi7mLler83FRravYaNZPZDe3cIsCtav+jgORZ5kc3+lYBUxFPbXa+V2SSk33DQym2zl2AzZyMrWoQ== X-YMail-OSG: zb4..78VM1msV4_RFzxMeeMyUgsg3j9X11L_oncHKpDdbr6cAaNBTld9o72kHV4 MU3yE3h4l7iz6sZyRQQJ9l4GgcTN.9jTYMaJSKtMSxOPzO3LnbaEFj5kdBdFz5W5UMdxtIeGNreB BykoVxdxHrR5nkkPJp20UBP7XbhnAa9ktMEVoKELMsLdaA6Kp1hp0YvI9TLxqG1_rbh9Ak0FDGv2 w5TmRrAAWCK6woq9fKX9OP_uTWPRsCOQemFjIVYoX473gxoDiVDbxNEPB_QEX3tZYowqsNr5e4gq x2miO3gZr1QEvk.MybsjZP_mkH5Hh6yjgNnaI3eZcL.S3ZQnB6dS8E6DqKXq5WdQ0RRXLhkIK2Sv fZmYn0kx82KxKXtsT9rsZlQzE_f_WEhq8VVgjc6g52Q_1iwsusrFOFHrITrd1Synu7ZXjXOaa5qg MVr3zdZMi0.wRmK97WzsJQLgJr9BADA6JHa6pueOG5KPj.XDI_sPvVC5e4TTyCF41axjZbhIqpjY .RlfThQ-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.bf2.yahoo.com with HTTP; Sun, 10 Dec 2017 16:01:59 +0000 Received: from smtpgate103.mail.bf1.yahoo.com (EHLO robicon.homeip.net) ([72.30.28.111]) by smtp402.mail.bf1.yahoo.com (JAMES SMTP Server ) with ESMTPA ID 1488015039; Sun, 10 Dec 2017 16:01:55 +0000 (UTC) To: "Gao, Liming" , "edk2-devel@lists.01.org" References: <1263998052.1770898.1512830709571.ref@mail.yahoo.com> <1263998052.1770898.1512830709571@mail.yahoo.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E18E283@SHSMSX104.ccr.corp.intel.com> From: Zenith432 Message-ID: <227fb275-6c49-48e9-f5b3-a00c7fcac909@users.sourceforge.net> Date: Sun, 10 Dec 2017 18:01:53 +0200 User-Agent: Thunderbird/52.5 MIME-Version: 1.0 In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E18E283@SHSMSX104.ccr.corp.intel.com> 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: Sun, 10 Dec 2017 15:57:25 -0000 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 10/12/2017 03:52 PM, Gao, Liming wrote: > I think these patches resolves CLANG build issues in BaseTools. Do you verify them with GCC or VS tool chain? > GCC 7.2 does not give any of the warnings generated by clang while compiling BaseTools. After applying the 4 BaseTools patches, it still does not give any warnings (or errors). I don't have VS toolchain to try on. For VfrFormPkg.h, there is simpler solution to surround all the offending 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 reason for the "-Wuninitialized". The reason is the attempt in 100 or so derived classes to force an initialization 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 around 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 option 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. That 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 warning locally or silencing warning globally.