Bug 1321986 - error: exponent has no digits
Summary: error: exponent has no digits
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-29 14:09 UTC by Marek Skalický
Modified: 2016-03-29 14:15 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-29 14:15:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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).


Note You need to log in before you can comment on or make changes to this bug.