Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed to handle composite types in conditional expressions #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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