lkml.org 
[lkml]   [2003]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Compiling kernel with SuSE 8.2/gcc 3.3
Although it fixes it for building on 32 bit architectures, won't changing


__u64 uid = 0xFFFFFFFFFFFFFFFF;
to

__u64 uid = 0xFFFFFFFFFFFFFFFFULL;

generate a type mismatch warning on ppc64 and similar 64 bit
architecutres since __u64 is not a unsigned long long on ppc64
(it is unsigned long)? My gut reaction is to just ingore the three
places that cause warnings and the remaining two places that cause
signed/unsigned compare warnings of unsigned int local variables
to #defined literals (which presumably are treated as signed by default).

Andi Kleen wrote:

>Steve French <smfrench@austin.rr.com> writes:
>
>>... and the similar ones in the same file
>>(fs/cifs/inode.c):
>>
>> __u64 uid = 0xFFFFFFFFFFFFFFFF;
>>
>>generates a warning saying the value is too long for a long on x86
>>SuSE 8.2 with gcc 3.3
>>
>
>Define it with ULL (= long long)
>
>
>AFAIK the problem is that it has no default promotion for constants to
>long long (normally they are int, long, unsigned long etc. depending on
>their value) It's some C99 thing. Or maybe a gcc bug. Anyways ULL
>makes it clear that it is unsigned long long.
>


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.062 / U:1.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site