Description of problem: New version of gcc fails with "error: exponent has no digits" Reproducer (test.cpp): " int main(){ double x = 0xabcab.defdefP-10; } " compiling with g++ -std=c++11 -o test test.cpp With gcc-6.0.0-0.15.fc24 it works fine. Version-Release number of selected component (if applicable): How reproducible: gcc-6.0.0-0.18.fc24 Actual results: compile failure "error: exponent has no digits" Expected results: compilation success
The error is correct. Hexadecimal floats are part of C99, C11 and the upcoming C++17 standards, while for C89, C++11 and C++14 they are just extensions. So, you need -std=gnu89, -std=gnu++11 or -std=gnu++14 instead of -std=c89, -std=c++11 or -std=c++14 to enable them (or -std=c99, -std=c11, -std=c++17).