Disable individual SHARC compiler warnings

SC58x family

CCES 2.8.1

Is there a way to disable a specific compiler warning within the C code?

For example, is there a way to disable the "No break at the end of case" warning on a case by case basis (pun intended).

In Lint, I would add "//lint -fallthrough" before the next case statement.

Parents
  • 0
    •  Analog Employees 
    on May 8, 2019 8:01 AM

    Hi,

    You can suppress the warning using the "-Wsuppress number[,number]" switch to the compiler. This can be added via Properties > C/C++ Build > Settings > Tool Settings > CrossCore SHARC C\C++ Compiler > Additional Options: -Wsuppress number.

    For example, if you want to suppress waning cc1080, then you need to add "-Wsuppress 1080" in Additional Options

    Regards,
    Santha kumari.K

Reply
  • 0
    •  Analog Employees 
    on May 8, 2019 8:01 AM

    Hi,

    You can suppress the warning using the "-Wsuppress number[,number]" switch to the compiler. This can be added via Properties > C/C++ Build > Settings > Tool Settings > CrossCore SHARC C\C++ Compiler > Additional Options: -Wsuppress number.

    For example, if you want to suppress waning cc1080, then you need to add "-Wsuppress 1080" in Additional Options

    Regards,
    Santha kumari.K

Children