From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Han Holl" To: egcs@cygnus.com Subject: Don't understand cv-quals message Date: Sun, 01 Feb 1998 04:28:00 -0000 Message-id: <19980201122701.23062.qmail@optiplex.palga.uucp> X-SW-Source: 1998-02/msg00012.html Hello, If I compile the following program (with egcs-1.0.1) : #include void f(const char** s) { cout << *s << endl; } main() { char *cs = "abcd"; f(&cs); } with: g++ --pedantic I get the following warning: t1.C: In function `int main()': t1.C:11: warning: passing `char **' as argument 1 of `f(const char **)' \ adds cv-quals without intervening `const' What does this mean, and can I do anything to make it go away? (I.e., can I make this code even more 'pedanticly' correct ? I fail to see how). As I understand this, what f() does is promise not to poke around in the characters, and I should be able to pass a non-const char ** to it. (This works of course with passing char * to a const char * function). Thanks in advance for any explanation, Han Holl