This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Emit DECL_EXPR for vla_p new operator (PR c++/39367)
Jason Merrill wrote:
> Hmm...I wonder why we're messing with a VLA type at all here. Given new
> T[n], why is it important to say that the allocation returns T(*)[n]
> rather than T*?
I agree that this seems like overkill.
Certainly from a C++ type point of view, "new int[n]" has type "int *";
thus what we're doing seems like it could potentially even yield
incorrect information for typeid, throwing exceptions, etc. I don't
know if we correct that at some later point.
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713