This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Do C++ signed types have modulo semantics?
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Michael Veksler <VEKSLER at il dot ibm dot com>
- Cc: Nathan Sidwell <nathan at codesourcery dot com>, gcc mailing list <gcc at gcc dot gnu dot org>, Andrew Pinski <pinskia at physics dot uc dot edu>
- Date: 28 Jun 2005 18:38:22 +0200
- Subject: Re: Do C++ signed types have modulo semantics?
- References: <OFEA870A13.7DE2D1DD-ON4325702E.00578B85-4325702E.0057B902@il.ibm.com>
Michael Veksler <VEKSLER@il.ibm.com> writes:
| Nathan Sidwell <nathan@codesourcery.com> wrote on 28/06/2005 18:48:26:
|
| >
| > why are you talking about one's complement in the context of gcc. From
| > implement-c.texi
| >
| > @cite{Whether signed integer types are represented using sign and
| magnitude,
| > two's complement, or one's complement, and whether the extraordinary
| value
| > is a trap representation or an ordinary value (C99 6.2.6.2).}
| >
| > GCC supports only two's complement integer types, and all bit patterns
| > are ordinary values.
| >
| > please stop considering non 2's complement stuff.
| >
|
| Sorry, did not realize this was documented this way.
| Is "implement-c.texi" part of the user visible documentation, or is it
| targeted for gcc developers?
It is targted at the user audience.
An issue I raised earlier -- that still remains -- is how, pratically,
that differs from the modulo semantics and the loop optimizer is not
willing to make under some circumstances.
-- Gaby