From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21879 invoked by alias); 7 Nov 2011 12:49:53 -0000 Received: (qmail 21870 invoked by uid 22791); 7 Nov 2011 12:49:52 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 07 Nov 2011 12:49:39 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id E6E938BB22; Mon, 7 Nov 2011 13:49:37 +0100 (CET) Date: Mon, 07 Nov 2011 13:08:00 -0000 From: Richard Guenther To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org, "Joseph S. Myers" Subject: Re: [PATCH] Fix PR50999, serialize frontend specific flags (-fexceptions) In-Reply-To: <201111071335.33685.ebotcazou@adacore.com> Message-ID: References: <201111071335.33685.ebotcazou@adacore.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-11/txt/msg00931.txt.bz2 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.