1
0
Fork 0
forked from fte/fteqw

Fix for erroneous warning messages when definining compiler constants.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1498 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-10-17 17:17:20 +00:00
parent 9ca5cce92a
commit 27044fbbcb

View file

@ -1901,10 +1901,14 @@ void QCC_PR_ConditionCompilation(void)
if (strlen(cnst->value) >= sizeof(cnst->value)) //this is too late.
QCC_PR_ParseError(ERR_CONSTANTTOOLONG, "Macro %s too long (%i not %i)", cnst->name, strlen(cnst->value), sizeof(cnst->value));
if (oldval && strcmp(oldval, cnst->value))
if (oldval)
{ //we always warn if it was already defined
//we use different warning codes so that -Wno-mundane can be used to ignore identical redefinitions.
if (strcmp(oldval, cnst->value))
QCC_PR_ParseWarning(WARN_DUPLICATEPRECOMPILER, "Alternate precompiler definition of %s", pr_token);
else
QCC_PR_ParseWarning(WARN_IDENTICALPRECOMPILER, "Identical precompiler definition of %s", pr_token);
}
}
int QCC_PR_CheakCompConst(void)