Debian Codegraph @

gcc/testsuite/c-c++-common/analyzer/named-constants-via-macros-undef.c

raw
1 #include "analyzer-decls.h"
2
3 /* Various constants used by the fd state machine. */
4
5 #define O_ACCMODE 42
6 #define O_RDONLY 0x1
7 #define O_WRONLY 010
8
9 #undef O_ACCMODE
10 #undef O_RDONLY
11 #undef O_WRONLY
12
13 void test_sm_fd_constants (void)
14 {
15 __analyzer_dump_named_constant ("O_ACCMODE"); /* { dg-warning "named constant 'O_ACCMODE' has unknown value" } */
16 __analyzer_dump_named_constant ("O_RDONLY"); /* { dg-warning "named constant 'O_RDONLY' has unknown value" } */
17 __analyzer_dump_named_constant ("O_WRONLY"); /* { dg-warning "named constant 'O_WRONLY' has unknown value" } */
18 }