From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8097 invoked by alias); 28 Jun 2005 07:20:50 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 7792 invoked by uid 22791); 28 Jun 2005 07:19:41 -0000 Received: from mtagate2.de.ibm.com (HELO mtagate2.de.ibm.com) (195.212.29.151) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 28 Jun 2005 07:19:41 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate2.de.ibm.com (8.12.10/8.12.10) with ESMTP id j5S7Jcew189470 for ; Tue, 28 Jun 2005 07:19:38 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j5S7Jcqx111270 for ; Tue, 28 Jun 2005 09:19:38 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11/8.13.3) with ESMTP id j5S7JclT005156 for ; Tue, 28 Jun 2005 09:19:38 +0200 Received: from d12ml102.megacenter.de.ibm.com (d12ml102.megacenter.de.ibm.com [9.149.166.138]) by d12av02.megacenter.de.ibm.com (8.12.11/8.12.11) with ESMTP id j5S7JbAD005132; Tue, 28 Jun 2005 09:19:37 +0200 In-Reply-To: <200506280855.03338.stevenb@suse.de> Subject: Re: signed is undefined and has been since 1992 (in GCC) To: Steven Bosscher Cc: gcc@gcc.gnu.org, Gabriel Dos Reis , Andrew Pinski Message-ID: From: Michael Veksler Date: Tue, 28 Jun 2005 07:20:00 -0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-SW-Source: 2005-06/txt/msg01082.txt.bz2 Steven Bosscher wrote on 28/06/2005 09:55:03: > On Tuesday 28 June 2005 07:12, Gabriel Dos Reis wrote: > > For the concrete case at issue, if the hardware I'm writing the C/C++ > > programs for consistently displays modulo arithmetics for signed > > integer type, Andrew can you tell me why GCC should deny me access > > to that functionally where it actually can? > > Because it disallows compiler transformations? E.g. suddenly a > loop with a signed variable as the loop counter may wrap around, > which that means some transformations that are safe now would > no longer be safe. So maybe introduce a -fsigned-wraps flag, that the user can use to make 'int' wrap even in loops. We have -fstrict-aliasing, so why not have -fsigned-wraps for users who want it. This way everybody will be happy (Gaby and Andrew in particular). I don't care either way, as long as numeric_limits is consistent. Michael