Merge branch 'Branch_e74b8bb2' into dev
This commit is contained in:
commit
4f82dc953f
@ -5370,9 +5370,10 @@ static void destructsymbols(symbol *root,int level)
|
||||
if ((opsym=findglb(symbolname,sGLOBAL))!=NULL) {
|
||||
if ((opsym->usage & uMISSING)!=0 || (opsym->usage & uPROTOTYPED)==0) {
|
||||
char symname[2*sNAMEMAX+16]; /* allow space for user defined operators */
|
||||
char *ptr= (sym->documentation!=NULL) ? sym->documentation : "";
|
||||
funcdisplayname(symname,opsym->name);
|
||||
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 */
|
||||
|
@ -200,9 +200,10 @@ static void (*unopers[])(void) = { lneg, neg, user_inc, user_dec };
|
||||
/* check existence and the proper declaration of this function */
|
||||
if ((sym->usage & uMISSING)!=0 || (sym->usage & uPROTOTYPED)==0) {
|
||||
char symname[2*sNAMEMAX+16]; /* allow space for user defined operators */
|
||||
char *ptr= (sym->documentation!=NULL) ? sym->documentation : "";
|
||||
funcdisplayname(symname,sym->name);
|
||||
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 */
|
||||
@ -1979,8 +1980,9 @@ restart:
|
||||
} /* if */
|
||||
} else if ((sym->usage & uMISSING)!=0) {
|
||||
char symname[2*sNAMEMAX+16]; /* allow space for user defined operators */
|
||||
char *ptr= (sym->documentation!=NULL) ? sym->documentation : "";
|
||||
funcdisplayname(symname,sym->name);
|
||||
error(4,symname); /* function not defined */
|
||||
error(4,symname,ptr); /* function not defined */
|
||||
} /* if */
|
||||
callfunction(sym,lval1,TRUE);
|
||||
return FALSE; /* result of function call is no lvalue */
|
||||
|
@ -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",
|
||||
|
8
source/compiler/tests/gh_500.meta
Normal file
8
source/compiler/tests/gh_500.meta
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
'test_type': 'output_check',
|
||||
'errors': """
|
||||
gh_500.pwn(13) : error 004: function "Test1" is not implemented - use "Test4"
|
||||
gh_500.pwn(14) : error 004: function "Test2" is not implemented
|
||||
gh_500.pwn(15) : error 004: function "Test3" is not implemented
|
||||
"""
|
||||
}
|
16
source/compiler/tests/gh_500.pwn
Normal file
16
source/compiler/tests/gh_500.pwn
Normal file
@ -0,0 +1,16 @@
|
||||
#pragma deprecated - use "Test4"
|
||||
forward Test1();
|
||||
|
||||
#pragma deprecated
|
||||
forward Test2();
|
||||
|
||||
forward Test3();
|
||||
|
||||
stock Test4(){}
|
||||
|
||||
main()
|
||||
{
|
||||
Test1(); // error 004: function "Test1" is not implemented - use "Test4"
|
||||
Test2(); // error 004: function "Test2" is not implemented
|
||||
Test3(); // error 004: function "Test3" is not implemented
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user