bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] location: fix EOF check


From: Théophile Ranquet
Subject: Re: [PATCH] location: fix EOF check
Date: Mon, 30 Sep 2013 09:24:49 +0200

Hi Andreas,

Thank you for taking your time to address my mistakes.

2013/9/28 Andreas Schwab <address@hidden>:
> -    char c = getc (caret_info.source);
> +    int c = getc (caret_info.source);
>      if (c != EOF)

So, is the implication here that c could never be equal to EOF, thus
making the following branch statement useless? It seems weird to me,
as there *should* have been a test covering this. I can't be entirely
sure anymore as to the rationale behind this code, but I guess it is
not about -1 locations (used by muscle_percent_define_default, IIRC),
since that is covered earlier in the location_caret function; so it
must be about standard input... am I right, Akim? It really doesn't
make any sense to me anymore. Was I just checking the return value for
the sake of checking it? :)

This code generates a warning with Clang (-Wconversion), I am rather
surprised that is has gone unnoticed for so long.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]