Skip to content

Commit

Permalink
emitterutils: Explicitly include <cstdint>
Browse files Browse the repository at this point in the history
GCC 15 will no longer include it by default, resulting in build
failures in projects that do not explicitly include it.

Error:
src/emitterutils.cpp:221:11: error: 'uint16_t' was not declared in this scope
  221 | std::pair<uint16_t, uint16_t> EncodeUTF16SurrogatePair(int codePoint) {
      |           ^~~~~~~~
src/emitterutils.cpp:13:1: note: 'uint16_t' is defined in header '<cstdint>';
this is probably fixable by adding '#include <cstdint>'
   12 | #include "yaml-cpp/null.h"
  +++ |+#include <cstdint>
   13 | #include "yaml-cpp/ostream_wrapper.h"

Tests pass.

Closes: #1307
See-also: https://gcc.gnu.org/pipermail/gcc-cvs/2024-August/407124.html
See-also: https://bugs.gentoo.org/937412
Signed-off-by: Christopher Fore <csfore@posteo.net>
  • Loading branch information
csfore committed Aug 15, 2024
1 parent 8fbf344 commit 0bcee98
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/emitterutils.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <algorithm>
#include <cstdint>
#include <iomanip>
#include <sstream>

Expand Down

0 comments on commit 0bcee98

Please sign in to comment.