This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/19866] New: Conversion from "type **" to "const type **" issues a warning.
- From: "jorgleis at in-exedra dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Feb 2005 18:17:29 -0000
- Subject: [Bug c/19866] New: Conversion from "type **" to "const type **" issues a warning.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Example program "test.c":
void foo(const void **bar) {
}
int main() {
void **bar = 0;
foo(bar);
}
Compilation with "gcc test.c":
test.c:6: warning: passing arg 1 of `foo' from incompatible pointer type.
Expected result: compilation without any warning at all.
Using pointers to pointers, it happens always.
gcc -v:
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.1/specs
Configured with: ../gcc-3.4.1/configure --prefix=/usr --libexecdir=/usr/lib
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --enable-languages=c,c++,objc,f77,ada,java
Thread model: posix
gcc version 3.4.1
--
Summary: Conversion from "type **" to "const type **" issues a
warning.
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jorgleis at in-exedra dot net
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19866