From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] not acme From: "Russ Cox" Date: Tue, 5 Jun 2007 10:42:01 -0400 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20070605143826.BA1CA1E8C1C@holo.morphisms.net> Topicbox-Message-UUID: 7844654e-ead2-11e9-9d60-3106f5b1d025 > is this a legal declaration?: > struct color convert_position_to_color(struct position pos); > Or should I do typedef first? > > pcc complains about multiple declaration when function is defined. struct position; struct color convert_position_to_color(struct position pos); otherwise the name "struct position" gets declared inside the function declaration ( ) and falls out of scope at the ) just like the name "pos" does. and then when you define struct position later it is a *different* struct position. russ