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: [C++ PATCH] Fix placement new if operator new has 2nd argument REFERENCE_TYPE (PR c++/34862)


It seems to me that this (and Ian's original patch) are approaching this problem the wrong way: we shouldn't be trying to guess whether a pointer is changing type based on the form of the call to new; this won't handle a user-defined placement new, or a user-defined override of the non-placement operator new which always returns the same pointer. Can't we attach the CHANGE_DYNAMIC_TYPE_EXPR to the value returned from operator new, rather than mess with the arguments?

Jason


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