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
If the structure is declared out of order with the struct this error will still happen and print the same message but now one s is the declared one and the other s is the undeclared one
% cat incompatible.c
void foo(struct s *a)
{}
struct s {
void* y;
};
void bar(void)
{
struct s a = {0};
foo((struct s*)&a);
}
% cn verify incompatible.c
incompatible.c:9:9: error: constraint violation: incompatible pointer types passing 'struct s*' to parameter of type 'struct s*'
foo((struct s*)&a);
^~~~~~~~~~~~~
#437 also concerns undefined structs but here cn permits them, then gives a misleading message about A!=A.
The text was updated successfully, but these errors were encountered: