This was probably copied from a std::filesystem test and the -std option
wasn't removed.
libstdc++-v3/ChangeLog:
* testsuite/experimental/filesystem/filesystem_error/cons.cc:
Remove -std=gnu++17 option.
(cherry picked from commit
ed0b4bb29a50d6be0e4b6411b3cc9f22967f1313)
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++17 -lstdc++fs" }
+// { dg-options "-lstdc++fs" }
// { dg-do run { target c++11 } }
// { dg-require-filesystem-ts "" }