D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 5138 - Special token sequence
Summary: Special token sequence
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 trivial
Assignee: No Owner
URL:
Keywords: accepts-invalid
Depends on:
Blocks:
 
Reported: 2010-10-30 16:50 UTC by John Mandeville
Modified: 2015-06-09 05:12 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description John Mandeville 2010-10-30 16:50:32 UTC
If I understand the documentation correctly, this should not compile:

#line 99L

This is because the fist token following line is supposed to be an Integer, not an IntegerLiteral.  Thus the suffix "L" should not be allowed.  However, this compiles on both D1 and D2.

The suffix here is silly but harmless.  I don't much care whether it should be allowed.  But it is still worth noting that the documentation is inconsistent with the compiler behavior.

Tested on Windows with v1.063, v1.065, v2.049, and v2.050.
Comment 1 Walter Bright 2012-01-20 00:31:40 UTC
Fixed 1.073/2.058