This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Restrict implementation considered harmful
- From: Diego Novillo <dnovillo at google dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 21 Nov 2008 08:31:18 -0500
- Subject: Re: Restrict implementation considered harmful
- References: <alpine.LNX.2.00.0811211209460.5167@zhemvz.fhfr.qr>
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.