title: How to solve Bison warning "... has no declared type"
body: <p>Running Bison on this file:</p>
  
  <pre><code>%{
      #include &lt;iostream&gt;
      int yylex();
      void yyerror(const char*);
  %}
  
  
  %union
  {
      char    name[100];
      int     val;
  }
  
  %token NUM ID
  %right '='
  %left '+' '-'
  %left '*'
  
  %%
  
  exp :   NUM     {$$.val = $1.val;}
      | ID        {$$.val = vars[$1.name];}
      | exp '+' exp   {$$.val = $1.val + $3.val;}
      | ID '=' exp    {$$.val = vars[$1.name] = $3.val;}
  ;
  
  %%
  </code></pre>
  
  <p>Leads to warnings of the kind of:</p>
  
  <blockquote>
    <p>warning:  $$ of 'exp' has no declared type.</p>
  </blockquote>
  
  <p><strong>What does it mean and how do I solve it?</strong></p>