This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFA] libstdc++/22203, aka PowerPC vs numeric_limits<integer>::traps
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: 07 Nov 2005 18:22:22 +0100
- Subject: Re: [RFA] libstdc++/22203, aka PowerPC vs numeric_limits<integer>::traps
- References: <436A598F.2040007@suse.de>
Paolo Carlini <pcarlini@suse.de> writes:
| Hi,
|
| submitter maintains that PowerPC integer divide does not trap and
| therefore, according to this comment in std_limits.h:
|
| // GCC only intrinsicly supports modulo integral types. The only remaining
| // integral exceptional values is division by zero. Only targets that
| do not
| // signal division by zero in some "hard to ignore" way should use false.
| #ifndef __glibcxx_integral_traps
| # define __glibcxx_integral_traps true
| #endif
|
| we should define __glibcxx_integral_traps to false for powerpc-*.
|
| Today I verified the substance of the PR with Ulrich Weigand, and I'd
| like to double check with you all that indeed for libstdc++-v3 it's
| appropriate defining __glibcxx_integral_traps to false. That would
| require a bit of configury, likely a new empty
| config/cpu/generic/cpu_defines.h, included by c++config.h (and therefore
| by std_limits.h), and specialized in config/cpu/powerpc/, not a big
| deal, overall.
If PPC claims integer arithmetic does not trap then we do need
*testcases* to go with the patch. The snipped provided in the PR does
not test anything. We do need actual program that tests that the
operations don't trap. With that modification, the patch is OK.
-- Gaby