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

            Bug ID: 105509
           Summary: [compatibility] f16 suffix not supported in C++ mode -
                    unable to find numeric literal operator
                    ‘operator""f16’
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: thiago at kde dot org
  Target Milestone: ---

The following code:

_Float16 f = 12.34f16;

compiles as C in GCC12, and as both C and C++ with Clang 14 and ICX 2022.

But with GCC 12 as C++, it generates:

error: unable to find numeric literal operator ‘operator""f16’

See also https://wg21.link/p1467, notably section 5.10 Literal suffixes

Reply via email to