This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Isolate & simplify paths with undefined behaviour


On 10/23/13 01:58, Florian Weimer wrote:
Could you keep in mind that there is considerable interest in a
check_nonnull attribute which marks values (parameters, return values,
maybe even struct fields) that can be NULL and need to be checked
explictly prior to dereference?  GCC would then warn if there is a path
on which the check is missing.

I don't have time at the moment to work on this, but it's on my
ever-growing TODO list. :)
There's a lot of overlap between this and the change which originally set me down this path -- namely a pass which would warn about potential null pointer dereference (with suitable knobs which allowed the user to control things like the non-nullness of a load of a pointer from memory).

I'd like to get back to that work, but it's definitely not a 4.9 thing.

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]