gcc/libstdc++-v3/testsuite/17_intro/versionconflict.cc
Arsen Arsenović 6f0d67b912
libstdc++: Add a test for <version> FTM redefinitions
This test detects redefinitions by compiling stdc++.h and <version>, 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.
2023-04-05 18:45:14 +02:00

8 lines
195 B
C++

// { dg-do preprocess }
// { dg-additional-options "-Werror" }
// Test for redefinitions of FTMs using bits/stdc++.h.
#define _GLIBCXX_TESTING_SYSHDR
#include <bits/stdc++.h>
#include <version>