Bug 11751 – [REG2.065a] Hex float exponents should be decimal

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-15T22:25:00Z
Last change time
2015-06-17T21:03:47Z
Keywords
accepts-invalid, pull, wrong-code
Assigned to
nobody
Creator
jiki

Comments

Comment #0 by jiki — 2013-12-15T22:25:22Z
Dmd has been changed to accept hex float exponent by hexadecimal (and 'F' suffix, too). This is a regression. In the spec: HexExponent: HexExponentStart DecimalDigitsNoSingleUS This regression is introduced by Pull 2923. https://github.com/D-Programming-Language/dmd/pull/2923 "redo lexing of float literals" Its comment: Shouldn't be any behavior changes.
Comment #1 by bugzilla — 2013-12-16T11:09:27Z
Can you give an example?
Comment #2 by k.hara.pg — 2013-12-16T16:37:04Z
(In reply to comment #1) > Can you give an example? auto x = 0x1.FFFFFFFFFFFFFpABC; // ^^^ With 2.064.2: test.d(1): Error: exponent expected test.d(1): Error: semicolon expected following auto declaration, not 'BC' test.d(1): Error: no identifier for declarator BC With git head: (no compilation error)
Comment #3 by jiki — 2013-12-16T17:07:18Z
(In reply to comment #2) Thanks. (In reply to comment #1) >Can you give an example? More actual one: static assert( is(float==typeof(0x0.1p1F)) ); Success in 2.064. Failure in 2.065a because dmd sees the last 'F' as a part of the exponent.
Comment #4 by k.hara.pg — 2013-12-17T04:41:09Z
Comment #5 by github-bugzilla — 2013-12-17T15:02:29Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/4d4e67455efb4728ba8f9181adc5e4f10fc90fd8 fix Issue 11751 - Hex float exponents should be decimal https://github.com/D-Programming-Language/dmd/commit/00e4068b327323aff2b459ec598eeae21622b70f Merge pull request #2978 from 9rnsr/fix11751 [REG2.065a] Issue 11751 - Hex float exponents should be decimal
Comment #6 by github-bugzilla — 2015-03-29T07:39:19Z
Comment #7 by github-bugzilla — 2015-06-17T21:03:47Z