Re: CXX conversion: min g++ version pre-requisite?

2012-08-20 Thread Richard Guenther
On Sun, Aug 19, 2012 at 8:44 PM, Gary Funck g...@intrepid.com wrote:
 I filed two bug reports:

 GCC install document does not list minimum required g++ version
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54324

 GCC does not build with G++ version 3.4.0
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54326

 Re: the latter bug report (54326), it might be further
 divided into two bug reports: one documenting the failure
 to build with g++ 3.4.0 and the other having to do with
 the use of casts in genoutput.c.  Let me know if you
 recommend that I separate the bug reports.

Does it still fail, even after fixing genoutput.c?  If so, yes, please open
a bug for the compile-with-3.4.6(!) issue.  No, I think 3.4._0_ should not
be what we should be after.

Richard.

Richard.

 - Gary


Re: CXX conversion: min g++ version pre-requisite?

2012-08-19 Thread Gary Funck
I filed two bug reports:

GCC install document does not list minimum required g++ version
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54324

GCC does not build with G++ version 3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54326

Re: the latter bug report (54326), it might be further
divided into two bug reports: one documenting the failure
to build with g++ 3.4.0 and the other having to do with
the use of casts in genoutput.c.  Let me know if you
recommend that I separate the bug reports.

- Gary


Re: CXX conversion: min g++ version pre-requisite?

2012-08-18 Thread NightStrike
On Fri, Aug 17, 2012 at 9:51 PM, Richard Guenther
richard.guent...@gmail.com wrote:
 On Sat, Aug 18, 2012 at 3:36 AM, Gary Funck g...@intrepid.com wrote:

 Paul Hargrove noted the following build failure on
 an older x86-32 Linux (Redhat 8.0) system.

 g++ -c   -g -O2 -DIN_GCC   -fno-exceptions -fno-rtti -W -Wall
 -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -fno-common
  -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild
 -I/usr/local/pkg/upc/nightly/compiler/gupc-src/gcc
 -I/usr/local/pkg/upc/nightly/compiler/gupc-src/gcc/build
 -I/usr/local/pkg/upc/nightly/compiler/gupc-src/gcc/../include
 -I/usr/local/pkg/upc/nightly/compiler/gupc-src/gcc/../libcpp/include
 -I/usr/local/pkg/gmp-4.2.4/include -I/usr/local/pkg/mpfr-2.4.2/include
 -I/usr/local/pkg/mpc-0.8/include
  -I/usr/local/pkg/upc/nightly/compiler/gupc-src/gcc/../libdecnumber
 -I/usr/local/pkg/upc/nightly/compiler/gupc-src/gcc/../libdecnumber/bid
 -I../libdecnumber\
 -o build/genoutput.o
 /usr/local/pkg/upc/nightly/compiler/gupc-src/gcc/genoutput.c
 /usr/local/pkg/upc/nightly/compiler/gupc-src/gcc/genoutput.c: In function
 `void note_constraint(rtx_def*, int)':
 /usr/local/pkg/upc/nightly/compiler/gupc-src/gcc/genoutput.c:1178: error:
 reinterpret_cast from type `const char (*)[1]' to type `char*' casts away
 constness
 make[2]: *** [build/genoutput.o] Error 1
 make[2]: Leaving directory `/usr/local/pkg/upc/nightly/compiler/bld/gcc'
 make[1]: *** [all-gcc] Error 2
 make[1]: Leaving directory `/usr/local/pkg/upc/nightly/compiler/bld'
 make: *** [all] Error 2


 The g++ version is: g++ (GCC) 3.4.0

 Currently, install.texi states:

 @heading Tools/packages necessary for building GCC
 @table @asis
 @item ISO C90 compiler
 Necessary to bootstrap GCC, although versions of GCC prior
 to 3.4 also allow bootstrapping with a traditional (KR) C compiler.

 To build all languages in a cross-compiler or other configuration where
 3-stage bootstrap is not performed, you need to start with an existing
 GCC binary (version 2.95 or later) because source code for language
 frontends other than C might use GCC extensions.

 This appears to be out-of-date with respect to new C++ stage 1
 build requirement.

 Please advise.

 The code is clearly buggy and should use CONST_CAST - well, or now,
 finally, const_cast to cast const char * to char *.

 Richard.

 Thanks,
 - Gary

Why do newer compilers not error out?


Re: CXX conversion: min g++ version pre-requisite?

2012-08-18 Thread Gary Funck
On 08/18/12 09:51:43, Richard Guenther wrote:
 The code is clearly buggy and should use CONST_CAST - well, or now,
 finally, const_cast to cast const char * to char *.

It is interesting that an old version of g++ caught this
but a newer version didn't?

- Gary


CXX conversion: min g++ version pre-requisite?

2012-08-17 Thread Gary Funck

Paul Hargrove noted the following build failure on
an older x86-32 Linux (Redhat 8.0) system.

g++ -c   -g -O2 -DIN_GCC   -fno-exceptions -fno-rtti -W -Wall
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -fno-common
 -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild
-I/usr/local/pkg/upc/nightly/compiler/gupc-src/gcc
-I/usr/local/pkg/upc/nightly/compiler/gupc-src/gcc/build
-I/usr/local/pkg/upc/nightly/compiler/gupc-src/gcc/../include
-I/usr/local/pkg/upc/nightly/compiler/gupc-src/gcc/../libcpp/include
-I/usr/local/pkg/gmp-4.2.4/include -I/usr/local/pkg/mpfr-2.4.2/include
-I/usr/local/pkg/mpc-0.8/include
 -I/usr/local/pkg/upc/nightly/compiler/gupc-src/gcc/../libdecnumber
-I/usr/local/pkg/upc/nightly/compiler/gupc-src/gcc/../libdecnumber/bid
-I../libdecnumber\
-o build/genoutput.o
/usr/local/pkg/upc/nightly/compiler/gupc-src/gcc/genoutput.c
/usr/local/pkg/upc/nightly/compiler/gupc-src/gcc/genoutput.c: In function
`void note_constraint(rtx_def*, int)':
/usr/local/pkg/upc/nightly/compiler/gupc-src/gcc/genoutput.c:1178: error:
reinterpret_cast from type `const char (*)[1]' to type `char*' casts away
constness
make[2]: *** [build/genoutput.o] Error 1
make[2]: Leaving directory `/usr/local/pkg/upc/nightly/compiler/bld/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/usr/local/pkg/upc/nightly/compiler/bld'
make: *** [all] Error 2


The g++ version is: g++ (GCC) 3.4.0

Currently, install.texi states:

@heading Tools/packages necessary for building GCC
@table @asis
@item ISO C90 compiler
Necessary to bootstrap GCC, although versions of GCC prior
to 3.4 also allow bootstrapping with a traditional (KR) C compiler.

To build all languages in a cross-compiler or other configuration where
3-stage bootstrap is not performed, you need to start with an existing
GCC binary (version 2.95 or later) because source code for language
frontends other than C might use GCC extensions.

This appears to be out-of-date with respect to new C++ stage 1
build requirement.

Please advise.

Thanks,
- Gary


Re: CXX conversion: min g++ version pre-requisite?

2012-08-17 Thread Hans-Peter Nilsson
On Fri, 17 Aug 2012, Gary Funck wrote:

 Paul Hargrove noted the following build failure on
 an older x86-32 Linux (Redhat 8.0) system.

wow. old.

 The g++ version is: g++ (GCC) 3.4.0

 Currently, install.texi states:

 @heading Tools/packages necessary for building GCC
 @table @asis
 @item ISO C90 compiler
 Necessary to bootstrap GCC, although versions of GCC prior
 to 3.4 also allow bootstrapping with a traditional (KR) C compiler.

 This appears to be out-of-date with respect to new C++ stage 1
 build requirement.

Or rather, nobody until now built with such an old version to
find all problems that need to be worked around if possible, or
the new (lowest version to support) oldest version to give up
on, where the maintenance yield is too low...

People had problems finding systems with gcc as low as 4.1.x,
for which problems have recently been solved.

I wouldn't be surprised if a detailed bug report would help
making 3.4.x supported at least for native bootstrap...  Maybe
person or persons with such access could help finding the right
set of casts, which for gen* programs might be cold enough to
minimize the maintenance burden from uglification.

brgds, H-P