[gnu.g++.lib.bug] libg++ 1.34.0 with g++ 1.34.0 vs 1.34.1

sorensen@hstbme.mit.edu (Gregory Sorensen) (03/18/89)

I'm confused.  I made libg++.a without problems a couple of
days ago with g++ 1.34.0.  Today I installed g++ 1.34.1,
and when I tried to build libg++.a, got the following fatal
error: (as well as some warnings I don't recall earlier seeing...)

[warnings deleted ...]

g++ -g -O -fchar-charconst -I../g++-include -I..  -fsave-memoized -c  String.cc
g++ -g -O -fchar-charconst -I../g++-include -I..  -fsave-memoized -c  Integer.cc
../g++-include/Integer.h:187: friend `even' implicitly overloaded
../g++-include/builtin.h:122: after declaration of non-overloaded `int even (long int)'
../g++-include/Integer.h:188: friend `odd' implicitly overloaded
../g++-include/builtin.h:127: after declaration of non-overloaded `int odd (long int)'
*** Error code 1
make: Fatal error: Command failed for target `Integer.o'
Current working directory /home/sorensen/gnu/dist-libg++/src
*** Error code 1
make: Fatal error: Command failed for target `libg++.a'


What's going on?  Is g++ 1.34.1 somehow pickier?

Thanks.

Greg Sorensen

sorensen@hstbme.mit.edu

dl@ROCKY.OSWEGO.EDU (Doug Lea) (03/18/89)

As mentioned by Michael in his 1.34.1 announcement, you need to
explicitly overload `odd' and `even' since overloaded versions could
be first seen in different orders when compiling different files.
I'll append the diffs.

Also, please remove the `-fsave-memoized' switch from GFLAGS in the
libg++ Makefiles when compiling with 1.34.1. There are some apparent
bugs in this.

-Doug

R>diff -rc2N builtin.h~ builtin.h
*** builtin.h~	Wed Jan 11 06:35:27 1989
--- builtin.h	Thu Mar 16 05:00:13 1989
***************
*** 43,46 ****
--- 43,48 ----
  overload sqr;
  overload testbit;
+ overload even;
+ overload odd;
  
  #include <std.h>

mdt@YAHI.STANFORD.EDU (Michael Tiemann) (03/19/89)

You need to add this to builtin.h:

yahi% diff -c2 builtin.h~ builtin.h
*** builtin.h~	Sat Mar  4 07:29:42 1989
--- builtin.h	Wed Mar 15 00:27:48 1989
***************
*** 43,46 ****
--- 43,48 ----
  overload sqr;
  overload testbit;
+ overload even;
+ overload odd;
  
  #include <std.h>
yahi% 

Michael