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:02:15 +0000 (14:02 -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 895e398c08cad584cf3efd4a1020fbe1f9d750bf..490df833673b05ffe3a70f72e1630edece48e785 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;