http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46936
Ondrej Bilka <neleai at seznam dot cz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |neleai at seznam dot cz --- Comment #1 from Ondrej Bilka <neleai at seznam dot cz> --- I put it here to avoid being marked as duplicate, I also wanted propose nonnul checks but they should be enabled by FORTIFY_SOURCE. In glibc we played with idea of scanning headers for nonnull attribute and automatically generate wrappers of these functions. Then by LD_PRELOADing these enable extra checks if attribute is null. We realized that offloading this functionality to gcc is better as it will cover everybody that annotates prototypes with nonnull, checks when pointer is known nonnull can be avoided.