Issue errors if array dimensions are negative or too large to fit in 32 bits.

This commit is contained in:
Matt Pharr
2011-12-14 15:39:12 -08:00
parent 1fa6520cb6
commit 17fdab2793
3 changed files with 49 additions and 13 deletions

View File

@@ -0,0 +1,7 @@
// Array dimension must be representable with a 32-bit integer.
struct foo {
int x[0xffffffffffff];
};

View File

@@ -0,0 +1,7 @@
// Array dimension must be non-negative
struct foo {
int x[-1];
};