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 17 Jun 2001, Alexandre Oliva wrote:

> On Jun 17, 2001, Neil Booth <neil@daikokuya.demon.co.uk> wrote:
> 
> > Hmm.  We could continue to use macros, but only use them to initialise
> > the structures rather than bits of conditionally compiled code
> > scattered all over the compiler.  It still a big improvement I think.
> 
> Someone had suggested moving macros from .h to .md.  We could then use
> gensomething to emit the machine-specific struct initializer.

If you want to implement that then I'll use it, otherwise I'll probably 
use the simple solution of a target_init function (called in toplev_main 
around the same time as lang_hooks.init_options) which sets the structure 
elements provided by a back end.  This also makes it simple for some 
elements to have non-NULL defaults.

-- 
Joseph S. Myers
jsm28@cam.ac.uk


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