This is the mail archive of the
gcc-patches@gcc.gnu.org
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: 13 Feb 2003 15:28:42 +0100
- Subject: Re: Unit at time compilation mode III
- Organization: Integrable Solutions
- References: <200302131417.h1DEHBQ10970@pc960.cambridge.arm.com>
Richard Earnshaw <rearnsha@arm.com> writes:
| > On Feb 13, 2003, Richard Earnshaw <rearnsha@arm.com> wrote:
| >
| > > Precisely why I'm not keen on "unit-at-once" -- it's not clear what the
| > > "unit" is.
| >
| > The C and C++ standards talk about translation units. I always read
| > `unit' here as shorthand for that.
| >
| > > - function-at-once intra-function optimization
| > > - file-at-once optimize over everything in the "file"
| > > - all-at-once optimize over all files on the command line
| >
| > file would be wrong, since you'll seldom see a translation unit that
| > draws code from a single file (i.e., that doesn't #include anything
| > else).
|
| Maybe the standards do, but I've rarely if ever seen normal users talking
| about compiling compilation units. They talk about compiling "files".
I have already seen existing compilers use the term "translation unit".
On the other hand, the term "file" is really misleading gievn the
compilation model of C and C++. I is definitely not appropriate for C
and C++. (Maybe it is appropriate for Java).
| I've never known a user complain about the fact that when they compile a
| file foo.c the contents of the files it included were also compiled :-)
Then, that just means you aren't sufficiently familiar with users
suffering nightmarres coming from compiling template-based codes :-)
Welcome to C++.
-- Gaby