On Wed, 31 Jul 2024 at 21:59, Jonathan Wakely <jwak...@redhat.com> wrote:
>
> On Wed, 31 Jul 2024 at 21:44, François Dumont <frs.dum...@gmail.com> wrote:
> >
> > Committed as trivial.
> >
> > Fix a compilation error that is not expected by the tests preserving
> > the expected ones.
> >
> > The 'test' variable declaration is missing since commit
> > a9260b7eb688df43a724e25421ba40f35a89fee9 that removed the test global
> > variable in testsuite files.
>
> Oh good catch!
>
> The problem is that the dg-error "no" is matching two errors on that
> line, the "'test' was not declared" one and the "no match" one.
>
> I think we should get rid of the 'test' variable again, and use a
> better dg-error pattern. "no" is much too short and matches too much.

Those are the only tests we have with a two-letter dg-error pattern,
there are none with one letter or three letters.

There are lots with four-letter patterns, but they're all { dg-error
"here" } which is fine.

There are lots of decimal FP tests with { dg-error "error" } which is
silly, it might as well be "." and match anything. They should be
fixed, although everything for DFP is low priority.

>
> There's no need to assign the expressions to a variable, they're
> ill-formed anyway.
>
> So:
>
>    itr != mapByName.end(); // { dg-error "no match" }
>    itr == mapByName.end(); // { dg-error "no match" }
>
>
> >
> > libstdc++-v3/ChangeLog:
> >
> >      * testsuite/23_containers/map/operators/1_neg.cc (test01): Add test
> > variable
> >      declaration.
> >      * testsuite/23_containers/set/operators/1_neg.cc (test01): Likewise.
> >
> > François

Reply via email to