Re: [CFT] BSDL iconv in base system

From: Garrett Wollman <wollman_at_hergotha.csail.mit.edu>
Date: Fri, 18 Jun 2010 15:55:38 -0400 (EDT)
In article <86bpba7nc1.fsf_at_ds4.des.no>, des_at_des.no writes:

>This means you can't, say, read data from a file into a buffer and then
>pass that buffer to iconv, because the buffer is not const (otherwise
>you couldn't have read data into it).  That seems like a pretty
>fundamental flaw.

But it's a fundamental flaw in the specification of C that "pointer to
pointer to X" and "pointer to pointer to const X" are
incompatible in this particular way (which is not required by any
machine for which there exist C99 compilers).  In general, the
addition of "const" to C in 1989 was a bit of a botch: it isn't as
strong as people expect it to be, and there are these weird corners.
(Another thing the committee left out was any way to declare a
"conforming" function, in which the return type has the same
qualifiers as one of its arguments -- see strchr() for example.)

That's water under the bridge now, of course.

-GAWollman
Received on Fri Jun 18 2010 - 17:55:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:04 UTC