savela@tel2.tel.vtt.fi (Markku Savela) (07/17/89)
We run into a strange problem when trying to compile some programs under Apollo SR10.1/sys5 combination (this does not seem to happen when running under bds4.3). The problem seems to center around single quotes (') within strings. Looking at the preprocessor output it seems that it adds those "line number hints" into incorrect places? The problem goes away, if single quotes are removed. The problem might be slightly difficult to replicate because of the "random" nature of those line-number lines... Me thinks we got a broken default "cpp" in use under SYS5 :) How do I force "cc" to use another and which one should I use? Or any other ideas about this? thanks, Markku Savela savela%vtttel@router.funet.fi ----------------- source fragment from "test.c" ---------------------- sprintf(line, "vtask='%s' state='%s' primitive='%s' blocks=%d bytes%lu\n", traceMemInfos[i].vtask->name, stateName, primName, traceMemInfos[i].blocks, traceMemInfos[i].used * sizeof(HEADER)); ----------------- output from cc -E test.c --------------------------- sprintf(line, "vtask='%s' state='%s' primitive='%s' blocks=%d # 1540 "test.c" bytes%lu\n", traceMemInfos[i].vtask->name, stateName, primName, traceMemInfos[i].blocks, traceMemInfos[i].used * sizeof(HEADER)); ----------------- sample of error message from cc -g -c test.c --- (1547) "vtask='%s' state='%s' primitive='%s' blocks=%d ******** Line 1547 of "test.c": [Error #003] Unterminated character string. (1548) bytes=%lu\n", ------------------end ----