From owner-freebsd-hackers Tue Jun 17 00:33:11 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id AAA00139 for hackers-outgoing; Tue, 17 Jun 1997 00:33:11 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id AAA00134 for ; Tue, 17 Jun 1997 00:33:07 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id RAA25623; Tue, 17 Jun 1997 17:16:04 +1000 Date: Tue, 17 Jun 1997 17:16:04 +1000 From: Bruce Evans Message-Id: <199706170716.RAA25623@godzilla.zeta.org.au> To: freebsd-hackers@FreeBSD.ORG, shigio@wafu.netgate.net Subject: Re: an inconvenience about macro [/usr/src/sys/sys/kernel.h] Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >--------------------------------------------------------------------------- >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