aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>2005-01-16 17:44:17 +0000
committerPaul Brook <pbrook@gcc.gnu.org>2005-01-16 17:44:17 +0000
commitdfbb43185db4da6c588f8166e5a2a2be296a30b7 (patch)
tree584184167f7a3e45ac0aaf034150aa823ec7ef1e /gcc
parentef1b6bcd0053edf631e611ec15e98f7bd35c9301 (diff)
downloadgcc-dfbb43185db4da6c588f8166e5a2a2be296a30b7.zip
gcc-dfbb43185db4da6c588f8166e5a2a2be296a30b7.tar.gz
gcc-dfbb43185db4da6c588f8166e5a2a2be296a30b7.tar.bz2
re PR fortran/19182 (Error messages seem to be printed slower)
2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> PR fortran/19182 * error.c (error_char): Line-buffer errors / warnings. From-SVN: r93734
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/error.c15
2 files changed, 19 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index d90e50e..01687ef 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,10 @@
2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
+ PR fortran/19182
+ * error.c (error_char): Line-buffer errors / warnings.
+
+2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
+
* trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
unsigned issue. Use build_int_cst instead of converting
integer_zero_node. Remove unnecessary conversion.
diff --git a/gcc/fortran/error.c b/gcc/fortran/error.c
index 7f0b57c..a8eae56 100644
--- a/gcc/fortran/error.c
+++ b/gcc/fortran/error.c
@@ -86,7 +86,20 @@ error_char (char c)
else
{
if (c != 0)
- fputc (c, stderr);
+ {
+ /* We build up complete lines before handing things
+ over to the library in order to speed up error printing. */
+ static char line[MAX_ERROR_MESSAGE + 1];
+ static int index = 0;
+
+ line[index++] = c;
+ if (c == '\n' || index == MAX_ERROR_MESSAGE)
+ {
+ line[index] = '\0';
+ fputs (line, stderr);
+ index = 0;
+ }
+ }
}
}