OAR

RTEMS GNU Tools On-Line Library


Destructors and Goto

PREV UP NEXT Bookshelf Using and Porting the GNU Compiler Collection (GCC)

5.3: goto and Destructors in GNU C++

In C++ programs, you can safely use the goto statement. When you use it to exit a block which contains aggregates requiring destructors, the destructors will run before the goto transfers control.

The compiler still forbids using goto to enter a scope that requires constructors.


PREV UP NEXT Bookshelf Using and Porting the GNU Compiler Collection (GCC)

Packaging copyright © 1988-2000 OAR Corporation
Context copyright by each document's author. See Free Software Foundation for information.