From 6f0d67b912900009bff5018bd58e17ea1db1de69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= Date: Wed, 8 Mar 2023 17:01:24 +0100 Subject: libstdc++: Add a test for FTM redefinitions This test detects redefinitions by compiling stdc++.h and , by disabling the system_header pragma on the latter, to allow warnings in it. Thanks Patrick Palka for the suggestion. libstdc++-v3/ChangeLog: * testsuite/17_intro/versionconflict.cc: New test. * include/std/version: Allow disabling the system_header pragma via _GLIBCXX_TESTING_SYSHDR. --- libstdc++-v3/testsuite/17_intro/versionconflict.cc | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 libstdc++-v3/testsuite/17_intro/versionconflict.cc (limited to 'libstdc++-v3/testsuite') diff --git a/libstdc++-v3/testsuite/17_intro/versionconflict.cc b/libstdc++-v3/testsuite/17_intro/versionconflict.cc new file mode 100644 index 00000000000..6c212980ab0 --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/versionconflict.cc @@ -0,0 +1,7 @@ +// { dg-do preprocess } +// { dg-additional-options "-Werror" } + +// Test for redefinitions of FTMs using bits/stdc++.h. +#define _GLIBCXX_TESTING_SYSHDR +#include +#include -- cgit v1.2.1