9.92 #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.
Related concepts
5.3 Controlling compiler diagnostic messages with pragmas
Related reference
9.93 #pragma push
Non-ConfidentialPDF file icon PDF versionARM DUI0375E
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.