Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Turn off deprecated bison warnings under MSVC
authorAndrew Dunstan <andrew@dunslane.net>
Fri, 20 Mar 2020 17:55:15 +0000 (13:55 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Fri, 20 Mar 2020 18:03:13 +0000 (14:03 -0400)
These are disabled by the configure code, so this is just fixing an
inconsistency in the MSVC code.

Backpatch to all live branches.

src/tools/msvc/pgbison.pl

index 7d0f784aa834f7e17e4075371a769eedcfa10d17..9eec12518ede04e1f1134d8eb11132e1620fa3a1 100644 (file)
@@ -45,5 +45,7 @@ close($mf);
 my $basetarg = basename($output);
 my $headerflag = ($make =~ /^$basetarg:\s+BISONFLAGS\b.*-d/m ? '-d' : '');
 
-system("bison $headerflag $input -o $output");
+my $nodep = $bisonver ge '3.0' ? "-Wno-deprecated" : "";
+
+system("bison $nodep $headerflag $input -o $output");
 exit $? >> 8;