diff mbox series

[pushed] testsuite, Darwin : Skip a test requiring strndup in libc.

Message ID 366FAE50-91D0-42BF-8807-999470F3E154@sandoe.co.uk
State New
Headers show
Series [pushed] testsuite, Darwin : Skip a test requiring strndup in libc. | expand

Commit Message

Iain Sandoe Aug. 29, 2021, 6:55 a.m. UTC
Hi

Before Darwin11 there is no strndup in libc. This test fails with
warning output because of that - so skip it on these versions (since
they are not able to use strndup anyway).

tested across the Darwin range and on x86_64, powerpc64 linux.
pushed to master, thanks
Iain

gcc/testsuite/ChangeLog:

	* gcc.dg/analyzer/strndup-1.c: Skip for Darwin versions
	without strndup support in libc.
---
 gcc/testsuite/gcc.dg/analyzer/strndup-1.c | 1 +
 1 file changed, 1 insertion(+)

--
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.dg/analyzer/strndup-1.c b/gcc/testsuite/gcc.dg/analyzer/strndup-1.c
index 23d9b6070ce..58223533b5d 100644
--- a/gcc/testsuite/gcc.dg/analyzer/strndup-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/strndup-1.c
@@ -1,3 +1,4 @@ 
+/* { dg-skip-if "no strndup in libc" { *-*-darwin[789]* *-*-darwin10* } } */
 #include <string.h>
 #include <stdlib.h>