This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Objective C/C++ Compiler Drivers
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Philip Herron <redbrain at gcc dot gnu dot org>
- Cc: Mike Stump <mikestump at comcast dot net>, gcc-patches at gcc dot gnu dot org, Ian Lance Taylor <iant at google dot com>, tom dot browder at gmail dot com
- Date: Sat, 4 Sep 2010 00:14:04 +0000 (UTC)
- Subject: Re: Objective C/C++ Compiler Drivers
- References: <4C6B6392.8080108@gcc.gnu.org> <C7C8A455-DA75-4194-9897-EF68FBA86DBE@comcast.net> <AANLkTikE2uQJh9QtXvzD1pCQ-1g2567FLkNgiD6KVQvN@mail.gmail.com> <AANLkTimoMFV3NTn9OW4qfazv9uVeMOvrMB8uD6PdgX8_@mail.gmail.com>
On Sat, 4 Sep 2010, Philip Herron wrote:
> Hey all,
>
> I started to work on this again for a little bit, i followed the
> gcc/gfrotranspec.c compiler driver since its such a pristine driver
> its hard not to copy it.
My previous comments still apply: copying code with random changes is bad
and leads to gratuitous divergence as subsequent improvements don't get
applied to all the copies, refactoring so that code can be shared is good.
It may be possible to reduce the C, C++ and Fortran drivers to a single
piece of shared code that takes a datastructure describing the libraries
required by the respective languages; certainly, patches that increase
code sharing and reduce the amount of ObjC-specific code needed for an
ObjC-specific driver would be a much better start than going straight into
writing that driver.
--
Joseph S. Myers
joseph@codesourcery.com