https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109936

--- Comment #8 from Adam Wozniak <adam at wozniakconsulting dot com> ---
(In reply to Jonathan Wakely from comment #6)
> That isn't the point. The compiler has to tokenize the input in order to
> perform the preprocessing step. That means it has to be able to decide what
> the bytes comprising the ≠ mean. Are they multiple tokens? A single token
> consisting of an identifier? A C++ operator?
> 
> The standard says "Each preprocessing token that is converted to a token
> (5.6) shall have the lexical form of a keyword, an identifier, a literal, or
> an operator or punctuator."
> 
> ≠ cannot be used in an identifier, and it's none of the other forms either.
> 
> > it should be perfectly legal to use these as arguments.
> 
> By that argument, you could say X(£), but that isn't allowed either.
> 
> > note the emoji passes through flawlessly.
> 
> Not with -Wpedantic

i would argue that X(£) should also be allowed.
i don't think of the preprocessor as part of the compiler.
it's a different step, a different executable, that happens BEFORE the
compiler.
hence the name, PREprocessor.

i cannot argue with "the standard", however.

Reply via email to