Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Compiler Warning (level 1) C4532

Error Message

'continue' : jump out of __finally/finally block has undefined behavior during termination handling

The compiler encountered one of the following keywords:

causing a jump out of a __finally or finally block during abnormal termination.

If an exception occurs, and while the stack is being unwound during execution of the termination handlers (the __finally or finally blocks), and your code jumps out of a __finally block before the __finally block ends, the behavior is undefined. Control may not return to the unwinding code, so the exception may not be handled properly.

If you must jump out of a __finally block, check for abnormal termination first.

The following sample generates C4532; simply comment out the jump statements to resolve the warnings.

// C4532.cpp
// compile with: /W1
// C4532 expected
int main() {
   int i;
   for (i = 0; i < 10; i++) {
      __try {
      } __finally {
         // Delete the following line to resolve.

      __try {
      } __finally {
         // Delete the following line to resolve.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.