Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Feature request
#11
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.
Reply
#12
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"]
[Image: yagl1.png]
[/quote]
Reply
#13
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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)