From owner-freebsd-current Fri Jan 17 14:44:37 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id OAA01297 for current-outgoing; Fri, 17 Jan 1997 14:44:37 -0800 (PST) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id OAA01282 for ; Fri, 17 Jan 1997 14:44:31 -0800 (PST) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id XAA12714; Fri, 17 Jan 1997 23:44:22 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.8.4/8.6.9) id XAA20639; Fri, 17 Jan 1997 23:05:06 +0100 (MET) Message-ID: Date: Fri, 17 Jan 1997 23:05:06 +0100 From: j@uriah.heep.sax.de (J Wunsch) To: rlb@mindspring.com (Ron Bolin) Cc: freebsd-current@freebsd.org Subject: Re: gcc compiler question References: <32DFDDF6.41C67EA6@mindspring.com> X-Mailer: Mutt 0.55-PL10 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <32DFDDF6.41C67EA6@mindspring.com>; from Ron Bolin on Jan 17, 1997 15:15:50 -0500 Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk As Ron Bolin wrote: > 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. I can't seem to realize your problem: j@uriah 132% /usr/libexec/cpp #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; } ^D # 1 "" typedef unsigned **PTR; static PTR *savead, Origin[100]; unsigned LSave[100]; main() { LSave[6 ] = savead- (Origin[5 ]) ; } -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)