This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: signed is undefined and has been since 1992 (in GCC)
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Falk Hueffner <falk at debian dot org>
- Cc: Michael Veksler <VEKSLER at il dot ibm dot com>, Steven Bosscher <stevenb at suse dot de>, gcc at gcc dot gnu dot org, Andrew Pinski <pinskia at physics dot uc dot edu>
- Date: 28 Jun 2005 14:06:27 +0200
- Subject: Re: signed is undefined and has been since 1992 (in GCC)
- References: <OF9AB81CC4.84EA88AC-ON4325702E.0027B9C9-4325702E.00283ECC@il.ibm.com><87r7enq6b6.fsf@debian.org>
Falk Hueffner <falk@debian.org> writes:
| Michael Veksler <VEKSLER@il.ibm.com> writes:
|
| > So maybe introduce a -fsigned-wraps flag, that the user can use
| > to make 'int' wrap even in loops.
|
| We have that already, it's called "-fwrapv".
In the case of C++, it leads to ODR violation because of the presence
of numeric_limits<T>::is_modulo -- assuming you make GCC's behaviour
consistent.
-- Gaby