Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 3 Jan 2002 10:47:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 3 Jan 2002 10:47:42 -0500 Received: from sproxy.gmx.de ([213.165.64.20]:21030 "HELO mail.gmx.net") by vger.kernel.org with SMTP id ; Thu, 3 Jan 2002 10:47:17 -0500 Message-ID: <3C347CC3.E7154C36@gmx.de> Date: Thu, 03 Jan 2002 16:46:11 +0100 From: Edgar Toernig MIME-Version: 1.0 To: David Woodhouse CC: Alan Cox , linux-kernel@vger.kernel.org, linuxppc-dev@lists.linuxppc.org Subject: Re: [PATCH] C undefined behavior fix In-Reply-To: <25193.1010018130@redhat.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org David Woodhouse wrote: > > What part of 'undefined behaviour' is so difficult for people to understand? The behaviour is undefined by the C standard. But the mentioned pointer arithmetic is defined in the environment where it has been used. GCC tries to optimize undefined C-standard behaviour. And IMHO that's the point. It may optimize defined behaviour and should not touch things undefined by the standard. Ciao, ET. PS: Hey, we are talking about C, the de luxe assembler! *g* - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/