title: Rationale for the C11 _Atomic specifier-vs-qualifier syntax irregularity?
body: <p>There is a related "what" question here: <a href="https://stackoverflow.com/questions/10668941/c11-grammar-ambiguity-between-atomic-type-specifier-and-qualifier">C11 grammar ambiguity between _Atomic type specifier and qualifier</a></p>
  
  <p>What I'm interested is <em>why</em>, since the C11 rationale hasn't been published yet, and this seems needlessly complex.</p>
  
  <p>The grammar includes both of these (and resolves the ambiguity in favor of <code>shift</code>ing the <code>(</code> rather than <code>reduce</code> (which would otherwise be in lookahead if followed by a <code>declarator</code> or <code>abstract-declarator</code>)), reachable from <code>declaration-specifiers</code> or <code>specifier-qualifier-list</code>:</p>
  
  <pre><code>atomic-type-specifier: _Atomic ( type-name )
  type-qualifier: _Atomic
  </code></pre>
  
  <p>This leads to the following code:</p>
  
  <pre><code>int i1;
  int (i2); // valid, same as i1 - usually seen in the context of pointer-to-function or pointer-to-array
  int _Atomic a1;
  int _Atomic (a2); // invalid
  _Atomic (int) a3; // valid, same as a1
  </code></pre>
  
  <p>Thoughts:</p>
  
  <ul>
  <li><p><code>_Atomic</code> must not modify an array or function. Barring redundant parentheses around a declarator, this means it would be valid to <code>#define _Atomic(x) x _Atomic</code> (if it were legal to <code>#define</code> keywords of course).</p></li>
  <li><p>When it occurs as a <code>qualifier</code>, <code>_Atomic</code> is the same syntactical part as <code>const</code>, and C programmers are <em>already</em> used to putting <code>const</code> on the correct side, so it can't be for "ease of use".</p></li>
  </ul>