www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11759] New: Poor error message trying to use lowercase L in literal suffix.

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11759

           Summary: Poor error message trying to use lowercase L in
                    literal suffix.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: peter.alexander.au gmail.com



13:23:12 PST ---
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".

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 17 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11759


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic, pull



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.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 17 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11759


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic, pull



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.


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


Issue 11759 - Poor error message trying to use lowercase L in literal suffix

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 17 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11759




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.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 17 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11759


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 17 2013
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11759




Commit pushed to 2.065 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.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 19 2013