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

Aaron Ballman <aaron at aaronballman dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aaron at aaronballman dot com

--- Comment #3 from Aaron Ballman <aaron at aaronballman dot com> ---
(In reply to Jonathan Wakely from comment #1)
> (In reply to Andrew Schepler from comment #0)
> > In C++14 and later, any integer literal may contain single quote characters
> > (aka apostrophe, ASCII 0x27).
> 
> That's a standard defect (and has already been raised as such on the
> committee reflector).

I'm working on a proposal to add support for digit separators in C and came
across this bug as part of that effort. FWIW, I looked around for a defect on
this and could not find one, nor any reflector discussion on it. So I reached
out to Core to ask their opinion and the position seems to be that there's no
reason to disallow digit separators in #line directives. They observed that
digit separators are permitted in digit sequences in general (for example, in
preprocessor constant expressions), so treating #line as a special case would
seem like an arbitrary inconsistency. 

https://lists.isocpp.org/core/2020/10/10086.php

There is implementation divergence on it: GCC and EDG reject digit separators
in #line; Clang and MSVC accept.

I'm hoping to avoid accidentally diverging C and C++ here, so my intent is to
propose to accept digit separators in C as well. Is there a reason GCC needs to
reject that Core perhaps isn't aware of?

Reply via email to