This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Converting tm.h macros to functions


On 18-Jun-2001, Mark Mitchell <mark@codesourcery.com> wrote:
> 
> > I was thinking of keeping the structures separate, to avoid the tedium
> > of struct1.struct2.member.  I don't think lumping them together buys
> > you much.
...
> conceptual things should ideally map one-to-one on code things.

I agree.

How about defining wrapper functions or macros?
E.g.

#define asm_output_int(i,f) (*target.asm_stuff.asm_output_int)((i),(f))

Then we could split the structure into separate substructures, but
in most places you'd avoid the tedium of struct1.struct2.member.
The only tedium would be in defining the wrappers...

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]