https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69976
David Malcolm <dmalcolm at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dmalcolm at gcc dot gnu.org --- Comment #5 from David Malcolm <dmalcolm at gcc dot gnu.org> --- >From a user's perspective, would this be better as a property of the data (or of its *type*), rather than of the function? i.e. have the user mark the on-stack buffer as security-sensitive, rather than mark the function as a whole? i.e. something like char __attribute__((security_sensitive)) buf[16]; Then the compiler could: (a) "do the right thing" for any functions containing such data: e.g. automatically clear the array after the last use, and (b) issue an error if the user tries to create a global variable of such a type, and (c) potentially suppress various optimizations on the data