Subject: Re: iconv(3) prototype
To: None <tech-userlevel@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-userlevel
Date: 07/28/2004 04:43:51
>> I've never understood why char ** is incompatible with
>> const char **....
> Briefly, [...]
> "const char *" is a different type from "char *", thus converting
> from "char **" to "const char **" is corresponding to (3).

Well, yes; what I mean is, I don't understand why they picked rules
that ended up with that effect.  It should be possible to add
qualifiers at any depth without producing an incompatible type.

> System A declares foo() as: void foo(char **);
> System B declares foo() as: void foo(const char **);

> If we wish to call it without warnings, we need to write as: [#if]

Or, actually,

	foo((void *)&str);

provided both systems provide prototypes.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B