From owner-freebsd-current Sat Feb 1 16:14: 9 2003 Delivered-To: freebsd-current@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id 8E18837B401; Sat, 1 Feb 2003 16:14:08 -0800 (PST) Date: Sat, 1 Feb 2003 16:14:08 -0800 From: Juli Mallett To: Bakul Shah Cc: Mark Murray , Julian Elischer , current@FreeBSD.ORG Subject: Re: Style fixups for proc.h Message-ID: <20030201161408.B64200@FreeBSD.org> References: <200302012315.h11NFVaX028348@grimreaper.grondar.org> <200302020002.TAA24089@warspite.cnchost.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200302020002.TAA24089@warspite.cnchost.com>; from bakul@bitblocks.com on Sat, Feb 01, 2003 at 04:02:57PM -0800 Organisation: The FreeBSD Project X-Alternate-Addresses: , , , , X-Towel: Yes X-LiveJournal: flata, jmallett X-Negacore: Yes Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * De: Bakul Shah [ Data: 2003-02-01 ] [ Subjecte: Re: Style fixups for proc.h ] > > Julian Elischer writes: > > > I don't know about the protection with a '_'. > > > > > > It's not standard and usually the name matches that used in the actual > > > function. > > > > When the prototype parameter name matches a local variable, the C compiler > > (and lint) whine about clashes between names in local/global namespace. > > According to C99, a function prototype has its own scope or > name space. It terminates at the end of the function > declarator. Basically naming a parameter in a function > prototype is an aide to the human user; it is not needed for > correct compilation[1] so this warning is bogus. As the > spec says in section 6.7.5.3 (according the draft I have) > > "The identifiers [naming parameters] are declared for > descriptive purposes only and go out of scope at the end > of the [prototype] declaration". > > I can't see what actual error is avoided by this warning. If a named prototype clashes with something in global scope, isn't it still a shadowing issue? They should probably never be *in* scope. -- Juli Mallett AIM: BSDFlata -- IRC: juli on EFnet OpenDarwin, Mono, FreeBSD Developer ircd-hybrid Developer, EFnet addict FreeBSD on MIPS-Anything on FreeBSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message