Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSam James2023-01-08 02:03:32 +0000
committerMartin Hořeňovský2023-01-08 20:08:58 +0100
commit52066dbc2a53f4c3ab2a418d03f93200a8245451 (patch)
tree7ce74dec2fe5f94d9f482a79b77b13e8b263b2bf
parentcdf604f30e05c9afeb8a67c38b01d867ffbbe614 (diff)
downloadcatch3-52066dbc2a53f4c3ab2a418d03f93200a8245451.tar.gz
Fix build with GCC 13 (add missing <cstdint> include)
GCC 13 (as usual for new compiler releases) shuffles around some internal includes and so <cstdint> is no longer transitively included. Explicitly include <cstdint> for uint64_t. ``` FAILED: src/CMakeFiles/Catch2.dir/catch2/internal/catch_clara.cpp.o /usr/lib/ccache/bin/g++-13 -I/var/tmp/portage/dev-cpp/catch-3.0.1/work/Catch2-3.0.1/src/catch2/.. -I/var/tmp/portage/dev-cpp/catch-3.0.1/work/Catch2-3.0.1_build/generated-includes -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -Wreturn-type -D_GLIBCXX_ASSERTIONS -ggdb3 -fdiagnostics-color=always -ffile-prefix-map=/var/tmp/portage/dev-cpp/catch-3.0.1/work/Catch2-3.0.1=. -Wall -Wc++20-compat -Wcast-align -Wcatch-value -Wdeprecated -Wexceptions -Wextra -Wextra-semi -Wfloat-equal -Winit-self -Wmisleading-indentation -Wmismatched-new-delete -Wmismatched-tags -Wmissing-braces -Wmissing-declarations -Wmissing-noreturn -Wnull-dereference -Wold-style-cast -Woverloaded-virtual -Wparentheses -Wpedantic -Wreorder -Wshadow -Wstrict-aliasing -Wsuggest-override -Wundef -Wuninitialized -Wunreachable-code -Wunused -Wunused-function -Wunused-parameter -Wvla -MD -MT src/CMakeFiles/Catch2.dir/catch2/internal/catch_clara.cpp.o -MF src/CMakeFiles/Catch2.dir/catch2/internal/catch_clara.cpp.o.d -o src/CMakeFiles/Catch2.dir/catch2/internal/catch_clara.cpp.o -c /var/tmp/portage/dev-cpp/catch-3.0.1/work/Catch2-3.0.1/src/catch2/internal/catch_clara.cpp In file included from /var/tmp/portage/dev-cpp/catch-3.0.1/work/Catch2-3.0.1/src/catch2/internal/catch_clara.cpp:12: /var/tmp/portage/dev-cpp/catch-3.0.1/work/Catch2-3.0.1/src/catch2/../catch2/internal/catch_string_manip.hpp:47:14: error: 'uint64_t' in namespace 'std' does not name a type; did you mean 'wint_t'? 47 | std::uint64_t m_count; | ^~~~~~~~ | wint_t /var/tmp/portage/dev-cpp/catch-3.0.1/work/Catch2-3.0.1/src/catch2/../catch2/internal/catch_string_manip.hpp:51:42: error: expected ')' before 'count' 51 | constexpr pluralise(std::uint64_t count, StringRef label): | ~ ^~~~~~ | ) ```
-rw-r--r--src/catch2/catch_test_case_info.hpp1
-rw-r--r--src/catch2/internal/catch_string_manip.hpp1
-rw-r--r--src/catch2/internal/catch_xmlwriter.cpp1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/catch2/catch_test_case_info.hpp b/src/catch2/catch_test_case_info.hpp
index ab5ae8b9..5ff3e3e7 100644
--- a/src/catch2/catch_test_case_info.hpp
+++ b/src/catch2/catch_test_case_info.hpp
@@ -15,6 +15,7 @@
#include <catch2/internal/catch_unique_ptr.hpp>
+#include <cstdint>
#include <string>
#include <vector>
diff --git a/src/catch2/internal/catch_string_manip.hpp b/src/catch2/internal/catch_string_manip.hpp
index 8630b56a..dc0c552c 100644
--- a/src/catch2/internal/catch_string_manip.hpp
+++ b/src/catch2/internal/catch_string_manip.hpp
@@ -10,6 +10,7 @@
#include <catch2/internal/catch_stringref.hpp>
+#include <cstdint>
#include <string>
#include <iosfwd>
#include <vector>
diff --git a/src/catch2/internal/catch_xmlwriter.cpp b/src/catch2/internal/catch_xmlwriter.cpp
index d3bc6303..6c1d45df 100644
--- a/src/catch2/internal/catch_xmlwriter.cpp
+++ b/src/catch2/internal/catch_xmlwriter.cpp
@@ -11,6 +11,7 @@
#include <catch2/internal/catch_enforce.hpp>
#include <catch2/internal/catch_xmlwriter.hpp>
+#include <cstdint>
#include <iomanip>
#include <type_traits>