**5.1 Evaluation of binary compatibility between compilers**

Compilers generally reorder a virtual function table according to each compiler's ABI, which makes the binary compatibility difficult. The interface *CompatibilityChecker* is suggested to check whether the methods of objects shared by different binaries (or executable files) created by different types of compilers normally call each other. The interface *CompatibilityChecker* has the methods *check1()*, *check2()*, and *check3()* arranged in an unordered fashion and is illustrated in **Figure 22**. The methods simply return the values 1, 2, and 3, respectively. In addition, all methods' calling convention is controlled as the same.

These methods are called to check whether the normal return value is delivered. The tests are considered successful if the three methods are normally called and are judged to have failed if any of the methods are not normally called or the program has shut down. The experiments using the interface *CompatibilityChecker* are performed using MSVC 9 and 14, GCC 4.5 and 5.2, and the Intel C++ Compiler 14 and 16 in Windows 10 in order to verify binary compatibility among different types of compilers. Note that the GCC of MinGW-w64 is used. In **Tables 1**–**3**, "O" means pass, "X" means failure, and "-" means not testable. ICC is the abbreviation of the Intel C++ Compiler. In other words, "O" means that the three methods are normally called.

It can be seen in **Tables 1** and **2** that BiCOMC and CCC guarantee the binary compatibility among MSVC, GCC, and ICC. However, CCC is only available in compilers supporting C++ 11. **Table 3** shows that the binary compatibility between MSVC and ICC is guaranteed as stated in [20], but these two compilers are not compatible with GCC. As stated earlier, the different types of compilers reorder the virtual function table, and then the reordered methods are not called normally. So C++ methods are called abnormally by different types of compilers as shown in **Table 3**, whereas BiCOMC and CCC worked normally because they prevent to reorder a virtual function table.
