Path: utzoo!mnetor!uunet!husc6!linus!philabs!pwa-b!mmintl!franka From: franka@mmintl.UUCP (Frank Adams) Newsgroups: comp.lang.c Subject: Re: optimizing assert Message-ID: <2662@mmintl.UUCP> Date: 19 Jan 88 00:51:20 GMT References: <11295@brl-adm.ARPA> <2300@haddock.ISC.COM> Reply-To: franka@mmintl.UUCP (Frank Adams) Organization: Multimate International, E. Hartford, CT. Lines: 16 In article <2300@haddock.ISC.COM> karl@haddock.ima.isc.com (Karl Heuer) writes: >If the expression has side effects, I think it's clear that the user does want >them to be evaluated. If the expression has no side effects, the compiler is >free to generate zero instructions. This is fine as long as the assert expression calls no functions. But unless you in an environment which permits global optimization, which most of us aren't, the compiler will have to make any function calls which are used in the expression. This would include, for example, assert(pow(x, 2) < y) -- to touch on another recent topic of discussion. -- Frank Adams ihnp4!philabs!pwa-b!mmintl!franka Ashton-Tate 52 Oakland Ave North E. Hartford, CT 06108