Fix incorrect error line show for incorrect return value on forwards (bug 6226).

This commit is contained in:
Nicholas Hastings 2015-01-28 09:51:02 -08:00
parent b3bb37323d
commit d9ce8249cb

View File

@ -5534,7 +5534,7 @@ static int newfunc(declinfo_t *decl, const int *thistag, int fpublic, int fstati
// Check that return tags match. // Check that return tags match.
if ((sym->usage & uPROTOTYPED) && !compare_tag(sym->tag, decl->type.tag)) { if ((sym->usage & uPROTOTYPED) && !compare_tag(sym->tag, decl->type.tag)) {
int old_fline = fline; int old_fline = fline;
fline = sym->lnumber; fline = funcline;
error(25); error(25);
fline = old_fline; fline = old_fline;
} }