X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=gILgqvYUFD8DM0uPBhJLs1LMoCqFZLsT95g0uDWdvcML3I2gIyNY7lFNZsmWxoOYcKwgEMs/Q2ldD4JdCMV03fdtigaTOf3ge1esjTB6zB8RJ9cCvp736kf/gLOKOVkLO+Uv1u7oVslnofnZ9Vr/K5eilqaZIpePO8REHAE9Pgw= Message-ID: <7705c9030612022332l285918ehedb61a2bb4a233bc@mail.gmail.com> Date: Sat, 2 Dec 2006 23:32:56 -0800 From: "Blair Campbell" To: djgpp AT delorie DOT com Subject: Re: string.h -- memccpy() prototype uses "int c, size_t n" w/o leading underscores In-Reply-To: <1165113846.188039.194250@j72g2000cwa.googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1165096766 DOT 030159 DOT 105280 AT f1g2000cwa DOT googlegroups DOT com> <4572251A DOT 680BFA98 AT yahoo DOT com> <200612030136 DOT kB31aPZl029891 AT envy DOT delorie DOT com> <1165113846 DOT 188039 DOT 194250 AT j72g2000cwa DOT googlegroups DOT com> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk I think that most compilers accept nameless function parameters in declarations. Maybe this would be even more appropriate than using underscores? Or could someone enlighten me otherwise? On 2 Dec 2006 18:44:06 -0800, rugxulo AT gmail DOT com wrote: > Hello, > > DJ Delorie wrote: > > > Why should it? The scope of those names is only the memccpy() > > > function. The only thing that can foul it is a previous "#define c > > > whatever" statement, etc. or a file scope declaration of c (and I > > > assume nobody would be that stupid). > > > > That's exactly what we're trying to prevent (and yes, people are that > > stupid). > > After I stumbled upon the clash (while obfuscating/shrinking the .C src > to a wimpy program of mine: went from 5k to 750 bytes or so and still > compiled), I noticed it seemed out of place to have "int c, size_t n" > when most other prototypes used underscores (e.g., "void *memchr(const > void *_s, int _c, size_t _n);"). No, not anything useful, and not even > good enough for an IOCCC entry, just me horsing around. :-P > > Feel free to keep your STRING.H unmodified if you're smart enough to > not have that problem (or work around it like I did). :-) > > P.S. "Stupid is as stupid does." -- Forrest Gump :-D > > -- Fall is my favorite season in Los Angeles, watching the birds change color and fall from the trees. David Letterman (1947 - ) See ya