Cyclone (programming language): Difference between revisions

Content deleted Content added
m Pointer types: {{code}}
Line 119:
}
</syntaxhighlight>
[[GNU Compiler Collection|gcc]] can produce warnings for such code as a side-effect of option {{code|-O2}} or {{code|-O3}}, but there are no guarantees that all such errors will be detected.
Cyclone does regional analysis of each segment of code, preventing dangling pointers, such as the one returned from this version of <code>itoa</code>. All of the local variables in a given scope are considered to be part of the same region, separate from the heap or any other local region. Thus, when analyzing <code>itoa</code>, the Cyclone compiler would see that <code>z</code> is a pointer into the local stack, and would report an error.