C++ Logo


Advanced search

Subject: Re: [isocpp-parallel] (SC22WG14.16350) Rough notes from SC22 WG21 SG14 meeting on pointer lifetime-end zap
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2019-05-04 06:11:39

> My conjecture (real information welcome!) is that current compilers tend
> to conflate compiler optimization facts like "*a aliases *b" or "a and b
> point to the same thing" with the result of the expression "a == b". The
> current standard sanctions this, but fundamentally they're not the same.
> When the compiler asks aliasing questions, it generally wants to know
> whether an update through one pointer could affect the value pointed to
> by the other. It doesn't care what answer it gets if either side cannot
> be safely dereferenced. We now have lots of examples where user code
> does care about that case.

I find this a very helpful conjecture which does appear to fit
observations. It would be useful if the clang devs could confirm or deny it.


SG14 list run by sg14-owner@lists.isocpp.org

Older Archives on Google Groups