From owner-cvs-all@FreeBSD.ORG Thu Dec 6 22:20:34 2007 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B538916A46B for ; Thu, 6 Dec 2007 22:20:34 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id D718913C4F0 for ; Thu, 6 Dec 2007 22:20:33 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 06 Dec 2007 22:20:31 -0000 Received: from p54A3D4B8.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.212.184] by mail.gmx.net (mp052) with SMTP; 06 Dec 2007 23:20:31 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX19utfINmuBuBStGZcLswgLpAK9G8SZi7V5JfkWGrO YKntOWKKqgNDe5 Message-ID: <475875AE.6040900@gmx.de> Date: Thu, 06 Dec 2007 23:20:30 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.6 (X11/20070806) MIME-Version: 1.0 To: Kip Macy References: <200712060400.lB640xxi025146@repoman.freebsd.org> <20071206202639.N11122@delplex.bde.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: cvs-src@freebsd.org, cvs-all@freebsd.org, src-committers@freebsd.org, Kip Macy , Bruce Evans Subject: Re: cvs commit: src/sys/sys param.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Dec 2007 22:20:34 -0000 Kip Macy wrote: > On Dec 6, 2007 2:25 AM, Bruce Evans wrote: >> On Thu, 6 Dec 2007, Kip Macy wrote: >> >>> kmacy 2007-12-06 04:00:59 UTC >>> >>> FreeBSD src repository >>> >>> Modified files: >>> sys/sys param.h >>> Log: >>> Respect the fact that the value a may be constant so cast to const uint8_t * >>> >>> Revision Changes Path >>> 1.318 +2 -2 src/sys/sys/param.h >> The correct fix is to back out 1.317. If not, at least spell `unsigned >> char' correctly and fix the other new style bug (a line longer than >> 80 characters from adding `const'). Using uint8_t is only a style bug >> since POSIX probably requires unsigned char to be the same as uint8_t. >> If unsigned char is larger than uint8_t, then revs.1.317-318 give >> undefined behaviour (aliasing bugs) and clearly broken behaviour (wrong >> divisor NBBY). These bugs are easy to avoid by using the correct >> spelling. >> > > I'm inclined to do whatever you say so long as my code works without a > substantial rewrite. However, can you please point me at where it says > uint8_t is not style(9) compliant? I think, he means that uint8_t is not necessarily the same type as unsigned char. In fact according to the C99 standard the type uint8_t does not necessarily exist (section 7.18.1.1). Christoph