Warning about forward declaration of enum types in non-cc65 modes.
This commit is contained in:
parent
8cdffc1944
commit
b2d3b8379c
1 changed files with 9 additions and 0 deletions
|
@ -276,6 +276,15 @@ static void Parse (void)
|
||||||
Entry->Name, Entry->V.BssName);
|
Entry->Name, Entry->V.BssName);
|
||||||
}
|
}
|
||||||
Entry->V.BssName = xstrdup (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");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue