[libcxx-commits] [libcxx] [libc++] Optimize num_put integral functions (PR #120859)
Alexander Kornienko via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 14 18:15:38 PDT 2025
alexfh wrote:
> > I was pointed at https://bugzilla.redhat.com/show_bug.cgi?id=166735, which seems to claim that 0x0 should just be 0, IIUC.
>
> @nico @alexfh Thanks for the information. I agree that `#` for octal and hexadeximal should print `0` instead of `00` and `0x0`.
Apart from that, `showpos` should always print sign, i.e. for 0 the formatting output should be `+0` (https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2310.pdf says *+ The result of a signed conversion always begins with a plus or minus sign.*)
As for pointers with null value, *The value of the pointer is converted to a sequence of printing characters, in an implementation-defined manner.*, so this part isn't regulated by the standard.
@ldionne @philnik777 do you agree with the above arguments?
https://github.com/llvm/llvm-project/pull/120859
More information about the libcxx-commits
mailing list