On Sun, May 12, 2013 at 2:49 PM, Alan Cox <a...@rice.edu> wrote:
> On 05/12/2013 16:37, Andrey Chernov wrote:
>> On 12.05.2013 20:50, Alan Cox wrote:
>>
>> GNU cc errors related to part of diff below:
>> cc1: warnings being treated as errors
>> ../../../vm/vm_page.c: In function 'vm_page_alloc':
>> ../../../vm/vm_page.c:1209: warning: 'mpred' may be used uninitialized
>> in this function
>> *** [vm_page.o] Error code 1
>> Formally yes, mpred here can be left unitialized.
>
> No, it can't.  The code amounts to
>
>     if ("x")
>         mpred = ... ;
>     ...
>     if ("x")
>         use mpred;
>     ...
>     if ("x")
>         use mpred;
>
> where "x" is "object != NULL".  Moreover, there are no assignments to
> the variable "object" or aliases by which the variable "object" can be
> modified over the lifespan of "mpred".  So, this is flawed analysis by
> our antique gcc.

Regardless of who's right or wrong, you've broken about half the
freebsd.org cluster.  It uses a mixture of gcc and clang to catch
sillyness like this.

-- 
Peter Wemm - pe...@wemm.org; pe...@freebsd.org; pe...@yahoo-inc.com; KI6FJV
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to