Skip to content

WARN: Logical expression, do not apply the second operand if not needed? #31

@keyvank

Description

@keyvank

Imagine these two if statements:

if(false && f()) {
}
if(true && f()) {
}

in 30cc, f() is evaluated twice, thus its side-effects are applied twice, but in regular C, only the f() in the second if-statement is applied.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions