Re: X86 GIT GCC 5 compilation warning

From: Borislav Petkov
Date: Sun Jun 14 2015 - 14:08:06 EST


On Sun, Jun 14, 2015 at 05:14:18PM +0200, Enrico Mioso wrote:
> Hi guys.
> Compiling my kernel with gcc (GCC) 5.1.0
> the GIT snapshot as of commit c8d17b451aa18b07b60e771addf17a5fdd4138c7
> I get the following warning you might be interested in:
> arch/x86/kernel/head_32.S:66: Warning: shift count out of range (32 is not between 0 and 31)

That's

LOWMEM_PAGES = (((1<<32) - __PAGE_OFFSET) >> PAGE_SHIFT)

and a 32-bit build. So gas hasn't been complaning so far about this.

Micha, did something change wrt constants type and width in gas in gcc5?

Judging by the warning, it seems gas considers the "1" a 4-byte type now
and complains about the shift overflow. But it didn't before and the asm
from gcc4.9 looks correct here.

What's up?

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/