Non-Confidential |
![]() |
ARM DUI0472J | ||
|
||||
Home > Compiler-specific Features > #pragma pop |
This pragma restores the previously saved pragma state.
#pragma push #pragma diag_suppress 177 void foo1(void) { /* Warning #177-D (variable was declared but never referenced) suppressed */ int x; } #pragma pop void foo2(void) { /* Warning #177-D (variable was declared but never referenced) generated */ int x; }
This example shows two identical functions, foo1()
and foo2()
, both of which would normally provoke warning #177-D (variable was declared but never referenced).
For the first function, foo1()
, #pragma diag_suppress
suppresses the warning. However, because the #pragma diag_suppress
is wrapped by a #pragma push
and #pragma pop
pair, the warning is re-enabled by #pragma pop
.