General search for symbols...
Stephen Biggs
xyzzy@hotpop.com
Wed Apr 9 08:43:00 GMT 2003
On Thu, 2003-04-03 at 22:11, Hans-Peter Nilsson wrote:
> 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 <new gcc
> > > > path>/gcc/config/<machine>/<machine>.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.
Ok... I'll check, thanks for the reply.
>
> > 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.
I wish I could tell you, but I am not at liberty, at this time... Thanks
for the advice.
I believe that if I check to see if the function decl for "va_end"
exists, then this tells me whether I am running stdarg or varargs...
>
> brgds, H-P
>
>
More information about the Gcc
mailing list