Date: Tue, 17 Jun 1997 17:16:04 +1000 From: Bruce Evans <bde@zeta.org.au> To: freebsd-hackers@FreeBSD.ORG, shigio@wafu.netgate.net Subject: Re: an inconvenience about macro [/usr/src/sys/sys/kernel.h] Message-ID: <199706170716.RAA25623@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>--------------------------------------------------------------------------- >Inconvenience about Macro >--------------------------------------------------------------------------- > >In /usr/src/sys/kern/init_main.c, SYSINIT macro is used. It is like this. > > [/usr/src/sys/kern/init_main.c] > SYSINIT(placeholder, SI_SUB_DUMMY,SI_ORDER_ANY, NULL, NULL) > >SYSINIT doesn't end with ';', because the definition already has it. I like leaving off the semicolon in the macro definition like this so that a semicolon must be supplied and is valid after invocations of the macro. Most of the SYSCTL() macros have the same problem. I planned to fix this someday. >But ctags(1) cannot treat this pattern. indent(1) has the same problem. This problem is mostly avoided by following the macro invocations with an invalid semicolon (the resulting null declarations at file scope are syntax errors in ANSI C). Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706170716.RAA25623>