rjmccall added a comment.

> In addition to the ABI compatibility concern, IMO, GCC's behavior here is 
> better and more user friendly:
>
> - C++ classes have methods
> - calling a method on a field takes the address of a field

I mean, this argument is hardly limited to non-POD types.  I suppose you could 
argue that with trivially-copyable types, you could at least copy the object 
somewhere else before calling the method.  But then the condition ought to be 
"has a trivial, non-deleted copy/move constructor" rather than "POD for the 
purposes of the ABI."

Well, anyway, as always, GCC is entitled to set the ABI for the platforms on 
which it is the system compiler.  I assume the POD definition actually comes 
from C++03 and not C++98, in which IIRC member pointers were non-trivial.  
Darwin will opt out, yes, and I think we should assume that PS4 will as well.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117616/new/

https://reviews.llvm.org/D117616

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to