Compiler Warning (level 4) C4918
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Compiler Warning (level 4) C4918

Error Message

'character' : invalid character in pragma optimization list

An unknown character was found in the optimization list of an optimize pragma statement.

For example, the following statement generates C4918:

// C4918.cpp
// compile with: /W4
#pragma optimize("X", on) // C4918 expected
int main()
© 2015 Microsoft