Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ncrcae.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!harvard!think!mit-eddie!genrad!decvax!mcnc!ncsu!ncrcae!wescott From: wescott@ncrcae.UUCP (Mike Wescott) Newsgroups: net.bugs.usg Subject: Bug in cxref(1) (actually /usr/lib/xcpp), SysV Message-ID: <2150@ncrcae.UUCP> Date: Wed, 24-Apr-85 11:58:42 EST Article-I.D.: ncrcae.2150 Posted: Wed Apr 24 11:58:42 1985 Date-Received: Sat, 27-Apr-85 01:30:54 EST Reply-To: wescott@ncrcae.UUCP (Mike Wescott) Organization: NCR, Columbia, SC Lines: 25 There's a bug that shows up when using cxref. Some files, when cxref'd give syntax errors that aren't there. The problem is in /usr/lib/xcpp, the special version of cpp(1) used by cxref. The cxref program invokes xcpp on each file with a -F option. The cpp.c code for the -F option lacks a continue statement; therefore the program processes a spurious -D option. On my machine a spurious -Dsr occurred and caused syntax errors on any file that had an "sr" variable declared. Fix: in main() of /usr/src/cmd/cpp/cpp.c: #ifdef CXREF case 'F': if ((outfp = fopen(argv[++i],"w")) == NULL) { fprintf(stderr, "Can't open %s\n", argv[i]); exit(1); } + continue; /* mcw: fix for cxref spurious -Dsr */ #endif -------------------------- Mike Wescott ncrcae!wescott