This is the mail archive of the
mailing list for the GCC project.
Re: Unit at time compilation mode III
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Richard dot Earnshaw at arm dot com
- Cc: Alexandre Oliva <aoliva at redhat dot com>, Geert Bosch <bosch at gnat dot com>, Jan Hubicka <jh at suse dot cz>, Fergus Henderson <fjh at cs dot mu dot oz dot au>, Richard Henderson <rth at redhat dot com>, Zack Weinberg <zack at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: 17 Feb 2003 08:46:21 +0100
- Subject: Re: Unit at time compilation mode III
- Organization: Integrable Solutions
- References: <200302151442.h1FEg6w28097@pc960.cambridge.arm.com>
Richard Earnshaw <email@example.com> writes:
| > On Feb 13, 2003, Richard Earnshaw <firstname.lastname@example.org> wrote:
| > > My point is that a user specifies the name of the file that he wants to
| > > compile when invoking gcc. He doesn't specify the name of each file that
| > > that includes. So file==unit in these circumstances.
| > Until you get to the point of compiling the same foo.c with different
| > -D options, that give you different object files that you then link
| > together. You certainly don't expect inter-translation-unit
| > optimizations to apply just because the code comes from the same file,
| > do you? :-)
| That's compiling the file twice -- I don't really see the distinction you
| are trying to make (yes, I know that the standards talk about compilation
| units, but your average everyday user has never even seen a copy of the
| standard let alone read it).
I believe Alexandre's point of -D options is preciely that although
the file is the same, the translation unit may change -- and that is
the usually the case, even for what you call the average everyday user.