E2471 #pragma checkoption failed: options are not as expected (C++)

From RAD Studio
Jump to: navigation, search

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

You can use #pragma checkoption to check that certain switches are in the state that you expect. If #pragma checkoption detects that a switch is not in the expected state, the compiler displays this error.

You can use the following syntax:

#pragma checkoption <options>

For example:

#pragma checkoption -O2

OR

#pragma checkoption -C -O2

The compiler will check if the option(s) are turned on. If all are turned on, nothing happens. If at least one is not turned on, this error is displayed.