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]
Other format: [Raw text]

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


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


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