Hacker News new | past | comments | ask | show | jobs | submit login

Isn’t that a form of “5. a mechanism where a pointer cannot point to an object that is more deeply scoped than itself”?

Also, since it’s an error, I guess it must be different from gcc and clang (and, likely other C compilers) -Wreturn-local-addr warnings (https://www.emmtrix.com/wiki/Clang:Flag/-Wreturn-local-addr), which can have false positives.

What’s the difference? Is the language stricter, disallowing some constructs that are valid, but hard to prove or is the error not always triggered for buggy code?






> Isn’t that a form of “5. a mechanism where a pointer cannot point to an object that is more deeply scoped than itself”?

That constraint is just a Tofte-Talpin region restriction, eg. lexically scoped regions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: