In the following example, the address of structure member foo.b is being cast as a struct pointer and then assigned to f2. With lint -Xalias_level=weak (or higher), this example generates an error.
struct foo{
int a;
int b;
};
struct foo *f1;
struct foo *f2;
void main()
{
f2 = (struct foo *)&f1->b; /* cast of a scalar pointer to struct pointer error*/
}