Re: [PATCH] kernel/time.c: Silence gcc warning 'integer constant tolarge for long type'

From: Linus Torvalds
Date: Fri May 02 2008 - 18:18:31 EST




On Fri, 2 May 2008, H. Peter Anvin wrote:
>
> That's more or less what my other patchset does. It's a bit more complex
> (because it gets the suffixes via macros, to get the right suffixes), but most
> of it is pure cleanup of the way we handle integers in architecture includes:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-inttypes.git

This is *still* wrong.

That C type prefix should be at the *define*, not the use of those macros.

The thing is, if C code needs to do

U64_C(HZ_TO_USEC_MUL32)

to use the macro HZ_TO_USEC_MUL32, then that is a *bug* in the macro.

That kind of stuff should not be visible to users of plain constants!

Linus
--
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/