Add #pragma compat <value>

\#pragma compat allows you to toggle compatibility mode on or off,
depending on the argument (0 or 1).

Note: #pragma compat doesn't affect the value of built-in constants,
e.g. __Pawn.
This commit is contained in:
Zeex 2015-04-01 23:45:09 +06:00
parent 647c915ab1
commit 998a1440a8

View File

@ -1232,6 +1232,10 @@ static int command(void)
if (!ok) {
error(207); /* unknown #pragma */
}
} else if (strcmp(str,"compat")==0) {
cell val;
preproc_expr(&val,NULL);
pc_compat=(int)val; /* switch compatibility mode on/off */
} else {
error(207); /* unknown #pragma */
} /* if */