You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Anton Pevtsov <An...@moscow.vdiweb.com> on 2005/10/25 16:50:44 UTC

Localization\22.locale.num.get test compilation problem on VC7.1

There is a problem in the localization\22.locale.num.get.cpp (line 1578)
:

#  ifndef _MSC_VER
#    define ULL(number)   number ## ULL
#  else   // if defined (_MSC_VER)
     // MSVC 7.0 doesn't recognize the LL suffix
#    define LL(number)   number ## UI64
#  endif   // _MSC_VER

    TEST (T, ULL (                  0),                     "0",  1, 0,
Eof);
    TEST (T, ULL (                  0),                    "+0",  2, 0,
Eof);
    TEST (T, ULL (                  0),                    "-0",  2, 0,
Eof);
    TEST (T, ULL (                  1),                    "+1",  2, 0,
Eof);
    TEST (T, ULL (                1080),                 "1080",  4, 0,
Eof);
    TEST (T, ULL (18446744073709551615), "18446744073709551615", 20, 0,
Eof);

So, if  _MSC_VER is defined then ULL becomes undefined. Maybe, here 

     // MSVC 7.0 doesn't recognize the LL suffix
#    define LL(number)   number ## UI64

instead of "LL" should be "ULL" :

     // MSVC 7.0 doesn't recognize the ULL suffix
#    define ULL(number)   number ## UI64

?


With best wishes,
Anton Pevtsov.

Re: Localization\22.locale.num.get test compilation problem on VC7.1

Posted by Martin Sebor <se...@roguewave.com>.
Anton Pevtsov wrote:
> There is a problem in the localization\22.locale.num.get.cpp (line 1578)
> :
> 
> #  ifndef _MSC_VER
> #    define ULL(number)   number ## ULL
> #  else   // if defined (_MSC_VER)
>      // MSVC 7.0 doesn't recognize the LL suffix
> #    define LL(number)   number ## UI64
> #  endif   // _MSC_VER
> 
>     TEST (T, ULL (                  0),                     "0",  1, 0,
[...]
> So, if  _MSC_VER is defined then ULL becomes undefined. Maybe, here 
> 
>      // MSVC 7.0 doesn't recognize the LL suffix
> #    define LL(number)   number ## UI64
> 
> instead of "LL" should be "ULL" :
> 
>      // MSVC 7.0 doesn't recognize the ULL suffix
> #    define ULL(number)   number ## UI64
> 
> ?

Yes, that looks like a typo.
Thanks for spotting it!
Martin