title: Why is it invalid for a union type declared in one function to be used in another function?
body: <p>When I read ISO/IEC 9899:1999 (see:6.5.2.3), I saw an example like this (emphasis mine) :</p>
  
  <blockquote>
    <p>The following is <strong>not a valid fragment</strong> (because the union type is <strong>not visible within function <code>f</code></strong>):</p>
  
  <pre><code>struct t1 { int m; };
  struct t2 { int m; };
  int f(struct t1 * p1, struct t2 * p2)
  {
        if (p1-&gt;m &lt; 0)
              p2-&gt;m = -p2-&gt;m;
        return p1-&gt;m;
  }
  int g()
  {
        union {
              struct t1 s1;
              struct t2 s2;
        } u;
        /* ... */
        return f(&amp;u.s1, &amp;u.s2);
  }
  </code></pre>
  </blockquote>
  
  <p>I found no errors and warnings when I tested.</p>
  
  <p>My question is: Why is this fragment invalid?</p>