[libc-commits] [PATCH] D146111: [libc] [test] Add missing <cstdint> include

Sam James via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Mar 14 22:18:44 PDT 2023


thesamesam created this revision.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
thesamesam requested review of this revision.

Fixes build w/ GCC 13:

  [587/7274] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc_system_str_to_float_comparison_test.dir/str_to_float_comparison_test.cpp.o
  FAILED: projects/libc/test/src/__support/CMakeFiles/libc_system_str_to_float_comparison_test.dir/str_to_float_comparison_test.cpp.o
  /usr/lib/llvm/16/bin/clang++ -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/sam/git/llvm-project/build/projects/libc/test/src/__support -I/home/sam/git/llvm-project/libc/test/src/__support -I/home/sam/git/llvm-project/build/include -I/home/sam/git/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -std=c++17 -MD -MT projects/libc/test/src/__support/CMakeFiles/libc_system_str_to_float_comparison_test.dir/str_to_float_comparison_test.cpp.o -MF projects/libc/test/src/__support/CMakeFiles/libc_system_str_to_float_comparison_test.dir/str_to_float_comparison_test.cpp.o.d -o projects/libc/test/src/__support/CMakeFiles/libc_system_str_to_float_comparison_test.dir/str_to_float_comparison_test.cpp.o -c /home/sam/git/llvm-project/libc/test/src/__support/str_to_float_comparison_test.cpp
  /home/sam/git/llvm-project/libc/test/src/__support/str_to_float_comparison_test.cpp:34:15: error: unknown type name 'uint32_t'
  static inline uint32_t hexCharToU32(char in) {
                ^
  /home/sam/git/llvm-project/libc/test/src/__support/str_to_float_comparison_test.cpp:39:15: error: unknown type name 'uint32_t'
  static inline uint32_t fastHexToU32(const char *inStr) {
                ^


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146111

Files:
  libc/test/src/__support/str_to_float_comparison_test.cpp


Index: libc/test/src/__support/str_to_float_comparison_test.cpp
===================================================================
--- libc/test/src/__support/str_to_float_comparison_test.cpp
+++ libc/test/src/__support/str_to_float_comparison_test.cpp
@@ -12,6 +12,7 @@
 
 // #include "src/__support/FPUtil/FPBits.h"
 
+#include <cstdint>
 #include <fstream>
 #include <iostream>
 #include <string>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146111.505364.patch
Type: text/x-patch
Size: 401 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230315/58b99215/attachment.bin>


More information about the libc-commits mailing list