Bug 20791 – extern(C++ <strings>) should allow a trailing comma
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-05-01T19:49:54Z
Last change time
2020-05-02T00:58:14Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel
Comments
Comment #0 by moonlightsentinel — 2020-05-01T19:49:54Z
Compiling this code
================================
extern(C++, "foo",)
struct S {}
================================
fails with:
comma.d(1): Error: expression expected, not `)`
comma.d(2): Error: found `struct` when expecting `)`
comma.d(2): Error: no identifier for declarator `S`
comma.d(2): Error: declaration expected, not `{
This is inconsistent because a trailing comma is allowed for function arguments, array literals, ... .
Comment #1 by dlang-bot — 2020-05-01T20:00:24Z
@MoonlightSentinel created dlang/dmd pull request #11090 "Fix Issue 20791 - extern(C++ <strings>) should allow a trailing comma" fixing this issue:
- Fix Issue 20791 - extern(C++ <strings>) should allow a trailing comma
https://github.com/dlang/dmd/pull/11090
Comment #2 by dlang-bot — 2020-05-02T00:58:14Z
dlang/dmd pull request #11090 "Fix Issue 20791 - extern(C++ <strings>) should allow a trailing comma" was merged into master:
- a496a35e72832410726adf11ee45cbb9c81ead30 by MoonlightSentinel:
Fix Issue 20791 - extern(C++ <strings>) should allow a trailing comma
https://github.com/dlang/dmd/pull/11090