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

Geert Uytterhoeven geert at linux-m68k.org
Mon Aug 11 12:25:03 PDT 2014


Hi Brian,

On Mon, Aug 11, 2014 at 9:06 PM, Brian Norris
<computersforpeace at gmail.com> 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 at linux-m68k.org

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



More information about the linux-mtd mailing list