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

--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Axel Naumann from comment #2)
> You asked for it, so here is my wish list:
> - for C++ < 1z, do not support hexfloats, neither with "unsigned" not
> negative exponents.

Since "unsigned" exponents are supported by standard C++11, g++ has to support
them.

> Or support both, as a GCC extention that's enabled by
> default - like in the GCC 5 times.

Given Joseph comments, it seems the "signed" extension is incompatible with
standard C++ < 1z. That is, the same valid program may behave differently
whether the extension is enabled or not.

> - if you remove support for C++ < 1z, state that hexfloats are unsupported
> in C++ < 1z.

Only "signed" exponents are unsupported. My patch above tries to catch this
case and give a better error message, but it is not as trivial as I thought.

> NB: Even if I would buy into the argument that diagnostics are limited by
> the tokens, I don't yet see why 'P' ends up being concated to the pp-number
> token in C++ < 1z.

You have to run g++ (actually, cc1plus) under a debugger to see why. See
lex_number. Doing it in a different way would probably break a lot of other
things.

Reply via email to