analyzer: avoid using <string.h> in malloc-1.c
This test assumes that memset and strlen have been marked with __attribute__((nonnull)), which isn't necessarily the case for an arbitrary <string.h>. This likely explains these failures: FAIL: gcc.dg/analyzer/malloc-1.c (test for warnings, line 417) FAIL: gcc.dg/analyzer/malloc-1.c (test for warnings, line 418) FAIL: gcc.dg/analyzer/malloc-1.c (test for warnings, line 425) FAIL: gcc.dg/analyzer/malloc-1.c (test for warnings, line 429) seen in https://gcc.gnu.org/ml/gcc-testresults/2020-01/msg01608.html on x86_64-apple-darwin18. Fix it by using the __builtin_ forms. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/malloc-1.c: Remove include of <string.h>. Use __builtin_ forms of memset and strlen throughout.
Showing
Please
register
or
sign in
to comment