[Bug target/48009] Bootstrap failure: c++locale.cc: invalid conversion from 'const char*' to 'char*'

2012-05-13 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48009

--- Comment #7 from Marc Glisse glisse at gcc dot gnu.org 2012-05-13 08:59:25 
UTC ---
(In reply to comment #6)
 (If anyone can point me to a fixinclude that does the same
 kind of one-line change elsewhere, I could work with that...)

That's easy, just take a look at the file fixincludes/inclhack.def, most fixes
are exactly this kind of one-line changes. Picking one completely at random:

fix = {
hackname  = vxworks_needs_vxtypes;
files = time.h;
select= uint_t([ \t]+_clocks_per_sec);
c_fix = format;
c_fix_arg = unsigned int%1;
test_text = uint_t\t_clocks_per_sec;;
};

This one replaces uint_t with unsigned int. The README file in that directory
is useful too.

ISTR there was a problem with genfixes not working on recent OS, but that
shouldn't be a problem for you ;-)


[Bug target/48009] Bootstrap failure: c++locale.cc: invalid conversion from 'const char*' to 'char*'

2012-05-13 Thread skunk at iskunk dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48009

--- Comment #8 from Daniel Richard G. skunk at iskunk dot org 2012-05-14 
03:19:36 UTC ---
Marc, thank you for the pointer. The single-line-edit case, at least, seems
straightforward enough.

Here's my stab at it:

/*
 * stdlib.h on AIX 4.3 declares strtof() with a non-const first argument.
 */
fix = {
hackname  = aix_strtof_const;
files = stdlib.h;
select= (extern float +strtof)\(char \*, char \*\*\);
c_fix = format;
c_fix_arg = %1(const char *, char **);
test_text = strtof(char *, char **);;
};


[Bug target/48009] Bootstrap failure: c++locale.cc: invalid conversion from 'const char*' to 'char*'

2012-05-12 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48009

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 CC||dje at gcc dot gnu.org

--- Comment #4 from Paolo Carlini paolo.carlini at oracle dot com 2012-05-12 
08:34:13 UTC ---
David, did you see this?


[Bug target/48009] Bootstrap failure: c++locale.cc: invalid conversion from 'const char*' to 'char*'

2012-05-12 Thread dje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48009

David Edelsohn dje at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-05-12
 Ever Confirmed|0   |1

--- Comment #5 from David Edelsohn dje at gcc dot gnu.org 2012-05-12 14:34:13 
UTC ---
AIX 4.3 is extremely old and support was withdrawn a while ago. I am surprised
that anyone is trying to build recent versions of GCC for it. If someone wants
to develop a fixincludes patch, I can review it. The problem undoubtedly
exists, but can be worked around manually.


[Bug target/48009] Bootstrap failure: c++locale.cc: invalid conversion from 'const char*' to 'char*'

2012-05-12 Thread skunk at iskunk dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48009

--- Comment #6 from Daniel Richard G. skunk at iskunk dot org 2012-05-13 
05:11:32 UTC ---
(In reply to comment #5)
 AIX 4.3 is extremely old and support was withdrawn a while ago. I am surprised
 that anyone is trying to build recent versions of GCC for it. If someone wants
 to develop a fixincludes patch, I can review it. The problem undoubtedly
 exists, but can be worked around manually.

My employer favors the use of older systems for software builds, as Unix is
generally solid on forward compatibility and this prevents awkward scenarios
where a customer is running an older OS than we are.

Continuing GCC support is one of the downsides of this approach, of course. I
wouldn't be surprised if support for AIX 4.3 is obsoleted soon, but I'd like to
ensure that everything is working before that point. (I didn't follow up
Solaris 8 as aggressively, and now I'm trying to get some fixes in even as the
support is being ripped out of 4.8.)

I can provide a unified-diff patch for the header in question; I don't know how
to hack fixincludes. (If anyone can point me to a fixinclude that does the same
kind of one-line change elsewhere, I could work with that...)


[Bug target/48009] Bootstrap failure: c++locale.cc: invalid conversion from 'const char*' to 'char*'

2012-05-11 Thread skunk at iskunk dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48009

Daniel Richard G. skunk at iskunk dot org changed:

   What|Removed |Added

Version|4.5.2   |4.7.0

--- Comment #2 from Daniel Richard G. skunk at iskunk dot org 2012-05-12 
04:30:17 UTC ---
Still an issue in 4.7.0.

user@host:/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/src/c++98 gmake
libc++98convenience.la
/opt/freeware/bin/bash ../../libtool --tag CXX --tag disable-shared 
--mode=compile /tmp/gcc-build/./gcc/xgcc -shared-libgcc -B/tmp/gcc-build/./gcc
-nostdinc++ -L/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/src
-L/tmp/gcc-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/home/src/gcc-4.7.0/libstdc++-v3/../libgcc
-I/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/powerpc-ibm-aix4.3.2.0
-I/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include
-I/home/src/gcc-4.7.0/libstdc++-v3/libsupc++   -fno-implicit-templates -Wall
-Wextra -Wwrite-strings -Wcast-qual -Wabi  -fdiagnostics-show-location=once  
-ffunction-sections -fdata-sections  -frandom-seed=c++locale.lo -g  -c -o
c++locale.lo c++locale.cc
libtool: compile:  /tmp/gcc-build/./gcc/xgcc -shared-libgcc
-B/tmp/gcc-build/./gcc -nostdinc++
-L/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/src
-L/tmp/gcc-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/home/src/gcc-4.7.0/libstdc++-v3/../libgcc
-I/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/powerpc-ibm-aix4.3.2.0
-I/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include
-I/home/src/gcc-4.7.0/libstdc++-v3/libsupc++ -fno-implicit-templates -Wall
-Wextra -Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once
-ffunction-sections -fdata-sections -frandom-seed=c++locale.lo -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; std::__c_locale = int*]':
c++locale.cc:67:34: error: invalid conversion from 'const char*' to 'char*'
[-fpermissive]
In file included from /tmp/gcc-build/./gcc/include-fixed/math.h:388:0,
 from
/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/cmath:46,
 from c++locale.cc:33:
/tmp/gcc-build/./gcc/include-fixed/stdlib.h:479:18: error:   initializing
argument 1 of 'float strtof(char*, char**)' [-fpermissive]
gmake: *** [c++locale.lo] Error 1


[Bug target/48009] Bootstrap failure: c++locale.cc: invalid conversion from 'const char*' to 'char*'

2012-05-11 Thread skunk at iskunk dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48009

--- Comment #3 from Daniel Richard G. skunk at iskunk dot org 2012-05-12 
04:33:41 UTC ---
Created attachment 27384
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27384
/usr/include/stdlib.h from AIX 4.3

Attaching the relevant header file, to aid in development of a fixinclude rule.