diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/backslash.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/backslash.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/backslash.c b/gcc/testsuite/gcc.dg/cpp/backslash.c new file mode 100644 index 000000000..f1b094a0b --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/backslash.c @@ -0,0 +1,21 @@ +/* Test backslash newline with and without trailing spaces. */ + +#define alpha(a, b, c) \ + a, \ + b, \ + c + +/* Note the trailing whitespace on the next three lines. */ +#define beta(a, b, c) \ + a, \ + b, \ + c + +/* { dg-warning "separated by space" "space" { target *-*-* } 9 } */ +/* { dg-warning "separated by space" "tab" { target *-*-* } 10 } */ +/* { dg-warning "separated by space" "space and tab" { target *-*-* } 11 } */ + +int x[] = { + alpha(1, 2, 3), + beta(4, 5, 6) +}; |