From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4a5af3e435f7af021644e8751db1e8e6@quintile.net> From: "Steve Simon" Date: Thu, 22 Nov 2012 11:54:35 +0000 To: 9fans@9fans.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] go forth and ulong no more! Topicbox-Message-UUID: e0156628-ead7-11e9-9d60-3106f5b1d025 > "The expression sizeof(object) yields an integer equal to the > size of the specified object." > > Not "unsigned integer". Old habits die hard. I feel your pain. We use lint a lot here and it irritates me greatly when it grumbles about loss of precision in assignment from sizeof() or nelem() to an int, e.g. int i; struct Result Results[4096]; for(i = 0; i < nelem(Results); i++) memset(&Results[i], 0, sizeof(Result)); I wish I had been in the standards meeting with a big stick when somone suggested sizeof() returned an unsigned. No doubt somone will pipe up and explain why its a very good idea, but it still annoys me. -Steve