Date: Thu, 19 Jul 2001 06:06:20 +0200 (CEST) From: Joel Wilsson <siigron@sii.linuxsweden.nu> To: sheldonh@starjuice.net Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Weird <stdarg.h> problem in 4.3-STABLE Message-ID: <200107190406.f6J46Kk00785@sii.linuxsweden.nu>
index | next in thread | raw e-mail
Sheldon Hearn <sheldonh@starjuice.net> 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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107190406.f6J46Kk00785>
