*BSD News Article 39111


Return to BSD News archive

Xref: sserve comp.os.386bsd.questions:15073 gnu.gcc.help:10306 gnu.g++.help:7242
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!yarrina.connect.com.au!werple.apana.org.au!otis.apana.org.au!serval.net.wsu.edu!netnews.nwnet.net!oracle.pnl.gov!osi-east2.es.net!cronkite.nersc.gov!dancer.ca.sandia.gov!overload.lbl.gov!lll-winken.llnl.gov!uwm.edu!news.alpha.net!news.mathworks.com!europa.eng.gtefsd.com!news.umbc.edu!haven.umd.edu!cville-srv.wam.umd.edu!cradle
From: cradle@wam.umd.edu (David)
Newsgroups: comp.os.386bsd.questions,gnu.gcc.help,gnu.g++.help
Subject: Problem with gcc/g++-2.6.2, using libg++-2.6.1
Date: 7 Dec 1994 10:27:22 GMT
Organization: University of Maryland, College Park
Lines: 72
Message-ID: <3c42ma$7re@cville-srv.wam.umd.edu>
NNTP-Posting-Host: rac2.wam.umd.edu


I've finally succeeded in building gcc-2.6.2 (using the fixed freebsd.h header
file from gcc-2.6.3) and libg++2.6.1 on my 386/40 FreeBSD 1.1 system.

However, gcc doesn't seem to be working properly.  When I try to compile this
simple program, as a C program (test3.c), I have no problem.  But when
I compile it as a C++ program (test3.cc), I get a parse error.  What's
going on?

Thanks in advance.
---------------------------
/*  test3.cc */


enum {false, true};


int main() {
	return 0;
}
---------------------------

Script started on Tue Dec  6 17:09:41 1994
% gcc -v test3.c
Reading specs from /usr/local/lib/gcc-lib/i386-unknown-freebsd1.1/2.6.2/specs
gcc version 2.6.2
 /usr/local/lib/gcc-lib/i386-unknown-freebsd1.1/2.6.2/cpp -lang-c -v -undef -D__
GNUC__=2 -D__GNUC_MINOR__=6 -Dunix -Di386 -D__FreeBSD__ -D__386BSD__ -D__unix__ 
-D__i386__ -D__FreeBSD__ -D__386BSD__ -D__unix -D__i386 -Asystem(unix) -Asystem(
FreeBSD) -Acpu(i386) -Amachine(i386) test3.c /var/tmp/cc016911.i
GNU CPP version 2.6.2 (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/local/i386-unknown-freebsd1.1/include
 /usr/local/lib/gcc-lib/i386-unknown-freebsd1.1/2.6.2/include
 /usr/include
End of search list.
 /usr/local/lib/gcc-lib/i386-unknown-freebsd1.1/2.6.2/cc1 /var/tmp/cc016911.i -q
uiet -dumpbase test3.c -version -o /var/tmp/cc016911.s
GNU C version 2.6.2 (80386, BSD syntax) compiled by GNU C version 2.6.2.
 as -o /var/tmp/cc0169111.o /var/tmp/cc016911.s
 ld -e start -dc -dp /usr/lib/crt0.o -L/usr/local/lib/gcc-lib/i386-unknown-freebsd1.1/2.6.2 -L/usr/local/lib /var/tmp/cc0169111.o -lgcc -lc -lgcc
% 
% 
% gcc -v test3.cc
Reading specs from /usr/local/lib/gcc-lib/i386-unknown-freebsd1.1/2.6.2/specs
gcc version 2.6.2
 /usr/local/lib/gcc-lib/i386-unknown-freebsd1.1/2.6.2/cpp -lang-c++ -v -undef -D
__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=6 -Dunix -Di386 -D__FreeB
SD__ -D__386BSD__ -D__unix__ -D__i386__ -D__FreeBSD__ -D__386BSD__ -D__unix -D__
i386 -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386) test3.cc /var/
tmp/cc016919.ii
GNU CPP version 2.6.2 (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/lib/g++-include
 /usr/local/include
 /usr/local/i386-unknown-freebsd1.1/include
 /usr/local/lib/gcc-lib/i386-unknown-freebsd1.1/2.6.2/include
 /usr/include
End of search list.
 /usr/local/lib/gcc-lib/i386-unknown-freebsd1.1/2.6.2/cc1plus /var/tmp/cc016919.ii -quiet -dumpbase test3.cc -version -o /var/tmp/cc016919.s
GNU C++ version 2.6.2 (80386, BSD syntax) compiled by GNU C version 2.6.2.
test3.cc:4: parse error before `false'
            ^^^^^^^^^^^^^^^^^^^^^^^^^^



David Eisner
cradle@wam.umd.edu
University of Maryland at College Park