6.10 Preprocessing Indicator
Grammar
1,preprocessing-file:
groupopt
Group:
Group-part
Group Group-part
Group-part:
if-section
Control-line
Text-line
# non-directive
if-section:
If-group elif-groupsopt else-groupopt Endif-line
If-group:
# if constant-expression New-line groupopt
# ifdef identifier New-line groupopt
# ifndef identifier New-line groupopt
elif-groups:
Elif-group
elif-groups Elif-group
Elif-group:
# elif constant-expression New-line groupopt
Else-group:
# Else New-line groupopt
endif-line:
# Else New-line
control-line:
# include Pp-tokens New-line
# Define identifier Replacement-list New-line
# Define identifier Lparen identifier-listopt ) replacement-list new-line
# Define identifier Lparen ... ) replacement-list new-line
# Define identifier Lparen identifier-list , ... ) replacement-list new-line
# undef identifier New-line
# Line Pp-tokens New-line
# Error pp-tokensopt New-line
# pragma pp-tokensopt New-line
# New-line
text-line:
pp-tokensopt New-line
non-directive:
Pp-tokens New-line
Lparen:
One ( character, no whitespace character immediately before it is placed
replacement-list:
pp-tokensopt
Pp-tokens:
Preprocessing-token
Pp-tokens Preprocessing-token
new-line:
Line break character
Describe
2. A preprocessing indicator consists of a string of preprocessing characters that meet the following constraints: The first token in the sequence is a # preprocessor, (at the beginning of the translation Phase 4) It is either the first character in the source file (optionally, After a white-space character that does not contain newline characters), or after a white-space character that contains at least one line break. The last character in the sequence is the first line-break character following the first token. [Note: Thus, preprocessor indicators are often referred to as "lines.") These "lines" do not have other syntactic meanings, since all whitespace characters are equivalent except in some cases during preprocessing (e.g., the # string literal in 6.10.3.2 creates operators). ] A newline character to terminate the preprocessing indicator, even if it occurs within a call to a macro that resembles a function.
ISO/IEC 9,899:2011 clause 6.10--preprocessing indicator