------- Comment #37 from gdr at integrable-solutions dot net  2010-02-21 18:04 
-------
Subject: Re:  numeric_limits<signed>::is_modulo is 
        inconsistent with gcc

On Sun, Feb 21, 2010 at 7:04 AM, rguenth at gcc dot gnu dot org
<gcc-bugzi...@gcc.gnu.org> wrote:

> Or suspend it.  I think this warrants a defect report anyway since I think
> is_modulo was intended to describe CPU behavior as otherwise defining
> signed integer overflow as undefined in one piece of the standard and
> then requiring a sane answer for is_modulo in another part sounds
> like a conflict of interest.

is_modulo is intended to describe the implementation's choice, not necessarily
the CPU behaviour (which the implementation may choose to mask or not.)

The issue here is that GCC does not always deliver the CPU behaviour, so it
is more a problem with GCC than with the standard.

Users who want to make incompatible assumptions about types in the same program
deserve what they get.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22200

Reply via email to