Commit 0f236c1f authored by Alexey Brodkin's avatar Alexey Brodkin Committed by Peter Korsgaard
Browse files

ARC: gcc - Fix SIZE_TYPE to be "unsigned int" instead of "long unsigned int"

This makes size_t to be "unsigned" ssize_t which makes happy compiler on data
type checks.

Fix is taken from current development branch of GCC for ARC and will be a
part of the next release of ARC tools, so at that point patch should be dropped.

https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/commit/249f040299402647525c3f15b79d319fa7acddd3

Fixes http://autobuild.buildroot.net/results/405/405da9a945511329929b18740b983c51b8dcc43e



Signed-off-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
Cc: Anton Kolesov <akolesov@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Reviewed-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent 58a41c2f
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
Fixes SIZE_TYPE to be "unsigned int" instead of "long unsigned int".

This makes size_t to be "unsigned" ssize_t which makes happy compiler on data
type checks.

Fix is taken from current development branch of GCC for ARC and will be a
part of the next release of ARC tools, so at that point patch should be dropped.

https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/commit/249f040299402647525c3f15b79d319fa7acddd3

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
---

--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -487,7 +487,7 @@ if (GET_MODE_CLASS (MODE) == MODE_INT		\
 /* Define this as 1 if `char' should by default be signed; else as 0.  */
 #define DEFAULT_SIGNED_CHAR 0
 
-#define SIZE_TYPE "long unsigned int"
+#define SIZE_TYPE "unsigned int"
 #define PTRDIFF_TYPE "long int"
 #define WCHAR_TYPE "int"
 #define WCHAR_TYPE_SIZE 32