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.
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.
There may be other string matching or similar changes that can enhance the robustness of the helper scripts. Feel free to contribute additional suggestions.
Hi @arindam-8 .
Here's a simple example, test.c:
Initially, I compiled it (
gcc test.c
) on an Ubuntu system without full-width single quotation marks (‘
). The output was as follows:The
In function 'main':
in this case uses a half-width single quotation mark.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: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 https://github.com/srg-imperial/GrayC/issues/4#issuecomment-1597316781
There may be other string matching or similar changes that can enhance the robustness of the helper scripts. Feel free to contribute additional suggestions.