Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1321986

Summary: error: exponent has no digits
Product: [Fedora] Fedora Reporter: Marek Skalický <mskalick>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: davejohansen, jakub, jwakely, law, mpolacek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-29 14:15:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marek Skalický 2016-03-29 14:09:24 UTC
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

Comment 1 Jakub Jelinek 2016-03-29 14:15:25 UTC
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).