Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Warning (level 1) C4393
Collapse the table of content
Expand the table of content

Compiler Warning (level 1) C4393

Error Message

'var' : const has no effect on literal data member; ignored

A literal data member was also specified as const. Since a literal data member implies const, you do not need to add const to the declaration.

The following sample generates C4393:

// C4393.cpp
// compile with: /clr /W1 /c
ref struct Y1 {
   literal const int staticConst = 10;   // C4393
   literal int staticConst2 = 10;   // OK
};

Community Additions

ADD
Show:
© 2015 Microsoft