invalid comparsion in 'src/input.c' line 516
Sigbjorn Finne
sof@galois.com
Wed, 19 Dec 2001 14:48:43 -0800
Ouch, not so good - thanks for the report. Bug fixed.
--sigbjorn
----- Original Message -----
From: "michael becker" <michaelb@coconet.de>
To: <hugs-bugs@haskell.org>
Sent: Tuesday, December 18, 2001 17:10
Subject: invalid comparsion in 'src/input.c' line 516
>
>
> hi,
>
> i compiled 'Hugs Version: December 2001' on aix using
> the native aix-compiler. when i start hugs, hugs hangs when
> parsing Prelude.hs.
>
> this happens because on line 516 in 'src/input.c' an integer (EOF)
> is compared with a char
>
> 512 static Int local nextLine()
> 513 {
> 514 for (lineLength = 0; lineLength < LINEBUFFER_SIZE-1;
lineLength++) {
> 515 lineBuffer[lineLength] = fgetc(inputStream);
> 516 if (lineBuffer[lineLength] == EOF)
>
>
> when i changed this to
>
> 512 static Int local nextLine()
> 513 {
> 514 int chr;
> 515 for (lineLength = 0; lineLength < LINEBUFFER_SIZE-1;
lineLength++) {
> 516 lineBuffer[lineLength] = (chr = fgetc(inputStream));
> 517 if (chr == EOF)
>
>
> hugs works ok.
>
>
> M.Becker
>
>
> _______________________________________________
> Hugs-Bugs mailing list
> Hugs-Bugs@haskell.org
> http://www.haskell.org/mailman/listinfo/hugs-bugs