diff --git a/source/preprocessor.tex b/source/preprocessor.tex index 6e9bea8816..8081fc6e73 100644 --- a/source/preprocessor.tex +++ b/source/preprocessor.tex @@ -80,7 +80,9 @@ \begin{bnf}\obeyspaces \nontermdef{elif-group}\br - \terminal{\# elif } constant-expression new-line \opt{group} + \terminal{\# elif } constant-expression new-line \opt{group}\br + \terminal{\# elifdef } constant-expression new-line \opt{group}\br + \terminal{\# elifndef} constant-expression new-line \opt{group} \end{bnf} \begin{bnf}\obeyspaces @@ -399,7 +401,9 @@ \end{floattable} \pnum -The \tcode{\#ifdef} and \tcode{\#ifndef} directives, and +The +\tcode{\#ifdef}, \tcode{\#ifndef}, \tcode{\#elifdef}, and \tcode{\#elifndef} +directives, and the \tcode{defined} conditional inclusion operator, shall treat \xname{has_include} and \xname{has_cpp_attribute} as if they were the names of defined macros. @@ -491,20 +495,21 @@ \pnum Preprocessing directives of the forms \begin{ncsimplebnf}\obeyspaces -\terminal{\# ifdef } identifier new-line \opt{group}\br +\terminal{\# ifdef } identifier new-line \opt{group}\br \indextext{\idxcode{\#ifdef}}% -\terminal{\# ifndef } identifier new-line \opt{group} +\terminal{\# ifndef } identifier new-line \opt{group}\br \indextext{\idxcode{\#ifndef}}% +\terminal{\# elifdef } identifier new-line \opt{group}\br +\indextext{\idxcode{\#elifdef}}% +\terminal{\# elifndef} identifier new-line \opt{group} +\indextext{\idxcode{\#elifndef}}% \end{ncsimplebnf} check whether the identifier is or is not currently defined as a macro name. Their conditions are equivalent to -\tcode{\#if} -\tcode{defined} -\grammarterm{identifier} -and -\tcode{\#if} -\tcode{!defined} -\grammarterm{identifier} +\tcode{\#if} \tcode{defined} \grammarterm{identifier}, +\tcode{\#if} \tcode{!defined} \grammarterm{identifier}, +\tcode{\#elif} \tcode{defined} \grammarterm{identifier}, and +\tcode{\#elif} \tcode{!defined} \grammarterm{identifier}, respectively. \pnum