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
[-- Attachment #1 --] 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 **************************************************************************** [-- Attachment #2 --] /* 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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?32DFDDF6.41C67EA6>
