[gcc r16-9316] 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:6a38fff95318382502158f5537a5abfff8e992ae

commit r16-9316-g6a38fff95318382502158f5537a5abfff8e992ae
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]>
    (cherry picked from commit d97947a3067c13dcd33eb1ef7aef14ca279316cf)

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 773ea3af570d..fe03beb273a7 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -15042,7 +15042,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.