- if (!IsVoid (Decl.Type)) {
- if (!IsArray (Decl.Type)) {
- /* Size is unknown and not an array */
- Error (ERR_UNKNOWN_SIZE);
- }
- } else if (ANSI) {
- /* We cannot declare variables of type void */
- Error (ERR_ILLEGAL_TYPE);
- }
+ if (!IsTypeVoid (Decl.Type)) {
+ if (!IsTypeArray (Decl.Type)) {
+ /* Size is unknown and not an array */
+ Error ("Variable `%s' has unknown size", Decl.Ident);
+ }
+ } else if (ANSI) {
+ /* We cannot declare variables of type void */
+ Error ("Illegal type for variable `%s'", Decl.Ident);
+ }