This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I am using code composer studio Version: 10.2.0.00009 and TI Clang v1.3.0.LTS compiler. I am building the code for a Generic little-endian Cortex-R5 processor.
I see that a particular warning, that normally gets reported, gets masked when I enable the "-save-temps" flag. Here's an example -
#include <inttypes.h>
void func1(uint32_t x);
int main(void)
{
uint32_t test = 20;
if (test < 10U);
{
func1(test);
}
return 0;
}
void func1(uint32_t x)
{
// do-something
}
In the code above, I accidentally put a semicolon at the end of my "if" statement (if (test < 10U);
). Normally on TI Clang 1.3.0, with default diagnostic options, it reports a warning on this statement saying -
../main.c:15:20: warning: if statement has empty body [-Wempty-body]
if (test < 10U);
^
However, when I enable -save-temps flag (on GUI through Project Properties -> Build -> Arm Compiler -> Advanced Options -> Control Options), the above warning disappears. I am guessing this is an unintended artifact of saving the temporary files and is not expected to happen. Can you resolve this?
Let me know if you need any more information for recreating the problem.
Thank you for notifying us of this problem, and supplying a concise test case. I can reproduce the same result. I filed EXT_EP-10632 to have this investigated. You are welcome to follow it with that link.
Thanks and regards,
-George
Thanks George for the prompt response!
Now that you have reported this, should I close this issue? Or should I leave it open until the fix is actually made in a later the next compiler version?
To understand why this thread is marked TI Thinks Resolved, please see the first FAQ on this page. With that in mind, you are welcome to close the thread now, or after the fix is released.
Thanks and regards,
-George