diff options
author | Arsen Arsenović <arsen@aarsen.me> | 2023-03-08 17:01:24 +0100 |
---|---|---|
committer | Arsen Arsenović <arsen@aarsen.me> | 2023-04-05 18:45:14 +0200 |
commit | 6f0d67b912900009bff5018bd58e17ea1db1de69 (patch) | |
tree | 8cd5cd11a20e511d0ec7eed0d126e1dba1cbef5b /libstdc++-v3/include | |
parent | 9d63ce7c4c0a993c419dceb823e71cba5da99e24 (diff) | |
download | gcc-6f0d67b912900009bff5018bd58e17ea1db1de69.tar.gz |
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.
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r-- | libstdc++-v3/include/std/version | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libstdc++-v3/include/std/version b/libstdc++-v3/include/std/version index cdd24248c57..1069bc6c9f6 100644 --- a/libstdc++-v3/include/std/version +++ b/libstdc++-v3/include/std/version @@ -30,7 +30,10 @@ #ifndef _GLIBCXX_VERSION_INCLUDED #define _GLIBCXX_VERSION_INCLUDED -#pragma GCC system_header +// To facilitate testsuite/17_intro/versionconflict.cc +#ifndef _GLIBCXX_TESTING_SYSHDR +# pragma GCC system_header +#endif #include <bits/c++config.h> |