10.96 #pragma pop

This pragma restores the previously saved pragma state.

Examples

#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
6.3 Controlling compiler diagnostic messages with pragmas
Related reference
10.97 #pragma push
Non-Confidential PDF file icon PDF version ARM DUI0472J
Copyright © 2010-2013 ARM. All rights reserved.