This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR50999, serialize frontend specific flags (-fexceptions)
On Mon, 7 Nov 2011, Eric Botcazou wrote:
> > This tries to find a way to prepend explicitly set command-line options
> > by those implicitly set by the frontend (-fexceptions in this case).
> > Unfortunately we don't seem to have a good way to extract this information
> > easily, so for -fexceptions I hope all frontends set that during
> > init_options_struct.
>
> That's wrong for Ada: it is set in gnat_init_gcc_eh and cannot be set earlier
> because we support run time selection of the EH scheme.
That's called from gigi () - where is that called from? Is that from
before post_options? Where does Ada arrange for properly initializing
the backed EH?
We do have too many option related langhooks ... we do
lang_hooks.init_options_struct ()
/* decode options to cl_options */
lang_hooks.init_options ()
/* process decoded options. */
lang_hooks.post_options ().
why can't gigi set flag_exceptions from lang_hooks.init_options ()?
I can trivially change the patch to use global_options.x_flag_exceptions,
but then we get redudnant -fexception flags (not that I would care).
Just looking for a more general solution (but I note that Ada lacks
some conversion to the new cl_decoded_options facility anyways ...)
Richard.