[libc-commits]  [libc] [libc] Add putc, fputc,	and fprintf to stdio/baremetal (PR #144567)
    William Huynh via libc-commits 
    libc-commits at lists.llvm.org
       
    Wed Jul  2 07:38:21 PDT 2025
    
    
  
================
@@ -7,14 +7,15 @@
 //===----------------------------------------------------------------------===//
 
 #include "src/stdio/putchar.h"
+
 #include "src/__support/CPP/string_view.h"
 #include "src/__support/OSUtil/io.h"
 #include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {
 
 LLVM_LIBC_FUNCTION(int, putchar, (int c)) {
-  char uc = static_cast<char>(c);
+  char uc = static_cast<unsigned char>(c);
----------------
saturn691 wrote:
yep, I got thrown off by "uc" = unsigned char, but char is ok too
https://github.com/llvm/llvm-project/pull/144567
    
    
More information about the libc-commits
mailing list