title: Efficient way to return a union in C?
body: <p>I have a function that returns a union, which the caller knows how to process. Is there an efficient 1-line way to return a union? What I do now:</p>
  
  <pre><code>typedef union { int i; char *s; double d; } FunnyResponse;
  FunnyResponse myFunc () {
      // Tedious:
     FunnyResponse resp; 
     resp.d = 12.34;
     return resp;
  }
  int main () {
     printf ("It's this: %g\n", myFunc().d);
  }
  </code></pre>
  
  <p>This compiles and runs however I'd like to have a single "return" line if possible. Any ideas?</p>