Visual C++ Compiler Warning C4188

Message Text

constant expression is not integral


This is a level 1 warning.


Despite the seemingly general applicability of the message text, this warning looks to be particular to #pragma implementation_key. Specifically, the pragma is given as

#pragma implementation_key ( key )

where the one token given as the argument is a constant, as expected, but is not an integral type. For example,

#pragma implementation_key (1.0)        // C4188

The compiler proceeds with key defaulted to zero.

Documentation Status

Since #pragma implementation_key isn’t documented, it is no great surprise that this warning isn’t either.