Debian Codegraph @

gcc/testsuite/c-c++-common/fhardened-9.c

raw
1 /* { dg-do compile { target *-*-linux* *-*-gnu* } } */
2 /* { dg-options "-fhardened -U_FORTIFY_SOURCE -U_GLIBCXX_ASSERTIONS" } */
3
4 #if defined(_FORTIFY_SOURCE) || defined(_GLIBCXX_ASSERTIONS)
5 # error "hardening enabled when it should not be"
6 #endif
7
8 /* { dg-warning "._FORTIFY_SOURCE. is not enabled" "" { target *-*-* } 0 } */
9 /* { dg-warning "._GLIBCXX_ASSERTIONS. is not enabled" "" { target *-*-* } 0 } */