In a scenario where three compiled objects (A, B, and C) are produced using the same compiler version:
...and assuming that:
...it is safe to link any combination of these objects according to GCC. GCC ensures ABI compatibility in such cases, regardless of the standard version used.
However, linking issues may arise if objects are compiled with different GCC versions and unstable C standard features are used. For example, linking objects compiled with GCC 4.9 and 5, using C 11 standard, can lead to problems due to unstable C 11 support in GCC 4.x.
Stability of C 03, C 11, and C 17 support in different GCC versions is as follows:
The above is the detailed content of Can C 11, C 14, and C 17 Objects be Safely Linked Using the Same Compiler?. For more information, please follow other related articles on the PHP Chinese website!