public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* How to understand the term 'unit' in 'unit-at-a-time'?
@ 2009-03-25  7:35 QiangHuang
  2009-03-25 13:28 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: QiangHuang @ 2009-03-25  7:35 UTC (permalink / raw)
  To: gcc-help

      Hi Everyone:

      GCC now has two styles for compilation, one for
'function-at-atime', and the other for 'unit-at-a-time'.
      The term 'unit' in this word refers to a whole source file ? or
something else.

      Could someone make an exact definition about it?
      And How the compiler make the decision that if the functions are
in the same compilation unit.

      Thanks a lot~

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to understand the term 'unit' in 'unit-at-a-time'?
  2009-03-25  7:35 How to understand the term 'unit' in 'unit-at-a-time'? QiangHuang
@ 2009-03-25 13:28 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2009-03-25 13:28 UTC (permalink / raw)
  To: QiangHuang; +Cc: gcc-help

QiangHuang <qianghuang87@gmail.com> writes:

>       GCC now has two styles for compilation, one for
> 'function-at-atime', and the other for 'unit-at-a-time'.
>       The term 'unit' in this word refers to a whole source file ? or
> something else.
>
>       Could someone make an exact definition about it?
>       And How the compiler make the decision that if the functions are
> in the same compilation unit.

"unit" refers to a single compilation unit, meaning everything that the
compiler sees in a single invocation.  The decision is made by the
command line options.

However, note that as of gcc 4.4 (not yet released) the compiler only
supports unit-at-a-time mode.  function-at-a-time mode has been
eliminated.

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-25 13:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-25  7:35 How to understand the term 'unit' in 'unit-at-a-time'? QiangHuang
2009-03-25 13:28 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).