Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Ben Pfaff <blp@cs.stanford.edu> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Function Parameter-List with Identifiers |
| Date | 2012-04-25 15:22 -0700 |
| Message-ID | <87aa1zpi45.fsf@blp.benpfaff.org> (permalink) |
| References | <jn9n36$4o0$1@dont-email.me> <87fwbrpmcr.fsf@blp.benpfaff.org> <jn9s61$2of$1@dont-email.me> |
Shao Miller <sha0.miller@gmail.com> writes:
> On 4/25/2012 16:50, Ben Pfaff wrote:
>> Shao Miller<sha0.miller@gmail.com> writes:
>>
>>> Quick question: At file scope, suppose we have:
>>>
>>> extern void foo(int Bar);
>>> void foo(int bar) { return; }
>>>
>>> (Please note the case.) I seem to recall some bit about the former
>>> parameter identifiers being ignored, but can't seem to find that
>>> bit. Does anyone recall if that's so? It's not an identifier-list,
>>> but a parameter-list.
>>
>> It is so. You can even add "const" to one of the prototypes, if
>> you like.
>>
>> (If you want, I'll look up a reference for you.)
>
> Thank you for your response.
>
> Since 'const' is a type qualifier, I'm sure you weren't referring to
> N1570 6.7.6.3p13 (where 6.7.6.3p2 is relevant for that, too).
I don't have N1570 conveniently at hand.
I'm talking about the final sentence in paragraph 13 in C99
6.7.5.3 "Function declarators (including prototypes)":
(In the determination of type compatibility and of a
composite type, each parameter declared with function or
array type is taken as having the adjusted type and each
parameter declared with qualified type is taken as having
the unqualified version of its declared type.)
> Were you suggesting this because of N1570 6.7p4 and 6.7.6.3p15; that
> type compatibility is the only consideration for this particular
> example?
Sorry, the lack of N1570 makes me not follow this.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Function Parameter-List with Identifiers Shao Miller <sha0.miller@gmail.com> - 2012-04-25 16:33 -0400
Re: Function Parameter-List with Identifiers Ben Pfaff <blp@cs.stanford.edu> - 2012-04-25 13:50 -0700
Re: Function Parameter-List with Identifiers Shao Miller <sha0.miller@gmail.com> - 2012-04-25 18:00 -0400
Re: Function Parameter-List with Identifiers Ben Pfaff <blp@cs.stanford.edu> - 2012-04-25 15:22 -0700
Re: Function Parameter-List with Identifiers Shao Miller <sha0.miller@gmail.com> - 2012-04-25 18:39 -0400
Re: Function Parameter-List with Identifiers Shao Miller <sha0.miller@gmail.com> - 2012-04-25 17:45 -0400
Re: Function Parameter-List with Identifiers Shao Miller <sha0.miller@gmail.com> - 2012-04-25 18:37 -0400
Re: Function Parameter-List with Identifiers pete <pfiland@mindspring.com> - 2012-04-25 18:20 -0400
Re: Function Parameter-List with Identifiers Shao Miller <sha0.miller@gmail.com> - 2012-04-25 18:38 -0400
Re: Function Parameter-List with Identifiers pete <pfiland@mindspring.com> - 2012-04-25 21:21 -0400
csiph-web