Bug 21980 – ImportC: _Thread_local allowed as storage class for return type

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-05-26T17:38:27Z
Last change time
2021-06-27T23:40:28Z
Keywords
accepts-invalid, ImportC
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2021-05-26T17:38:27Z
This is illegal as per C99 6.7.1-4: _Thread_local shall not appear in the declaration specifiers of a function declaration. --- _Thread_local int invalid();
Comment #1 by bugzilla — 2021-06-27T10:15:12Z
ImportC is C11, not C99, but the same restriction applies.
Comment #2 by dlang-bot — 2021-06-27T18:16:49Z
@WalterBright created dlang/dmd pull request #12771 "Issue 21980 - importC: _Thread_local allowed as storage class for ret…" mentioning this issue: - Issue 21980 - importC: _Thread_local allowed as storage class for return type https://github.com/dlang/dmd/pull/12771
Comment #3 by dlang-bot — 2021-06-27T19:15:35Z
dlang/dmd pull request #12771 "Issue 21980 - ImportC: _Thread_local allowed as storage class for ret…" was merged into master: - f721cb6301a8aae7b47796b5608f74daf310cc66 by Walter Bright: Issue 21980 - importC: _Thread_local allowed as storage class for return type https://github.com/dlang/dmd/pull/12771