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]

Re: [PATCH] C++ patch to build the Java runtime with ENABLE_TREE_CHECKING.


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

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