[Bug c/59850] Support sparse-style pointer address spaces (type attributes)
josh at joshtriplett dot org
gcc-bugzilla@gcc.gnu.org
Fri Feb 21 04:19:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59850
--- Comment #19 from Josh Triplett <josh at joshtriplett dot org> ---
(In reply to Tom Tromey from comment #18)
> (In reply to Tom Tromey from comment #17)
> > It seems that "force" works on function parameters and casts
> > but not direct assignments:
>
> It's also an error in conditional expressions and in a "return".
>
> I can implement this exactly but I'm curious whether it is intended.
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.
More information about the Gcc-bugs
mailing list