]> git.saurik.com Git - bison.git/commitdiff
yacc.c: don't use _Pragma GCC diagnostic with 4.6
authorAkim Demaille <akim@lrde.epita.fr>
Thu, 25 Oct 2012 12:45:36 +0000 (14:45 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Fri, 26 Oct 2012 12:27:37 +0000 (14:27 +0200)
Reported by Peter Simons.
http://lists.gnu.org/archive/html/bug-bison/2012-10/msg00033.html

* data/yacc.c (b4_declare_scanner_communication_variables): 4.7
seems fine though.

THANKS
data/yacc.c

diff --git a/THANKS b/THANKS
index b6a2b2d854e783a8f64c27d8126f73371ca1d757..ee05b564a0b6d4c158cdba09a6678b4e75e8615b 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -87,6 +87,7 @@ Paul Hilfinger            Hilfinger@CS.Berkeley.EDU
 Per Allansson             per@appgate.com
 Peter Fales               psfales@lucent.com
 Peter Hamorsky            hamo@upjs.sk
+Peter Simons              simons@cryp.to
 Piotr Gackiewicz          gacek@intertel.com.pl
 Quoc Peyrot               chojin@lrde.epita.fr
 R Blake                   blakers@mac.com
index 1b3dc752e0dc8819e6abad3217d0a69324486f83..3b111d123fda767347b1b4bc685274c8ceee23c8 100644 (file)
@@ -171,7 +171,7 @@ m4_define([b4_declare_scanner_communication_variables], [[
 int yychar;
 
 ]b4_pure_if([[
-#if defined __GNUC__ && (4 < __GNUC__ + (6 <= __GNUC_MINOR__))
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
 /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
     _Pragma ("GCC diagnostic push") \