Use pragma deprecated message in error 4:

```pawn
#pragma deprecated - use "Test2".
forward Test();

stock Test2() { }

main()
{
	Test();
}
```
This commit is contained in:
Y_Less 2020-03-27 14:33:25 +00:00
parent 2ae2141afe
commit 06183b37ae
3 changed files with 7 additions and 4 deletions

View File

@ -5010,8 +5010,9 @@ static void destructsymbols(symbol *root,int level)
if ((opsym->usage & uMISSING)!=0 || (opsym->usage & uPROTOTYPED)==0) {
char symname[2*sNAMEMAX+16]; /* allow space for user defined operators */
funcdisplayname(symname,opsym->name);
char *ptr= (sym->documentation!=NULL) ? sym->documentation : "";
if ((opsym->usage & uMISSING)!=0)
error(4,symname); /* function not defined */
error(4,symname,ptr); /* function not defined */
if ((opsym->usage & uPROTOTYPED)==0)
error(71,symname); /* operator must be declared before use */
} /* if */

View File

@ -195,8 +195,9 @@ static void (*unopers[])(void) = { lneg, neg, user_inc, user_dec };
if ((sym->usage & uMISSING)!=0 || (sym->usage & uPROTOTYPED)==0) {
char symname[2*sNAMEMAX+16]; /* allow space for user defined operators */
funcdisplayname(symname,sym->name);
char *ptr= (sym->documentation!=NULL) ? sym->documentation : "";
if ((sym->usage & uMISSING)!=0)
error(4,symname); /* function not defined */
error(4,symname,ptr); /* function not defined */
if ((sym->usage & uPROTOTYPED)==0)
error(71,symname); /* operator must be declared before use */
} /* if */
@ -1880,7 +1881,8 @@ restart:
} else if ((sym->usage & uMISSING)!=0) {
char symname[2*sNAMEMAX+16]; /* allow space for user defined operators */
funcdisplayname(symname,sym->name);
error(4,symname); /* function not defined */
char *ptr= (sym->documentation!=NULL) ? sym->documentation : "";
error(4,symname,ptr); /* function not defined */
} /* if */
callfunction(sym,lval1,TRUE);
return FALSE; /* result of function call is no lvalue */

View File

@ -43,7 +43,7 @@ static char *errmsg[] = {
/*001*/ "expected token: \"%s\", but found \"%s\"\n",
/*002*/ "only a single statement (or expression) can follow each \"case\"\n",
/*003*/ "declaration of a local variable must appear in a compound block\n",
/*004*/ "function \"%s\" is not implemented\n",
/*004*/ "function \"%s\" is not implemented %s\n",
/*005*/ "function may not have arguments\n",
/*006*/ "must be assigned to an array\n",
/*007*/ "operator cannot be redefined\n",