gls@cbnewsh.ATT.COM (Col. G. L. Sicherman) (09/16/89)
Here's an annoying cpp bug that seems to have been around for a while. I'm on a 3B2 running Vr3: $ what /lib/cpp /lib/cpp: /lib/cpp.sl 1.13 4.2 05/14/87 11610 AT&T-SF $ cat tst.c #define SQUARE(x) ((x) * (x)) #define CUBE(x) ((x) * (x) * (x)) void exit(); main() { int a, b; a = 3; b = SQUARE( a) + CUBE( a); printf("%d\n", b); exit(0); } $ /lib/cpp tst.c # 1 "tst.c" void exit(); main() { int a, b; a = 3; b = (( a) * ( a)) + # 13 "tst.c" (( a) * ( a) * ( a)); # 14 "tst.c" printf("%d\n", b); exit(0); } $ Naturally the output won't compile with "# 13" in the middle of a line. Does anybody have a fix for this? -- G. L. Sicherman gls@odyssey.att.COM
gls@cbnewsh.ATT.COM (Col. G. L. Sicherman) (09/17/89)
Nobody has sent me a fix yet (well, we can work around the problem). But pegasus!hansen tells me it's fixed in Vr4 with the ANSI cpprocessor. Good to know that some people know when to start from scratch! Thanks meanwhile to auspex!guy and loft386!dpi for suggestions. -:- POZZO: He used to dance the farandole, the fling, the brawl, the jig, the fandango and even the hornpipe. He capered. For joy. Now that's the best he can do. Do you know what he calls it? ESTRAGON: The Scapegoat's Agony. VLADIMIR: The Hard Stool. POZZO: The Net. He thinks he's entangled in a net. --S. Beckett, _Waiting for Godot_ -- Col. G. L. Sicherman gls@odyssey.att.COM