> From: Daiki Ueno <u...@gnu.org>
> Cc: ebl...@redhat.com,  w...@gnu.org,  bug-gnulib@gnu.org
> Date: Thu, 23 Oct 2014 13:09:11 +0900
> 
> > Next, it looks to me that the test program in iconv.m4 is
> > inappropriate for a C++ compiler, because (AFAIK) C++ does not allow
> > type-casting of the kind that the original test program (before your
> > changes) did to the 2nd argument.  (With a C compiler, you get a
> > warning, which the configure script ignores.)
> 
> I'm not familiar with C++, but does that really cause an error?
> 
> Yes, I see warnings with:
> 
>   ./configure CC=g++ CFLAGS=-Wcast-qual

It's possible that I've misinterpreted the compiler error messages,
and that the real problem is that _after_ type-casting, the (now)
'char **' pointer was being passed where the prototype expects a
'const char **'.

> The attached patch tries to suppress it.  Perhaps
> gnulib/tests/test-iconv.c also needs a fix.
> 
> I've tested it on MSYS after manually adding 'const' to the iconv
> declaration in /usr/local/include/iconv.h, and it seems to be detected.
> 
> Here is a new test package:
> http://du-a.org/~ueno/junk/test-iconv-2.tar.gz

Thanks, this works.

Reply via email to