From: Eric B. <er...@go...> - 2007-07-16 21:19:17
|
Wolfgang Jansen wrote: > Eric Bezault wrote: >> 'gevoid' is the result of the code optimizer. >> corresponding Eiffel code, no matter what, this call will result in >> a call on Void target. For example: >> >> local >> s: STRING >> do >> s.append_string ("gobo") >> >> 'gevoid' is then emitted instead of the call. > Now, I understand. What about issuing a compiler warning > stimulating the programmer to eleminate the awkward construct? I don't like warnings when the code is valid. For example if in a third-party library class we have: f (s: STRING) is do if s /= Void then print (s.as_upper) else print ("Void string") end end and then in my application I have: x.f (Void) the dynamic type set mechanism used by the Gobo optimizer will tell me that `s' will always be Void in `f', therefore there is no need to generate the code for `as_upper' and 'gevoid' will used in the call instead. But there is nothing to be fixed because the code will not be called anyway. The optimizer has no flow analysis to determine that we are in an if-branch that can never be entered. And there is nothing wrong with `f' because as soon as we add the line: x.f ("gobo") in our application 'gevoid' will not be emitted in the generated C code anymore. But I agree that sometimes it will be useful to have this information as warning when the Eiffel code is really at fault. > The attachments contain the configuration file for use > of the "cc" on alpha platforms and the adapted "install.sh". Thank you. I will add them to Gobo SVN. BTW, what is 'icc'? Is it the same as what I found on wikipedia: http://en.wikipedia.org/wiki/Intel_C%2B%2B_Compiler -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |