Commit e936965b authored by Kristof Szabados's avatar Kristof Szabados
Browse files

This change has to be reverted until it is done correctly ( documentation is...


This change has to be reverted until it is done correctly ( documentation is missing, testing is missing for now) + it would drop support for gcc 4.3 ad 4.8 which we still need to support for some time.
Signed-off-by: Kristof Szabados's avatarKristof Szabados <Kristof.Szabados@ericsson.com>
parent 4cb32b66
......@@ -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
......
......@@ -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"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment