[clang] [Clang][Sema] Add fortify warnings for getlogin_r, ttyname_r, ptsname_r, and confstr (PR #244704)
Venkatesh Srinivasan via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 2 14:51:40 PST 2026
venk-ks wrote:
Thanks @efriedma-quic! Even if this gets worked around on the busybox-w32 side (https://github.com/rmyorston/busybox-w32/issues/631), fixing it in Clang seems like the principled thing to do—both to avoid hard-erroring on `regparm` mismatches and to avoid silently stripping calling conventions like `stdcall`.
To make sure I'm aligned: I'll put together a small PR updating `Sema::MergeFunctionDecl` to emit `-Wincompatible-library-redeclaration` (instead of `err_regparm_mismatch` / stripping the CC), preserve the user's calling convention and `regparm`, and avoid treating the declaration as a builtin—and we can adjust the details (or whether target-gating POSIX builtins is also worth doing separately) in review.
https://github.com/llvm/llvm-project/pull/244704
More information about the cfe-commits
mailing list