This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: Objective C/C++ Compiler Drivers


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
joseph@codesourcery.com


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