https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107750
--- Comment #3 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> --- > --- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> --- > Sorry about the breakage; thanks for filing this, and for the patch. > > Looking at: > FAIL: gcc.dg/analyzer/fd-access-mode-target-headers.c (test for warnings, > line 53) > it looks like the analyzer was able to figure out the values of O_RDONLY and > O_WRONLY in your headers, but not of O_ACCMODE. I suspect it might be having > issues with SOCK_STREAM and SOCK_DGRAM also. > > How are these values defined in your headers? The analyzer has gained some > ability to try to e.g. scrape macro values from the C frontend, but only some > cases are supported. <sys/fcntl.h>: #define O_ACCMODE (O_SEARCH | O_EXEC | 0x3) <sys/socket.h>: #if !defined(_XPG4_2) || defined(__EXTENSIONS__) #define SOCK_STREAM NC_TPI_COTS /* stream socket */ #define SOCK_DGRAM NC_TPI_CLTS /* datagram socket */ #define SOCK_RAW NC_TPI_RAW /* raw-protocol interface */ #else #define SOCK_STREAM 2 /* stream socket */ #define SOCK_DGRAM 1 /* datagram socket */ #define SOCK_RAW 4 /* raw-protocol interface */ #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ NC_TPI_COTS is also 2, same for the other two. > There's a way of debugging this using -fdump-analyzer, but I'm looking at > adding a way to make such issues show up more clearly in the DejaGnu logs, > which hopefully should make them easier to track down. That would certainly be nice. Thanks. Rainer