From: Shiny Happy Goth Boy
Subject: Re: gcl 2.2 compilation problem on solaris 2.5
Date: 
Message-ID: <4f59iu$pnv@savoy.cc.williams.edu>
I have a similar problem.  I'm also using a Sparc5 running
Solaris2.5.  I get a problem when compiling the file o/gbc.c.
I'm using GCC 2.7.0.  The same problem occurs with GCC 2.6.0.
The error message is as follows:

gcc -I/home/cs-students/97lhz/gcl-2.2/o -static -DVOL=volatile -fsigned-char
	-c -O -I../gcl-tk -I../h/ -O4 gbc.c  
sgbc.c: In function `sgc_quit':
In file included from gbc.c:1321:
sgbc.c:1072: warning: assignment makes pointer from integer without a cast
sgbc.c:1074: warning: assignment makes integer from pointer without a cast
sgbc.c: In function `memprotect_handler':
sgbc.c:1124: void value not ignored as it ought to be
*** Error code 1
make: Fatal error: Command failed for target `gbc.o'
Current working directory /home/cs-students/97lhz/gcl-2.2/o
*** Error code 1
make: Fatal error: Command failed for target `all'

The only file I modified was add-defs to tell it where to find certain
files (X11 libs and includes).

Any help is appreciated...

--Hank Zill
Student Lab Manager, CompSci Dept., Williams College
·····@cs.williams.edu
From: Casper H.S. Dik
Subject: Re: gcl 2.2 compilation problem on solaris 2.5
Date: 
Message-ID: <4fcjro$m9l@mail.fwi.uva.nl>
····@ (Shiny Happy Goth Boy) writes:

>gcc -I/home/cs-students/97lhz/gcl-2.2/o -static -DVOL=volatile -fsigned-char
>	-c -O -I../gcl-tk -I../h/ -O4 gbc.c  
>sgbc.c: In function `sgc_quit':
>In file included from gbc.c:1321:
>sgbc.c:1072: warning: assignment makes pointer from integer without a cast
>sgbc.c:1074: warning: assignment makes integer from pointer without a cast
>sgbc.c: In function `memprotect_handler':
>sgbc.c:1124: void value not ignored as it ought to be


Yep, the GET_FAULT_ADDRESS macro is faulty:

#define GET_FAULT_ADDR(sig,code,scp,addr) \
  (code ? ((siginfo_t *)code )->si_addr : error("no address info"))


This is not legal C since error is declared as void.

None of the compilers I use (SunPRO C, gcc 2.7.2)
accept this code.

Casper
-- 
Casper Dik - Sun Microsystems - via my guest account at the University
of Amsterdam.  My work e-mail address is: ··········@Holland.Sun.COM
Statements on Sun products included here are not gospel and may
be fiction rather than truth.