From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1482 invoked by alias); 10 Sep 2004 06:37:06 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 1457 invoked from network); 10 Sep 2004 06:37:02 -0000 Received: from unknown (HELO wire.cs.nthu.edu.tw) (140.114.79.60) by sourceware.org with SMTP; 10 Sep 2004 06:37:02 -0000 Received: from wire.cs.nthu.edu.tw (localhost.localdomain [127.0.0.1]) by wire.cs.nthu.edu.tw (Postfix) with ESMTP id 5819717D07 for ; Fri, 10 Sep 2004 14:36:44 +0800 (CST) From: "Ming-Chia Jiang" To: gcc-help@gcc.gnu.org Subject: extern functions in header file Date: Fri, 10 Sep 2004 06:37:00 -0000 Message-Id: <20040910062659.M23072@wire.cs.nthu.edu.tw> X-OriginatingIP: 220.130.44.251 (jmc) MIME-Version: 1.0 Content-Type: text/plain; charset=big5 X-SW-Source: 2004-09/txt/msg00083.txt.bz2 Hi folks, Is there any difference between declaring functions with prefix "extern" and without "extern" keyword in header files?? For example, I define a function FUNC(void, int) in test.c. And test.c includes the test.h with the following two conditions: --test.h with extern-- extern void FUNC(void, int); --test.h without extern-- void FUNC(void, int); The output result seems no difference, and also the compiler does not show warning messages for both cases. Can anyone advise what the 'extern' keyword effects in the header file? Best Regards Ming-Chia