[Bug c/110815] [static] not as useful as the nonnull attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110815 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |14.0
[Bug c/110815] [static] not as useful as the nonnull attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110815 uecker at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED CC||uecker at gcc dot gnu.org --- Comment #4 from uecker at gcc dot gnu.org --- Fixed on trunk.
[Bug c/110815] [static] not as useful as the nonnull attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110815 Xi Ruoyao changed: What|Removed |Added CC||xry111 at gcc dot gnu.org --- Comment #3 from Xi Ruoyao --- IIUC this is fixed now?
[Bug c/110815] [static] not as useful as the nonnull attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110815 --- Comment #2 from CVS Commits --- The master branch has been updated by Martin Uecker : https://gcc.gnu.org/g:c58b426d64ac2513dc0ed19165740604e891e9df commit r14-5353-gc58b426d64ac2513dc0ed19165740604e891e9df Author: Martin Uecker Date: Thu Jul 27 13:41:33 2023 +0200 c: Synthesize nonnull attribute for parameters declared with static [PR110815] Parameters declared with `static` are nonnull. We synthesize an artifical nonnull attribute for such parameters to get the same warnings and optimizations. Bootstrapped and regression tested on x86. PR c/110815 PR c/112428 gcc/c-family: * c-attribs.cc (build_attr_access_from_parms): Synthesize nonnull attribute for parameters declared with `static`. gcc: * gimple-ssa-warn-access.cc (pass_waccess::maybe_check_access_sizes): remove warning for parameters declared with `static`. gcc/testsuite: * gcc.dg/Wnonnull-8.c: Adapt test. * gcc.dg/Wnonnull-9.c: New test.
[Bug c/110815] [static] not as useful as the nonnull attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110815 --- Comment #1 from Martin Uecker --- Created attachment 55638 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55638=edit patch This patch would synthesize a nonnull attribute for such parameters, making this fully equivalent.