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 and char pointers


On Wed, 2005-05-04 at 20:41 -0400, Diego Novillo wrote:
> On Wed, May 04, 2005 at 05:08:23PM -0700, James E Wilson wrote:
> 
> > We can perhaps handle this well in the tree-aliasing code (if
> > it handled restrict at all), but it would be difficult to
> > handle this well in the RTL aliasing code.
> >
> It doesn't.  Mostly for similar reasons.
> 
> Perhaps we could be more aggressive with the new aliasing changes
> coming down the line, but it's certainly no
> trivial to take
> advantage of restrict.  A shame, really.

You can do it, but apparently restrict isn't as simple as "a and b are
both restrict pointers and therefore can never alias", because that's
not the actual definition of restrict.
It says stuff about pointers "based on" restricted objects, etc.

Joseph Myers has shown some very weird but legal things you can do with
restrict that make it all but pointless to try to handle, at least for
the non function argument case.


> 
> 
> Diego.


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