]> granicus.if.org Git - graphviz/commitdiff
suppress warnings from using Bison extensions in lib/expr/exparse.y
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 2 Sep 2020 00:53:43 +0000 (17:53 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 8 Sep 2020 14:39:21 +0000 (07:39 -0700)
This is the equivalent of 8c099fc032074a0bb5961d67ef4df05ddca7eba4 but for a
different parser. Surprisingly exparse.y was already using Bison extensions, so
this actually suppresses two warnings:

  bison -y -dtv ../../lib/expr/exparse.y
  ../../lib/expr/exparse.y:131.1-7: warning: POSIX Yacc does not support %binary [-Wyacc]
   %binary       <op>    EQ      NE
   ^~~~~~~
  ../../lib/expr/exparse.y:132.1-7: warning: POSIX Yacc does not support %binary [-Wyacc]
   %binary       <op>    '<'     '>'     LE      GE
   ^~~~~~~

Related to #1806.

lib/expr/Makefile.am
lib/expr/expr.vcxproj

index 9562c39469c01abea7ee81dac8becb456477a168..52802ec2ddb9afef296e96f029ca346dd8cf17a8 100644 (file)
@@ -67,7 +67,7 @@ exparse.h: y.tab.h
 y.tab.c y.tab.h: y.output
 
 y.output: $(top_srcdir)/lib/expr/exparse.y
-       @YACC@ -dtv $(top_srcdir)/lib/expr/exparse.y
+       @YACC@ -Wno-yacc -dtv $(top_srcdir)/lib/expr/exparse.y
 
 expr.3.pdf: expr.3.ps
        @PS2PDF@ $< $@
index a170a3df8de8de26285e4f2842c217c96ff01ea4..f7c9ab1894dd30d5ae92b545116baf86fb03de96 100644 (file)
@@ -64,7 +64,7 @@
     </ClCompile>
     <Lib />
     <PreBuildEvent>
-      <Command>win_bison -dy exparse.y -o exparse-intermediate.c
+      <Command>win_bison -Wno-yacc -dy exparse.y -o exparse-intermediate.c
 sed "s/yy/ex/g" &lt; exparse-intermediate.c | sed "s/YY/EX/g" &gt; exparse.c
 sed "s/yy/ex/g" &lt; exparse-intermediate.h | sed "s/YY/EX/g" &gt; exparse.h
 del exparse-intermediate.c
@@ -82,7 +82,7 @@ del exparse-intermediate.h</Command>
     </ClCompile>
     <Lib />
     <PreBuildEvent>
-      <Command>win_bison -dy exparse.y -o exparse-intermediate.c
+      <Command>win_bison -Wno-yacc -dy exparse.y -o exparse-intermediate.c
 sed "s/yy/ex/g" &lt; exparse-intermediate.c | sed "s/YY/EX/g" &gt; exparse.c
 sed "s/yy/ex/g" &lt; exparse-intermediate.h | sed "s/YY/EX/g" &gt; exparse.h
 del exparse-intermediate.c