erroneous result computing an expression

Geoff Keating geoffk@cygnus.com
Fri Mar 24 13:41:00 GMT 2000


Ludovic WALLE <walle@inist.fr> writes:

>     if ((((((int) *((*str)++)) & 0x1FU) << 6) | (((int) *((*str)++)) &
> 0x3FU)) != 0xA0) {

This expression is not legal ISO C, because it modifies '*str' twice
between sequence points.  There is no bug in gcc.

-- 
- Geoffrey Keating <geoffk@cygnus.com>


More information about the Gcc-bugs mailing list