[libc-commits] [libc] 2e8ef93 - [libc] [test] Add missing <cstdint> include

Sam James via libc-commits libc-commits at lists.llvm.org
Thu Mar 16 12:04:09 PDT 2023


Author: Sam James
Date: 2023-03-16T19:03:59Z
New Revision: 2e8ef93439a4a430fe5f96b9d999ce96405345f4

URL: https://github.com/llvm/llvm-project/commit/2e8ef93439a4a430fe5f96b9d999ce96405345f4
DIFF: https://github.com/llvm/llvm-project/commit/2e8ef93439a4a430fe5f96b9d999ce96405345f4.diff

LOG: [libc] [test] Add missing <cstdint> include

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) {
              ^
```

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D146111

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/libc/test/src/__support/str_to_float_comparison_test.cpp b/libc/test/src/__support/str_to_float_comparison_test.cpp
index 5f5f71cbb1e24..19f3f869f3c4c 100644
--- a/libc/test/src/__support/str_to_float_comparison_test.cpp
+++ b/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>


        


More information about the libc-commits mailing list