Debian Codegraph @

gcc/testsuite/g++.dg/diagnostic/pr67960-2.C

raw
1 // PR c++/67960
2 // { dg-do compile }
3 // { dg-additional-options "-Werror -fmax-errors=1" }
4 __attribute__((deprecated)) void doNothing(){}
5
6 int
7 main()
8 {
9 doNothing(); // { dg-error "is deprecated" }
10 }
11
12 // { dg-message "all warnings being treated as errors" "" { target *-*-* } 0 }
13 // { dg-bogus "compilation terminated" "" { target *-*-* } 0 }