Consider the following scenario:
- You create a C++/CLI project by using Microsoft Visual Studio 2005 Service Pack 1 (SP1).
- The source code in the project executes a throw statement or a _declspec(noreturn) function. The code that is executed after the statement or the _declspec(noreturn) function is run frequently.
- You build the project with an optimization compiler option enabled. For example, you enable the Maximize Speed (/O2) optimization compiler option. An application is generated after you build the project.
- An exception is thrown or the _declspec(noreturn) function is executed when you run the application.