Path: utzoo!attcan!uunet!cbmvax!vu-vlsi!dsinc!syd From: syd@dsinc.UUCP (Syd Weinstein) Newsgroups: comp.sys.apollo Subject: Re: sr10.1 C preprocessor is broken ? Message-ID: <52@dsinc.UUCP> Date: 27 Jan 89 00:54:47 GMT References: <865@nosc.NOSC.MIL> <913@cernvax.UUCP> Reply-To: syd@dsinc.UUCP (Syd Weinstein) Organization: Datacomp Systems, Inc., Huntingdon Valley, PA 19006 Lines: 39 In article <913@cernvax.UUCP> achille@cernvax.UUCP () writes: :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. : I reported the same problem to Apollo, and am trying to get them to write an APR. The SR10.0 cpp works fine, and intresting enough the /bsd4.3/usr/lib/cpp works fine, but the /sys5.3/usr/lib/cpp is broken. What I did was to change the symbolic link in /lib to a shell script that checks the environment. If the environment is Sys5.3, it call /bsd4.3/usr/lib/cpp -I/sys5.3/usr/include $* else it calls /bsd4.3/usr/lib/cpp $*. That work around seems to be ok for now. -- ===================================================================== Sydney S. Weinstein, CDP, CCP Elm Coordinator Datacomp Systems, Inc. Voice: (215) 947-9900 {allegra,bpa,vu-vlsi}!dsinc!syd FAX: (215) 938-0235