[gnu.g++.bug] Problem while installing g++ on Sun3

winckler@ira.uka.de (Joerg Winckler) (03/21/89)

I have some problems with g++ version 1.34. I will install g++-1.34
on a sun3 (with option -m68881). I use BSD4.3 Rel. 3.??, not the new Sun OS4.?.

While installing ich had several problems:
(It's a long mail, but I try to locate the error as good as possible)

The first problem is in 'cplus-parse.y'.
---------------------------------------

We find following statement: 

|
|#define YYDEBUG 
|

So YYDEBUG is an empty string.
This string will be compared in 'cplus-parse.tab.c': line 1584

|
|#if YYDEBUG != 0
|

This generates a cpp-error. The same error occurs nearly 15 times.
Correction: I say (in 'cplus-parse.y'): 

|
|#define YYDEBUG 1
|

The second problem arises while compiling 'cplus-lex.c'
-------------------------------------------------------
|../gcc-test/gcc -B../gcc-test/ -g -DSOS -DESKIT -O -c cplus-lex.c
|cplus-lex.c:59: parse error before `yylloc'
|cplus-lex.c:59: warning: data definition lacks type or storage class
|cplus-lex.c: In function yylex:
|cplus-lex.c:1590: request for member `first_line' in something not a structure or union
|*** Error code 1
|
|Stop.

I found in several other '.c'-files the following construction:
(These lines I copied out of 'cexp.c').

|#ifndef YYLTYPE
|typedef
|  struct yyltype
|    {
|      int timestamp;
|      int first_line;
|      int first_column;
|      int last_line;
|      int last_column;
|      char *text;
|   }
|  yyltype;
|
|#define YYLTYPE yyltype
|#endif
|
Correction: I added this construction in 'cplus-lex.c'
just before the line 59.

The third problem are 'only' warnings:
-----------------------------------
|../gcc-test/gcc -B../gcc-test/ -g -DSOS -DESKIT -O -c tree.c
|tree.c: In function lvalue_p:
|tree.c:1002: warning: comparison between pointer and integer
and 
|../gcc-test/gcc -B../gcc-test/ -g -DSOS -DESKIT -O -c stor-layout.c
|stor-layout.c: In function layout_basetypes:
|stor-layout.c:422: warning: assignment of pointer from integer lacks a cast
and 
../gcc-test/gcc -B../gcc-test/ -Um68k -g -c crt0.c
crt0.c: In function start1:
crt0.c:431: warning: `start1' was declared implicitly `extern' and later `static'

The rest goes well, BUT

The following program doesn't run:(using old dist-libg++)
| #include <stream.h>
|
| main()
| {
|	cerr << "Hello world\n";
| }

Error message:
| (113 : auenland : CC )g++ -o try try.cc -I/usr/ukautil/GNU/include
| /usr/ukautil/GNU/include/stdio.h:40: storage class specifier `_iobuf' not allow
| after struct or class
| /usr/ukautil/GNU/include/stdio.h:41: Segmentation violation
| Program c++ got fatal signal 11.


Can anybody help me ?!?

I'll mail the solutions, sended to me.

Thanks, Joerg Winckler