Debian Codegraph @

gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-8.c

raw
1 /* This test uses intentionally DOS line endings (CR+LF). */
2 /* { dg-do compile { target { c || c++11 } } } */
3 /* { dg-options "-Wtrailing-whitespace=any" } */
4
5 int i;
6 /* { dg-warning "trailing whitespace" "" { target *-*-* } .-1 } */
7 int j;
8 /* { dg-warning "trailing whitespace" "" { target *-*-* } .-1 } */
9 int \
10 k \
11 ;
12 /* { dg-warning "backslash and newline separated by space" "" { target *-*-* } .-3 } */
13 /* { dg-warning "backslash and newline separated by space" "" { target *-*-* } .-3 } */
14 /* { dg-warning "trailing whitespace" "" { target *-*-* } .-3 } */
15
16 /* { dg-warning "trailing whitespace" "" { target *-*-* } .-1 } */
17
18 /* { dg-warning "trailing whitespace" "" { target *-*-* } .-1 } */
19
20 /* { dg-warning "trailing whitespace" "" { target *-*-* } .-1 } */
21
22 /* { dg-warning "trailing whitespace" "" { target *-*-* } .-1 } */
23
24 /* { dg-warning "trailing whitespace" "" { target *-*-* } .-1 } */
25
26 /* { dg-warning "trailing whitespace" "" { target *-*-* } .-1 } */
27 const char *p = R"*|*(
28
29
30 .
31 )*|*";
32 /* { dg-warning "trailing whitespace" "" { target *-*-* } .-1 } */
33 // This is a comment with trailing whitespace
34 /* { dg-warning "trailing whitespace" "" { target *-*-* } .-1 } */
35 /* This is a comment with trailing whitespace
36 */
37 /* { dg-warning "trailing whitespace" "" { target *-*-* } .-2 } */
38 // This is a comment with trailing whitespace
39 /* { dg-warning "trailing whitespace" "" { target *-*-* } .-1 } */
40 /* This is a comment with trailing whitespace
41 */
42 /* { dg-warning "trailing whitespace" "" { target *-*-* } .-2 } */
43 /* { dg-warning "trailing whitespace" "" { target *-*-* } .+1 } */
44