From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: erik quanstrom Date: Mon, 10 Aug 2009 12:43:21 -0400 To: 9fans@9fans.net In-Reply-To: <4A8049D6.3000207@tecmav.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Unexpected 8c warning message Topicbox-Message-UUID: 40c52c5e-ead5-11e9-9d60-3106f5b1d025 > Absolutely true. > But I got a subtle compiler message about a very very simple and short > piece of code. how is the compiler supposed to determine if the code in question is short and simple? > > in your case, you can either provide a dummy assignment > > or use SET(var) to inform 8c that it can forget about that > > warning. > > > I didn't know SET(var) so I used a dummy assignment, as you can see in > my original mail. > Both seems to me a medicine worst than the disease. Personal opinion, of > course. on the other hand, if you've been following along at home with linux development, you'll remember that a week or so ago a really smart compiler screwed everybody over by optimizing away a test for null because clearly that couldn't happen. http://lwn.net/Articles/342330/ http://lwn.net/Articles/342420/ (this problem is also demonstrates one reason mixing asignments and declarations is bad practice.) - erik