-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Clang pre-defined macros for C23 binary format? #81896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We defer to the host system's llvm-project/clang/lib/Headers/inttypes.h Line 21 in 4d273b9
|
@AaronBallman I agree that PRIbN is definitely for posix headers. But UINT8_FMTx is provided as builtin macro by clang. Since we have hex format already, I think it is reasonable to also have binary format. |
Ah, I see what you're saying, thank you! Yeah, I think that's a reasonable request. |
@llvm/issue-subscribers-clang-frontend Author: Schrodinger ZHU Yifan (SchrodingerZhu)
Is there any plan to add pre-defined macros for binary format (`b/B`) similar to `__UINT8_FMTx__`?
Having
|
This adds predefined formatting macros in C23 mode for printing unsigned integers in binary format (e.g, __UINT_FAST64_FMTB__). These are used to implement the PRIb (et al) macros in inttypes.h Fixes llvm#81896
This adds predefined formatting macros in C23 mode for printing unsigned integers in binary format (e.g, __UINT_FAST64_FMTB__). These are used to implement the PRIb (et al) macros in inttypes.h Fixes #81896
Is there any plan to add pre-defined macros for binary format (
b/B
) similar to__UINT8_FMTx__
?Glibc
has addedPRIbN
andPRIBN
: https://github.com/bminor/glibc/blob/bbd248ac0d75efdef8fe61ea69b1fb25fb95b6e7/stdlib/inttypes.h#L168.Having
__UINT8_FMTb__
or__UINT8_FMTB__
will helplibc
to definePRIbN
andPRIBN
as inllvm-project/libc/include/llvm-libc-macros/inttypes-macros.h
Line 167 in e82659f
The text was updated successfully, but these errors were encountered: