]> git.draconx.ca Git - cdecl99.git/blobdiff - src/parse.y
libcdecl: Move another error message into the string table.
[cdecl99.git] / src / parse.y
index 03fa1395a6df02fa27f7ec864998c6251c143388..6d349f79ef1bc8537280c92066a349f0429ff20f 100644 (file)
 #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.
  *
@@ -593,8 +588,10 @@ english_array: T_VLA T_ARRAY english_vla T_OF {
 
 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 | {