RAD Studio
ContentsIndex
PreviousUpNext
E2471: pragma checkoption failed: options are not as expected

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.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!