Re: Defect in linearization of short circuit &&

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

 



2010/2/14 Jacek Śliwerski <sliwers@xxxxxxxxxxxxxx>:
> Apparently, the issue is not with the linearization.  I noticed that the
> condition has been parsed as:
>
> EXPR_BINOP
>  * EXPR_LOGICAL
>    * EXPR_LOGICAL
>       * EXPR_PREOP
>       * EXPR_PREOP
>    * EXPR_COMPARE
>  * EXPR_COMPARE
>
> After replacing EXPR_BINOP with EXPR_LOGICAL in the top node of the tree,
> the linearization works just fine.  Could someone explain me the difference
> between EXPR_BINOP and EXPR_LOGICAL in this context?

EXPR_BINOP used in normal operation require two operands.
e.g.  a + b, a | b
Both operands will get evaluated.

EXPR_LOGICAL using for condition branching and it has the short curcit
behavior in mind. e.g. a || b

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux