This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/48009] New: Bootstrap failure: c++locale.cc: invalid conversion from 'const char*' to 'char*'
- From: "skunk at iskunk dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 6 Mar 2011 19:47:04 +0000
- Subject: [Bug bootstrap/48009] New: Bootstrap failure: c++locale.cc: invalid conversion from 'const char*' to 'char*'
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48009
Summary: Bootstrap failure: c++locale.cc: invalid conversion
from 'const char*' to 'char*'
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: skunk@iskunk.org
Host: powerpc-ibm-aix4.3.2.0
Target: powerpc-ibm-aix4.3.2.0
Build: powerpc-ibm-aix4.3.2.0
After working around bug #47907, bootstrapping GCC 4.5.2 on this AIX 4.3 system
fails with
ln -s /home/src/gcc-4.5.2/libstdc++-v3/config/locale/generic/c_locale.cc
./c++locale.cc || true
[...]
libtool: compile: /tmp/gcc-4.5.2-build/./gcc/xgcc -shared-libgcc
-B/tmp/gcc-4.5.2-build/./gcc -nostdinc++
-L/tmp/gcc-4.5.2-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/src
-L/tmp/gcc-4.5.2-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/src/.libs
-B/opt/tg/powerpc-ibm-aix4.3.2.0/bin/ -B/opt/tg/powerpc-ibm-aix4.3.2.0/lib/
-isystem /opt/tg/powerpc-ibm-aix4.3.2.0/include -isystem
/opt/tg/powerpc-ibm-aix4.3.2.0/sys-include
-I/tmp/gcc-4.5.2-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/powerpc-ibm-aix4.3.2.0
-I/tmp/gcc-4.5.2-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include
-I/home/src/gcc-4.5.2/libstdc++-v3/libsupc++ -fno-implicit-templates -Wall
-Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once
-ffunction-sections -fdata-sections -g -c c++locale.cc -DPIC -o c++locale.o
c++locale.cc: In function 'void std::__convert_to_v(const char*, _Tp&,
std::ios_base::iostate&, int* const&) [with _Tp = float, std::ios_base::iostate
= std::_Ios_Iostate, int* = int*]':
c++locale.cc:66:34: error: invalid conversion from 'const char*' to 'char*'
c++locale.cc:66:34: error: initializing argument 1 of 'float strtof(char*,
char**)'
make[4]: *** [c++locale.lo] Error 1
make[4]: Leaving directory
`/tmp/gcc-4.5.2-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/tmp/gcc-4.5.2-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/tmp/gcc-4.5.2-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3'
make[1]: *** [all-target-libstdc++-v3] Error 2
make[1]: Leaving directory `/tmp/gcc-4.5.2-build'
make: *** [bootstrap-lean] Error 2
Sure enough,
% grep strtof /usr/include/*.h
/usr/include/stdlib.h: extern float strtof();
/usr/include/stdlib.h: extern float strtof(char *, char **);
This is the same as bug #26297, except with newer versions of AIX and GCC. I
will attempt adding the const keyword to the strtof() prototype in GCC's copy
of the system stdlib.h.