D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 22234 - __traits(getLinkage) returns wrong value for extern(System) functions
Summary: __traits(getLinkage) returns wrong value for extern(System) functions
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2021-08-23 13:59 UTC by Adam D. Ruppe
Modified: 2022-04-12 12:06 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Adam D. Ruppe 2021-08-23 13:59:47 UTC
extern(System) void foo() {}

pragma(msg, __traits(getLinkage, foo));


Prints "C" but the spec <https://dlang.org/spec/traits.html#getLinkage> says it can be "System" and thus should be since that's what is in the source.
Comment 1 Dlang Bot 2022-01-24 12:52:51 UTC
@dkorpel created dlang/dlang.org pull request #3185 "Fix issue 22234 - __traits(getLinkage) returns wrong value for extern(System) functions" fixing this issue:

- Fix issue 22234 - __traits(getLinkage) returns wrong value for extern(System) functions

https://github.com/dlang/dlang.org/pull/3185
Comment 2 Dlang Bot 2022-04-03 10:46:45 UTC
@dkorpel created dlang/dmd pull request #13942 "Fix issue 22234 - traits(getLinkage) returns wrong value for extern(System) functions" fixing this issue:

- Fix issue 22234 - traits(getLinkage) returns wrong value for extern(System) functions

https://github.com/dlang/dmd/pull/13942
Comment 3 Dlang Bot 2022-04-12 12:06:58 UTC
dlang/dmd pull request #13942 "Fix issue 22234 - traits(getLinkage) returns wrong value for extern(System) functions" was merged into master:

- e194e648b2cacd6378774e9a713554d588a88920 by Dennis Korpel:
  Fix issue 22234 - traits(getLinkage) returns wrong value for extern(System) functions

https://github.com/dlang/dmd/pull/13942