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

Halalaluyafail3 <luigighiron at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |luigighiron at gmail dot com

--- Comment #1 from Halalaluyafail3 <luigighiron at gmail dot com> ---
With #embed, this also occurs with:

#embed<something>limit(1)

(In reply to Richard Smith from comment #0)
> The first diagnostic might also be incorrect (the header-name production for
> double-quoted strings also can't have a UDL suffix), but the max munch rule
> appears to require that we lex a string-literal rather than a header-name
> here! I think that's probably a wording bug, and the lexer should prefer to
> produce a header-name token whenever possible. (I'm taking that part to WG21
> CWG; Clang also diagnoses this, but EDG does not.)
I do not think it is worth it to add a special case for this. Note that this
can also occur with encoding prefixes:

#define L
#include L"stddef.h"

This gets parsed as a string literal rather than identifier plus header name,
or identifier plus string literal. Moreover, it is easy to construct examples
where UDL suffix parsing gets in the way:

extern"C"int foo();

A space is necessary between "C" and int for this to be parsed correctly.

Reply via email to