[C++ PATCH] Enforce extern "Java" aggregates to be heap allocated (PR c++/30293, c++/30294)

Mark Mitchell mark@codesourcery.com
Fri Nov 23 23:40:00 GMT 2007


Jakub Jelinek wrote:

>> This looks OK, but I've picked some nits.  I'd also like one of the Java
>> maintainers to sign off on the concept, just to be sure that we don't
>> break Java CNI code in the field.
> 
> Already got one from Andrew Haley.
> http://gcc.gnu.org/ml/gcc-patches/2007-11/msg01155.html

Thanks; sorry I missed that.

> Yeah, placement new might allocate on the heap, but libjava doesn't care as
> much if it was heap allocated or not, but if it was allocated by libjava
> itself as a Java object, which is something non-placement new code in
> build_new_1 takes care of.

Thanks for the explanation.  The patch is OK, then.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list