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: [RFC] Fixes to bootstrap from a C++ compiler (part 1)


Bernardo Innocenti wrote:

Neato!  Since I've not yet committed my original patch,
how would you like me to change all those xmalloc()+cast's
to use these macros instead?

What I want to do is move the macros xnew, xcnew, xnewvec,
xcnewvec and maybe xobnew from libcpp/internal.h to
include/libiberty.h.

This would bring us one step closer to a natural C++ syntax
for object allocation.

I think that's a great idea, and probably non-controversial, since all the comments thus far have been positive. I think this is a win even if we never do C++ stuff; it's a little simpler than the current explicit casting stuff.


However, the libiberty maintainers generally aren't happy when we make changes there without consulting them, so you should get Ian or DJ to sign off.

If you do that, then your original patch, updated to use these macros, is OK.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


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