[RFA] libstdc++/22203, aka PowerPC vs numeric_limits<integer>::traps

Benjamin Kosnik bkoz@redhat.com
Thu Nov 10 01:24:00 GMT 2005


> I believe the objects might want to be declared volatile, to side-step
> excessive cleverness from the compiler.  For the integer types, we
> only need to test for
> 
>    int
>    unsigned
>    long
>    unsigned long
>    long long                    -- guarded by extension
>    unsigned long long           -- guarded by extension

Great.

FYI there is no guard on <limits> for long long and ull, so I don't see
a need to guard in this specific test. (This is unlike io, for instance.)

> For floating points, trpping is a different, more complicated story.
> If is_iecxxx is true, then division by zero would not trap (infinity).
> If is_iecxxx is false, we don' know (VAX may trap for 0/0 -- I have to
> check).
> For most cases (i.e. IEE-754), trapping for floating points have to do
> with whether there is a support for signaling NaN.

I'm going to punt on the fp types for now, if you feel ambitious in the
future, feel free to do something complicated.

best,
benjamin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: p.20051109-2
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20051110/2d814c16/attachment.ksh>


More information about the Libstdc++ mailing list