Article View: net.lang.c++
Article #91Compiler bug report (#3)
From: Steve Rumsby
Date: Tue, 11 Mar 1986 15:46
Date: Tue, 11 Mar 1986 15:46
38 lines
1359 bytes
1359 bytes
This is one of a series of reports of bugs found in the C++ compiler here at
warwick. We have release 1.0 of the software.
DESCRIPTION
A C++ file is run through cpp before cfront, right?
Cpp Doesn't recognise // style comments and tries to process them
as normal. Any words in such comments which also happen to be
macro names will cause cpp to throw up.
EXAMPLE
#define foo(x) (x)
main()
{
int i = 1;
int j = 2;
i = foo(j); // That use of foo is fine, but the two
// occurrances of foo in this comment
// aren't
}
OUTPUT
CC /tmp/x.c:
/tmp/x.c: 8: foo: argument mismatch
/tmp/x.c: 9: foo: argument mismatch
/tmp/x.c: 8: foo: unterminated macro call
1 error
--
Steve Rumsby.
...!ukc!warwick!steve.
Technical Details
Message-ID:
<262@euclid.warwick.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!mcvax!ukc!warwick!steveShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!mcvax!ukc!warwick!steve From: steve@warwick.UUCP (Steve Rumsby) Newsgroups: net.lang.c++ Subject: Compiler bug report (#3) Message-ID: <262@euclid.warwick.UUCP> Date: Tue, 11-Mar-86 10:46:41 EST Article-I.D.: euclid.262 Posted: Tue Mar 11 10:46:41 1986 Date-Received: Sat, 15-Mar-86 18:52:14 EST Reply-To: steve@warwick.UUCP (Steve Rumsby) Distribution: net Organization: Maths Institute, Warwick University, UK Lines: 38