]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Move test error_category to global scope
authorJonathan Wakely <jwakely@redhat.com>
Wed, 13 Mar 2024 10:02:12 +0000 (10:02 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 18 Mar 2024 11:00:14 +0000 (11:00 +0000)
commita0bca5584725153ad560b97a33a07e3c56f6f953
tree1bb6d1385bebece4c184b04221c3d524a258fb8b
parent7b9fa0982f4db0a64aacfe5018708a89f956245a
libstdc++: Move test error_category to global scope

A recent GDB change causes this test to fail due to missing RTTI for the
custom_cast type. This is presumably because the custom_cat type was
defined as a local class, so has no linkage. Moving it to local scope
seems to fix the test regressions, and probably makes the test more
realistic as a local class with no linkage isn't practical to use as an
error category that almost certainly needs to be referred to in other
scopes.

libstdc++-v3/ChangeLog:

* testsuite/libstdc++-prettyprinters/cxx11.cc: Move custom_cat
to namespace scope.

(cherry picked from commit a8c7c3a40953e34f57278d224a07dc3698c64a84)
libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc