From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32454 invoked by alias); 4 Apr 2003 00:11:58 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 32447 invoked from network); 4 Apr 2003 00:11:58 -0000 Received: from unknown (HELO dair.pair.com) (209.68.1.49) by sources.redhat.com with SMTP; 4 Apr 2003 00:11:58 -0000 Received: (qmail 24561 invoked by uid 20157); 4 Apr 2003 00:11:57 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 4 Apr 2003 00:11:57 -0000 Date: Fri, 04 Apr 2003 02:13:00 -0000 From: Hans-Peter Nilsson X-X-Sender: hp@dair.pair.com To: Stephen Biggs cc: GCC list Subject: Re: General search for symbols... In-Reply-To: <1049368586.1267.2.camel@steve> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2003-04/txt/msg00166.txt.bz2 On 3 Apr 2003, Stephen Biggs wrote: > On Wed, 2003-04-02 at 13:34, Hans-Peter Nilsson wrote: > > On 2 Apr 2003, Stephen Biggs wrote: > > > I am trying to port GCC to another machine. > > > > > > Given that I have a file > > path>/gcc/config//.c, how would I, within any of the > > > functions in that file find out if a certain symbol has been defined by > > > a "#define" statement in the C source that is being compiled? > > > > That's an odd need for a new port. Care to elaborate; example? > > (It might turn out to be a misunderstanding or a need covered > > by an existing mechanism, that's mainly why I ask.) > > Thanks for the reply. > > E.g., I need to do something different in the assembly output based on > whether varargs.h or stdarg.h was included in the C source file. Maybe that need is covered by the macro current_function_stdarg. See function.h. That particular macro unfortunately seems not documented. See also other ports. One or another has probably solved the same problem your port has. > I > thought to check to see if either "_VARARGS_H" or "_STDARG_H" was > defined. I am also going to need this for other things. I can't guess what you mean by "other things" so I can't help you there. brgds, H-P