From 1ff329062f91c5d40a8be4dd6ffe61b756a6b08d Mon Sep 17 00:00:00 2001 From: Spoike Date: Thu, 16 Jul 2020 19:23:00 +0000 Subject: [PATCH] Fix 'enum int {};' syntax. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5732 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/qclib/qcc_pr_comp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/engine/qclib/qcc_pr_comp.c b/engine/qclib/qcc_pr_comp.c index 3b0f6760c..c270daf3e 100644 --- a/engine/qclib/qcc_pr_comp.c +++ b/engine/qclib/qcc_pr_comp.c @@ -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