This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Disable Warning Messages for a Segment of Code

In UV4 I would like to suppress a specific warning message for a segment of code. I tried:

#pragma diag_suppress=550 unsigned int stacked_r0; unsigned int stacked_r1; unsigned int stacked_r2; unsigned int stacked_r3; #pragma diag_warning=550 unsigned int stacked_r12; unsigned int stacked_lr; unsigned int stacked_pc; unsigned int stacked_psr;

What I was attempting to do was to disable the warning for the first 4 lines and still get the warning for the last 4. This would prove that I can disable and then renable a warning over a segment of code. But this disables the warning for all lines.

Am I misinterpreting how #pragma works and/or am I enabling the warning incorrectly?

P.S. If you are interested, this code is part of a hard-fault handler.

Thank you,

Parents Reply Children
No data