[cfe-dev] PR17558 - Question about Uninitialized Variables
Michel Morin
mimomorin at gmail.com
Wed Jan 15 22:28:39 PST 2014
Richard Smith wrote:
> This is tricky to fix in general;
> Michael's patch addresses one particular corner of this,
Ah, now I understand what Michael tried to do.
> In general, we would like to look at the context in which '&x' appears,
> and determine if that context could possibly store through the pointer
> or save it somewhere.
Such contextual analysis would be nice ;)
FWIW, gcc can warn about uninitialized variables whose address are taken
only when optimization is enabled.
(Without optimization, gcc behaves similarly to clang.)
Regards,
Michel
More information about the cfe-dev
mailing list