This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

bogus "assignment from incompatible pointer type" ?


gcc complains about "assignment from incompatible pointer type" in
this code:

const struct hashnode **foo;
void x(struct hashnode **y)
{
  foo = y;
}

but does not object to the assignment if there is only one layer of
pointers, or 'foo' is declared as 'struct hashnode *const *'.  Why is
this?

zw

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]