Path: utzoo!attcan!uunet!mcvax!inria!crcge1!litp!pda From: pda@litp.UUCP (Pierre DAVID) Newsgroups: comp.std.c Subject: Re: typedef-name as a parameter name Summary: mea culpa Keywords: typedef-name, identifier scope Message-ID: <394@litp.UUCP> Date: 15 Sep 88 13:48:56 GMT References: <387@litp.UUCP> Organization: Laboratoire MASI - Universite Paris VI - France Lines: 35 In article <387@litp.UUCP>, I wrote: > I would like to know if these two programs are ANSI-C strictly conforming > or not. If not, I would appreciate if someone could tell me exactly > why (I have the January 1988 draft). > > typedef int t1, t2 ; > void f1 (t1) ; > void f2 (t2) > int t2 ; > { > void f3 (t1) ; > } > > typedef int type ; > type f (type type) > { > return type+1 ; > } The answer is NO ! I have found the answer in paragraph 3.7.1 (Function definitions), in "Constraints" : An identifier declared as a typedef name shall not be redeclared as a parameter. One more C particularism... Pierre David pda@litp.uucp ...!uunet!mcvax!inria!litp!pda