title: Bison type clash on C++ subclasses
body: <p>So I'm getting type clashes in bison, of the form  </p>
  
  <pre><code>warning: type clash on default action: &lt;stmt&gt; != &lt;expr&gt;
  </code></pre>
  
  <p>because I have a production like </p>
  
  <pre><code>%type &lt;stmt&gt; Stmt
  %type &lt;expr&gt; Expr
  ...
  Stmt : Expr    /* empty */
       | Otherstuff {do other stuff.....}
       ;
  </code></pre>
  
  <p>I was wondering if there was a way to get rid of these errors, because Expr is a subclass of Stmt (I'm using c++), but has extra functions so just putting in</p>
  
  <pre><code>%type &lt;stmt&gt; Stmt Expr
  </code></pre>
  
  <p>won't work. Any ideas?</p>