Compiler: Revert "Add #warning directive."

Probably not that useful.
This commit is contained in:
Arkshine 2014-08-17 10:51:06 +02:00
parent 32b546df69
commit ca7b0ceadd
3 changed files with 12 additions and 22 deletions

View File

@ -287,7 +287,7 @@ typedef struct s_stringpair {
*/ */
#define tFIRST 256 /* value of first multi-character operator */ #define tFIRST 256 /* value of first multi-character operator */
#define tMIDDLE 280 /* value of last multi-character operator */ #define tMIDDLE 280 /* value of last multi-character operator */
#define tLAST 326 /* value of last multi-character match-able token */ #define tLAST 325 /* value of last multi-character match-able token */
/* multi-character operators */ /* multi-character operators */
#define taMULT 256 /* *= */ #define taMULT 256 /* *= */
#define taDIV 257 /* /= */ #define taDIV 257 /* /= */
@ -361,18 +361,17 @@ typedef struct s_stringpair {
#define tpPRAGMA 323 #define tpPRAGMA 323
#define tpTRYINCLUDE 324 #define tpTRYINCLUDE 324
#define tpUNDEF 325 #define tpUNDEF 325
#define tpWARNING 326
/* semicolon is a special case, because it can be optional */ /* semicolon is a special case, because it can be optional */
#define tTERM 327 /* semicolon or newline */ #define tTERM 326 /* semicolon or newline */
#define tENDEXPR 328 /* forced end of expression */ #define tENDEXPR 327 /* forced end of expression */
/* other recognized tokens */ /* other recognized tokens */
#define tNUMBER 329 /* integer number */ #define tNUMBER 328 /* integer number */
#define tRATIONAL 330 /* rational number */ #define tRATIONAL 329 /* rational number */
#define tSYMBOL 331 #define tSYMBOL 330
#define tLABEL 332 #define tLABEL 331
#define tSTRING 333 #define tSTRING 332
#define tEXPR 334 /* for assigment to "lastst" only */ #define tEXPR 333 /* for assigment to "lastst" only */
#define tEMPTYBLOCK 335 /* empty blocks for AM bug 4825 */ #define tEMPTYBLOCK 334 /* empty blocks for AM bug 4825 */
/* (reversed) evaluation of staging buffer */ /* (reversed) evaluation of staging buffer */
#define sSTARTREORDER 0x01 #define sSTARTREORDER 0x01

View File

@ -1374,14 +1374,6 @@ static int command(void)
if (!SKIPPING) if (!SKIPPING)
error(111,lptr); /* user error */ error(111,lptr); /* user error */
break; break;
case tpWARNING:
while (*lptr<=' ' && *lptr!='\0')
lptr++;
if (!SKIPPING) {
str=strtok((char*)lptr, "\n");
error(234, str != NULL ? str : (char*)lptr); /* user warning, and remove unnecessary newline */
}
break;
default: default:
error(31); /* unknown compiler directive */ error(31); /* unknown compiler directive */
ret=SKIPPING ? CMD_CONDFALSE : CMD_NONE; /* process as normal line */ ret=SKIPPING ? CMD_CONDFALSE : CMD_NONE; /* process as normal line */
@ -1862,7 +1854,7 @@ char *sc_tokens[] = {
"sleep", "state", "static", "stock", "switch", "tagof", "while", "sleep", "state", "static", "stock", "switch", "tagof", "while",
"#assert", "#define", "#else", "#elseif", "#emit", "#endif", "#endinput", "#assert", "#define", "#else", "#elseif", "#emit", "#endif", "#endinput",
"#endscript", "#error", "#file", "#if", "#include", "#line", "#pragma", "#endscript", "#error", "#file", "#if", "#include", "#line", "#pragma",
"#tryinclude", "#undef", "#warning", "#tryinclude", "#undef",
";", ";", "-integer value-", "-rational value-", "-identifier-", ";", ";", "-integer value-", "-rational value-", "-identifier-",
"-label-", "-string-" "-label-", "-string-"
}; };

View File

@ -238,7 +238,7 @@ static char *fatalmsg[] = {
/*108*/ "codepage mapping file not found\n", /*108*/ "codepage mapping file not found\n",
/*109*/ "invalid path: \"%s\"\n", /*109*/ "invalid path: \"%s\"\n",
/*110*/ "assertion failed: %s\n", /*110*/ "assertion failed: %s\n",
/*111*/ "user error: %s\n" /*111*/ "user error: %s\n",
#else #else
"c\224\241\222a\206from \327le\335", "c\224\241\222a\206from \327le\335",
"c\224\241writ\200\277 \327le\335", "c\224\241writ\200\277 \327le\335",
@ -291,7 +291,6 @@ static char *warnmsg[] = {
/*231*/ "state specification on forward declaration is ignored\n", /*231*/ "state specification on forward declaration is ignored\n",
/*232*/ "output file is written, but with compact encoding disabled\n" /*232*/ "output file is written, but with compact encoding disabled\n"
/*233*/ "symbol \"%s\" is marked as deprecated: %s\n", /*233*/ "symbol \"%s\" is marked as deprecated: %s\n",
/*234*/ "user warning: %s\n"
#else #else
"\345 \274tr\240\226\233\277 %\206\273\337c\367\305", "\345 \274tr\240\226\233\277 %\206\273\337c\367\305",
"\222\323i\231\300\344\224t/\314cr\375\364", "\222\323i\231\300\344\224t/\314cr\375\364",