1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-23 04:30:10 +00:00

Warning about forward declaration of enum types in non-cc65 modes.

This commit is contained in:
acqn 2020-08-03 01:38:54 +08:00 committed by Oliver Schmidt
parent 8cdffc1944
commit b2d3b8379c

View File

@ -276,6 +276,15 @@ static void Parse (void)
Entry->Name, Entry->V.BssName);
}
Entry->V.BssName = xstrdup (bssName);
/* Check for enum forward declaration.
** Warn about it when extensions are not allowed.
*/
if (Size == 0 && IsTypeEnum (Decl.Type)) {
if (IS_Get (&Standard) != STD_CC65) {
Warning ("ISO C forbids forward references to 'enum' types");
}
}
}
}