diff options
author | David Malcolm <dmalcolm@redhat.com> | 2020-01-30 15:44:59 -0500 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2020-01-30 19:12:11 -0500 |
commit | 3e990d795405b370dc5315da59ce809750173312 (patch) | |
tree | 587108294b39b729115d3bfcc05ec0e8c98e28cc /gcc/tree.h | |
parent | e34ad101a4338eab41e38e624f2c7178d0b83d24 (diff) | |
download | gcc-3e990d795405b370dc5315da59ce809750173312.zip gcc-3e990d795405b370dc5315da59ce809750173312.tar.gz gcc-3e990d795405b370dc5315da59ce809750173312.tar.bz2 |
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.
Diffstat (limited to 'gcc/tree.h')
0 files changed, 0 insertions, 0 deletions