src/c-types-{impl,parse}.lisp: Support C11 `_Atomic'.
[sod] / doc / syntax.tex
index 5f8c89e..560dc47 100644 (file)
@@ -451,8 +451,14 @@ recognized.
 \alt "bool" | "_Bool"
 \alt "imaginary" | "_Imaginary" | "complex" | "_Complex"
 \alt <qualifier>
+\alt <atomic-type>
 
-<qualifier> ::= "const" | "volatile" | "restrict"
+<qualifier> ::= <atomic> | "const" | "volatile" | "restrict"
+
+<atomic-type> ::=
+  <atomic> "(" @<declaration-specifier>^+ <abstract-declarator> ")"
+
+<atomic> ::= "atomic" | "_Atomic"
 
 <type-name> ::= <identifier>
 \end{grammar}
@@ -472,6 +478,7 @@ combinations are permitted.  A declaration specifier must consist of zero or
 more @<qualifier>s, and one of the following, up to reordering.
 \begin{itemize}
 \item @<type-name>
+\item @<atomic-type>
 \item @"struct" @<identifier>, @"union" @<identifier>, @"enum" @<identifier>
 \item @"void"
 \item @"_Bool", @"bool"
@@ -509,6 +516,8 @@ All of these have their usual C meanings.
 
 <argument> ::= @<declaration-specifier>^+ <argument-declarator>
 
+<abstract-declarator> ::= <declarator>$[\epsilon]$
+
 <argument-declarator> ::= <declarator>$[\mbox{@<identifier> @! $\epsilon$}]$
 
 <simple-declarator> ::= <declarator>$[\mbox{@<identifier>}]$