From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30007 invoked by alias); 15 Jul 2005 10:26:57 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 29957 invoked by alias); 15 Jul 2005 10:26:52 -0000 Date: Fri, 15 Jul 2005 10:35:00 -0000 Message-ID: <20050715102652.29956.qmail@sourceware.org> From: "gdr at integrable-solutions dot net" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050714131031.22485.mattias@virtutech.se> References: <20050714131031.22485.mattias@virtutech.se> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/22485] pointer +- integer is never NULL X-Bugzilla-Reason: CC X-SW-Source: 2005-07/txt/msg01879.txt.bz2 List-Id: ------- Additional Comments From gdr at integrable-solutions dot net 2005-07-15 10:26 ------- Subject: Re: pointer +- integer is never NULL "mattias at virtutech dot se" writes: | ------- Additional Comments From mattias at virtutech dot se 2005-07-15 09:12 ------- | It could be made an option so the user can tell GCC whether to make | standard-conforming code go as fast as possible or if arithmetic on null | pointers (as a gcc extension, say) is needed. -fnull-pointer-arith? | | (In reply to comment #13) | > Scanning a region of memory starting from zero, is not | > exactly the kind of thing never done in practice. | | True, but that sort of code is already in danger, since GCC assumes that in | | x = *p; | if (!p) shout(); | | the condition is never true (even if it is possible to read from location 0). True but that is not the kind of codes I'm talking about. -- Gaby -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22485