commit b49ee206468a789cd58b73c1012f4eab381bbb63
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Thu Sep 17 12:59:43 2015 +0200
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Thu Sep 17 12:59:43 2015 +0200

    Close stdout in error
    
    Printing ???? is a non sense because the backend must check
    for this sequence, and it means a low level read routine is needed,
    but a better approach can be close the output stream.

diff --git a/cc1/error.c b/cc1/error.c
index ecd310d..64a4e8a 100644
--- a/cc1/error.c
+++ b/cc1/error.c
@@ -26,7 +26,7 @@ warn_error(int flag, char *fmt, va_list va)
        if (flag < 0) {
                if (!failure) {
                        failure = 1;
-                       puts("????");
+                       fclose(stdout);
                }
                failure = 1;
                if (nerrors++ == MAXERRNUM) {
diff --git a/cc1/ir.md b/cc1/ir.md
index 661d98d..6981df0 100644
--- a/cc1/ir.md
+++ b/cc1/ir.md
@@ -10,7 +10,7 @@ The language is composed by lines, which represent statements,
 and fields in statements are separated by tabulators. Declaration
 statements begin in column 0, meanwhile expressions and control
 flow begin with a tabulator. When the front end detects an error
-it emits ???? and stop of emitting anything else.
+it closes the output stream.
 
 ## Types ##
 

Reply via email to