Compiler Warning (level 1 and level 4) C4949
TOC
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 1 and level 4) C4949

Error Message

pragmas 'managed' and 'unmanaged' are meaningful only when compiled with '/clr[:option]'

The compiler ignores the managed and unmanaged pragmas if the source code is not compiled with /clr. This warning is informational.

The following sample generates C4949:

// C4949.cpp
// compile with: /LD /W1
#pragma managed   // C4949

When #pragma unmanaged is used without /clr, C4949 is a level 4 warning.

The following sample generates C4949:

// C4949b.cpp
// compile with: /LD /W4
#pragma unmanaged   // C4949
Show:
© 2016 Microsoft