Skip to content

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

@junweizeng

Description

@junweizeng

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.

Metadata

Metadata

Assignees

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