Xref: utzoo comp.lang.c++:4853 comp.lang.c:22343 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!amdcad!cayman!tim From: tim@cayman.amd.com (Tim Olson) Newsgroups: comp.lang.c++,comp.lang.c Subject: Re: Time to standardize "true" and "false" Message-ID: <27541@amdcad.AMD.COM> Date: 28 Sep 89 18:18:50 GMT References: <12070@cit-vax.Caltech.Edu> <8862@etana.tut.fi> Sender: news@amdcad.AMD.COM Reply-To: tim@amd.com (Tim Olson) Organization: Advanced Micro Devices, Austin, TX Lines: 20 Summary: Expires: Sender: Followup-To: In article <8862@etana.tut.fi> pl@etana.tut.fi (Lehtinen Pertti) writes: | From article <12070@cit-vax.Caltech.Edu>, by wen-king@cit-vax.Caltech.Edu (King Su): | > | > #define bool(a) (!!(a)) | > | > Then just use bool(X) whenever you wanted to use (bool)X. | > | | Then suddenly just behind the corner cames C-compiler from | ACME-corporation and realizes '!!a' -> negation of negation is | same as original -> we can optimize it away. | | Nice, isn't it. And too real too. And wrong, too. Do you know of a compiler that does this in the general case? -- Tim Olson Advanced Micro Devices (tim@amd.com)