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

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

Open
ZsgsDesign opened this issue Feb 28, 2022 · 0 comments

Comments

@ZsgsDesign
Copy link

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.

@ZsgsDesign ZsgsDesign changed the title bitwise not operator did not get recognized properly when used with function and judging statement bitwise NOT operator did not get recognized properly when used with function and judging statement Feb 28, 2022
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

No branches or pull requests

1 participant