Is it safe to link gcc 6, gcc 7, and gcc 8 objects? : <p><a href="https://stackoverflow.com/q/46746878/2069064">Is it safe to link C++17, C++14, and C++11 objects</a> asks about linking objects compiled with different language standards, and Jonathan Wakely's excellent answer on that question explains the ABI stability promises that gcc/libstdc++ make to enusure that this works.</p>

<p>There's one more thing that can change between gcc versions though - the language ABI via <a href="https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html" rel="noreferrer"><code>-fabi-version</code></a>. Let's say, for simplicity, I have three object files:</p>

<ul>
<li><code>foo.o</code>, compiled with gcc 6.5 c++14</li>
<li><code>bar.o</code>, compiled with gcc 7.4 c++14</li>
<li><code>quux.o</code>, compiled with gcc 8.3 c++17</li>
</ul>

<p>All with the respective default language ABIs (i.e. 10, 11, and 13). Linking these objects together is safe from the library perspective per the linked answer. But are there things that could go wrong from a language ABI perspective? Is there anything I should be watching out for? Most of the language ABI changes seem like they wouldn't cause issues, but the calling convention change for empty class types in 12 might?</p>
