This is the mail archive of the gcc-patches@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: Aliasing 'this' in a C++ constructor


On 05/18/2018 09:21 AM, Marc Glisse wrote:

what about comparisons to this?  I thought restrict implied such a comparison was 'never the same'?

ie. if the ctor was:
 selfie (selfie *ptr) : me (ptr==this ? 0 : ptr) {}

It is tempting to think so, but I don't see any language to that effect.

Ok then, thanks for the explanations.

nathan

--
Nathan Sidwell


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