> -----Original Message-----
> From: Julian Foad [mailto:julianf...@btopenworld.com]
> Sent: dinsdag 19 november 2013 12:39
> To: Ben Reser
> Cc: dev@subversion.apache.org
> Subject: Re: Warning for missing sentinel arguments
> 
> > On 11/18/13 3:03 PM, Julian Foad wrote:
> 
> >> The patch also changes SVN_NO_ERROR from "0" to "((svn_error_t *)0)".
> This
> >> has the side effect of detecting other mis-uses: I committed two such
> fixes
> >> as http://svn.apache.org/r1543193 and http://svn.apache.org/r1543216 . I
> >> can't think of any negative consequences but shout out if you can.
> 
> Actually, this is a change of a public API and maybe ABI (I'm not sure), and
> while it might be a good idea in itself it should not be casually changed as 
> part
> of this patch. So I'll leave out that change and not mark svn_cl__try() with
> SVN_SENTINEL_NULL, since GCC's attribute requires the sentinel argument
> to be a pointer.

It is just compiler magic and doesn't affect the ABI or API. If such a marking 
would affect either of them it would be a breaking change to mark something 
deprecated.

I'm quite sure the deprecated marking was explicity designed to allow things to 
be marked without breaking it.

Besides we enable this *only* when we detect a compiler that supports the 
annotation.


The 0 vs NULL might be a valid argument for this specific function, but I don't 
see how a C compiler could really see the difference in just a simple argument 
list where both must be handed equivalent to the C rules. 
(I don't think the same applies to C++ in general, but luckily we only support 
C)


        Bert

Reply via email to