That was insane.

Link: <https://software.codidact.com/posts/292718>
Signed-off-by: Alejandro Colomar <a...@kernel.org>
---
 gcc/testsuite/gcc.c-torture/execute/pr68143_1.c | 2 +-
 gcc/testsuite/gcc.c-torture/execute/pr70566.c   | 2 +-
 gcc/testsuite/gcc.dg/tm/20100615.c              | 2 +-
 gcc/testsuite/gcc.target/aarch64/pr91927.c      | 2 +-
 libiberty/alloca.c                              | 2 +-
 libiberty/argv.c                                | 2 +-
 libiberty/getopt1.c                             | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gcc/testsuite/gcc.c-torture/execute/pr68143_1.c 
b/gcc/testsuite/gcc.c-torture/execute/pr68143_1.c
index cbfbbc2458b..87978906e6d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr68143_1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr68143_1.c
@@ -1,4 +1,4 @@
-#define NULL 0
+#define NULL ((void *) 0)
 
 struct stuff
 {
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr70566.c 
b/gcc/testsuite/gcc.c-torture/execute/pr70566.c
index f47106e70c7..4a52d0789f2 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr70566.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr70566.c
@@ -1,6 +1,6 @@
 /* PR target/70566.  */
 
-#define NULL 0
+#define NULL ((void *) 0)
 
 struct mystruct
 {
diff --git a/gcc/testsuite/gcc.dg/tm/20100615.c 
b/gcc/testsuite/gcc.dg/tm/20100615.c
index 26964d43367..7b5ab0d827d 100644
--- a/gcc/testsuite/gcc.dg/tm/20100615.c
+++ b/gcc/testsuite/gcc.dg/tm/20100615.c
@@ -6,7 +6,7 @@
 /* { dg-final { scan-assembler-not "tm_clone_table" { target { ! *-*-darwin*  
} } } } */
 /* { dg-final { scan-assembler-not "__DATA,__tm_clone_table" { target 
*-*-darwin*  } } } */
 
-#define NULL 0
+#define NULL ((void *) 0)
 extern void *malloc (__SIZE_TYPE__);
 
 __attribute__((transaction_pure))
diff --git a/gcc/testsuite/gcc.target/aarch64/pr91927.c 
b/gcc/testsuite/gcc.target/aarch64/pr91927.c
index f5cde1a5336..e0c0574c949 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr91927.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr91927.c
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-mstrict-align -O3" } */
 
-#define NULL 0
+#define NULL ((void *) 0)
 
 typedef unsigned uint32_t;
 typedef struct __attribute__((__packed__))
diff --git a/libiberty/alloca.c b/libiberty/alloca.c
index b75f7560f94..3bf0b17b41c 100644
--- a/libiberty/alloca.c
+++ b/libiberty/alloca.c
@@ -78,7 +78,7 @@ static long i00afunc ();
 #endif
 
 #ifndef NULL
-#define        NULL    0
+#define        NULL ((void *) 0)
 #endif
 
 /* Define STACK_DIRECTION if you know the direction of stack
diff --git a/libiberty/argv.c b/libiberty/argv.c
index f889432a868..3cb79a09eca 100644
--- a/libiberty/argv.c
+++ b/libiberty/argv.c
@@ -44,7 +44,7 @@ Boston, MA 02110-1301, USA.  */
 #endif
 
 #ifndef NULL
-#define NULL 0
+#define NULL ((void *) 0)
 #endif
 
 #ifndef EOS
diff --git a/libiberty/getopt1.c b/libiberty/getopt1.c
index 7db3d167757..cb80c5ed3d8 100644
--- a/libiberty/getopt1.c
+++ b/libiberty/getopt1.c
@@ -61,7 +61,7 @@
 #endif
 
 #ifndef        NULL
-#define NULL 0
+#define NULL ((void *) 0)
 #endif
 
 int
-- 
2.45.2

Attachment: signature.asc
Description: PGP signature

Reply via email to