This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] PR 19182
Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> writes:
> Index: error.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/fortran/error.c,v
> retrieving revision 1.9
> diff -u -p -r1.9 error.c
> --- error.c 3 Jan 2005 21:43:49 -0000 1.9
> +++ error.c 8 Jan 2005 00:03:29 -0000
> @@ -86,7 +86,20 @@ error_char (char c)
> else
> {
> if (c != 0)
> - fputc (c, stderr);
> + {
> + /* We build up complete lines before passing handing things
> + over to the library in order ot speed up error printing. */
> + static char line[MAX_ERROR_MESSAGE];
> + static int index = 0;
> +
> + line[index++] = c;
What if index >= MAX_ERROR_MESSAGE?
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."