[libc-commits] [PATCH] D158774: [libc] Add GPU support for `printf` and `fprintf`

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Sep 5 10:25:37 PDT 2023


michaelrj added inline comments.


================
Comment at: libc/src/stdio/gpu/parser.h:134
+    ++cur_pos;
+
+  if (format[cur_pos] != '\0')
----------------
I realize that this was probably for size reasons, but this should probably add back something for parsing flags, widths, and precisions. The current design will accept all valid format specifiers, but won't reject all invalid format specifiers (e.g. `%?d`).


================
Comment at: libc/src/stdio/gpu/parser.h:168
+    specifier.raw_value =
+        *reinterpret_cast<uintptr_t *>(reinterpret_cast<void *>(&p));
+    break;
----------------
this should be a `bit_cast`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158774/new/

https://reviews.llvm.org/D158774



More information about the libc-commits mailing list