Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 742 Bytes

compiler-warning-level-1-c4393.md

File metadata and controls

24 lines (20 loc) · 742 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 1) C4393
Compiler Warning (level 1) C4393
11/04/2016
C4393
C4393
353a0539-d1ea-4c1b-8849-c9b321ec9842

Compiler Warning (level 1) C4393

'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
};