In the GCC toolchain from MinGW-Builds project, these macros look correct and consistent, but these aren't in the llvm-mingw.
the test
cc\version>g++ -o gnu-version gccv.cc
cc\version>.\gnu-version
GNU Compiler Collection version: 15.2.0
Full version string: 15.2.0
cc\version>mingw-llvmenv
cc\version>g++ -o llvm-version gccv.cc
cc\version>.\llvm-version
GNU Compiler Collection version: 4.2.1
Full version string: Clang 22.1.4 (https://github.com/llvm/llvm-project.git 35990504507d79e0b9deb809c8ee5e1b34ceef20)
the source
#include <iostream>
int main() {
std::cout << "GNU Compiler Collection version: ";
std::cout << __GNUC__ << "." << __GNUC_MINOR__ << "." << __GNUC_PATCHLEVEL__ << std::endl;
std::cout << "Full version string: " << __VERSION__ << std::endl;
return 0;
}
In the GCC toolchain from MinGW-Builds project, these macros look correct and consistent, but these aren't in the llvm-mingw.
the test
the source