Fix 'enum int {};' syntax.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5732 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2020-07-16 19:23:00 +00:00
parent bd29617dce
commit 1ff329062f

View file

@ -15842,9 +15842,13 @@ QCC_type_t *QCC_PR_ParseEnum(pbool flags)
strictenum = QCC_PR_CheckName("class"); //c++11 style
type = QCC_PR_ParseType(false, true); //legacy behaviour
if (!type)
if (type)
{
QCC_PR_ParseWarning(WARN_DEPRECACTEDSYNTAX, "legacy enum base type. Use \"enum [class] [name_e]:type\" instead\n");
basetype = type;
}
else
{
basetype = (flag_assume_integer?type_integer:type_float);
if (pr_token_type == tt_name)
name = QCC_PR_ParseName();
else