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
machine unreach;
initial state s {
on TERMINATE -> .done;
on I (guard_foo) clear_foo -> done;
state done {}
state s1 {
on I -> done;
state done {}
}
}
state done {
}
like so:
static int unreach_s_s1_done(struct unreach *self, struct unreach_event *event) {
if (!self || !event) return -1;
switch (event->id) {
case unreach_event_I:
if (1) {
self->state = NULL;
self->state = unreach_s_s1_done;
break;
}
if (guard_foo(self, event)) {
self->state = NULL;
clear_foo(self, event);
self->state = unreach_s_done;
break;
}
break;
The if (guard_foo) is unreachable and the C compiler complains about it.
The text was updated successfully, but these errors were encountered:
I see why it would do that, and I think the behavior of the generated code is correct. It would definitely be better if it didn't do that so I'll look into it.
The generated C for this has unreachable code:
like so:
The
if (guard_foo)
is unreachable and the C compiler complains about it.The text was updated successfully, but these errors were encountered: