> -----Original Message-----
> From: Martin Sebor [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 18, 2007 9:53 PM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: svn commit: r577002 - 
> /incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp
> 
> >     * 20.temp.buffer.cpp (run_test): Use _RWSTD_LONG_MAX instead
> >     of _RWSTD_PTRDIFF_MAX because BigStruct parametrized by
> >     unsigned long type and sizeof (_RWSTD_PTRDIFF_T) can be
> >     greater that sizeof (unsigned long).
> 
> Shouldn't that be the other way around? I mean, wouldn't a 
> more robust solution be to parametrize BigStruct on ptrdiff_t 
> so that it can be instantiated with the largest possible value even on
> LLP64 like Windows?

  Are there any LLP64 platforms except Windows?

  Because on Windows the maximum size of the array is 0x7fffffff bytes.

The following line of code:

char buf [0x80000000];

inducts the error on MSVC (32 bit and 64 bit):

error C2148: total size of array must not exceed 0x7fffffff bytes

on ICC 9.1 (32 bit and 64 bit), 10.0 (32 bit and 64 bit):

error: array is too large
  char buf [0x80000000];
       ^

Farid.

Reply via email to