[uClibc 0000904]: __ctype_touplow_t has incompatible type
bugs at busybox.net
bugs at busybox.net
Fri Jun 30 00:22:23 UTC 2006
The following issue has been CLOSED
======================================================================
http://busybox.net/bugs/view.php?id=904
======================================================================
Reported By: syn
Assigned To: uClibc
======================================================================
Project: uClibc
Issue ID: 904
Category: Standards Compliance
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
Resolution: no change required
Fixed in Version:
======================================================================
Date Submitted: 06-14-2006 02:37 PDT
Last Modified: 06-29-2006 17:22 PDT
======================================================================
Summary: __ctype_touplow_t has incompatible type
Description:
In uClibc, __ctype_touplow_t is either __int16_t (if
__UCLIBC_HAS_CTYPE_SIGNED__ is defined) or unsigned char otherwise. There
is a comment from Manuel stating :
`` * Besides uClibc, I'm using this code in my libc for elks, which is
* a 16-bit environment with a fairly limited compiler. It would make
* things much easier for me if this file isn't modified unnecessarily.
''
But when building gcc 3.4.6 with C++ support, build fails with error :
In file included from ../../../../gcc-3.4.6/libstdc++-v3/src/ctype.cc:76:
/usr/cross/src/gcc-3.4.6-i586-linux-uclibc-stage2-build/i586-linux-uclibc/libstdc++-v3/include/i586-linux-uclibc/bits/ctype_noninline.h:
In constructor `std::ctype<char>::ctype(int*, const short unsigned int*,
bool, size_t)':
/usr/cross/src/gcc-3.4.6-i586-linux-uclibc-stage2-build/i586-linux-uclibc/libstdc++-v3/include/i586-linux-uclibc/bits/ctype_noninline.h:85:
error: cannot convert `const __ctype_touplow_t*' to `const int*' in
assignment
/usr/cross/src/gcc-3.4.6-i586-linux-uclibc-stage2-build/i586-linux-uclibc/libstdc++-v3/include/i586-linux-uclibc/bits/ctype_noninline.h:86:
error: cannot convert `const __ctype_touplow_t*' to `const int*' in
assignment
/usr/cross/src/gcc-3.4.6-i586-linux-uclibc-stage2-build/i586-linux-uclibc/libstdc++-v3/include/i586-linux-uclibc/bits/ctype_noninline.h:
In constructor `std::ctype<char>::ctype(const short unsigned int*, bool,
size_t)':
/usr/cross/src/gcc-3.4.6-i586-linux-uclibc-stage2-build/i586-linux-uclibc/libstdc++-v3/include/i586-linux-uclibc/bits/ctype_noninline.h:120:
error: cannot convert `const __ctype_touplow_t*' to `const int*' in
assignment
/usr/cross/src/gcc-3.4.6-i586-linux-uclibc-stage2-build/i586-linux-uclibc/libstdc++-v3/include/i586-linux-uclibc/bits/ctype_noninline.h:121:
error: cannot convert `const __ctype_touplow_t*' to `const int*' in
assignment
In bits/ctype_base.h (under libstdc++-v3 directory) :
typedef const int* __to_type;
with a comment : // Information as gleaned from /usr/include/ctype.h.
__to_type is used to declare _M_toupper and _M_tolower, which are used in
incompatible assignments above.
There are several solutions to this problem :
1/ We can patch uClibc so that it uses 32 bits integers, and 16 bits
integers when a macro (say __ELKS_LIBC__ ;-)) is defined. This seems to be
the best fix to me, since we really need glibc compatibility.
2/ We can patch gcc to correctly typedef __to_type (or even avoid defining
this type and use __ctype_touplow_t instead), but I guess gcc guys had good
reasons to do this code that way, and gcc isn't as reactive as uClibc is.
3/ Maybe other cool solutions I haven't thought about.
======================================================================
----------------------------------------------------------------------
syn - 06-14-06 02:50
----------------------------------------------------------------------
After some more searching, the bug seems to be fixed in gcc, but with a
more or less hidden patch :
http://gcc.gnu.org/bugzilla/attachment.cgi?id=6132
----------------------------------------------------------------------
psm - 06-14-06 02:58
----------------------------------------------------------------------
you seem to try to compile vanilla gcc sources, you should at least apply
the gcc
patches used in buildroot
----------------------------------------------------------------------
vapier - 06-29-06 17:22
----------------------------------------------------------------------
nothing to change in uClibc
Issue History
Date Modified Username Field Change
======================================================================
06-14-06 02:37 syn New Issue
06-14-06 02:37 syn Status new => assigned
06-14-06 02:37 syn Assigned To => uClibc
06-14-06 02:50 syn Note Added: 0001425
06-14-06 02:58 psm Note Added: 0001426
06-29-06 17:22 vapier Note Added: 0001475
06-29-06 17:22 vapier Status assigned => closed
06-29-06 17:22 vapier Resolution open => no change
required
======================================================================
More information about the uClibc-cvs
mailing list