This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Restrict implementation considered harmful


On Fri, Nov 21, 2008 at 06:21, Richard Guenther <rguenther@suse.de> wrote:

> I think the only reasonable thing to do is to rip out the broken
> restrict pointer handling completely.
>
> Any better ideas?

I will assume that this program is valid.  I am not familiar enough
with the restrict definition, but ISTM that if __restrict implies a
contract not to make the pointers conflict, then this program is
obviously violating it.

Having said that, relying on restrict based purely on the DECLs does
seem like a bad idea.  What if we encoded restrict in the SSA names
themselves?  PTA could flip a bit specifying whether get_alias_set can
rely on restrict or not.  Though that seems a bit kludgy.


Diego.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]