https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128544
Bug ID: 128544
Summary: enhancement: attribute that defines error condition
for return values
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: uecker at gcc dot gnu.org
Target Milestone: ---
It would be good to have an attribute that tells the compiler which return
values indicate failure (e.g. NULL, negative, non-positive, etc.). This would
allow checking that a following "if" exists and tests for the right thing.