[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] fix potentially undefined operation warning

From: Mattias Engdegård <mattiase_at_bredband.net>
Date: Fri, 16 May 2014 21:14:13 +0200

16 maj 2014 kl. 19.24 skrev Andreas Stieger:

> I think he has. Further, the call is to svn__base36toui64() which,
> if I read correctly, uses the pointer as a return, e.g. in this case
> it does not matter whether the first parameter was incremented.
> Never versions of gcc might detect this and not warn?

As far as I can tell from reading C99 6.5.16§1 and§3, f(&x, +
+x) is actually well-defined since the value of the variable being
incremented isn't being used twice, only its address. (There is a
sequence point before the actual call;§10.) That doesn't mean
it's good style – the patch is an obvious improvement!
Received on 2014-05-17 02:15:55 CEST

This is an archived mail posted to the Subversion Dev mailing list.