← Back to index
|
Original Bugzilla link
Bug 22018 – pragma(inline) parameter not checked when the pragma is a declaration
Status
RESOLVED
Resolution
WONTFIX
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-06-12T05:12:01Z
Last change time
2021-06-15T13:33:51Z
Assigned to
No Owner
Creator
Basile-z
Comments
Comment #0
by b2.temp — 2021-06-12T05:12:01Z
no error is emitted for the following code --- pragma(inline, INVALID); void v(){} --- The scenario is that the semicolon is a typo.
Comment #1
by razvan.nitu1305 — 2021-06-15T13:08:05Z
I'm not sure this is a bug. Since the declaration is missing, the pragma is no longer semantically analyzed.
Comment #2
by razvan.nitu1305 — 2021-06-15T13:16:22Z
Looking at the dmd source code it seems that this is on purpose [1]. Closing as invalid. [1]
https://github.com/dlang/dmd/blob/master/src/dmd/dsymbolsem.d#L1631