The actual usage of the pragma is within functions and older versions of gcc only support the pragma outside of functions.
Unified · Split
| @@ -3779,8 +3779,7 @@ EOF · 3778 unmodified lines | ||
| 3779 | 3779 | done |
| 3780 | 3780 | |
| 3781 | 3781 | check_cc <<EOF && enable pragma_deprecated |
| 3782 | −_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") | |
| 3783 | −_Pragma("GCC diagnostic warning \"-Wdeprecated-declarations\"") | |
| 3782 | +void foo(void) { _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") } | |
| 3784 | 3783 | EOF |
| 3785 | 3784 | |
| 3786 | 3785 | check_cc <<EOF && enable attribute_packed |