This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Do C dialect options -std=* affect the ABI?
- From: Florian Weimer <fweimer at redhat dot com>
- To: Sebastian Huber <sebastian dot huber at embedded-brains dot de>, GCC help <gcc-help at gcc dot gnu dot org>
- Date: Tue, 8 May 2018 14:27:54 +0200
- Subject: Re: Do C dialect options -std=* affect the ABI?
- References: <7cbd7194-0b7c-53ca-2885-2fec51e3da24@embedded-brains.de>
On 05/08/2018 07:32 AM, Sebastian Huber wrote:
For example can I safely link objects produced with different C++
standard versions to produce an executable?
In general, no. A lot of header files enable and disable features based
on the standards version, and that usually has an ABI impact.
I think for C, the inlining behavior changes significantly, which has
ABI implications. See the -fgnu89-inline option (whose documentation
apparently was not updated for C11). I'm not even sure that you can
assume that if the code still links, it has the same behavior.
Thanks,
Florian