https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63645

--- Comment #8 from M Welinder <terra at gnome dot org> ---
> That is a different issue. You access  expr->func.argc and expr->func.func  
> in your if expression. And of course they are uninitialised.

No, I don't.  You see, C has this feature for the && operator that if the
first condition is false, then the second is not evaluated.  It is in
Section 6.5.13 of the standard:

6.5.13  Logical AND operator
[...]
       [#4] Unlike the bitwise binary & operator, the  &&  operator
       guarantees  left-to-right  evaluation;  there  is a sequence
       point after the evaluation of the  first  operand.   If  the
       first operand compares equal to 0, the second operand is not
       evaluated.

The first condition is false because it compares GNM_EXPR_OP_LT to
GNM_EXPR_OP_FUNCALL.  These have the values 0 and 1 respectively,
which are comfortably within the range of allowed values for type
unsigned char.  0 and 1 are not equal, so the == operator (see
Section 6.5.9) evaluates to 0.

Still thinking about Andrew's suggestion that Valgrind might be at
fault.  It wouldn't be the first bitfield related problem there.

Reply via email to