title: Finding out what the GCC include path is
body: <p>I'm trying to programmatically find the <code>#include</code> path on Linux, which as I understand it, in practice means finding what GCC considers it to be. (Is that quite true? How does Clang do it?)</p>
  
  <p>According to <a href="http://gcc.gnu.org/onlinedocs/cpp/Search-Path.html">http://gcc.gnu.org/onlinedocs/cpp/Search-Path.html</a> some of the components involve the CPU architecture and the GCC version; the latter in particular seems tricky; I suppose it could be obtained by running <code>gcc --version</code> and parsing the output (or <code>gcc -v</code>), but this seems inelegant at best and fragile at worst. Doing it from within one's code assuming one's program is being compiled with GCC might be another option, but it would require depending on that assumption.</p>
  
  <p>What's the recommended way to do it?</p>