Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mycoboco
Copy link

lcc currently fails to correctly handle composite types in conditoinal expressions. For example,

void foo(void)
{
    extern int cond;
    int (*a)[], (*b)[10], (*c)[20];

    c = cond? a: b;
    c = cond? b: a;
}

The two assignments to c are both invalid, but lcc complains that only the latter is.

This commit fixes the problem by adding two calls to composite() when checking types for conditional expressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant