[Bug c/16966] New: warning about (in)copatible pointer types **const / *const*const
schaum at uni-paderborn dot de
gcc-bugzilla@gcc.gnu.org
Tue Aug 10 14:37:00 GMT 2004
Compiling following code with gcc results in the shown error. Since x in f() is
more restricted than ppx in main(), it should be ok (like for g())!?
// gcc 3.2.2 / 3.3.3 / 3.4.1
// warning: passing arg 1 of `f' from incompatible pointer type
void f(const int *const *const x) {
}
void g(const int *const x) {
}
int main(int argc, char * argv[])
{
int x;
int * px = &x;
int **const ppx = &px;
f(ppx);
g(px);
return 0;
}
--
Summary: warning about (in)copatible pointer types **const /
*const*const
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schaum at uni-paderborn dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16966
More information about the Gcc-bugs
mailing list