Bug in cxref(1) (actually /usr/lib/xcpp), SysV
Mike Wescott
wescott at ncrcae.UUCP
Thu Apr 25 02:58:42 AEST 1985
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
More information about the Net.bugs.usg
mailing list