From owner-freebsd-bugs Mon Feb 1 20:30:05 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA06637 for freebsd-bugs-outgoing; Mon, 1 Feb 1999 20:30:05 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA06632 for ; Mon, 1 Feb 1999 20:30:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.2/8.9.2) id UAA19727; Mon, 1 Feb 1999 20:30:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Date: Mon, 1 Feb 1999 20:30:01 -0800 (PST) Message-Id: <199902020430.UAA19727@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.ORG From: Bruce Evans Subject: Re: kern/9869: Addition to style(9) about usage of macro. Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/9869; it has been noted by GNATS. From: Bruce Evans To: FreeBSD-gnats-submit@FreeBSD.ORG, shigio@wafu.netgate.net Cc: Subject: Re: kern/9869: Addition to style(9) about usage of macro. Date: Tue, 2 Feb 1999 15:21:56 +1100 > The following statement should be added to style(9). > > When using macros out of function, they should end with a semicolon. > > SYSINIT(placeholder, SI_SUB_DUMMY,SI_ORDER_ANY, NULL, NULL); > > Otherwise, ctags(1) and gtags(1) cannot recognize function definitions > collectly. Unfortunately, a semicolon after SYSINIT() is a (pedantic) syntax error. I don't think there should be a style rule about this. Instead, there should be rules about writing statement macros and declaration macros more carefully so that not having the semicolon is a (non-pedantic) syntax error. The usual method for statement macros is to wrap the macro in `do ... while (0)', and a not so usual method for declaration macros is to end the macro with `struct __hack'. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message