https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99203

--- Comment #3 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to Francois-Xavier Coudert from comment #2)
> This is present in upstream (glibc), probably should be reported there:
> https://sourceware.org/git/?p=glibc.git;a=blob;f=stdio-common/printf_fp.c;
> h=75bbadbaeb6cdc55f09ab3e806cc9ab3e958c2e6;hb=HEAD

commit 2be836fe44010d92ffffb73cd060045bb10305e4
Author:     Adhemerval Zanella <adhemerval.zane...@linaro.org>
AuthorDate: Fri Apr 25 18:06:33 2025 -0300
Commit:     Adhemerval Zanella <adhemerval.zane...@linaro.org>
CommitDate: Mon Apr 28 09:51:59 2025 -0300

    stdio: Remove UB on printf_fp

    The __printf_fp_buffer_1 issues count_leading_zeros with 0 argument,
    which might leads to call __builtin_ctz depending of the ABI.
    Replace with stdbit.h function instead.

    Checked on x86_64-linux-gnu and i686-linux-gnu.
    Reviewed-by: Paul Eggert <egg...@cs.ucla.edu>

Need to sync gcc.

Reply via email to