From: Daryle Walker (darylew_at_[hidden])
Date: 2005-12-04 16:25:18
On 12/4/05 11:59 AM, "Hartmut Kaiser" <hartmut.kaiser_at_[hidden]> wrote:
> Vambola Kotkas wrote:
>> Wave Driver C++ preprocessor seems quite useful tool to see what
>> happens with most macros. Unfortunatelly it needs some debugging
>> before it can be used to preprocess real code. For example it refuses
>> (unneccessarily) to process sometimes.
>> Silly example 1:
>> #if __LINE__ == 11112223334
>> #pragma message( "Huh!" )
>> test.cpp(1): error: ill formed integer literal or integer constant
>> large: 11112223334.
>> None of the available wave flags did seemingly help. Not that i need
>> huge integers, however boost sometimes does have way bigger ones so it
>> must be legal? MS Visual C++ 7.1 processes constants like
>> 18446744073709551615 without any noise.
>> See ... 1.33.0 boost/cstdint.hpp line(263):
>> # if ULONG_MAX == 18446744073709551615 // 2**64 - 1
> It's not legal for 32 bit systems. Either flag the 11112223334 with the LL
> suffix (and the --long_long command line option) or you are out of luck with
> Wave. At least as long the code is not hidden inside a non-evaluated
> #if/#endif block. I've fixed Wave after 1.33.0 to accept large numbers in
> non-evaluated #if expressions, just to allow to compile Boost.
Maybe one day we could use some sort of bignum class to hold preprocessor
numbers. I'm guessing that you currently base the "number too large" errors
by trying to load the number into a (built-in) numeric variable. The
problem is that it won't work for cross-compilers where the compiling
computer's number sizes are smaller than the number sizes on the target
-- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk