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

Compiler Warning (level 2) C4308

Error Message

negative integral constant converted to unsigned type

An expression converts a negative integer constant to an unsigned type. The result of the expression is probably meaningless.

Example

// C4308.cpp
// compile with: /W2
unsigned int u = (-5 + 3U);   // C4308

int main()
{
}

Community Additions

ADD
Show:
© 2015 Microsoft