Jump to content

Translation unit (programming)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Abdull (talk | contribs) at 23:43, 30 January 2010 (Created page with '{{about|the C programming term|the linguistic meaning of the term|translation unit}} In the terminology of the C programming language, ...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

In the terminology of the C programming language, a translation unit is the ultimate input to a C compiler from which an object file gets generated. [1]

Context

A C program consists of units called source files (or preprocessing files). When the C preprocessor expands a source file with all header files declared by #include directives, the result is a preprocessing translation unit. Further preprocessing translates the preprocessing translation unit into a translation unit. From a translation unit, the compiler generates an object file, which can be further processed and linked (possibly with other object files) to form an executable program.

References