From 58e95206e2a81eaa61361cbfd6699240ffdab91f Mon Sep 17 00:00:00 2001 From: Spoike Date: Mon, 13 Sep 2004 03:14:42 +0000 Subject: [PATCH] Make it do proper warnings. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@199 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/qclib/qcc_pr_lex.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/engine/qclib/qcc_pr_lex.c b/engine/qclib/qcc_pr_lex.c index fcf852bfb..b5f95ad7e 100644 --- a/engine/qclib/qcc_pr_lex.c +++ b/engine/qclib/qcc_pr_lex.c @@ -1565,7 +1565,12 @@ void QCC_PR_ConditionCompilation(void) if (!QCC_PR_SimpleGetToken ()) QCC_PR_ParseError(ERR_NONAME, "No name defined for compiler constant"); - QCC_PR_UndefineName(pr_token); + cnst = Hash_Get(&compconstantstable, pr_token); + if (cnst) + { + Hash_Remove(&compconstantstable, pr_token); + QCC_PR_ParseWarning(WARN_DUPLICATEPRECOMPILER, "Duplicate definition of %s", pr_token); + } cnst = QCC_PR_DefineName(pr_token);