This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Enforce extern "Java" aggregates to be heap allocated (PR c++/30293, c++/30294)
- From: Andrew Haley <aph at redhat dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Jason Merrill <jason at redhat dot com>, Tom Tromey <tromey at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sat, 24 Nov 2007 10:06:37 +0000
- Subject: Re: [C++ PATCH] Enforce extern "Java" aggregates to be heap allocated (PR c++/30293, c++/30294)
- References: <20071122125107.GX5451@devserv.devel.redhat.com> <474720A0.3050102@codesourcery.com>
Mark Mitchell writes:
> Jakub Jelinek wrote:
>
> > All of the listed attributes are also true of C++, though C++ has
> > extra features (for example in C++ objects may be allocated not just
> > on the heap, but also statically or in a local stack frame).
>
> 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.
As far as I'm aware, it only makes any sense to create instances of
Java classes on the heap. I have difficulty figuring out any
circumstances where not to do so would not be an error.
Andrew.
--
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903