-
Notifications
You must be signed in to change notification settings - Fork 88
Closed
Description
When accesses occur in loop guards, the access location covers the entire body of the statement. It makes it very unreadable inside GobPie for real-world examples like this:
#include <pthread.h>
#include <stdio.h>
int myglobal;
void *t_fun(void *arg) {
if (myglobal > 0) {
printf("Stupid!");
printf("Stupid!");
printf("Stupid!");
printf("Stupid!");
printf("Stupid!");
printf("Stupid!");
}
return NULL;
}
int main(void) {
pthread_t id;
pthread_create(&id, NULL, t_fun, NULL);
myglobal=myglobal+1;
pthread_join (id, NULL);
return 0;
}I tried a fix in 076660b, but it's not clear if that causes issues with our use of locations for other things. Are there cases when we'd want the location to cover the entire statement?
Reactions are currently unavailable