From a3cfa83e6b354c0dc35e1e078c72b7c7298bfd24 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Fri, 26 Sep 2008 21:08:42 +0100 Subject: [PATCH] Disallow old style array declarations in Delight --- dmd/parse.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dmd/parse.c b/dmd/parse.c index 5b0c407..791b486 100644 --- a/dmd/parse.c +++ b/dmd/parse.c @@ -1988,6 +1988,9 @@ Type *Parser::parseDeclarator(Type *t, Identifier **pident, TemplateParameters * #if CARRAYDECL case TOKlbracket: { // This is the old C-style post [] syntax. + if (dltSyntax) + error("use 'type[] var', not 'type var[]'"); + nextToken(); if (token.value == TOKrbracket) { -- 2.11.4.GIT