What a translation unit is.
From: ellie fant (pcrcutitout1000011_at_uko2.co.uk)
Date: 11/26/03
- Next message: Josh Sebastian: "Re: What a translation unit is."
- Previous message: ellie fant: "Re: <ctype.h> toLower()"
- Next in thread: Josh Sebastian: "Re: What a translation unit is."
- Reply: Josh Sebastian: "Re: What a translation unit is."
- Reply: Irrwahn Grausewitz: "Re: What a translation unit is."
- Reply: Ian Woods: "Re: What a translation unit is."
- Reply: Josh Sebastian: "Re: What a translation unit is."
- Reply: Josh Sebastian: "Re: What a translation unit is."
- Reply: Richard Heathfield: "Re: What a translation unit is."
- Reply: Karl Heinz Buchegger: "Re: What a translation unit is."
- Reply: Martijn Lievaart: "Re: What a translation unit is."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 25 Nov 2003 23:22:23 -0000
A select few individuals do not seem to understand what a translation unit
is.
So I would like to point out what the documents state:
[quote MSDN]
Source files can be translated at different times - in fact, it is common to
translate only out-of-date files. The translated translation units can be
kept either in separate object files or in object-code libraries. These
separate translation units are then linked to form an executable program or
a dynamic-link library (DLL).
Translation units can communicate using:
Calls to functions that have external linkage.
Calls to class member functions that have external linkage.
Direct modification of objects that have external linkage.
Direct modification of files.
Interprocess communication (for Microsoft® Windows®-based applications
only).
[end quote]
As far as I can see from the above it is necessary to compile your source
code to create a translation unit or an object file. A translation unit can
be an object file or an object-code library.
therefore:
=================================================
[quote: Richard Heathfield]
The output of a compiler is generally called an object file. The translation
unit is the input, not the output.
[end quote]
This is utter nonsense.
A translation unit is generally considered to be input to the LINKER.
And the object code generated by the compiler is normally considered a TU.
Richard you seem to have your facts wrong AGAIN.
==================================================
[quote Josh Sebastian]
The term "translation unit" refers to an
entity of source code (ie, input to a compiler). You may not /like/
that definition, but that's your problem.
[end quote]
No Josh this is incorrect , the input to the LINKER is a TU.
And you might not like that definition but that is the correct definition
and therefore YOUR problem.
==================================================
[quote Arthur J ODwyer]
G-d d-mm-t, "Jumbo," Richard *told* you to find out what translation
units were *on your own*! It's in the *Standard*, for Pete's sake!
It's not hard to find! Go read a d-mn book for once in your life!
[end quote]
Arthur, Richard doesn't seem to know what a TU is.
And I would recommend that you read some books yourself .
That's IF you can read.
:-s
==================================================
<sigh>
Will there ever be an end to the self righteous argumentative behavior of
these children?
===================================================
[quote B. V Ingen]
Lets have a definitive answer on that. The C standard says:
<quote>
5.1.1.1 Program structure
1 A C program need not all be translated at the same time. The text of the
program is kept in units called source files, (or preprocessing files) in
this International Standard. A source file together with all the headers
and source files included via the preprocessing directive #include is known
as a preprocessing translation unit. After preprocessing, a preprocessing
translation unit is called a translation unit.
</quote>
The C++ standard has a similar definition of translation unit in clause 2
(first paragraph).
[end quote]
Thanks for that B
This seems to pretty much back up my idea of a TU.
===================================================
Hope this clears things up
:-)
- Next message: Josh Sebastian: "Re: What a translation unit is."
- Previous message: ellie fant: "Re: <ctype.h> toLower()"
- Next in thread: Josh Sebastian: "Re: What a translation unit is."
- Reply: Josh Sebastian: "Re: What a translation unit is."
- Reply: Irrwahn Grausewitz: "Re: What a translation unit is."
- Reply: Ian Woods: "Re: What a translation unit is."
- Reply: Josh Sebastian: "Re: What a translation unit is."
- Reply: Josh Sebastian: "Re: What a translation unit is."
- Reply: Richard Heathfield: "Re: What a translation unit is."
- Reply: Karl Heinz Buchegger: "Re: What a translation unit is."
- Reply: Martijn Lievaart: "Re: What a translation unit is."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|