Fixed diagnostic messages on enumerator overflow.
An enumerator that would be incremented greater than ULONG_MAX now causes an error.
This commit is contained in:
9
test/err/bug1890.c
Normal file
9
test/err/bug1890.c
Normal file
@@ -0,0 +1,9 @@
|
||||
/* bug #1890 - Overflow in enumerator value is not detected */
|
||||
|
||||
#include <limits.h>
|
||||
enum { a = ULONG_MAX, b } c = b;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user