configure: Check for GCC diagnostic pragma support inside of functions
authorDiego Biurrun <diego@biurrun.de>
Fri, 2 Aug 2013 20:03:09 +0000 (22:03 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 3 Aug 2013 08:08:04 +0000 (10:08 +0200)
The actual usage of the pragma is within functions and older versions
of gcc only support the pragma outside of functions.

configure

index 5bfd8e6..539c581 100755 (executable)
--- a/configure
+++ b/configure
@@ -3779,8 +3779,7 @@ EOF
 done
 
 check_cc <<EOF && enable pragma_deprecated
-_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
-_Pragma("GCC diagnostic warning \"-Wdeprecated-declarations\"")
+void foo(void) { _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") }
 EOF
 
 check_cc <<EOF && enable attribute_packed