In article <86bpba7nc1....@ds4.des.no>, d...@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 _______________________________________________ email@example.com mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"