Path: utzoo!attcan!uunet!mcvax!inria!crcge1!litp!pda From: pda@litp.UUCP (Pierre DAVID) Newsgroups: comp.std.c Subject: typedef-name as a parameter name Keywords: typedef-name, identifier scope Message-ID: <387@litp.UUCP> Date: 14 Sep 88 15:46:11 GMT Organization: Laboratoire MASI - Universite Paris VI - France Lines: 37 Hello C gurus ! 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). ----- Program A ------------------------- typedef int t1, t2 ; void f1 (t1) ; /* "t1" is the parameter type */ void f2 (t2) /* "t2" is a parameter, hiding "t2" type definition */ int t2 ; { void f3 (t1) ; /* "f3" declaration. "t1" is the type of the parameter */ } ----- Program B ------------------------- typedef int type ; /* * "f" is of type "type" * "f" has a parameter named "type" whose type is "type" */ type f (type type) { return type+1 ; } ----------------------------------------- Thanks to all. Pierre David pda@litp.uucp ...!uunet!mcvax!inria!litp!pda