[Bug libstdc++/33734] New: iconv_t must not be assumed to be a pointer

jbeulich at novell dot com gcc-bugzilla@gcc.gnu.org
Thu Oct 11 07:27:00 GMT 2007


There are three instances of reinterpret_cast<iconv_t>(-1) in
libstdc++-v3/include/ext/codecvt_specializations.h, all of which are invalid if
iconv_t does not resolve to a pointer (on NetWare it is a plain int, but
obviously it could also be a compound type).

/home/jbeulich/build/gcc/4.2.1-netware/./gcc/xgcc -shared-libgcc
-B/home/jbeulich/build/gcc/4.2.1-netware/./gcc -nostdinc++
-L/home/jbeulich/build/gcc/4.2.1-netware/i686-novell-netware/libstdc++-v3/src
-L/home/jbeulich/build/gcc/4.2.1-netware/i686-novell-netware/libstdc++-v3/src/.libs
-B/usr/local/i686-novell-netware/bin/ -B/usr/local/i686-novell-netware/lib/
-isystem /usr/local/i686-novell-netware/sys-include -isystem
/usr/local/i686-novell-netware/include
-L/home/jbeulich/build/gcc/4.2.1-netware/./ld -Winvalid-pch -Wno-deprecated -x
c++-header -g -O2 
-I/home/jbeulich/build/gcc/4.2.1-netware/i686-novell-netware/libstdc++-v3/include/i686-novell-netware
-I/home/jbeulich/build/gcc/4.2.1-netware/i686-novell-netware/libstdc++-v3/include
-I/home/jbeulich/cpp/gcc/4.2.1/libstdc++-v3/libsupc++ -O2 -g
/home/jbeulich/cpp/gcc/4.2.1/libstdc++-v3/include/precompiled/extc++.h -o
i686-novell-netware/bits/extc++.h.gch/O2g.gch
In file included from
/home/jbeulich/cpp/gcc/4.2.1/libstdc++-v3/include/precompiled/extc++.h:39:
/home/jbeulich/build/gcc/4.2.1-netware/i686-novell-netware/libstdc++-v3/include/ext/codecvt_specializations.h:
In member function 'bool __gnu_cxx::encoding_state::good() const':
/home/jbeulich/build/gcc/4.2.1-netware/i686-novell-netware/libstdc++-v3/include/ext/codecvt_specializations.h:131:
error: invalid cast from type 'int' to type 'iconv_t'
/home/jbeulich/build/gcc/4.2.1-netware/i686-novell-netware/libstdc++-v3/include/ext/codecvt_specializations.h:
In member function 'void __gnu_cxx::encoding_state::init()':
/home/jbeulich/build/gcc/4.2.1-netware/i686-novell-netware/libstdc++-v3/include/ext/codecvt_specializations.h:169:
error: invalid cast from type 'int' to type 'iconv_t'
/home/jbeulich/build/gcc/4.2.1-netware/i686-novell-netware/libstdc++-v3/include/ext/codecvt_specializations.h:
In member function 'void __gnu_cxx::encoding_state::destroy()':
/home/jbeulich/build/gcc/4.2.1-netware/i686-novell-netware/libstdc++-v3/include/ext/codecvt_specializations.h:202:
error: invalid cast from type 'int' to type 'iconv_t'
make[2]: *** [i686-novell-netware/bits/extc++.h.gch/O2g.gch] Error 1
make[2]: Leaving directory
`/home/jbeulich/build/gcc/4.2.1-netware/i686-novell-netware/libstdc++-v3/include'
Making all in include
In file included from
/home/jbeulich/cpp/gcc/4.2.1/libstdc++-v3/include/precompiled/extc++.h:39:
/home/jbeulich/build/gcc/4.2.1-netware/i686-novell-netware/libstdc++-v3/include/ext/codecvt_specializations.h:
In member function 'bool __gnu_cxx::encoding_state::good() const':
/home/jbeulich/build/gcc/4.2.1-netware/i686-novell-netware/libstdc++-v3/include/ext/codecvt_specializations.h:131:
error: invalid cast from type 'int' to type 'iconv_t'
/home/jbeulich/build/gcc/4.2.1-netware/i686-novell-netware/libstdc++-v3/include/ext/codecvt_specializations.h:
In member function 'void __gnu_cxx::encoding_state::init()':
/home/jbeulich/build/gcc/4.2.1-netware/i686-novell-netware/libstdc++-v3/include/ext/codecvt_specializations.h:169:
error: invalid cast from type 'int' to type 'iconv_t'
/home/jbeulich/build/gcc/4.2.1-netware/i686-novell-netware/libstdc++-v3/include/ext/codecvt_specializations.h:
In member function 'void __gnu_cxx::encoding_state::destroy()':
/home/jbeulich/build/gcc/4.2.1-netware/i686-novell-netware/libstdc++-v3/include/ext/codecvt_specializations.h:202:
error: invalid cast from type 'int' to type 'iconv_t'
make[4]: *** [i686-novell-netware/bits/extc++.h.gch/O2g.gch] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-libstdc++-v3] Error 2
make: *** [all] Error 2


-- 
           Summary: iconv_t must not be assumed to be a pointer
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jbeulich at novell dot com
 GCC build triplet: *-*-*
  GCC host triplet: *-*-*
GCC target triplet: i686-novell-netware


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33734



More information about the Gcc-bugs mailing list