Rate This Document
Findability
Accuracy
Completeness
Readability

Overview

BiSheng Compiler is developed based on the open-source LLVM. Compared with the GNU and Intel compilers, the LLVM frontend Clang performs stricter syntax check and strictly complies with language standards. For details about common compatibility and portability issues of Clang, see the official Clang compatibility documentation. This section lists some BiSheng Compiler compatibility issues in contrast with GNU and Intel compilers and some intrinsic procedures for reference. BiSheng Compiler has achieved a certain level of compatibility with GNU and Intel compilers and provides the overall compatibility option -fGNU-compatibility for GNU compiler and the overall compatibility option -fIntel-Compatibility for Intel compiler.

BiSheng Compiler also provides the clang-tidy tool to provide suggestions on some compatibility issues that require code modification. Run the following commands:

1
2
clang-tidy --checks='-*,BSCompatibility*' -export-details=fix.yaml test1.c test2.cpp --
share/clang/clang-tidy-stats.py --args -export-stats=stats.xlsx -export-stats-input=fix.yaml

It can identify compatibility issues, generate alarms, and output code information and modification suggestions to the stats.xlsx file.