stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Lemings" <Eric.Lemi...@roguewave.com>
Subject RE: svn commit: r659253 - in /stdcxx/branches/4.2.x: examples/manual/ src/ tests/algorithms/ tests/containers/ tests/localization/ tests/numerics/ tests/regress/ tests/src/ tests/strings/ util/
Date Fri, 30 May 2008 18:14:50 GMT
 

> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com] 
> Sent: Friday, May 23, 2008 11:37 AM
> To: dev@stdcxx.apache.org
> Subject: Re: svn commit: r659253 - in /stdcxx/branches/4.2.x: 
> examples/manual/ src/ tests/algorithms/ tests/containers/ 
> tests/localization/ tests/numerics/ tests/regress/ tests/src/ 
> tests/strings/ util/
> 
...
> 
> FYI: The cast above changes the semantics of the expression
> by slicing the high 32-bits of which (when it's 64 bits wide)
> before shifting the result right, potentially causing it to
> lose its high order bits. I don't think the code is really
> unsafe since which is 32 bits wide in ILP32 but a more robust
> fix (should the type of which change to 64 bits in the future)
> would be to cast the result of the shift expression.

Oh so instead of casting just which, cast the result of the whole
expression?  I'll add that to my TODO list.

Brad.

Mime
View raw message