comparison gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-bw-line-numbers-2.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* { dg-do compile } */
2 /* Verify "-fdiagnostics-minimum-margin-width=0". */
3 /* { dg-options "-O -fdiagnostics-show-caret -fdiagnostics-show-line-numbers -fdiagnostics-minimum-margin-width=0" } */
4
5 /* This is a collection of unittests for diagnostic_show_locus;
6 see the overview in diagnostic_plugin_test_show_locus.c.
7
8 In particular, note the discussion of why we need a very long line here:
9 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
10 and that we can't use macros in this file. */
11
12 void test_simple (void)
13 {
14 #if 0
15 myvar = myvar.x; /* { dg-warning "test" } */
16
17 /* { dg-begin-multiline-output "" }
18 15 | myvar = myvar.x;
19 | ~~~~~^~
20 { dg-end-multiline-output "" } */
21 #endif
22 }