title: Why is _Generic keyword supported in c99 or c90 modes?
body: <p>I wrote a simple C program to test the availability of <strong>_Generic</strong> keyword.</p>
  
  <pre><code>int main() {
      int _Generic;
  }
  </code></pre>
  
  <p>I ran the program with <em>gcc-5.3.1</em> and <em>clang-3.8.0</em> compilers on Ubuntu.</p>
  
  <p>Obviously this program generated an error when compiled in the latest c11 standard.</p>
  
  <p>But, when compiled with <strong>-std=c90</strong> and <strong>-std=c99</strong> flags, it generated an error as well. Whereas, the _Generic keyword was only introduced in c11 standard.</p>
  
  <p>Is it that the -std= flags behave differently? And is there a way to test the pure c90 and c99 standards?</p>
  
  <p><em>EDIT:</em></p>
  
  <p>I did run the same program with other identifiers which are not keywords as per c11 standard. Like:</p>
  
  <pre><code>int _Hello;
  int _Gener;
  </code></pre>
  
  <p>And they compiled successfully without any errors or warnings.
  This is probably because of 7.1.3, which says</p>
  
  <blockquote>
    <p>If the program declares or defines an identifier in a
    context in which it is reserved (other than as allowed by 7.1.4), or defines a reserved
    identifier as a macro name, the behavior is undefined</p>
  </blockquote>
  
  <p>as said by @Art and @Lundin.</p>