| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O -fdiagnostics-show-caret -fno-diagnostics-show-labels" } */ |
| 3 |
|
| 4 |
/* Verify that -fno-diagnostics-show-labels works. */ |
| 5 |
|
| 6 |
/* This is a collection of unittests for diagnostic_show_locus; |
| 7 |
see the overview in diagnostic_plugin_test_show_locus.c. |
| 8 |
|
| 9 |
In particular, note the discussion of why we need a very long line here: |
| 10 |
01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 |
| 11 |
and that we can't use macros in this file. */ |
| 12 |
|
| 13 |
void test_multiline (void) |
| 14 |
{ |
| 15 |
#if 0 |
| 16 |
x = (first_function () |
| 17 |
+ second_function ()); /* { dg-warning "test" } */ |
| 18 |
|
| 19 |
/* This shouldn't have a label. */ |
| 20 |
/* { dg-begin-multiline-output "" } |
| 21 |
x = (first_function () |
| 22 |
~~~~~~~~~~~~~~~~~ |
| 23 |
+ second_function ()); |
| 24 |
^ ~~~~~~~~~~~~~~~~~~ |
| 25 |
{ dg-end-multiline-output "" } */ |
| 26 |
#endif |
| 27 |
} |