W8097 Not all options can be restored at this time (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Compiler Errors And Warnings (C++) Index

Your program has a #pragma pop at a place where it can't restore options.

For example:

#pragma option push -v
int main()
{
  int i;
  i = 1;
#pragma option pop
  return i;
}

For this example, compile with -v-. The message happens because the first #pragma causes debug info to change state (turns it on). Then, in the middle of the function where it is useless to toggle the debug info state, the #pragma pop attempts to return to the former state.