Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!oliveb!sun!gorodish!guy From: guy@gorodish.UUCP Newsgroups: comp.lang.c Subject: Re: C and Floating Point Message-ID: <16483@sun.uucp> Date: Fri, 10-Apr-87 03:17:32 EST Article-I.D.: sun.16483 Posted: Fri Apr 10 03:17:32 1987 Date-Received: Sat, 11-Apr-87 15:25:52 EST References: <15958@sun.uucp> <5716@brl-smoke.ARPA> <14680@cca.CCA.COM> <802@viper.UUCP> Sender: news@sun.uucp Lines: 27 Keywords: C Fortran Floating Point Parenthases > Don, you're correct in saying that OPT_EXPR -could- have been used by > someone prior to the standard, but in using that as a disqualifier you're > ignoring the difference in scope. The -Oe declaration will effect the > entire module being compiled with that flag. Using a define allows you > to "define" it at some point in the program and then undefine it later. This translates as "using #defines may break existing code, but it's more convenient". Sorry, but I just don't see how the difference in scope is relevant *at all*. The fact that OPT_EXPR breaks existing code is sufficient cause to reject it out of hand unless you can demonstrate that the benefits that it brings are very great. The use of "could" in your statement doesn't affect the validity of the arguments; one could easily turn the argument around - "It's correct to say that somebody *could* have written code that's broken by this extra optimization, but by using that as a disqualifier you're ignoring the fact that OPT_EXPR is a perfectly legitimate C identifier." > Anyone know if the standard allows for control of compiler flags from > within a source file?? The standard allows a compiler to implement "#pragma" directives that can affect the compiler's behavior. No, there's no guaranteed standard way of saying "only do these optimizations", but nobody ever said life was fair. A few strategically-placed "#ifdef"s never hurt anybody.