Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

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.

Strange behaviour when -save-temps flag is enabled on TI Clang v1.3.0.LTS

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.