Visual C++ Compiler Warning C4684

Message Text

'attribute' : WARNING!! attribute may cause invalid code generation: use with caution


This is a level 1 warning.


If only in version 13.00.9466, the attribute is necessarily no_injected_text. All syntactically acceptable use of this attribute causes this warning.

The product documentation says that the cause of this warning is “you used an attribute that should not commonly be used.” That may be so, but the admonition seems a little strong given that the obviously most common use of the no_injected_text attribute is in part the compiler’s own doing: every merged injected text file that the compiler creates because of the /Fx option contains a compiler-generated fragment that uses the no_injected_text attribute.