[Bug c++/69905] New: Digit separators break literal operators

public at alisdairm dot net gcc-bugzilla@gcc.gnu.org
Mon Feb 22 20:49:00 GMT 2016


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

            Bug ID: 69905
           Summary: Digit separators break literal operators
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: public at alisdairm dot net
  Target Milestone: ---

The following code fails to compile when the macro is defined:

#include <chrono>
using namespace std::literals;

#if defined SHOW_BUG
auto x = 1'23s
#else
auto x = 123s;
#endif

I /think/ this is a problem in the front-end, rather than the library, as the
digit separator should not be visible to the library call.


More information about the Gcc-bugs mailing list