Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sun-barr!ccut!s.u-tokyo!rkna50!nttlab!seraph.NTT.JP From: takada@seraph.NTT.JP (Toshihiro Takada) Newsgroups: comp.unix.ultrix Subject: Bug in cc? (about parameter prototype) Message-ID: <106265@nttlab.ntt.JP> Date: 31 Aug 90 05:23:50 GMT Sender: news@nttlab.ntt.JP Organization: NTT Basic Research Laboratories, Musashino, Tokyo, JAPAN Lines: 31 We have a DECstation3100 running Ultrix/3.1. The following code cause an error. Is this bug already fixed? /*------------------------------*/ seraph:2 cat > a.c typedef int* IPTR; int tako(int x, int y) { extern int ika(IPTR, IPTR); return(ika(&x, &y)); } seraph:3 cc -c a.c ccom: Error: a.c, line 3: syntax error extern int ika(IPTR, IPTR); --------------------------^ ccom: Error: a.c, line 3: function declaration in bad context extern int ika(IPTR, IPTR); ---------------------------^ ccom: Error: a.c, line 4: illegal function return(ika(&x, &y)); -------------------^ ccom: Error: a.c, line 4: operands of RETURN have incompatible types return(ika(&x, &y)); ---------------------^ ======================================================================== NTT Basic Research Labs. Toshihiro TAKADA Information Science Research Lab. takada@nttlab.ntt.JP ========================================================================