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

Enhancing the Robustness of the Helper Scripts with Additional String Matching or Similar Changes #5

Open
junweizeng opened this issue Jun 20, 2023 · 0 comments
Assignees

Comments

@junweizeng
Copy link

junweizeng commented Jun 20, 2023

Hi @arindam-8 .

Here's a simple example, test.c:

int main
{
    a = 1;
}
  1. Initially, I compiled it (gcc test.c) on an Ubuntu system without full-width single quotation marks (). The output was as follows:

    test.c: In function 'main':
    test.c:3:5: error: 'a' undeclared (first use in this function)
    3 | a = 1;
    | ^
    test.c:3:5: note: each undeclared identifier is reported only once for each function it appears in

    The In function 'main': in this case uses a half-width single quotation mark.

  2. However, when I switched to an Ubuntu system with Chinese language support (which includes full-width single quotation marks ), and recompiled it (gcc test.c), the output changed to:

    test.c: In function ‘main’:
    test.c:3:5: error: ‘a’ undeclared (first use in this function)
    a = 1;
    ^
    test.c:3:5: note: each undeclared identifier is reported only once for each function it appears in

    The In function ‘main’:in this case uses a full-width single quotation mark.

I apologize for the previous commit, which was incorrect. I think the original -ve "In function ‘bug’:" should be retained, and we can add -ve "In function 'bug':" after it to enhance the robustness of the program.

Originally posted by @Vanish-Zeng in #4 (comment)

There may be other string matching or similar changes that can enhance the robustness of the helper scripts. Feel free to contribute additional suggestions.

@arindam-8 arindam-8 self-assigned this Jun 20, 2023
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

2 participants