From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Faylor To: gdb-patches@sources.redhat.com Subject: Re: [RFA] work around sigsetjmp/siglongjmp macro problems Date: Tue, 14 Aug 2001 07:40:00 -0000 Message-id: <20010814104057.A25342@redhat.com> References: <3B785A0C.7000104@cygnus.com> <20010813193225.A10164@redhat.com> <20010813222037.A20589@redhat.com> <3B788F78.8050005@cygnus.com> <20010813225508.A22351@redhat.com> <20010813201116.A12426@nevyn.them.org> <20010813231801.A23019@redhat.com> <2561-Tue14Aug2001100532+0300-eliz@is.elta.co.il> X-SW-Source: 2001-08/msg00166.html On Tue, Aug 14, 2001 at 10:05:32AM +0300, Eli Zaretskii wrote: >> Date: Mon, 13 Aug 2001 23:18:01 -0400 >> From: Christopher Faylor >> >> ! #define SIGSETJMP(buf) sigsetjmp((buf), 1) >> ! #define SIGLONGJMP(buf,val) siglongjmp((buf), (val)) > >I suggest to add a comment here which explains why do you need parens >around the argument. I considered that but, in reality, I think it was a bug that they were missing. It is just "good style" (tm) to parenthesize macro arguments. I checked other macros in gdb. Most, if not all, of them parenthesize their arguments without comment. I didn't see any reason to document the parenthesizing in this one case, even though it is fixing a bug. I thought it would be unlikely that someone would come along later and remove the parentheses from this and other macro arguments. However, if the consensus is that comments are needed, then I'll add them. cgf