If I have the following macro:
#define A 10 * 2
does that macro replacing list have 5 preprocessing tokens or only 3?
According to the C11 standard it seems as white space is a separation token
The categories of preprocessing tokens are: header names, identifiers, preprocessing numbers, character constants, string literals, punctuators, and single non-white-space characters that do not lexically match the other preprocessing token categories.
It has three tokens: two preprocessing numbers with an *
in between. Whitespace is not a token.
The line you quoted includes the wording: single non-white-space characters
; that is specifically not whitespace.
The standard goes on to say that tokens "can be separated by white space" and that "White space may appear within a preprocessing token only as part of a header name or between the quotation characters in a character constant or string literal", all of which pretty clearly state that whitespace is not a token.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With