Path: utzoo!mnetor!uunet!husc6!bbn!rochester!PT.CS.CMU.EDU!IUS1.CS.CMU.EDU!edw From: edw@IUS1.CS.CMU.EDU (Eddie Wyatt) Newsgroups: comp.lang.c Subject: funny error Message-ID: <1211@PT.CS.CMU.EDU> Date: 24 Mar 88 16:32:42 GMT Sender: netnews@PT.CS.CMU.EDU Organization: Carnegie-Mellon University, CS/RI Lines: 33 I got an interesting error message today from the SUN compiler: /bin/cc -I. -I/usr/misc/.matrix/include -f68881 -pipe -I/usr/wyatt/include -g -c net.c "net.c", line 400: yacc stack overflow *** Error code 1 Stop. ------------------------------------------------------------------------- I have the macro def: #define matinvert(xxx) do { errno = 0; \ matinvert(xxx); \ if (errno) \ printf("ERROR - in matinvert"); \ } while (0) Line 400 has the first occurance of this macro. Well it seems that I'm not allow to use the macro's name within the macro definition (the C compile interprets it as a recusive macro). However, somehow the above macro sufficiently confused the compiler. If I use the -E switch the compiler is able to determine that the definition is recursive. Oh well, just thought I would share in the experience. BTW: Sun's cc is written using yacc, I didn't know that til now. -- Eddie Wyatt e-mail: edw@ius1.cs.cmu.edu