#include "cdecl-internal.h"
#include "errmsg.h"
-#define FAIL(msg) do { \
- yyerror(&yylloc, NULL, NULL, msg); \
- YYERROR; \
-} while (0)
-
/*
* Allocate a parse tree node via cdecl__alloc_item.
*
array_length: { $$ = 0; }
array_length: T_UINT {
- if (!($$ = $1))
- FAIL(_("array length must be positive"));
+ if (!($$ = $1)) {
+ cdecl__errmsg(CDECL__EZEROARRAY);
+ YYERROR;
+ }
}
english_vla: T_IDENT | {