This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Bootstrap failure on alpha
Jan Hubicka <hubicka@ucw.cz> writes:
>> The warning is spurious -- if one_utf8_to_cppchar returns 0 then s has
>> been initialized; if it returns any other value, s is not used. I
>> have no objection to adding the default initialization, but you might
>> want to think about making the warning more accurate.
>
> We've discussed this with Jeff as the other cases has been same.
> Our uninitialized warning has beem always CFG based and doing more
> acurate dataflow is probably not affordable.
> I am not sure whether in the case of inlining we don't want to shup up
> the warning completely.
The warning could be useful. If there were a bug in
one_utf8_to_cppchar, for instance, such that it didn't initialize s
when it was supposed to, then it would be valuable to detect that.
It would be interesting to think about a separate analysis that looked
at 'out' parameters like this one (we'd need some reliable way of
telling them from pass-by-reference parameters) and detected whether
or not they were always initialized. In the general case, an
interface like one_utf8_to_cppchar's is risky (in this case, it's
deliberately done that way for speed, though).
> I in general don't like the idea of warnings depending on
> optimization decisions. But at the moment it is not doable as
> warning comes from RTL backend still.
Yeah, I don't like that either. I've been bitten too many times by
-Wuninitialized not firing with optimization off.
zw