Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-no-labels.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-no-labels.c Thu Oct 25 07:37:49 2018 +0900 @@ -0,0 +1,27 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fdiagnostics-show-caret -fno-diagnostics-show-labels" } */ + +/* Verify that -fno-diagnostics-show-labels works. */ + +/* This is a collection of unittests for diagnostic_show_locus; + see the overview in diagnostic_plugin_test_show_locus.c. + + In particular, note the discussion of why we need a very long line here: +01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 + and that we can't use macros in this file. */ + +void test_multiline (void) +{ +#if 0 + x = (first_function () + + second_function ()); /* { dg-warning "test" } */ + + /* This shouldn't have a label. */ + /* { dg-begin-multiline-output "" } + x = (first_function () + ~~~~~~~~~~~~~~~~~ + + second_function ()); + ^ ~~~~~~~~~~~~~~~~~~ + { dg-end-multiline-output "" } */ +#endif +}