Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

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()
{
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.