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

@@ -1024,12 +1024,12 @@
                         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
+        } else if (np == errorloc) {            /* error */
                 if (trulvl > 0) {
                         char ebuf[BUFFERSIZ];
 
                         p = ebuf;
                         while (*inp != '\n') {

@@ -1044,13 +1044,10 @@
                         }
                         *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='#';