Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!uunet!aai!leo From: leo@aai.uu.net (Leo Pinard) Newsgroups: comp.unix.questions Subject: Re: Trouble with cxref(1) Keywords: cxref sun3 3B1 Message-ID: <1990Feb11.053937.7629@aai.uu.net> Date: 11 Feb 90 05:39:37 GMT References: <2019@cjsa.WA.COM> Reply-To: leo@aai.UU.NET (Leo Pinard) Organization: Amerinex Artificial Intelligence, Amherst MA Lines: 31 In article <2019@cjsa.WA.COM> jeff@cjsa.WA.COM (Jeffery Small) writes: >I have been unable to get cxref(1) to work. I am attempting to run this on >a set of program files which compile and lint clean. I have tried all manner >of invocations with no improvement so I am tossing this out for comments. > >Now, on a Sun-3/60 (4.0.3 OS) using either /bin/cxref of /usr/5bin/cxref, >I get the following message: > > SWITCH ERROR IN TMPSCAN: inafunct = no > >and cxref aborts. Does anyone have any idea what I am doing wrong or what >problems I should be looking for? I posted a question about this recently and got an answer for the Sun, at least. Jim Litchfield sent me the answer (Thanks, Jim!). It's a bug in cpp that can be worked around by running cpp separately, and then cxref. I use the following script: #! /bin/csh foreach name (*.c) /usr/lib/cpp -Dunix -Dsun -Dsparc $name >${name:r}.cref.c end cxref -cst -o rpe.cref *.cref.c foreach name (*.cref.c) \rm $name end To find out what options to pass the compiler, do a cc -dryrun. The bug is supposedly fixed in 4.1. Leo Pinard leo@aai.uu.net