This is the mail archive of the
mailing list for the GCC project.
Re: Objective C/C++ Compiler Drivers
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: IainS <developer at sandoe-acoustics dot co dot uk>
- Cc: Philip Herron <redbrain at gcc dot gnu dot org>, gcc patches <gcc-patches at gcc dot gnu dot org>, Ian Lance Taylor <iant at google dot com>, tom dot browder at gmail dot com, mrs at gcc dot gnu dot org
- Date: Wed, 18 Aug 2010 16:17:51 +0000 (UTC)
- Subject: Re: Objective C/C++ Compiler Drivers
- References: <4C6B6392.email@example.com> <D6DF1155-42B5-4707-8769-23DBE3CD8DE6@sandoe-acoustics.co.uk>
On Wed, 18 Aug 2010, IainS wrote:
> If I was doing this I'd steal (& modify) the options parser from gfortran and
> use the lang_specific_driver from g++ as a template for dealing with
> recognizing the case of PCH.
Please refactor into shared code instead of copying from one place to
another with random changes. For Obj-C++ you probably want to share all
the existing g++ driver code.
I'm in the process of debugging a patch that moves lang_specific_driver to
working with cl_decoded_option structures. Lots of oddities in the
existing lang_specific_driver code have shown up in the process and I've
no real idea whether some of them have good reasons behind them. For
example, why do some drivers but not others have special treatment of
0-character and 1-character operands (not always limited to "-" but
sometimes including other 1-character operands) different from how they
handle other non-option operands? The comment
/* We don't do this anymore, since we don't get them with minus
signs on them. */
that has also clearly been copied from one place to another doesn't make
any sense to me.
Joseph S. Myers