"Dave Korn" <[EMAIL PROTECTED]> writes:

>>From: Joe Buck
>> 
>> there are no uninitialized variables, as the address of k is
>> perfectly well defined.
>
>   Indeed so, but I think Sylvester's point is that given that foo
> takes a const pointer, the compiler could theoretically know that
> foo cannot legitimately make any use of (dereference) the pointer
> value being passed and could perhaps issue a warning.

However, it can store the pointer somewhere and dereference it later,
when it points to something initialized. But a low-priority warning
might be useful, one would have to experiment with how many false
positives this gives.

>   Myself, I was surprised that the inliner didn't catch on to what
> was going on and complain.  I would have expected that, but it
> didn't even at O3.

It does for me with mainline.

-- 
        Falk

Reply via email to