Print this page
cpp: do not pass #error into output stream, warn about it and exit non-0

*** 1024,1035 **** while (*inp != '\n') /* pass text */ p = cotoken(p); } else if (np == pragmaloc) { /* pragma */ while (*inp != '\n') /* pass text */ p = cotoken(p); - } else if (np == errorloc) { /* error */ #ifdef EXIT_ON_ERROR if (trulvl > 0) { char ebuf[BUFFERSIZ]; p = ebuf; while (*inp != '\n') { --- 1024,1035 ---- while (*inp != '\n') /* pass text */ p = cotoken(p); } else if (np == pragmaloc) { /* pragma */ while (*inp != '\n') /* pass text */ p = cotoken(p); #ifdef EXIT_ON_ERROR + } else if (np == errorloc) { /* error */ if (trulvl > 0) { char ebuf[BUFFERSIZ]; p = ebuf; while (*inp != '\n') {
*** 1044,1056 **** } *p = '\0'; pperror(ebuf); exit(exfail); } - #else - while (*inp != '\n') /* pass text */ - p = cotoken(p); #endif } else if (np==lneloc) {/* line */ if (flslvl==0 && pflag==0) { outp=inp=p; *--outp='#'; --- 1044,1053 ----