What is translation unit

mahmoodn nt_mahmood@yahoo.com
Tue Dec 11 08:09:00 GMT 2007


Thanks, 
I understood...


Robert Kiesling wrote:
> 
> Dear confused,
> 
>> > Sorry, I did not fully understand. I think mean that number of
>> translation
>> > units = number of cpp files.
>> > Right?
>> 
>> More-or-less.
>> 
>> If a Fred.cpp does a #include "Barney.cpp", then Barney.cpp will be in
>> the
>> same translation unit as Fred.cpp.
>> 
>> If Wilma.cpp is not compiled, then there is no Wilma translation unit.
>> 
>> Sincerely,
>> --Eljay
>> 
> 
> IIRC correctly, a translation unit is the input that goes through 
> the preprocess-parse-codegeneration cycle.
> 
> That means all of the cpp inputs of
> 
>   g++ foo.cpp bar.cpp baz.cpp -o foobarbaz.o
> 
> are translation units.
> 
> Regards,
> 
> Robert
> 
> -- 
> Ctalk Home Page: http://www.ctalklang.org/
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/What-is-translation-unit-tp14250608p14269483.html
Sent from the gcc - Help mailing list archive at Nabble.com.



More information about the Gcc-help mailing list