Date: Mon, 05 Sep 2011 02:09:36 -0700 From: perryh@pluto.rain.com To: matthias.andree@gmx.de Cc: freebsd-ports@freebsd.org Subject: Re: reasons for rewriting regular memory (was: [ANNOUNCE]: clang compiling ports, take 2) Message-ID: <4e6491d0.MNLKNzL63JK0kXDG%perryh@pluto.rain.com> In-Reply-To: <4E637DD8.50700@gmx.de> References: <20110725155920.GA83490@freebsd.org> <4E631DBF.9000106@yandex.ru> <20110904101252.526de5ef@nonamehost.> <4E632A09.8060904@FreeBSD.org> <20110904114550.71c63078@nonamehost.> <4E63516B.7000805@FreeBSD.org> <20110904130659.7a94cce8@raksha.tavi.co.uk> <4E637DD8.50700@gmx.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Matthias Andree <matthias.andree@gmx.de> wrote: > > I agree, but I can think of another valid exception. System with > > Hamming correction on the memory, gets a single bit (correctable) > > error. Need to rewrite the memory contents to reset all the parity > > bits! > That's a matter of the EDAC stuff, not the business of applications. True, but it may explain why clang does not flag "*x = *x;" when it does flag "x = x;". A compiler cannot know the context in which the compiled code will be used. BTW I agree that an understanding is needed of _why_ the code in question was included. I have seen "x = x;" -- x being a formal parameter -- used to prevent an "unused argument" warning in a function which did not in fact need the argument in question, but had to declare it for uniformity with other functions pointed to by the same function pointer type.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4e6491d0.MNLKNzL63JK0kXDG%perryh>