🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.c++
Article #377

c++ version 1.1 incompatibility with 4.3bsd C compiler

#377
From: Richard Rudell
Date: Fri, 31 Oct 1986 16:14
46 lines
1503 bytes
The following does not compile with Version 1.1 of cfront on a bsd 4.3 VAX:


	#include <complex.h>

	main()
	{
	    complex a = complex(5.0,7.0);
	    complex b = complex(4.5,3.2);
	    complex c = complex(4.5,3.2);

	    complex d = a + b + c;
	}


The compiler produces the error message:
	CC  com.c:
	cc   com..c -lC
	"/usr/include/CC/complex.h", line 44: redeclaration of _plusFCcomplex__Ccomplex___
	mv: com..o: Cannot access: No such file or directory


The problem is that the declarations (taken from the cfront output):

		.
		.

	#line 44 "/usr/include/CC/complex.h"
	extern struct complex _plusFCcomplex__Ccomplex___ ();
		.
		.
		.
	#line 44 "/usr/include/CC/complex.h"
	static struct complex _plusFCcomplex__Ccomplex___ ();


are considered illegal by the 4.3 compiler.  Apparently cfront is
creating a static function because of an inability to fully expand
the complex addition in-line.

Any simple fix ?


Thanks,
Rick Rudell.
Technical Details
Message-ID: <1109@ucbcad.BERKELEY.EDU>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!think!nike!ucbcad!rudell

Show 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!rutgers!think!nike!ucbcad!rudell
From: rudell@ucbcad.BERKELEY.EDU (Richard Rudell)
Newsgroups: net.lang.c++
Subject: c++ version 1.1 incompatibility with 4.3bsd C compiler
Message-ID: <1109@ucbcad.BERKELEY.EDU>
Date: Fri, 31-Oct-86 11:14:44 EST
Article-I.D.: ucbcad.1109
Posted: Fri Oct 31 11:14:44 1986
Date-Received: Sat, 1-Nov-86 04:29:58 EST
Organization: CAD Group, U.C. Berkeley
Lines: 46
Keywords: bug, bsd4.3