Skip to content

Mangled else if construct when converting inline structs #7

@Nevcairiel

Description

@Nevcairiel

Converting following code causes the converter to mangle the else if, producing "elseif" (one word) in the output, obviously breaking compilation:

typedef struct AVRational{
    int num; ///< numerator
    int den; ///< denominator
} AVRational;

int av_rescale_q(int a, AVRational bq, AVRational cq);

int main()
{
    AVRational framerate = {1,25};
    if (1) {
        int next_dts = av_rescale_q(1,  (AVRational){1, 1000000}, framerate);
    } else if (2) {
        // nada!
    }
    return 0;
}

The issue does not seem to appear if the inline struct is the third function parameter, in this case anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions