Bug 20449 – integer literal specification and implementation differs

Status
NEW
Severity
normal
Priority
P3
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-12-14T10:31:27Z
Last change time
2024-12-15T15:25:28Z
Keywords
pull
Assigned to
No Owner
Creator
berni44
Moved to GitHub: dlang.org#3980 →

Comments

Comment #0 by bugzilla — 2019-12-14T10:31:27Z
void main() { auto x = 9223372036854775808; // long.max + 1 } compilation fails, but specs on https://dlang.org/spec/lex.html#integerliteral tell, that it will not. See https://forum.dlang.org/post/[email protected]
Comment #1 by dlang-bot — 2019-12-14T21:25:56Z
@dkorpel updated dlang/dmd pull request #10673 "Fix 20449 - integer literal specification and implementation differs" fixing this issue: - fix issue 20449 - integer literal specification and implementation differs https://github.com/dlang/dmd/pull/10673
Comment #2 by bugzilla — 2019-12-16T07:29:47Z
Because it's been implemented this way for 19 years now, and the compiler behavior matches C, I recommend that the spec change rather than the compiler.
Comment #3 by bugzilla — 2019-12-16T07:46:52Z
I changed this to a spec bug, rather than a compiler bug.
Comment #4 by bugzilla — 2019-12-16T07:59:37Z
(In reply to Walter Bright from comment #3) > I changed this to a spec bug, rather than a compiler bug. Nitpicking, but: It was a spec bug from the very beginning and I was surprised to see an implementation fix PR...
Comment #5 by robert.schadek — 2024-12-15T15:25:28Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dlang.org/issues/3980 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB