From owner-freebsd-hackers Wed Jul 18 19: 8:50 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from sii.linuxsweden.nu (h55n2fls32o867.telia.com [217.208.37.55]) by hub.freebsd.org (Postfix) with ESMTP id F21D137B403 for ; Wed, 18 Jul 2001 19:08:45 -0700 (PDT) (envelope-from siigron@sii.linuxsweden.nu) Received: (from siigron@localhost) by sii.linuxsweden.nu (8.11.4/8.11.3) id f6J46Kk00785; Thu, 19 Jul 2001 06:06:20 +0200 (CEST) (envelope-from siigron) Date: Thu, 19 Jul 2001 06:06:20 +0200 (CEST) From: Joel Wilsson Message-Id: <200107190406.f6J46Kk00785@sii.linuxsweden.nu> To: sheldonh@starjuice.net Subject: Re: Weird problem in 4.3-STABLE Cc: freebsd-hackers@FreeBSD.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Sheldon Hearn writes: > static inline void > xdaemonwarn(char *fmt, ...) > { > va_list ap; > > va_start(ap, fmt); > if (!daemon_quiet) > warn(fmt, ap); > va_end(ap); > > return; > } > > GCC gives "syntax error before 'void'". Fair enough. $ cat test.c static inline void blah(void) { printf("yada yada yada\n"); } main() { blah(); } $ gcc -ansi -o test test.c test.c:2: syntax error before `void' $ gcc -o test test.c $ cat test2.c static __inline void blah(void) { printf("yada yada yada\n"); } main() { blah(); } $ gcc -ansi -o test2 test2.c $ So either get rid of the -ansi flag, or use __inline instead of inline. Regards, Joel Wilsson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message