From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17971 invoked by alias); 25 Mar 2009 13:28:34 -0000 Received: (qmail 17963 invoked by uid 22791); 25 Mar 2009 13:28:33 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Mar 2009 13:28:27 +0000 Received: from zps36.corp.google.com (zps36.corp.google.com [172.25.146.36]) by smtp-out.google.com with ESMTP id n2PDSPjW005776; Wed, 25 Mar 2009 06:28:25 -0700 Received: from smtp.corp.google.com (spacemonkey1.corp.google.com [192.168.120.115]) by zps36.corp.google.com with ESMTP id n2PDSNaI024939 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 25 Mar 2009 06:28:23 -0700 Received: from localhost.localdomain.google.com (adsl-71-133-8-30.dsl.pltn13.pacbell.net [71.133.8.30]) (authenticated bits=0) by smtp.corp.google.com (8.13.8/8.13.8) with ESMTP id n2PDSNio002308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 25 Mar 2009 05:28:23 -0800 To: QiangHuang Cc: gcc-help@gcc.gnu.org Subject: Re: How to understand the term 'unit' in 'unit-at-a-time'? References: <1807a3db0903250035y5db7cf64qe68b43c362e468b@mail.gmail.com> From: Ian Lance Taylor Date: Wed, 25 Mar 2009 13:28:00 -0000 In-Reply-To: <1807a3db0903250035y5db7cf64qe68b43c362e468b@mail.gmail.com> (QiangHuang's message of "Wed\, 25 Mar 2009 15\:35\:40 +0800") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2009-03/txt/msg00322.txt.bz2 QiangHuang 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