From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4692 invoked by alias); 5 Feb 2014 20:07:56 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 4607 invoked by uid 48); 5 Feb 2014 20:07:53 -0000 From: "josh at joshtriplett dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/59850] Support sparse-style pointer address spaces (type attributes) Date: Wed, 05 Feb 2014 20:07:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: josh at joshtriplett dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-02/txt/msg00502.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59850 --- Comment #12 from Josh Triplett --- (In reply to Tom Tromey from comment #9) > (In reply to Josh Triplett from comment #7) > > > I can't think of a legitimate reason to have a null pointer constant in a > > non-zero address space; there's already a null pointer constant, NULL, > > effectively in all address spaces, so why would you want to redefine it? > > > That isn't a null pointer constant, since it isn't (void *); it can't be > > converted to any other pointer type without warning, and I don't think it's > > unreasonable to say it can't be converted to any other address space without > > warning either. > > Thanks. While the one case did seem borderline to me, overall my > concern is really about trying to understand all the cases, so I can > document the feature nicely. For the documentation, I'd suggest making it very clear that the magic "works in all addresss spaces" behavior applies only to NULL ((void *)0), not to any arbitrary pointer with the value 0.