Re: Confusion in setting default options for non-C/C++ languages

2011-01-31 Thread Joseph S. Myers
On Mon, 31 Jan 2011, Xinliang David Li wrote: > On Mon, Jan 31, 2011 at 9:52 AM, Joseph S. Myers > wrote: > > On Sun, 30 Jan 2011, Ian Lance Taylor wrote: > > > >> I think that the call to lang_hooks.init_option_struct must be moved > >> after the call to default_options_optimization, one way or

Re: Confusion in setting default options for non-C/C++ languages

2011-01-31 Thread Xinliang David Li
On Mon, Jan 31, 2011 at 9:52 AM, Joseph S. Myers wrote: > On Sun, 30 Jan 2011, Ian Lance Taylor wrote: > >> I think that the call to lang_hooks.init_option_struct must be moved >> after the call to default_options_optimization, one way or another. > > No, that is wrong; by design this structure in

Re: Confusion in setting default options for non-C/C++ languages

2011-01-31 Thread Joseph S. Myers
On Sun, 30 Jan 2011, Ian Lance Taylor wrote: > I think that the call to lang_hooks.init_option_struct must be moved > after the call to default_options_optimization, one way or another. No, that is wrong; by design this structure initialization should happen before the options from the command l

Re: Confusion in setting default options for non-C/C++ languages

2011-01-31 Thread Richard Guenther
On Sun, 30 Jan 2011, Ian Lance Taylor wrote: > Currently toplev_main calls > init_options_once > init_options_struct > lang_hooks.init_options_struct > which all make sense. It then calls > decode_options > which calls > default_options_optimization > which sets various options based on

Confusion in setting default options for non-C/C++ languages

2011-01-30 Thread Ian Lance Taylor
Currently toplev_main calls init_options_once init_options_struct lang_hooks.init_options_struct which all make sense. It then calls decode_options which calls default_options_optimization which sets various options based on the optimization level. That is fine provided all languages ag