Posts: 922
Threads: 15
Joined: Jun 2003
So what happened to your data-flow analysis? Or perhaps, there's none, just a dead simple check?
Oh, ok, you were just trying to bash FB as always, no problem then, i stopped taking anything you say into account since ages ago.
Posts: 602
Threads: 27
Joined: Oct 2004
Quote:but meh, fb sucks anyways :p SCNR
learn to read and interpret properly. anyways, i still don't see where the problem is with detecting something like the above. there's of course no need for fullfledged data flow analysis, it's actually a "dead" simple pass to the type checker. nothing more nothing less, never said i implemented it either.
this is all just something we do in our free time, aka hobby. don't get to serious about it :p
quote="NecrosIhsan"]
[/quote]
Posts: 691
Threads: 5
Joined: Apr 2002
Quote:anyways, i still don't see where the problem is with detecting something like the above. there's of course no need for fullfledged data flow analysis, it's actually a "dead" simple pass to the type checker.
It can be done for simple cases and is, as you say, dead easy. However in the general case the problem is undecideable; it cannot be done no matter how much dataflow analysis etc is done. This is why gcc and vc++ don't report errors for the code I gave.
In my example you cannot warn that the function returns a pointer to a local variable since it doesn't always. Even warning about possibly returning a pointer to a local variable may be over zealous since the callee may never give values of x and y which allow it to happen.
esus saves.... Passes to Moses, shoots, he scores!