Re: Cast abuse
- From: Peter Bloomfield <PeterBloomfield MindSpring com>
- To: Balsa list <balsa-list gnome org>
- Subject: Re: Cast abuse
- Date: Tue, 20 Nov 2001 08:09:18 -0500
On 2001.11.20 05:38 Pawel Salek wrote:
...
> glibc-devel-2.2.4-19:/usr/include/iconv.h contains:
>
> extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
> size_t *__restrict __inbytesleft,
> char **__restrict __outbuf,
> size_t *__restrict __outbytesleft);
>
> I do not know what '__restrict' means (anybody knows?) but it does
> not appear to be equivalent to 'const'.
>
> /Pawel
That's the version I have, and gcc complains about passing from an
incompatible pointer type if when inbuf is passed from a const char **.
The __restrict stuff is a mystery to me, but it doesn't look as though
it can be defined so as to change the declaration to a const char **.
So until the header file gets updated, I believe we need the cast.
Peter
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]