From 2e01fd8b00192c3ace8df389749e73c63b647a79 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sun, 10 Jan 2016 13:51:04 +0000 Subject: [PATCH] doc/syntax.tex, src/sod-module.5: Document new C99 types. --- doc/syntax.tex | 16 +++++++++++++++- src/sod-module.5 | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/doc/syntax.tex b/doc/syntax.tex index 3727013..e084be2 100644 --- a/doc/syntax.tex +++ b/doc/syntax.tex @@ -445,6 +445,8 @@ recognized. \alt "void" | "char" | "int" | "float" | "double" \alt "short" | "long" \alt "signed" | "unsigned" +\alt "bool" | "_Bool" +\alt "imaginary" | "_Imaginary" | "complex" | "_Complex" \alt ::= "const" | "volatile" | "restrict" @@ -453,7 +455,14 @@ recognized. \end{grammar} A @ is an identifier which has been declared as being a type name, -using the @"typename" or @"class" definitions. +using the @"typename" or @"class" definitions. The following type names are +defined in the built-in module. +\begin{itemize} +\item @"va_list" +\item @"size_t" +\item @"ptrdiff_t" +\item @"wchar_t" +\end{itemize} Declaration specifiers may appear in any order. However, not all combinations are permitted. A declaration specifier must consist of zero or @@ -462,6 +471,7 @@ more @, and one of the following, up to reordering. \item @ \item @"struct" @, @"union" @, @"enum" @ \item @"void" +\item @"_Bool", @"bool" \item @"char", @"unsigned char", @"signed char" \item @"short", @"unsigned short", @"signed short" \item @"short int", @"unsigned short int", @"signed short int" @@ -471,6 +481,10 @@ more @, and one of the following, up to reordering. \item @"long long", @"unsigned long long", @"signed long long" \item @"long long int", @"unsigned long long int", @"signed long long int" \item @"float", @"double", @"long double" +\item @"float _Imaginary", @"double _Imaginary", @"long double _Imaginary" +\item @"float imaginary", @"double imaginary", @"long double imaginary" +\item @"float _Complex", @"double _Complex", @"long double _Complex" +\item @"float complex", @"double complex", @"long double complex" \end{itemize} All of these have their usual C meanings. diff --git a/src/sod-module.5 b/src/sod-module.5 index 2a1123f..9779822 100644 --- a/src/sod-module.5 +++ b/src/sod-module.5 @@ -691,6 +691,18 @@ class-definition | .B unsigned .| +.B bool +| +.B _Bool +.| +.B imaginary +| +.B _Imaginary +| +.B complex +| +.B _Complex +.| .I qualifier .br .I qualifier @@ -705,6 +717,18 @@ class-definition ::= .I identifier .PP +The following +.IR type-name s +are defined in the built-in module. +.hP \*o +.B va_list +.hP \*o +.B size_t +.hP \*o +.B ptrdiff_t +.hP \*o +.B wchar_t +.PP Declaration specifiers may appear in any order. However, not all combinations are permitted. A declaration specifier must consist of @@ -759,6 +783,22 @@ and one of the following, up to reordering. .BR float , .BR double , .B long double +.hP \*o +.BR "float _Imaginary" , +.BR "double _Imaginary" , +.B "long double _Imaginary" +.hP \*o +.BR "float imaginary" , +.BR "double imaginary" , +.B "long double imaginary" +.hP \*o +.BR "float _Complex" , +.BR "double _Complex" , +.B "long double _Complex" +.hP \*o +.BR "float complex" , +.BR "double complex" , +.B "long double complex" .PP .IR declarator [ k ] ::= -- 2.11.0