This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Move handle_option and read_cmdline_option to opts-common.c


On 06/25/2010 03:28 PM, Richard Guenther wrote:
> On Wed, Jun 23, 2010 at 2:50 AM, Joseph S. Myers
> <joseph@codesourcery.com> wrote:
>> This patch is relative to a tree with
>> <http://gcc.gnu.org/ml/gcc-patches/2010-06/msg01968.html> and
>> <http://gcc.gnu.org/ml/gcc-patches/2010-06/msg02150.html> applied.
>> The former needs C++ and Ada pieces approved; the latter needs C++
>> pieces approved.
>>
>> Continuing the work towards sharing option processing code between the
>> driver and the compiler proper, this patch moves handle_option and
>> read_cmdline_option, and the set_option function they use, into
>> opts-common.c.  In various places where these functions do things that
>> may not be appropriate in the driver at least initially, appropriate
>> callbacks are provided, and a cl_option_handlers structure is used to
>> describe these callbacks.
>>
>> The set of callbacks is needed by recursive handle_option calls (from
>> options enabling other options) and so some prototypes, including for
>> the handle_option langhook, are adjusted to pass the handlers
>> pointer.  The handle_option langhook is also adjusted to have a
>> boolean return value; the comments suggested a tristate return value
>> but nothing used or acted on a negative return value as was suggested
>> in the comments.  The Ada hook had useless checks for missing option
>> arguments (erroneous options don't get passed to these handlers),
>> which I removed.  The argument order of the handle_option function is
>> adjusted to match that of various related functions, by swapping the
>> arg and value operands.
>>
>> Bootstrapped with no regressions on x86_64-unknown-linux-gnu.  OK to
>> commit?
> 
> Ok for the non-frontend specific changes.

OK for Java.


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