Path: utzoo!attcan!uunet!lll-winken!lll-tis!oodis01!uplherc!sp7040!obie!wsccs!terry From: terry@wsccs.UUCP (Every system needs one) Newsgroups: comp.lang.c Subject: Re: Optimization (was Re: volatile) Message-ID: <536@wsccs.UUCP> Date: 17 May 88 03:48:47 GMT References: <13074@brl-adm.ARPA> <3938@killer.UUCP> <310@zinn.MV.COM> Lines: 42 In article <310@zinn.MV.COM>, mem@zinn.MV.COM (Mark E. Mallett) writes: | In article <3938@killer.UUCP>, chasm@killer.UUCP (Charles Marslett) writes: | > In article <13074@brl-adm.ARPA>, dsill@NSWC-OAS.arpa (Dave Sill) writes: | > > Terry Lambert writes: | > > | > > This bears repeating. There should be no circumstances under which | > > the semantics of the language are changed by a flag to the compiler. | | Avoiding the word "semantics", -O can change the way the program | operates, which is what is important in this discussion. | | And if you don't think that the semantics of the language can be changed | by a flag to the compiler, well... what about "-D" ?? Mark: First: I am the one being repeated, not doing the repeating. Second: The statement being repeated did NOT deal with all options; only -O... it was: |Basically, if it works without -O, it should work with -O, regardless of what |the compiler writer's optimization does to achieve its goal. If this makes |writing compilers harder, so what? Third: The point was that while a transform based -O is most likely a non-reversable one, no information should be lost due to bad assumptions made by the compiler writer, and that ANSI C was a cop-out by compiler writers who wanted the hard work of determining volatility and aliases, as well as other information useful for optimization, done by the programmer. I simply suggested that I could not see one instance of where it was conceptually impossible for a compiler writer to determine these things; just damn hard. My point was "better the compiler writer than the compiler user". | Terry Lambert UUCP: ...{ decvax, ihnp4 } ...utah-cs!century!terry | | @ Century Software OR: ...utah-cs!uplherc!sp7040!obie!wsccs!terry | | SLC, Utah | | These opinions are not my companies, but if you find them | | useful, send a $20.00 donation to Brisbane Australia... | | 'Admit it! You're just harrasing me because of the quote in my signature!' |