A new option is added to warn if floating point literals have non-standard
suffices (currently Q and W) in pedantic mode. The option is ON by default.

I don't think we should turn this off when building GCC itself (as opposed
to target libraries).  Host floating-point should only be used for limited
purposes such as reporting timing statistics, not for anything that could
affect target code generation; I don't see any reason we should want to
use these extended floating types in GCC itself at all.

I turned it off because any gcc/*.cc that includes <limits> directly or through eg. <math.h> throws:

In file included from <BUILD>/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/bits/specfun.h:44, from <BUILD>/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/cmath:3913, from <BUILD>/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/math.h:36,
                 from ../../gcc/gcc/genautomata.cc:116:
<BUILD>/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/limits:2107:30: error: non-standard suffix on floating constant [-Werror=non-standard-suffix]
 2107 |         return __extension__ 0x1.0p-16382Q;
| ^~~~~~~~~~~~~
...

Should I add the flag selectively to affected files' build flags only?

--
Gábor

PS: Now that I think of it, I don't know how my adding the flag to ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC did work at all in stage1, as the native compiler doesn't have the new flag at that point yet, but I'll re-check.

Reply via email to