I don't think GCC has a special case for handling COM classes. However, I found that GCC uses "Itanium CXX ABI" on Linux which specifies vtable layout which accidentally might match the layout of COM classes. However, it is not guaranteered (for example, by C++ standards) that other compilers use the same layout.
The ABI isn't covered by C++ standards, it's target and architecture dependent. For the purposes of this discussion that ABI is stable for C++ vtables on the targets and architectures that VST3 supports.
If a compiler and linker don't follow those ABIs then it would also be close to useless for compiling or linking against shared libraries. So in the wild, all useful compilers do target the same ABIs.
gcc in mingw on windows is the odd duck, but most production software does not support it anyway.
Not really, VST3's COM-like API just uses virtual methods, they don't guarantee layout to the same degree actual COM does with compiler support. They simply rely on the platform ABI being standardized enough.
I don't think GCC has a special case for handling COM classes. However, I found that GCC uses "Itanium CXX ABI" on Linux which specifies vtable layout which accidentally might match the layout of COM classes. However, it is not guaranteered (for example, by C++ standards) that other compilers use the same layout.
The ABI is stable everywhere VST3s are used. It has to be or nothing would work.
Everything would work except for VST3, if written according to standards.
The ABI isn't covered by C++ standards, it's target and architecture dependent. For the purposes of this discussion that ABI is stable for C++ vtables on the targets and architectures that VST3 supports.
If a compiler and linker don't follow those ABIs then it would also be close to useless for compiling or linking against shared libraries. So in the wild, all useful compilers do target the same ABIs.
gcc in mingw on windows is the odd duck, but most production software does not support it anyway.
> If a compiler and linker don't follow those ABIs then it would also be close to useless for compiling or linking against shared libraries.
I guess in C++ you are not supposed to link libraries produced by different compilers? Maybe you should use C-compatible interfaces in this case?
You are, you can, and people do. Sure you should use C interfaces, that's what CLAP does, and it's easier to understand as a result.
The C standard similarly does not specify an ABI.
Not really, VST3's COM-like API just uses virtual methods, they don't guarantee layout to the same degree actual COM does with compiler support. They simply rely on the platform ABI being standardized enough.