You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recursive datastructures cannot be declared in ST. We need a validation to permit users from declaring such datastructures using STRUCTS, FB and CLASSES.
example:
TYPE A: STRUCT
other: B;
END_STRUCT
END_TYPE
TYPE B: STRUCT
other: A;
END_STRUCT
END_TYPE
Such recursions can be immediate (a struct containing itself) but they can also be formed over numerous hops (A->B->...->H->A).
We basically need to show that the declaration-graph (starting from all global variables and all programs) contains no cycles.
Every cycle should be reported as a problem.
Note that POINTER-declarations must not be treated as edges in the declaration-graph.
The text was updated successfully, but these errors were encountered:
Recursive data structures such as structs, arrays within structs as well as function blocks are now correctly detected and displayed as errors. For example a self-referencing struct such as
```
TYPE A : STRUCT
a : A;
END_STRUCT END_TYPE
```
will now generate the error message `Recursive data structure `A -> A` has infinite size`. Despite detecting such recursions the compiler will still crash with this commit because we do not abort codegen.
Recursive datastructures cannot be declared in ST. We need a validation to permit users from declaring such datastructures using STRUCTS, FB and CLASSES.
example:
Such recursions can be immediate (a struct containing itself) but they can also be formed over numerous hops (
A->B->...->H->A
).We basically need to show that the declaration-graph (starting from all global variables and all programs) contains no cycles.
Every cycle should be reported as a problem.
Note that POINTER-declarations must not be treated as edges in the declaration-graph.
The text was updated successfully, but these errors were encountered: