From e936965b7c382e7c22f5d04997690611e1ed9648 Mon Sep 17 00:00:00 2001
From: Kristof Szabados <Kristof.Szabados@ericsson.com>
Date: Tue, 28 Apr 2020 19:27:36 +0200
Subject: [PATCH] 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 <Kristof.Szabados@ericsson.com>
---
 common/version.h  | 12 ++----------
 core/gccversion.c |  5 ++---
 2 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/common/version.h b/common/version.h
index c2e3472a3..c04a20ea1 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 3d2f7ac54..6ab738386 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"
-- 
GitLab