I use clang
, gcc
, and tcc
, and I'd like to be able to differentiate between the three in a common header.
Judging by their macro dumps, I expect that the presence of the
__clang__
macro will uniquely identify clang.
I'm unable to get a macro dump with tcc
( $compiler -x c -E -dM /dev/null
doesn't work in its case ).
What is the macro(s) (if any) that will uniquely identify gcc (and possibly tcc)?
__GNUC__
? – Solis__GNUC__
too. – Gourmandisedefined(__GNU__) && !defined(__clang__)
? – Solistcc
doesn't define__GNUC__
. Thanks. – Gourmandise