public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* CXX conversion: min g++ version pre-requisite?
@ 2012-08-18  1:36 Gary Funck
  2012-08-18  1:58 ` Hans-Peter Nilsson
  2012-08-18  7:51 ` Richard Guenther
  0 siblings, 2 replies; 7+ messages in thread
From: Gary Funck @ 2012-08-18  1:36 UTC (permalink / raw)
  To: Gcc Patches; +Cc: Paul H. Hargrove, Nenad Vukicevic


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 (K&R) 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: CXX conversion: min g++ version pre-requisite?
  2012-08-18  1:36 CXX conversion: min g++ version pre-requisite? Gary Funck
@ 2012-08-18  1:58 ` Hans-Peter Nilsson
  2012-08-18  7:51 ` Richard Guenther
  1 sibling, 0 replies; 7+ messages in thread
From: Hans-Peter Nilsson @ 2012-08-18  1:58 UTC (permalink / raw)
  To: Gary Funck; +Cc: Gcc Patches, Paul H. Hargrove, Nenad Vukicevic

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 (K&R) 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: CXX conversion: min g++ version pre-requisite?
  2012-08-18  1:36 CXX conversion: min g++ version pre-requisite? Gary Funck
  2012-08-18  1:58 ` Hans-Peter Nilsson
@ 2012-08-18  7:51 ` Richard Guenther
  2012-08-18 12:53   ` NightStrike
  2012-08-18 16:58   ` Gary Funck
  1 sibling, 2 replies; 7+ messages in thread
From: Richard Guenther @ 2012-08-18  7:51 UTC (permalink / raw)
  To: Gary Funck; +Cc: Gcc Patches, Paul H. Hargrove, Nenad Vukicevic

On Sat, Aug 18, 2012 at 3:36 AM, Gary Funck <gary@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 (K&R) 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: CXX conversion: min g++ version pre-requisite?
  2012-08-18  7:51 ` Richard Guenther
@ 2012-08-18 12:53   ` NightStrike
  2012-08-18 16:58   ` Gary Funck
  1 sibling, 0 replies; 7+ messages in thread
From: NightStrike @ 2012-08-18 12:53 UTC (permalink / raw)
  To: Richard Guenther
  Cc: Gary Funck, Gcc Patches, Paul H. Hargrove, Nenad Vukicevic

On Fri, Aug 17, 2012 at 9:51 PM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Sat, Aug 18, 2012 at 3:36 AM, Gary Funck <gary@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 (K&R) 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?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: CXX conversion: min g++ version pre-requisite?
  2012-08-18  7:51 ` Richard Guenther
  2012-08-18 12:53   ` NightStrike
@ 2012-08-18 16:58   ` Gary Funck
  2012-08-19 18:44     ` Gary Funck
  1 sibling, 1 reply; 7+ messages in thread
From: Gary Funck @ 2012-08-18 16:58 UTC (permalink / raw)
  To: Richard Guenther; +Cc: Gcc Patches, Paul H. Hargrove, Nenad Vukicevic

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: CXX conversion: min g++ version pre-requisite?
  2012-08-18 16:58   ` Gary Funck
@ 2012-08-19 18:44     ` Gary Funck
  2012-08-20  7:39       ` Richard Guenther
  0 siblings, 1 reply; 7+ messages in thread
From: Gary Funck @ 2012-08-19 18:44 UTC (permalink / raw)
  To: Richard Guenther; +Cc: Gcc Patches, Paul H. Hargrove, Nenad Vukicevic

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: CXX conversion: min g++ version pre-requisite?
  2012-08-19 18:44     ` Gary Funck
@ 2012-08-20  7:39       ` Richard Guenther
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Guenther @ 2012-08-20  7:39 UTC (permalink / raw)
  To: Gary Funck; +Cc: Gcc Patches, Paul H. Hargrove, Nenad Vukicevic

On Sun, Aug 19, 2012 at 8:44 PM, Gary Funck <gary@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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-08-20  7:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-18  1:36 CXX conversion: min g++ version pre-requisite? Gary Funck
2012-08-18  1:58 ` Hans-Peter Nilsson
2012-08-18  7:51 ` Richard Guenther
2012-08-18 12:53   ` NightStrike
2012-08-18 16:58   ` Gary Funck
2012-08-19 18:44     ` Gary Funck
2012-08-20  7:39       ` Richard Guenther

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).