This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] C++ patch to build the Java runtime with ENABLE_TREE_CHECKING.
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: [PATCH] C++ patch to build the Java runtime with ENABLE_TREE_CHECKING.
- From: Jason Merrill <jason at redhat dot com>
- Date: 08 Jul 2000 10:08:31 -0700
- Cc: apbianco at redhat dot com, gcc-patches at gcc dot gnu dot org
- References: <200006210515.WAA02159@deliverance.cygnus.com> <20000620222751I.mitchell@codesourcery.com> <14672.22821.427041.156751@deliverance.cygnus.com> <20000621003348X.mitchell@codesourcery.com>
Mark Mitchell <mark@codesourcery.com> writes:
> >>>>> "Alexandre" == Alexandre Petit-Bianco <apbianco@cygnus.com> writes:
>
> >> Do you have a test-case for that problem?
>
> Oh, I see. The computed-goto extension. Another extension that has
> bad C++ semantics: you can't be sure destructors will run when you
> leave a scope, or that the target of the jump will actually have
> everything initialized.
>
> This extension should actually be removed in C++, for these reasons.
> It violates C++'s guarantee that construction and destruction always
> happen.
Seems to me that this is just another instance of undefined behavior;
there are plenty of ways to violate that guarantee within the
standard. Deleting a pointer to the wrong type, for instance.
Do you have a better suggestion for doing insn dispatch in an interpreter?
Jason