title: Where can I get the source code of the C standard functions in gcc/clang etc?
body: <p>I want to see the "real" C source code of the functions — its real implementation in the gcc and clang compiler. I mean "real" because I look at in the header file but I see only a prototype and something that seems like an extension.</p>
  
  <p>For example, let's say that I want the code of the standard C <code>tmpnam()</code> function.  It's defined in the stdio.h header (by standard — I know that only its prototype must be defined there; the code itself can come from <em>any</em> (better chosen by the compiler writer) header file). But what I can see only is </p>
  
  <pre><code>/* Generate a temporary filename.  */
  extern char *tmpnam (char *__s) __THROW __wur;
  __END_NAMESPACE_STD
  </code></pre>
  
  <p>Where is the code of the function that make it work? That's I'm looking for. Similarly, I don't find it in the clang compiler.
  If possible, can someone explain why the compiler writer choose this model? Doesn't it leave the code explicit in the respective header file? Is it some "trick" to perform some type of optimization, or something like that?</p>