lkml.org 
[lkml]   [2008]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel/time.c: Silence gcc warning 'integer constant to large for long type'


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


\
 
 \ /
  Last update: 2008-05-03 00:21    [from the cache]
©2003-2011 Jasper Spaans