Bug 11759 – Poor error message trying to use lowercase L in literal suffix.

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-17T13:23:00Z
Last change time
2013-12-19T05:47:41Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
peter.alexander.au

Comments

Comment #0 by peter.alexander.au — 2013-12-17T13:23:12Z
ulong x = 123ul; ul.d(1): Error: semicolon expected, not 'l' ul.d(1): Error: no identifier for declarator l D, unlike C/C++, requires uppercase L for the suffix. I think this will be a common enough mistake, and easy/unambiguous to detect, so I believe it deserves a better error message. Something along the lines of "Error: uppercase L required for long integer suffix".
Comment #1 by k.hara.pg — 2013-12-17T17:13:34Z
https://github.com/D-Programming-Language/dmd/pull/2979 https://github.com/D-Programming-Language/dlang.org/pull/448 "D language spec" should not allow 'l' suffix, but compiler implementation can parse it for the particular use case.
Comment #2 by github-bugzilla — 2013-12-17T17:13:38Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e1d179032b08e313e0fdba3709cf66a0e8f9d99f fix Issue 11759 - Poor error message trying to use lowercase L in literal suffix https://github.com/D-Programming-Language/dmd/commit/ccea9b03310ad89aa2d38ec3d90f24d91ecae526 Merge pull request #2979 from 9rnsr/fix11759 Issue 11759 - Poor error message trying to use lowercase L in literal suffix
Comment #3 by github-bugzilla — 2013-12-17T17:15:33Z
Commit pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/c4a66b074d44bbaa249eaac4990234a982bdd896 Add note for lower case suffix 'l' and allow it in lexing level. Related: Issue 11759 - Poor error message trying to use lowercase L in literal suffix.
Comment #4 by github-bugzilla — 2013-12-19T05:47:41Z