From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Cieslak Subject: Re: [PATCH v2] Avoid clang prior initialization error when listing MTRR flags Date: Wed, 24 Sep 2014 13:02:04 +0000 (UTC) Message-ID: References: <5416E8330200007800034F1B@mail.emea.novell.com> <1411552173-52583-1-git-send-email-saper@saper.info> <1411552173-52583-2-git-send-email-saper@saper.info> <5422D2630200007800038379@mail.emea.novell.com> <5422B9B2.50005@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XWmD0-0001oo-6J for xen-devel@lists.xenproject.org; Wed, 24 Sep 2014 13:02:14 +0000 In-Reply-To: <5422B9B2.50005@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xenproject.org, Ian Campbell , Jan Beulich List-Id: xen-devel@lists.xenproject.org On Wed, 24 Sep 2014, Julien Grall wrote: > Hi, > > On 09/24/2014 01:17 PM, Jan Beulich wrote: >>>>> On 24.09.14 at 11:49, wrote: >>> Clang 3.4 complains when compiling range of designated range >>> initializers: >>> >>> generic.c:95:32: error: initializer overrides prior initialization of this >>> subobject [-Werror,-Winitializer-overrides] >>> [MTRR_TYPE_UNCACHABLE] = "uncachable", >>> ^~~~~~~~~~~~ >>> 6 errors generated. >>> >>> Signed-off-by: Marcin Cieslak >> >> Introducing a second lookup level for dealing with a bogus compiler >> warning is definitely not the route we want to go. As said before - >> a patch to turn off that warning would be fine, but I don't think any >> other one would be. Not sure the warning is bogus: are initializers guaranteed to be done in order? On my amd64 box this change adds exacly one CPU instruction (movslq (%rcx,%rax,4),%rcx) > I have sent a patch to disable initializer-overrides warning few months > ago. See https://patches.linaro.org/27060/. > > I haven't had time to rework my clang series. It may be interesting to > give a look at it and made the change request. IIRC, most of the patches > were already acked/reviewed. > > http://lists.xenproject.org/archives/html/xen-devel/2014-03/msg03239.html Thanks Julien, will have a look at it. Right now I need ca. 10 patches to compile Xen with clang 3.5+ (r203994) on FreeBSD/amd64 for amd64. Some patches are identical as yours (yajl_gen_status, libxl_get_scheduler and so on...) //Marcin