Debian Codegraph @

gcc/testsuite/g++.dg/plugin/location-overflow-test-pr100796.c

raw
1 // PR c++/100796
2 // { dg-additional-options "-Wsuggest-override -fplugin-arg-location_overflow_plugin-value=0x60000001" }
3 // Passing LINE_MAP_MAX_LOCATION_WITH_COLS meant we stopped distinguishing between lines in a macro.
4
5 #define DO_PRAGMA(text) _Pragma(#text)
6 #define WARNING_PUSH DO_PRAGMA(GCC diagnostic push)
7 #define WARNING_POP DO_PRAGMA(GCC diagnostic pop)
8 #define WARNING_DISABLE(text) DO_PRAGMA(GCC diagnostic ignored text)
9 #define NO_OVERRIDE_WARNING WARNING_DISABLE("-Wsuggest-override")
10
11 #define BOILERPLATE \
12 WARNING_PUSH \
13 NO_OVERRIDE_WARNING \
14 void f(); \
15 WARNING_POP
16
17 struct B
18 {
19 virtual void f();
20 };
21
22 struct D: B
23 {
24 BOILERPLATE
25 };