public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "josh at joshtriplett dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/59850] Support sparse-style pointer address spaces (type attributes)
Date: Thu, 03 Jul 2014 20:48:00 -0000	[thread overview]
Message-ID: <bug-59850-4-a3NYbiZprW@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-59850-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59850

--- Comment #27 from Josh Triplett <josh at joshtriplett dot org> ---
(In reply to Tom Tromey from comment #21)
> (In reply to Tom Tromey from comment #20)
> 
> > BTW if you want to try it out I have a branch:
> > https://github.com/tromey/gcc/tree/add-sparse-attributes
> 
> This still needs a bit of work.
> I rebased it to be more patchlike and wrote some ChangeLog
> entries, but I still need to verify that all the behavior
> is correct (I forgot a lot of state...) and also write the
> documentation.
> 
> That said, recently I've been wondering whether this could
> be better done as a plugin.  I started down the road of
> simply patching gcc due, I think, to the designated_init
> attribute, which can't really be done as a plugin.
> But it seems that perhaps noderef/force/address_space could
> be; and perhaps also bitwise and nocast.
> 
> In the "pro" column, as a plugin it could be maintained elsewhere.
> That might be interesting.
> 
> In the "con" column, it's a pain if multiple projects want to
> use these checks.  Then it's just one more thing to fetch.
> 
> I'm curious to hear your thoughts on the subject.

Given the goal of providing compatibility with the existing support in Sparse
(and potentially surpassing it in the future with the benefit of better
analysis and compiler infrastructure backing it up), I strongly feel that this
needs to exist in the default distribution of GCC, invokable without any
barriers beyond an additional warning flag.  (And usually not even that;
anything that only emits warnings on code using an extension attribute should
get turned on by default.)

A plugin shipped with GCC and enabled by default could potentially provide that
benefit as well, but that goes against the only "pro" you listed.  I don't
think maintaining this elsewhere makes sense.  Meanwhile, the "con" you listed
seems far more serious.  I'd like to see all projects currently using Sparse
able to transparently take advantage of this.

Please let me know what I can do to help complete this branch.  I'd be happy to
help write the documentation, for instance.


  parent reply	other threads:[~2014-07-03 20:48 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-17  5:05 [Bug c/59850] New: " hpa at zytor dot com
2014-01-17  8:03 ` [Bug c/59850] " josh at joshtriplett dot org
2014-02-01  5:26 ` tromey at gcc dot gnu.org
2014-02-01 18:39 ` josh at joshtriplett dot org
2014-02-03  8:20 ` tromey at gcc dot gnu.org
2014-02-05 14:45 ` tromey at gcc dot gnu.org
2014-02-05 15:55 ` josh at joshtriplett dot org
2014-02-05 16:50 ` hpa at zytor dot com
2014-02-05 17:51 ` tromey at gcc dot gnu.org
2014-02-05 18:11 ` tromey at gcc dot gnu.org
2014-02-05 20:06 ` josh at joshtriplett dot org
2014-02-05 20:07 ` josh at joshtriplett dot org
2014-02-05 20:08 ` josh at joshtriplett dot org
2014-02-05 20:12 ` tromey at gcc dot gnu.org
2014-02-06  0:08 ` josh at joshtriplett dot org
2014-02-06  4:44 ` hpa at zytor dot com
2014-02-21  3:09 ` tromey at gcc dot gnu.org
2014-02-21  3:37 ` tromey at gcc dot gnu.org
2014-02-21  4:19 ` josh at joshtriplett dot org
2014-02-21 14:58 ` tromey at gcc dot gnu.org
2014-06-27  4:33 ` tromey at gcc dot gnu.org
2014-06-27 11:24 ` manu at gcc dot gnu.org
2014-06-27 14:24 ` manu at gcc dot gnu.org
2014-06-29  2:26 ` tromey at gcc dot gnu.org
2014-07-03 20:36 ` tromey at gcc dot gnu.org
2014-07-03 20:48 ` josh at joshtriplett dot org [this message]
2014-07-03 21:03 ` tromey at gcc dot gnu.org
2014-07-09 14:10 ` tromey at gcc dot gnu.org
2014-07-09 14:31 ` tromey at gcc dot gnu.org
2014-07-30 23:24 ` tromey at gcc dot gnu.org
2014-08-08 16:10 ` tromey at gcc dot gnu.org
2022-09-26 22:47 ` dmalcolm at gcc dot gnu.org
2022-10-03 15:02 ` mpolacek at gcc dot gnu.org
2022-10-03 16:16 ` hpa at zytor dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-59850-4-a3NYbiZprW@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).