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

--- Comment #6 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Harald van Dijk from comment #5)
> The rationale at the time "this extension cannot conflict with
> standards-conforming programs" probably no longer holds though. Now that,
> for C++, $ is in the basic character set and not permitted to be part of
> identifiers, it looks like that makes
> 
>   #define FOO
>   #define STR(x) STR_(x)
>   #define STR_(x) #x
>   int main() { return STR(FOO$)[1]; }
> 
> a strictly confirming C++ program that must return 0?

But that would be only for c++26 which we dont claim to fully implement yet.

I wonder why c++26 didnt update the rules for identifiers when adding $ to
basic character set. Maybe an oversight/defect?

Reply via email to