Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

c++ version 1.1 incompatibility with 4.3bsd C compiler

0 views
Skip to first unread message

Richard Rudell

unread,
Oct 31, 1986, 11:14:44 AM10/31/86
to

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.

0 new messages