[Issue 20791] New: extern(C++ <strings>) should allow a trailing comma
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri May 1 19:49:54 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20791
Issue ID: 20791
Summary: extern(C++ <strings>) should allow a trailing comma
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: moonlightsentinel at disroot.org
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, ... .
--
More information about the Digitalmars-d-bugs
mailing list