Bug 21938 – importC: Support __attribute__ specifiers that could be mapped to D attributes

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-05-20T18:16:14Z
Last change time
2023-12-15T02:07:46Z
Keywords
ImportC
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2021-05-20T18:16:14Z
To name a few potential __attribute__ candidates. - access (read_only, 1) - aligned - aligned (alignment) - always_inline - noreturn - nothrow - pure
Comment #1 by ibuclaw — 2021-05-20T18:21:43Z
(In reply to Iain Buclaw from comment #0) > To name a few potential __attribute__ candidates. > Of course, forgetting an obvious one: - deprecated
Comment #2 by bugzilla — 2022-02-10T08:24:29Z
- aligned - aligned (alignment) Now there are 3 ways to align in gcc: #pragma pack _Alignas __attribute___
Comment #3 by bugzilla — 2023-04-09T05:43:40Z
Comment #4 by bugzilla — 2023-04-27T01:12:00Z
Comment #5 by bugzilla — 2023-12-15T02:07:46Z
Currently doing all but `access`. The access modes are read_only, read_write, write_only, or none. https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html None of those access modes are supported in detail by D semantics, the best we can do without adding more D semantics is to simply ignore them, which is done today. I.e. there isn't much value in implementing `access`. I'm going to write the rest as "FIXED" and `access` as WONTFIX.