[Issue 4623] Non-integer type allowed as static array size
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Sep 29 17:39:31 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4623
--- Comment #3 from Iain Buclaw <ibuclaw at ubuntu.com> 2010-09-29 17:39:15 PDT ---
You can catch it in parse.c
@@ -2428,6 +2428,12 @@
{
//printf("it's type[expression]\n");
inBrackets++;
+
+ if (token.value != TOKint32v && token.value != TOKuns32v &&
+ token.value != TOKint64v && token.value != TOKuns64v &&
+ peekNext() == TOKrbracket)
+ error("I should be a an integral value, not [%s]",
token.toChars());
+
Expression *e = parseAssignExp(); // [
expression ]
if (token.value == TOKslice)
{
I certainly don't mind either way. Your patch works just great, thanks!
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list