Thread View: comp.bugs.sys5
2 messages
2 total messages
Started by Col. G. L. Sicherman
Fri, 15 Sep 1989 17:28
obtrusive line number in cpp
Author: Col. G. L. Sicherman
Date: Fri, 15 Sep 1989 17:28
Date: Fri, 15 Sep 1989 17:28
48 lines
1166 bytes
1166 bytes
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
Re: obtrusive line number in cpp
Author: Col. G. L. Sicherman
Date: Sat, 16 Sep 1989 23:10
Date: Sat, 16 Sep 1989 23:10
18 lines
1095 bytes
1095 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads