Article View: comp.bugs.sys5
Article #97obtrusive line number in cpp
From: 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
Technical Details
Message-ID:
<3945@cbnewsh.ATT.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!rutgers!bellcore!att!cbnewsh!glsShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!rutgers!bellcore!att!cbnewsh!gls From: gls@cbnewsh.ATT.COM (Col. G. L. Sicherman) Newsgroups: comp.bugs.sys5 Subject: obtrusive line number in cpp Message-ID: <3945@cbnewsh.ATT.COM> Date: 15 Sep 89 17:28:12 GMT Distribution: na Organization: AT&T Bell Laboratories Lines: 48