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 2) C4309
Collapse the table of content
Expand the table of content

Compiler Warning (level 2) C4309

Error Message

'conversion' : truncation of constant value

The type conversion causes a constant to exceed the space allocated for it. You may need to use a larger type for the constant.

The following sample generates C4309:

// C4309.cpp
// compile with: /W2
int main()
{
   char c = 128;   // C4309
}

Community Additions

ADD
Show:
© 2015 Microsoft