Skip to content

Commit 983d471

Browse files
committed
Patch two Cppcheck bugs for upcoming GCC 13
Cppcheck does not compile with GCC 13 without these fixes, see: https://gcc.gnu.org/gcc-13/porting_to.html
1 parent 5b2e053 commit 983d471

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/cppcheck-gcc13.patch

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
GCC 13 has stricter allocator checks:
2+
https://gcc.gnu.org/gcc-13/porting_to.html
3+
4+
Also, libstdc++ no longer leaks stdint.h definitions.
5+
--- a/lib/mathlib.cpp
6+
+++ b/lib/mathlib.cpp
7+
@@ -25,2 +25,3 @@
8+
#include <cmath>
9+
+#include <cstdint>
10+
#include <cstdlib>
11+
--- a/lib/smallvector.h
12+
+++ b/lib/smallvector.h
13+
@@ -43,2 +43,5 @@
14+
{}
15+
+
16+
+ template<class U> TaggedAllocator(const TaggedAllocator<U, N>);
17+
+ template<class U> struct rebind { using other = TaggedAllocator<U, N>; };
18+
};

0 commit comments

Comments
 (0)