On Fri, 30 Sept 2022 at 19:13, Jonathan Wakely via Libstdc++ <libstd...@gcc.gnu.org> wrote: > > On Fri, 30 Sept 2022 at 19:07, Jonathan Wakely <jwak...@redhat.com> wrote: > > > > On Fri, 30 Sept 2022 at 19:04, Jonathan Wakely <jwak...@redhat.com> wrote: > > > > > > On Fri, 30 Sept 2022 at 18:55, Jakub Jelinek <ja...@redhat.com> wrote: > > > > > > > > On Fri, Sep 30, 2022 at 06:47:07PM +0100, Jonathan Wakely via > > > > Gcc-patches wrote: > > > > > On Fri, 30 Sept 2022 at 17:26, Jonathan Wakely wrote: > > > > > > > > > > > > On Fri, 30 Sept 2022 at 17:04, Torbjörn SVENSSON > > > > > > <torbjorn.svens...@foss.st.com> wrote: > > > > > > > > > > > > > > libstdc++-v3/testsuite: > > > > > > > > > > > > > > * 20_util/bind/ref_neg.cc: Prune Windows paths too. > > > > > > > > > > > > Please CC the libstdc++ for libstdc++ patches. > > > > > > > > > > > > OK for trunk, thanks. > > > > > > > > > > I'm seeing errors now on x86_64-linux: > > > > > > > > > > ERROR: 20_util/bind/ref_neg.cc: unknown dg option: /\\ for " > > > > > dg-prune-output 53 "[/\\](functional|bits/invoke.h):" " > > > > > > > > > > ERROR: 20_util/bind/ref_neg.cc: unknown dg option: /\\ for " > > > > > dg-prune-output 53 "[/\\](functional|bits/invoke.h):" " > > > > > > > > Bet it should be > > > > // { dg-prune-output "\[/\\](functional|bits\[/\\]invoke.h):" } > > > > or so. Completely untested. > > > > > > That fixes the error, but now the regex doesn't match so there are > > > still excess errors. It needs to be: > > > > > > // { dg-prune-output ".*\[/\\](functional|bits\[/\\]invoke.h):.*" } > > > > > > Without any regex special characters, there's an implicit .* before > > > and after the pattern. But when you use any regex special characters > > > in the pattern, it stops working. I can't remember why. I figured it > > > out once. > > > > It looks like just adding .* at the start is enough: > > > > // { dg-prune-output ".*\[/\\](functional|bits\[/\\]invoke.h):" } > > > > But that's so ugly, I'm tempted to replace that prune with something > > different. > > I'll finish testing this and push it.
I committed this instead, with no .* in the pattern.
commit 7069d03ba4ad6133225b89d433d9e86f0b0745b8 Author: Jonathan Wakely <jwak...@redhat.com> Date: Fri Sep 30 19:10:29 2022 libstdc++: Fix broken dg-prune-output The new pattern in the dg-prune-output directive doesn't work. Instead of a messy regex full of leaning toothpicks, just match on the diagnostic text instead of the header paths. libstdc++-v3/ChangeLog: * testsuite/20_util/bind/ref_neg.cc: Fix dg-prune-output directive. diff --git a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc index 1e9f3e7fece..a78935775c2 100644 --- a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc +++ b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc @@ -50,7 +50,7 @@ void test02() // Ignore the reasons for deduction/substitution failure in the headers. // Arrange for the match to work on installed trees as well as build trees. -// { dg-prune-output "[/\\](functional|bits/invoke.h):" } +// { dg-prune-output "no type named 'type' in 'struct std::result_of" } int main() {