The "array length must be positive" error message seems to have been
missed when all the error messages were combined, so let's move it
in now for a modest size reduction.
&CDECL__EDECLTYPE mixing type names and declarations is not allowed
&CDECL__ERANGE integer constant out of range
&CDECL__EBADINT invalid integer constant
+&CDECL__EZEROARRAY array length must be positive
#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 | {