D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 19949 (abi_tag) - C++ Mangling: no support for abi-tags from the Itanium ABI
Summary: C++ Mangling: no support for abi-tags from the Itanium ABI
Status: RESOLVED FIXED
Alias: abi_tag
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All Linux
: P1 normal
Assignee: Suleyman Sahmi (سليمان السهمي)
URL:
Keywords: C++, mangling, pull
Depends on:
Blocks:
 
Reported: 2019-06-08 16:24 UTC by Suleyman Sahmi (سليمان السهمي)
Modified: 2020-03-28 02:48 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 Suleyman Sahmi (سليمان السهمي) 2019-06-08 16:24:26 UTC
The Itanium ABI defines a C++ attribute called `abi_tag` which is used for ABI versionning. For example std::string on linux uses it.
DMD doens't support this attribute yet which makes the C++ interface less capable.

Specification: https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangle.abi-tag

example:
---
#include <string>

std::string toString(char* s)
{
    return s;
}
---

On Linux it mangles to _Z8toStringB5cxx11Pc, B5xcc11 is the abi_tag.

Related to issue #14956.
Comment 1 Suleyman Sahmi (سليمان السهمي) 2019-06-08 22:13:44 UTC
https://github.com/dlang/dmd/pull/9995
Comment 2 Dlang Bot 2019-06-12 01:38:25 UTC
@SSoulaimane created dlang/druntime pull request #2639 "issue 19949 - C++ Mangling: add support for abi-tags from the Itanium ABI" mentioning this issue:

- issue 19949 - C++ Mangling: add support for abi-tags from the Itanium ABI

https://github.com/dlang/druntime/pull/2639
Comment 3 Dlang Bot 2019-06-12 01:57:00 UTC
@SSoulaimane updated dlang/dmd pull request #9995 "Fix issue 19949 - C++ Mangling: add support for abi-tags from the Itanium ABI" fixing this issue:

- Fix issue 19949 - C++ Mangling: add support for abi-tags from the Itanium ABI

https://github.com/dlang/dmd/pull/9995
Comment 4 Dlang Bot 2020-03-15 23:20:37 UTC
@Geod24 created dlang/druntime pull request #2990 "Add compiler-recognized UDA for Itanium ABI's abi-tags" mentioning this issue:

- Add compiler-recognized UDA for Itanium ABI's abi-tags
  
  This is part of issue 19949.

https://github.com/dlang/druntime/pull/2990
Comment 5 Dlang Bot 2020-03-15 23:22:33 UTC
@Geod24 created dlang/dmd pull request #10927 "Fix issue 19949: Implement support for C++ ABI tags" fixing this issue:

- Fix issue 19949 - C++ Mangling: add support for abi-tags from the Itanium ABI
  
  Implements C++ ABI tags with a few more restruction than the previous PR (9995).
  In particular, do not follow C++ source-level conventions when impractical
  (e.g. propagation). Since this is a feature that will be seldom used by users,
  I favored implementation simplicity over user-friendly semantics.
  
  Co-Authored-By: سليمان السهمي  (Suleyman Sahmi) <sahmi.soulaimane@gmail.com>

https://github.com/dlang/dmd/pull/10927
Comment 6 Dlang Bot 2020-03-16 00:58:35 UTC
dlang/druntime pull request #2990 "Add compiler-recognized UDA for Itanium ABI's abi-tags" was merged into master:

- bf85f57bcf87af7aa5190376e7c520a59797dd35 by سليمان السهمي  (Suleyman Sahmi):
  Add compiler-recognized UDA for Itanium ABI's abi-tags
  
  This is part of issue 19949.

https://github.com/dlang/druntime/pull/2990
Comment 7 Dlang Bot 2020-03-28 02:48:46 UTC
dlang/dmd pull request #10927 "Fix issue 19949: Implement support for C++ ABI tags" was merged into master:

- 45bc42393d5b8acdd4f940b961aee4614139a09f by Geod24:
  Fix issue 19949 - C++ Mangling: add support for abi-tags from the Itanium ABI
  
  Implements C++ ABI tags with a few more restriction than the previous PR (9995).
  In particular, do not follow C++ source-level conventions when impractical
  (e.g. propagation). Since this is a feature that will be seldom used by users,
  I favored implementation simplicity over user-friendly semantics.
  
  Co-Authored-By: سليمان السهمي  (Suleyman Sahmi) <sahmi.soulaimane@gmail.com>

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