Here's a swell little bug that GCC came across today:

src/string/primitives.c: In function ‘INTVAL 
Parrot_char_digit_value(Parrot_Interp, UINTVAL)’:
src/string/primitives.c:332:50: warning: logical ‘or’ of collectively 
exhaustive tests is always true [-Wlogical-op]

The offending code:

    if ((character >= 0x30) || (character <= 0x39))
        return character - 0x30;

That || should have been an &&.  As written, it is always true.

I know that the compiler warnings are often a nuisance, and we can be tempted 
to Just Make Them Shut Up, but there's often good diagnostic information in 
there as well.

xoxo,
Andy

--
Andy Lester => [email protected] => www.theworkinggeek.com => AIM:petdance




_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to