Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!G.OSWEGO.EDU!dl From: dl@G.OSWEGO.EDU (Doug Lea) Newsgroups: gnu.g++.lib.bug Subject: Possible bug in (version 1.36.1) Message-ID: <8912291456.AA18748@g.oswego.edu> Date: 29 Dec 89 14:56:49 GMT References: <8912201451.AA16126@idris.id.dk> Sender: daemon@tut.cis.ohio-state.edu Reply-To: dl@oswego.oswego.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 24 Sorry for the delayed reply -- I've been away. Well, it's less of a bug than a limitation: if you were to change assertval from #define assertval(ex) \ ((ex) ? 1 : \ (__eprintf("Failed assertion " #ex " at line %d of `%s'.\n",\ __LINE__, __FILE__), abort (), 0)) to #define assertval(ex) \ ((ex) ? (ex) : \ (__eprintf("Failed assertion " #ex " at line %d of `%s'.\n",\ __LINE__, __FILE__), abort (), 0)) then it would evaluate ex twice. While it IS possible to overcome this with gcc/g++ expression-returning compound statements, I didn't do this, in order to be conservative. Do thing it is worth doing? -Doug