This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Does it safe to link several objects which compiled with different `--std` flags ?
- From: Remus Clearwater <remus dot clearwater at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 8 Jun 2018 20:17:04 +0800
- Subject: Does it safe to link several objects which compiled with different `--std` flags ?
For example:
$ gcc -c --std=gnu90 a.c -o a.o
$ gcc -c --std=gnu11 b.c -o b.o
$ gcc -c --std=c99 c.c -o c.o
$ ld -o bin /lib/crt0.o a.o b.o c.o -lc
I think the answer should be 'true' but I couldn't find any specification
about it yet.
Thanks a lot :)
Remus