From owner-cvs-src@FreeBSD.ORG Tue Aug 5 15:26:11 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF44837B401; Tue, 5 Aug 2003 15:26:11 -0700 (PDT) Received: from hermes.aueb.gr (hermes.aueb.gr [195.251.255.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7741943F93; Tue, 5 Aug 2003 15:26:10 -0700 (PDT) (envelope-from dds@aueb.gr) Received: from aueb.gr (ugrads18.wrong.dialup.aueb.gr [195.251.251.212]) by hermes.aueb.gr (8.12.9/8.12.9) with ESMTP id h75MPWoj030396; Wed, 6 Aug 2003 01:25:32 +0300 Message-ID: <3F3029CE.40C6746B@aueb.gr> Date: Wed, 06 Aug 2003 01:03:58 +0300 From: Diomidis Spinellis Organization: Athens University of Ecomomics and Business X-Mailer: Mozilla 4.78 [en] (Windows NT 5.0; U) X-Accept-Language: en,el,de MIME-Version: 1.0 To: Dag-Erling =?iso-8859-7?Q?Sm=F8rgrav?= References: <200308050722.h757MCxl098780@repoman.freebsd.org> <20030805122815.GA17099@numeri.campus.luth.se> <3F2FAE21.6EEB6309@aueb.gr> Content-Type: text/plain; charset=iso-8859-7 Content-Transfer-Encoding: quoted-printable cc: cvs-all@FreeBSD.org cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: Diomidis Spinellis cc: Johan Karlsson Subject: Re: cvs commit: src/sys/dev/sym sym_fw.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2003 22:26:12 -0000 Dag-Erling Sm=F8rgrav wrote: > Diomidis Spinellis writes: > > SYM_GEN_B is defined as > > > > #define SYM_GEN_B(s, label) s label; > > > > in the include file for defining the structure members, and as > > > > #define SYM_GEN_B(s, label) ((short) offsetof(s, label)), > > > > in the C file for initializing the structures. Thus SYM_GEN_FW will > > always end with a semicolon or a comma. > = > Remove the semicolon and the comma from the definitions, and add > semicolons and commas to the invocations. As I wrote, this will not work, because there we are dealing with two different nested macro definitions. Consider the main macro definition D1 and the two alternative nested macros D2 and D3: // D1: = #define SYM_GEN_FW_B(s) \ SYM_GEN_B(s, no_data) \ SYM_GEN_B(s, sel_for_abort) \ SYM_GEN_B(s, sel_for_abort_1) \ =2E.. // D2: #define SYM_GEN_B(s, label) s label; // D3: #define SYM_GEN_B(s, label) ((short) offsetof(s, label)), Removing the semicolon from D2 or the comma from D3 will make D1 syntactically incorrect. Diomidis -- dds@