I thought we had a check for this but I guess not, given that #1020 doesn't seem to present any errors. This kind of check would be very helpful there.
E.g. for this input:
Produce something like this test:
void check_foo_a(struct foo test_foo) {
long test_foo_a_0 = test_foo.a;
long *test_foo_a_1 = &test_foo.a;
}
The _1 test comparing pointers is the important bit here since it should catch -Wincompatible-pointer-types. I don't know if the _0 test will catch anything that doesn't, but it doesn't hurt.
This test can be created for both structs and unions.
I thought we had a check for this but I guess not, given that #1020 doesn't seem to present any errors. This kind of check would be very helpful there.
E.g. for this input:
Produce something like this test:
The
_1test comparing pointers is the important bit here since it should catch-Wincompatible-pointer-types. I don't know if the_0test will catch anything that doesn't, but it doesn't hurt.This test can be created for both structs and unions.