qcc: Avoid crashing from trying to warn about uninlinable inlines.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5747 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
0c0b6c3ed0
commit
da6b6c3e6c
2 changed files with 5 additions and 3 deletions
|
@ -5811,7 +5811,7 @@ static QCC_sref_t QCC_PR_Inline(QCC_sref_t fdef, QCC_ref_t **arglist, unsigned i
|
|||
//make sure that its a function type and that there's no special weirdness
|
||||
if (!eval || eval->function < 0 || argcount > 8 || eval->function >= numfunctions || fdef.sym->arraysize != 0 || fdef.cast->type != ev_function || argcount != fdef.cast->num_parms || fdef.cast->vargs || fdef.cast->vargcount)
|
||||
{
|
||||
QCC_PR_ParseWarning(0, "Couldn't inline \"%s\": %s", ctx.func->name, "inconsistent context");
|
||||
QCC_PR_ParseWarning(0, "Couldn't inline \"%s\": %s", fdef.sym->name, "inconsistent context");
|
||||
return nullsref;
|
||||
}
|
||||
ctx.func = &functions[eval->function];
|
||||
|
@ -5828,6 +5828,7 @@ static QCC_sref_t QCC_PR_Inline(QCC_sref_t fdef, QCC_ref_t **arglist, unsigned i
|
|||
}
|
||||
ctx.fdef = fdef.sym;
|
||||
ctx.result = nullsref;
|
||||
ctx.error = NULL;
|
||||
if ((int)ctx.func->code <= 0)
|
||||
{
|
||||
char *fname = ctx.func->name;
|
||||
|
@ -15945,7 +15946,7 @@ QCC_type_t *QCC_PR_ParseEnum(pbool flags)
|
|||
type = QCC_PR_ParseType(false, true); //legacy behaviour
|
||||
if (type)
|
||||
{
|
||||
QCC_PR_ParseWarning(WARN_DEPRECACTEDSYNTAX, "legacy enum base type. Use \"enum [class] [name_e]:type\" instead\n");
|
||||
QCC_PR_ParseWarning(WARN_DEPRECACTEDSYNTAX, "legacy enum base type. Use \"enum [class] [name_e]:type\" instead");
|
||||
basetype = type;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -226,6 +226,7 @@ struct {
|
|||
{" F325", WARN_NESTEDCOMMENT},
|
||||
{" F326", WARN_DEPRECATEDVARIABLE},
|
||||
{" F327", WARN_ENUMFLAGS_NOTINTEGER},
|
||||
{" F328", WARN_DEPRECACTEDSYNTAX},
|
||||
|
||||
{" F207", WARN_NOTREFERENCEDFIELD},
|
||||
{" F208", WARN_NOTREFERENCEDCONST},
|
||||
|
@ -4610,7 +4611,7 @@ static void QCC_SetDefaultProperties (void)
|
|||
targ = QCF_DARKPLACES;
|
||||
else
|
||||
targ = QCF_STANDARD;
|
||||
QCC_OPCodeSetTarget(targ, 0x7fffffff);
|
||||
QCC_OPCodeSetTarget(targ, 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue