The handling of state effecting pragmas has been improved. Now, #pragma push and #pragma pop save and restore the state of diagnostics pragmas.
This will affect the severity of diagnostic messages when using #pragma diag_suppress. In order to be effective, the #pragma push and #pragma pop must enclose the full scope responsible for the generation of diagnostic message. For example, the compiler will generate a warning, Warning #177-D: variable "b" was declared but never referenced for function foo(), in only one of the following cases:
void foo(void)
{
#pragma push
#pragma diag_suppress 177
int b; // warning not suppressed
#pragma pop
}
#pragma push
#pragma diag_suppress 177
void foo(void)
{
int b; // warning suppressed
}
#pragma pop
[SDCOMP-11007]