| 1 |
#define UNUSED_MACRO /* { dg-error "UNUSED_MACRO" "" { xfail *-*-* } } */ |
| 2 |
#include "line-map-3.H" /* { dg-bogus "-:UNUSED_MACRO" "" { xfail *-*-* } } */ |
| 3 |
|
| 4 |
/* { dg-do compile } */ |
| 5 |
/* { dg-additional-options "-Werror=unused-macros" } */ |
| 6 |
|
| 7 |
/* PR preprocessor/105608 */ |
| 8 |
/* This test case is currently xfailed and requires work in libcpp/pch.cc to |
| 9 |
resolve. Currently, the macro location is incorrectly assigned to line 2 |
| 10 |
of the header file when read via PCH, because libcpp doesn't try to |
| 11 |
assign locations relative to the newly loaded line map after restoring |
| 12 |
the PCH. */ |
| 13 |
|
| 14 |
/* In PCH mode we also complain incorrectly about the command line macro -Dwith_PCH |
| 15 |
added by dejagnu; that warning would get suppressed if the macro location were |
| 16 |
correctly restored by libcpp to reflect that it was a command line macro. */ |
| 17 |
/* { dg-bogus "-:with_PCH" "" { xfail *-*-* } 2 } */ |
| 18 |
|
| 19 |
/* The reason we used -Werror was to prevent pch.exp from rerunning without PCH; |
| 20 |
in that case we would get unnecessary XPASS outputs since the test does work |
| 21 |
fine without PCH. Once the bug is fixed, remove the -Werror and switch to |
| 22 |
dg-warning. */ |
| 23 |
/* { dg-regexp {[^[:space:]]*: some warnings being treated as errors} } */ |