[Bug c/59850] Support sparse-style pointer address spaces (type attributes)

tromey at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 21 14:58:00 GMT 2014


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

--- Comment #20 from Tom Tromey <tromey at gcc dot gnu.org> ---
(In reply to Josh Triplett from comment #19)

> I brought this exact case up on linux-sparse, and Christopher Li's (quite
> reasonable) perspective was that it doesn't really make sense to put "force"
> on a variable to begin with (as opposed to a function parameter).  Given
> that, I think one of two behaviors would be reasonable: either prohibit
> force entirely on non-parameter variable declarations, or allow it and treat
> it much like parameters (ignore extended type differences on assignment). 
> I'm mildly inclined towards the latter.
> 
> I don't, however, think it's sensible to reproduce sparse's behavior
> entirely here, allowing it but not having it take effect.  Either prohibit
> it or give it a sensible semantic, preferably the latter.

Allowing it is definitely simpler to implement.
Disallowing it for ordinary declarations would need some research
on my part.
BTW if you want to try it out I have a branch:
https://github.com/tromey/gcc/tree/add-sparse-attributes



More information about the Gcc-bugs mailing list