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

Nested comments causes compiler warnings #397

Open
jltrahan-Gecko opened this issue Jul 4, 2024 · 1 comment
Open

Nested comments causes compiler warnings #397

jltrahan-Gecko opened this issue Jul 4, 2024 · 1 comment
Labels
bug Something isn't working hardware New hardware or architecture support request

Comments

@jltrahan-Gecko
Copy link

Describe the bug
tx_thread_context_save.s in the rxv3 port contains a nested comment, which causes a compiler warning (gcc for RX in this case, v8.3.0-202405.)

Specifically, line 97 contains a nested "C-style" comment that started at line 88. I'm not sure if this is a ThreadX issue, or specifically gcc's (i.e. gcc ASM should be ignoring the entire line to begin with, as it starts with a ;

Other compilers/IDEs (CC-RX, IAR) may have this issue, I have not checked.

To Reproduce
Simply build an rxv3 project (with the relevant port) with gcc for RX.

Expected behavior
No warning - i.e. remove next comment

Impact
Annoyance, need to "filter" out non-critical warning.

@jltrahan-Gecko jltrahan-Gecko added bug Something isn't working hardware New hardware or architecture support request labels Jul 4, 2024
@jltrahan-Gecko
Copy link
Author

Hi,

I also opened a support ticket with the maintainers of gcc for RX (https://llvm-gcc-renesas.com/)

They responded that .s files are sent directly to the assembler, but that .S files (which is the case here) are parsed by the C preprocessor first, before being sent to the assembler. I tested, and confirmed this behavior.

Since using the C preprocessor may be useful, even with assembly files, I think the .S extension should stay. This means that the underlying issue, the unclosed comment, should be resolved (i.e. add closing "*/" at the end of line 95 of tx_thread_context_save.S)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hardware New hardware or architecture support request
Projects
None yet
Development

No branches or pull requests

1 participant