lkml.org 
[lkml]   [1998]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Volatile magic
From
Date
Alan Cox <alan@lxorguk.ukuu.org.uk> writes:

|>> Please note that if you want to know if long is 64bit, #if ((~0UL) ==
|>> 0xffffffff) is not good way - what about crosscompiling? I already

|> It is the right way to do it if your cross C pre-processor is decent. If
|> your native and cross build compilers generate different output you have a
|> MAJOR bug.

No, it's perfectly correct. GCC 2.8 uses intmax_t for all computations in
the preprocessor, which is long long with glibc 2.1. This is required by
the standard. You simply cannot use the preprocessor to find the size of
a C type.

--
Andreas Schwab "And now for something
schwab@issan.informatik.uni-dortmund.de completely different"
schwab@gnu.org

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