Path: utzoo!attcan!uunet!mcvax!cernvax!achille From: achille@cernvax.UUCP (achille) Newsgroups: comp.sys.apollo Subject: sr10.1 C preprocessor is broken ? Message-ID: <913@cernvax.UUCP> Date: 24 Jan 89 11:20:29 GMT References: <865@nosc.NOSC.MIL> Reply-To: achille@cernvax.UUCP () Organization: CERN European Laboratory for Particle Physics, CH-1211 Geneva, Switzerland Lines: 37 Hi, I'm having any sort of troubles using /bin/cc under sr10.1 on a dn3000 and finally I think I found my problems in /usr/lib/cpp. Here it is what happens: cpp breaks (arbitrarily) lines and insert (wrong) line numbering information in the middle, here is a short example: line 38 in .c file: printf("%s --- %2.2d/%2.2d/%1.1d\n",argv[0],d->tm_mon,d->tm_mday,d->tm_wday); output from cc -E: printf("%s --- # 42 "t_bks.c" %2.2d/%2.2d/%1.1d\n",argv[0],d->tm_mon,d->tm_mday,d->tm_wday); The error I get is pretty clear: (0038) printf("%s --- ******** Line 38 of "t_bks.c": [Error #003] Unterminated character string. (0042) %2.2d/%2.2d/%1.1d\n",argv[0],d->tm_mon,d->tm_mday,d->tm_wday); ******** Line 42 of "t_bks.c": [Error #068] The types of [] and [ 2.200000000000000 ] are not compatible with the "%" operator. Using /com/cc everything works fine, the program compiles fine on sun and cray/unicos. As everybody knows, /com/cc has its own cpp ! Don't tell me to /com/cc, I thought sr10 was Unix, just Unix, bugs included (and new ones added ? :-) As a side effect, when using dde to debug, I find myself debugging comment lines, thanx to the wrong numbering cpp is introducing I guess. I od'ed the file and there are no control characters (after all it was working under sr9.7) Has anybody the same problem ? Is there any non-broken apollo cpp around ? I need a quick solution ! Advance thanx Achille Petrilli Cray and PWS operations