[libc-commits] [libc] [libc] Add __isoc99_fscanf alias. (PR #213125)

via libc-commits libc-commits at lists.llvm.org
Sat Aug 1 09:37:22 PDT 2026


keepitupkitty wrote:

> > I do not think that _just_ stubbing the function is a correct approach since isoc99_*scanf implies %a specifier which is used for string allocation to be present since it was made as a GNU extension and it was there way before POSIX's issue 7 %m modifier + it conflicts with %a specifier too.
> > https://man7.org/linux/man-pages/man3/sscanf.3.html#NOTES
> 
> We do not support (and I don't think ever will support) old-style GNU variant of using `%a` for allocation. llvm-libc just treats `%a` as a floating-point specifier.
> 
> _However_, I noticed that we have a `TODO` to add support for `%m` as well. @michaelrj-google - do you remember if there were any blockers for it? (in either case, I don't think it should prevent this PR from merging).

If you won't be supporting gnu extensions in scanf is there reason for those aliasas? Is it binary compatibility?

https://github.com/llvm/llvm-project/pull/213125


More information about the libc-commits mailing list