Questions tagged [itanium-abi]
6 questions
23
votes
1 answer
In the Itanium C++ ABI, why does the mangled name for template functions not resolve dependent typedefs?
For example:
template
struct foo
{
using bar = int;
};
// _Z3bazi
void baz(foo::bar quux) {
}
template
void baz(typename foo::bar quux) {
}
// _Z3bazIiEvN3fooIT_E3barE
template void baz(foo::bar…

Tavian Barnes
- 12,477
- 4
- 45
- 118
21
votes
3 answers
GCC vs MS C++ compiler for maintaining API backwards binary compatibility
I came from the Linux world and know a lot of articles about maintaining backwards binary compatibility (BC) of a dynamic library API written in C++ language. One of them is "Policies/Binary Compatibility Issues With C++" based on the Itanium C++…

linuxbuild
- 15,843
- 6
- 60
- 87
8
votes
2 answers
Type trait to identify primary base class
If I have a class Base, with at least one virtual function, and a class Derived which inherits singly from this then (uintptr_t)derived - (uintptr_t)static_cast (derived) is guaranteed (by the Itanium ABI) to be zero, even though Derived is…

jleahy
- 16,149
- 6
- 47
- 66
6
votes
1 answer
C++ exception support in linux kernel module
In 2005 Dr Dobb's magazine published an article about patch for linux kernel. The patch pretended to allow Itanium C++ ABI in kernel space. The patch was not accepted.
The code disappeared from the Net (I cannot find it :)).
It seems that the…

Spoonwalker Highwater
- 411
- 2
- 9
3
votes
0 answers
Why does Itanium ABI require some value parameters to be allocated in memory and passed by reference?
If the parameter type is non-trivial for the purposes of calls, the caller must allocate space for a temporary and pass that temporary by reference
https://itanium-cxx-abi.github.io/cxx-abi/abi.html#value-parameter
And *non-trivial for the purpose…

lz96
- 2,816
- 2
- 28
- 46
3
votes
2 answers
Why can I catch an object or dynamic_cast even if its std::type_info object is different?
I was conducting an experiment and defined the same class both in a program and in a shared library that I dlopen from the program and made sure the program has no entry for the type info object in its dynsym table. Then I throw an object of that…

Johannes Schaub - litb
- 496,577
- 130
- 894
- 1,212