This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] work around sigsetjmp/siglongjmp macro problems


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 <cgf@redhat.com>
>>
>> ! #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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]