diff --git a/common/version.h b/common/version.h index c2e3472a33e8b05cfe0222efaf37fca16f8bf5a2..c04a20ea173f55465ace6c6d4ce4a90a26c0e539 100644 --- a/common/version.h +++ b/common/version.h @@ -91,18 +91,10 @@ #endif #ifdef __clang__ - #if __clang_major__ > 4 - #define CLANG_VERSION (__clang_major__ * 10000 ) - #else - #define CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100) - #endif + #define CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100) #define COMPILER_VERSION_STRING " Clang: (GNU) " STR(__clang_major__) "." STR(__clang_minor__) "." STR(__clang_patchlevel__) #else - #if __GNUC__ > 4 - #define GCC_VERSION (__GNUC__ * 10000 ) - #else - #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) - #endif + #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) #define COMPILER_VERSION_STRING " GCC: (GNU) " STR(__GNUC__) "." STR(__GNUC_MINOR__) GCC_PATCHLEVEL_STRING #endif diff --git a/core/gccversion.c b/core/gccversion.c index 3d2f7ac54e82d370d48a3f17feb616237b99f049..6ab7383861882516aa47bcf459bf3ec2c1828392 100644 --- a/core/gccversion.c +++ b/core/gccversion.c @@ -72,10 +72,9 @@ int main(void) "#if GCC_VERSION != %d\n" #endif "#error The version of " COMPILER_NAME_STRING " does not match the expected version (" COMPILER_NAME_STRING " %d.%d.%d)\n" - "#endif\n", compiler_major>4?compiler_major * 10000:compiler_major * 10000 + compiler_minor * 100, + "#endif\n", compiler_major * 10000 + compiler_minor * 100, /* Note that we don't use compiler_patchlevel when checking. - * This assumes that code is portable between GCC a.b.x and a.b.y - * The GCC & Clang changed the versioning scheme and both dropped the minor versions */ + * This assumes that code is portable between GCC a.b.x and a.b.y */ compiler_major, compiler_minor, compiler_patchlevel); #elif defined(__SUNPRO_C) printf("\n"