Bug in cc? (about parameter prototype)
Toshihiro Takada
takada at seraph.NTT.JP
Fri Aug 31 15:23:50 AEST 1990
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 at nttlab.ntt.JP
========================================================================
More information about the Comp.unix.ultrix
mailing list