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 --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> --