guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Reference leak in `iprin1 ()'


From: Neil Jerram
Subject: Re: [PATCH] Reference leak in `iprin1 ()'
Date: Thu, 17 Nov 2005 18:52:42 +0000
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Well, nothing to be really "concerned" about, mostly consistency.  In a
> declaration, `()' has a different meaning than `(void)', but not in the
> definition.  According to section 6.7.5.3 or ISO/IEC 9899:1999:
>
>   10 The special case of an unnamed parameter of type void as the only
>      item in the list specifies that the function has no parameters.
>
>   [...]
>
>   14 An identifier list declares only the identifiers of the parameters
>      of the function. An empty list in a function declarator that is
>      part of a definition of that function specifies that the function
>      has no parameters. The empty list in a function declarator that is
>      not part of a definition of that function specifies that no
>      information about the number or types of the parameters is
>      supplied.124)
>
> Since, the declarations in `print.h' use `(void)', there's nothing
> really serious here.

Thanks.  But in the absence of any actual problem, I think I'll leave
this as is for now.

>>> Below is an updated patch.  I modified `PUSH_REF ()' as well so that it
>>> does PSTATE->TOP++ _after_ using the `PSTATE_STACK_SET ()' macro: this
>>> is safer.
>>
>> Why is it safer?
>
> Because of the side effects these macros may introduce, as described in
> http://gcc.gnu.org/onlinedocs/gcc-4.0.2/cpp/Duplication-of-Side-Effects.html#Duplication-of-Side-Effects
>  .

Yes of course, silly me.  I misread what you said you had done as
changing PSTATE->TOP++ to ++(PSTATE->TOP).  This is definitely a good
change.

This patch is now in CVS.  Thanks for all your effort on this.

     Neil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]