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)
committerDiego Biurrun <diego@biurrun.de>
Fri, 2 Aug 2013 20:34:03 +0000 (22:34 +0200)
The actual usage of the pragma is within functions and older versions
of gcc only support the pragma outside of functions.

configure

index 979cc60..dadc4ba 100755 (executable)
--- a/configure
+++ b/configure
@@ -3395,8 +3395,7 @@ EOF
 done
 
 check_cc <<EOF && enable pragma_deprecated
 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
 EOF
 
 check_cc <<EOF && enable attribute_packed