Date: Fri, 17 Jan 1997 15:15:50 -0500 From: Ron Bolin <rlb@mindspring.com> To: freebsd-current@freebsd.org Subject: gcc compiler question Message-ID: <32DFDDF6.41C67EA6@mindspring.com>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------446B9B3D2781E494167EB0E7 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit In trying to port cprolog to FBSD. I find the the Solaris 2.X c compiler can handle the following macro sub, but gcc can't on any platform. Does anyone have a suggestion how gcc might emulate the Solaris macro substitution? Thank's Ron See attached code -- **************************************************************************** Ron Bolin rlb@mindspring.com, http://www.mindspring.com/~rlb/ GSU: gs01rlb@panther.gsu.edu matrlbx@indigo4.cs.gsu.edu Home: 770-992-8877 **************************************************************************** --------------446B9B3D2781E494167EB0E7 Content-Type: text/plain; charset=us-ascii; name="test.c" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="test.c" /* Under Solaris 2.X this compiles with the proper macro substitution on savepS = savead-lcl0; to LSave [ 6 ] = savead- ( Origin [ 5 ] ); But gcc does not */ #define savepS LSave[NAreas] #define NAreas 6 /* number of work areas/stacks */ #define LocalId 5 typedef unsigned **PTR; static PTR *savead, Origin[100]; #define lcl0 (Origin[LocalId]) unsigned LSave[100]; main() { savepS = savead-lcl0; } --------------446B9B3D2781E494167EB0E7--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?32DFDDF6.41C67EA6>