Skip to content

bitwise NOT operator did not get recognized properly when used with function and judging statement #75

@ZsgsDesign

Description

@ZsgsDesign

Given the following code:

int main(){
    int a, b;
    fscanf(input, "%d", &b);
    if(~fscanf(user_output, "%d", &a)) {
        // ...
    }
}

The ~fscanf part inconsistently displayed itself as purple, while when using other operators it displays black for operator and then blues for the function name:

int main(){
    int a, b;
    fscanf(input, "%d", &b);
    if(fscanf(user_output, "%d", &a)) {
        // ...
    }
}
int main(){
    int a, b;
    fscanf(input, "%d", &b);
    if(+fscanf(user_output, "%d", &a)) {
        // ...
    }
}
int main(){
    int a, b;
    fscanf(input, "%d", &b);
    if(-fscanf(user_output, "%d", &a)) {
        // ...
    }
}

Even for bitwise XOR operator ^ the behavior stays the same:

int main(){
    int a, b;
    fscanf(input, "%d", &b);
    if(^fscanf(user_output, "%d", &a)) {
        // ...
    }
}

I believe this caused inconsistency and should be fixed in the future.

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