https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86934

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #1)
> That should be simple, just include <bits/stdc++.h> and <version> and
> compile with -Wsystem-headers to check for redefinition warnings.

As discussed on IRC,
for i in 98 11 14 17 2a; do echo '#include <bits/stdc++.h>' | g++
-D_GLIBCXX_VERSION_INCLUDED -E -std=c++$i -dD -xc++ - | grep
'^[[:blank:]]*#[[:blank:]]*define[[:blank:]]*__cpp_' | sort -u > /tmp/1; echo
'#include <version>' | g++ -E -std=c++$i -dD -xc++ - | grep
'^[[:blank:]]*#[[:blank:]]*define[[:blank:]]*__cpp_' | sort -u > /tmp/2; diff
-up /tmp/1 /tmp/2; done
is a more thorough way of checking not just the case where both <version> and
other headers define the same __cpp_lib* macro differently, but also when one
defines one and the other doesn't.

Reply via email to