eclipse-threadx / threadx

Eclipse ThreadX is an advanced real-time operating system (RTOS) designed specifically for deeply embedded applications.

Home Page:https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/threadx/index.md

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nested comments causes compiler warnings

jltrahan-Gecko opened this issue · comments

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.

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)