I never said I wouldn't use that code, but I can decide for myself which
version to use best where. There were reasons why it wasn't used as a
function in the first place. In any case that might still be the best
code to switch back to.
Regards,
Arjan
-----Oorspronkelijk bericht-----
Van: pike-devel-bounces@lists.lysator.liu.se
[mailto:pike-devel-bounces@lists.lysator.liu.se] Namens Stephen R. van
den Berg
Verzonden: Thursday, July 31, 2008 5:55 PM
Aan: Arjan van Staalduijnen
CC: pike-devel@lists.lysator.liu.se; Martin B?hr
Onderwerp: Re: 'if' with failing 'else' block
Arjan van Staalduijnen wrote:
I was trying to implement a change to the macro which would make it
safe, because we're using the call to this macro in lots of places and
it would be hard to pinpoint all the problematic places.
Do yourself a favour and use the:
do { ...; } while(0)
construct as suggested earlier.
Using the merely braced version introduces other problems (sometimes).
--
Sincerely,
Stephen R. van den Berg.
"There are three types of people in this world: those who make things
happen,
those who watch things happen and those who wonder what happened."
__________________________________________________________
Deze e-mail en de inhoud is vertrouwelijk en uitsluitend bestemd voor de geadresseerde(n). Indien u niet de geadresseerde bent van deze e-mail verzoeken wij u dit direct door te geven aan de verzender door middel van een reply e-mail en de ontvangen e-mail uit uw systemen te verwijderen. Als u geen geadresseerde bent, is het niet toegestaan om kennis te nemen van de inhoud, deze te kopieren, te verspreiden, bekend te maken aan derden noch anderszins te gebruiken.
The information contained in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Please notify us immediately if you have received it in error by reply e-mail and then delete this message from your system.
__________________________________________________________