[Bug c/17654] New: Pointless warning on incompatible pointer types

jbeulich at novell dot com gcc-bugzilla@gcc.gnu.org
Fri Sep 24 15:16:00 GMT 2004


While being in line with the standard, there does not seem to be any point in
emitting a warning when passing a multi-level pointer not const-qualified at
some level to a function the parameter of which is an equivalent pointer, just
const-qualified at all levels:

void test2(const char*const*);

void test(char**ppc) {
	test2(ppc);
}

Without such functionality, it is for certain constructs, rather hard to achieve
const-correct, warning-free code that does also not use ill casts.

-- 
           Summary: Pointless warning on incompatible pointer types
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jbeulich at novell dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17654



More information about the Gcc-bugs mailing list