Re: [PATCH] mtd: nand: Use ULL-suffix for big u64 constant

From: Geert Uytterhoeven
Date: Mon Aug 11 2014 - 15:25:12 EST


Hi Brian,

On Mon, Aug 11, 2014 at 9:06 PM, Brian Norris
<computersforpeace@xxxxxxxxx> wrote:
> I'm curious: do your broken compilers also generate broken code/data?
> i.e., does gcc 4.4.7 give 250000000000 its proper ULL value still?

Yes it does (checked the assembler output).

>> > However, I could be convinced to apply this, if only to satisfy broken
>> > tools and to avoid addressing this question over and over...
>>
>> So please apply. Too many people are still using 32-bit targets and
>> gcc < 4.6.
>
> OK, you've convinced me ;) Applied to l2-mtd.git/next, with an editorial
> comment.

Thanks!

BTW, I had some faint memories of integer constants never being 64-bit
without the "LL" suffix, but that's no longer true in c99 (I did check that a
few days ago).

The warning does go away when adding -std=c99 with gcc-4.4.
Interestingly, it doesn't appear with -std=c89 with gcc 4.6.2 or 4.8.2.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
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/