I would like to know the name (and version, if available) of the compiler that is being used to compile the code.
Do popular compilers like GCC, Clang, ICX, et cetera define any macro that can be used to detect this?
Use-case: I require it for the --version
flag of the program. (Yes, it also prints the compiler information).
Note: I do not particularly care for Windows here, and am looking for a solution for Unix-like systems.