[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2] Avoid clang prior initialization error when listing MTRR flags

On Wed, 24 Sep 2014, Julien Grall wrote:


On 09/24/2014 01:17 PM, Jan Beulich wrote:
On 24.09.14 at 11:49, <saper@xxxxxxxxxx> wrote:
Clang 3.4 complains when compiling range of designated range

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 <saper@xxxxxxxxxx>

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.


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...)


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.