[gcc r17-2565] testsuite: cast argument to char* in can_deref_null [PR126261]

Torbjorn Svensson via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:d97947a3067c13dcd33eb1ef7aef14ca279316cf

commit r17-2565-gd97947a3067c13dcd33eb1ef7aef14ca279316cf
Author: Torbjörn SVENSSON <[email protected]>
Date:   Mon Jul 20 17:07:07 2026 +0200

    testsuite: cast argument to char* in can_deref_null [PR126261]
    
    gcc/testsuite/ChangeLog:
    
            PR testsuite/126261
            * lib/target-supports.exp (check_effective_target_can_deref_null):
            Cast argument to char*.
    
    Signed-off-by: Torbjörn SVENSSON <[email protected]>

Diff:
---
 gcc/testsuite/lib/target-supports.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index de98aeb27313..f43197779517 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -15183,7 +15183,7 @@ proc check_effective_target_can_deref_null { } {
 	int
 	main ()
 	{
-	  read_mem (0);
+	  read_mem ((char *)0);
 	  return 0;
 	}
       } "-O0 -fno-delete-null-pointer-checks -Wno-null-dereference"]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.