-
Notifications
You must be signed in to change notification settings - Fork 10
/
microblaze-size_t.diff
39 lines (31 loc) · 1.18 KB
/
microblaze-size_t.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 478ee0c03a08e2ef9371fd88d516738936943e78 Mon Sep 17 00:00:00 2001
From: David Holsgrove <david.holsgrove@xilinx.com>
Date: Fri, 28 Sep 2012 16:32:03 +1000
Subject: [PATCH 06/11] [Patch, microblaze]: Add SIZE_TYPE and PTRDIFF_TYPE to
microblaze.h
Fixes warnings like;
warning: format '%zX' expects argument of type 'size_t',
but argument 3 has type 'unsigned int' [-Wformat]
Changelog
2013-03-18 David Holsgrove <david.holsgrove@xilinx.com>
* gcc/config/microblaze/microblaze.h: Define SIZE_TYPE
and PTRDIFF_TYPE.
Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
---
gcc/config/microblaze/microblaze.h | 6 ++++++
1 file changed, 6 insertions(+)
diff -r a522e4b04c77 gcc/config/microblaze/microblaze.h
--- a/gcc/config/microblaze/microblaze.h Thu Dec 24 11:25:11 2015 -0500
+++ b/gcc/config/microblaze/microblaze.h Thu Dec 24 11:25:13 2015 -0500
@@ -218,6 +218,12 @@
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE "int"
+#undef SIZE_TYPE
+#define SIZE_TYPE "unsigned int"
+
+#undef PTRDIFF_TYPE
+#define PTRDIFF_TYPE "int"
+
#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
((TREE_CODE (EXP) == STRING_CST || TREE_CODE (EXP) == CONSTRUCTOR) \
&& (ALIGN) < BITS_PER_WORD \