stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: svn commit: r577002 - /incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp
Date Tue, 18 Sep 2007 18:53:26 GMT
faridz@apache.org wrote:
> Author: faridz
> Date: Tue Sep 18 11:01:47 2007
> New Revision: 577002
> 
> URL: http://svn.apache.org/viewvc?rev=577002&view=rev
> Log:
> 2007-09-18 Farid Zaripov <Farid_Zaripov@epam.com>
> 
> 	* 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?

Martin

> 
> Modified:
>     incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp
> 
> Modified: incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp
> URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp?rev=577002&r1=577001&r2=577002&view=diff
> ==============================================================================
> --- incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp (original)
> +++ incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp Tue Sep 18 11:01:47 2007
> @@ -443,9 +443,9 @@
>      // avoid instantiating test on very large structs
>      // to prevent failures (at compile or run-time) due
>      // to compiler bugs
> -    test_failure ((BigStruct<_RWSTD_PTRDIFF_MAX / 2>*)0, 0);
> -    test_failure ((BigStruct<_RWSTD_PTRDIFF_MAX - 1>*)0, 0);
> -    test_failure ((BigStruct<_RWSTD_PTRDIFF_MAX>*)0, 0);
> +    test_failure ((BigStruct<_RWSTD_LONG_MAX / 2>*)0, 0);
> +    test_failure ((BigStruct<_RWSTD_LONG_MAX - 1>*)0, 0);
> +    test_failure ((BigStruct<_RWSTD_LONG_MAX>*)0, 0);
>  
>  #else
>  
> 
> 


Mime
View raw message