[libc-commits] [PATCH] D158774: [libc] Add GPU support for `printf` and `fprintf`
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Sep 5 10:42:42 PDT 2023
jhuber6 added inline comments.
================
Comment at: libc/src/stdio/gpu/parser.h:134
+ ++cur_pos;
+
+ if (format[cur_pos] != '\0')
----------------
michaelrj wrote:
> 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`).
I originally had code for that but it added an absurd amount of resource usage that I don't think we really need. The parsing here will definitely pick this up as an argument and copy the argument to the server. We use a real parser there so the actual printing will pick it up, but I guess the number of arguments might be off?
I'm guessing the standard solution is to just ignore it?
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