Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Feb 2003 15:38:38 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Mark Murray <mark@grondar.org>
Cc:        Julian Elischer <julian@elischer.org>, current@FreeBSD.ORG
Subject:   Re: Style fixups for proc.h 
Message-ID:  <200302012338.h11NccjO017853@apollo.backplane.com>
References:   <200302012315.h11NFVaX028348@grimreaper.grondar.org>

next in thread | previous in thread | raw e-mail | index | archive | help

: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.

    I've never in my life heard of this behavior before, what compiler
    arguments reproduce it?

:2 ways to fix this are to "protect" the prototype argument names with the
:"_", or to remove the argument name altogether.

    If it is a problem, why not simply use the same variable names that are
    declared in the procedure proper?  The underscore looks ugly and out of
    place and doesn't make that much sense to me.

							-Matt


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302012338.h11NccjO017853>