From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 25 00:56:02 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B946B16A4E0 for ; Tue, 25 Jul 2006 00:56:02 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF72D43D49 for ; Tue, 25 Jul 2006 00:56:00 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.pc (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.7/8.13.7/Debian-1) with ESMTP id k6P0tekN007625 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 25 Jul 2006 03:55:43 +0300 Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.7/8.13.7) with ESMTP id k6P0tYcQ007820; Tue, 25 Jul 2006 03:55:35 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.pc (8.13.7/8.13.7/Submit) id k6P0tYIW007819; Tue, 25 Jul 2006 03:55:34 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 25 Jul 2006 03:55:34 +0300 From: Giorgos Keramidas To: "Michael D. Norwick" Message-ID: <20060725005534.GA7484@gothmog.pc> References: <44C56443.50106@centurytel.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44C56443.50106@centurytel.net> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-3.771, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.63, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-hackers@freebsd.org Subject: Re: Just a question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jul 2006 00:56:02 -0000 On 2006-07-24 19:22, "Michael D. Norwick" wrote: > The following warnings were generated by a GhostScript build during > 'portmanager -u': > > ./src/gsfunc0.c: In function `function_Sd_enum_ptrs': > ./src/gsfunc0.c:37: warning: traditional C rejects ISO C style function > definitions > ./src/gsfunc0.c: In function `function_Sd_reloc_ptrs': > ./src/gsfunc0.c:48: warning: traditional C rejects ISO C style function > definitions > ./src/gsfunc0.c: In function `fn_gets_1': > ./src/gsfunc0.c:74: warning: traditional C rejects ISO C style function > definitions > ./src/gsfunc0.c: In function `fn_gets_2': > > This is just a small clip of the warning when building one .c file. The > build generated many of these warnings then aborted for reasons unknown > to me right now. I just wanted to know what this particular warning is > in reference to. Using GCC 3.4.4 (20050518). This is the warning enabled by -Wtraditional, and you get it for all functions that have full prototypes, i.e.: # giorgos@gothmog:/tmp/foo$ cc -Wtraditional foo.c # foo.c: In function `foo': # foo.c:4: warning: traditional C rejects ISO C style function definitions # foo.c: In function `main': # foo.c:10: warning: traditional C rejects ISO C style function definitions # giorgos@gothmog:/tmp/foo$ cc -Wtraditional bar.c # giorgos@gothmog:/tmp/foo$ diff -u bar.c foo.c # --- bar.c Tue Jul 25 03:53:59 2006 # +++ foo.c Tue Jul 25 03:52:13 2006 # @@ -1,12 +1,12 @@ # #include # # -int foo () # +int foo (void) # { # printf("foo\n"); # return 0; # } # # -int main() # +int main(void) # { # return foo(); # } # giorgos@gothmog:/tmp/foo$ Either the original GhostScript sources or the port uses -Wtraditional...