This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Informing gcc that a function initializes a pointer target
- From: Ian Pilcher <arequipeno at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 11 Oct 2013 18:57:19 -0500
- Subject: Informing gcc that a function initializes a pointer target
- Authentication-results: sourceware.org; auth=none
I've run into a situation where I'm getting a spurious (I think) "may be
used uninitialized" warning.
https://bugzilla.redhat.com/show_bug.cgi?id=1018422
In this case, the variable is initialized when its address is passed to
another function.
This situation made me wonder if there's some sort of function (or
parameter) attribute that I could use to inform the compiler that the
function does, in fact, initialize the variable.
Thanks!
--
========================================================================
Ian Pilcher arequipeno@gmail.com
Sometimes there's nothing left to do but crash and burn...or die trying.
========================================================================