From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9799 invoked by alias); 28 Jun 2005 04:50:31 -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 9749 invoked by uid 22791); 28 Jun 2005 04:50:24 -0000 Received: from mail-out3.fuse.net (HELO smtp3.fuse.net) (216.68.8.176) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 28 Jun 2005 04:50:24 +0000 Received: from gx4.fuse.net ([216.68.17.142]) by smtp3.fuse.net (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20050628045022.KEL344.smtp3.fuse.net@gx4.fuse.net> for ; Tue, 28 Jun 2005 00:50:22 -0400 Received: from dellpi.pinski.fam ([216.68.17.142]) by gx4.fuse.net (InterMail vG.1.02.00.02 201-2136-104-102-20041210) with ESMTP id <20050628045022.STPO12227.gx4.fuse.net@dellpi.pinski.fam>; Tue, 28 Jun 2005 00:50:22 -0400 Received: from [10.0.0.80] (zhivago.i.pinski.fam [10.0.0.80]) by dellpi.pinski.fam (8.12.2/8.12.1) with ESMTP id j5S4oGQi004661; Tue, 28 Jun 2005 00:50:18 -0400 (EDT) In-Reply-To: References: <27fdc0d8dc588cfdb3a14a153c5d037c@physics.uc.edu> Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <6d9fa260f233e519762c7d11276a35ad@physics.uc.edu> Content-Transfer-Encoding: 7bit Cc: gcc mailing list From: Andrew Pinski Subject: Re: signed is undefined and has been since 1992 (in GCC) Date: Tue, 28 Jun 2005 04:50:00 -0000 To: Gabriel Dos Reis X-SW-Source: 2005-06/txt/msg01077.txt.bz2 On Jun 28, 2005, at 12:34 AM, Gabriel Dos Reis wrote: > The attitude that "undefined behaviour" should be interpreted > as "we should not make things more useful when we can" is beyond > understanding. Then C/C++ aliasing rules go out the window really or maybe I misunderstand what you are trying to say? And what about casting functions to a different function type and calling that, we just declared it as calling a trap in the last couple of years. That is not very useful really. What about var_args with shorts, that is not useful but since it is undefined, we just call trap on it. Or even sequence points, we get less of those bugs than C/C++ aliasing rules violation but still get some even with documenting they are undefined and change with optimizations. The list can go on, with the current undefined behavior we have changed in the recent years, past 5 years. Part of C++ aliasing rules were not implemented until at least 3.3 which was only 2 years ago. -- Pinski