diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el libg++-2.8.1.3-20000816/libg++/ChangeLog libg++-2.8.1.3-20000914/libg++/ChangeLog --- libg++-2.8.1.3-20000816/libg++/ChangeLog Thu Sep 14 13:43:02 2000 +++ libg++-2.8.1.3-20000914/libg++/ChangeLog Thu Sep 14 12:58:11 2000 @@ -1,3 +1,7 @@ +2000-09-14 Manfred Hollstein + + * config/linux.mt (MT_CFLAGS): Add -O0. + 2000-08-16 Manfred Hollstein * config/linux.mt (MT_CFLAGS): Add definition. diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el libg++-2.8.1.3-20000816/libg++/config/linux.mt libg++-2.8.1.3-20000914/libg++/config/linux.mt --- libg++-2.8.1.3-20000816/libg++/config/linux.mt Thu Sep 14 13:43:02 2000 +++ libg++-2.8.1.3-20000914/libg++/config/linux.mt Thu Sep 14 12:58:37 2000 @@ -17,4 +17,5 @@ _G_CONFIG_H= # We must compile using -ffloat-store; otherwise we generate wrong code # at least for RNG.cc -MT_CFLAGS = -ffloat-store +# Recent gcc version seem to elimitate unused inline functions; add -O0 +MT_CFLAGS = -ffloat-store -O0 diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el libg++-2.8.1.3-20000816/libg++/etc/benchmarks/ChangeLog libg++-2.8.1.3-20000914/libg++/etc/benchmarks/ChangeLog --- libg++-2.8.1.3-20000816/libg++/etc/benchmarks/ChangeLog Thu Dec 17 15:34:11 1998 +++ libg++-2.8.1.3-20000914/libg++/etc/benchmarks/ChangeLog Thu Sep 14 12:02:23 2000 @@ -1,3 +1,12 @@ +2000-09-07 Manfred Hollstein + + * Char.h (NO_NRV/_G_NO_NRV): Rename to _G_USE_NRV and revert + logic for tests. + * Int.h (NO_NRV/_G_NO_NRV): Likewise. + * Makefile.in (TEST_PROGS): Rename test program "no_nrv" to "nrv". + (check): Likewise. + (no_nrv): Likewise; use -D_G_USE_NRV for compilation. + 1998-12-17 Manfred Hollstein * dhrystone.cc (Proc2): Initialize EnumLoc explicitly. diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el libg++-2.8.1.3-20000816/libg++/etc/benchmarks/Char.h libg++-2.8.1.3-20000914/libg++/etc/benchmarks/Char.h --- libg++-2.8.1.3-20000816/libg++/etc/benchmarks/Char.h Mon Aug 31 12:12:24 1998 +++ libg++-2.8.1.3-20000914/libg++/etc/benchmarks/Char.h Thu Sep 14 12:02:23 2000 @@ -35,7 +35,7 @@ and this notice must be preserved on all **** REMOVED, NO LONGER SUPPORTED IN G++ *****) -DNO_GNU_CONST - to eliminate calling const functions const -DCONVERT - to eliminate mixed mode fns that avoid constructors - -DNO_NRV - to eliminate use of named return values + -D_G_USE_NRV - to use named return values -DFAKEVPTR - to get one pocharer per object padding -DRETREF - to make =, +=, etc. return *this, not void -DHEAVY - to override the copy ctor and destructor (heavyweight class) @@ -221,7 +221,7 @@ INLINE char& operator >>=(char& a, cons #endif -#ifdef _G_NO_NRV +#ifndef _G_USE_NRV INLINE Char operator - (const Char REF a) { Char r(a); r.negate(); return r; } diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el libg++-2.8.1.3-20000816/libg++/etc/benchmarks/Int.h libg++-2.8.1.3-20000914/libg++/etc/benchmarks/Int.h --- libg++-2.8.1.3-20000816/libg++/etc/benchmarks/Int.h Mon Aug 31 12:12:24 1998 +++ libg++-2.8.1.3-20000914/libg++/etc/benchmarks/Int.h Thu Sep 14 12:02:23 2000 @@ -34,7 +34,7 @@ and this notice must be preserved on all (-DNO_GNU_CONST - to eliminate calling const functions const **** REMOVED, NO LONGER SUPPORTED IN g++ ***** ) -DCONVERT - to eliminate mixed mode fns that avoid constructors - -DNO_NRV - to eliminate use of named return values + -D_G_USE_NRV - to use named return values -DFAKEVPTR - to get one pointer per object padding -DRETREF - to make =, +=, etc. return *this, not void -DHEAVY - to override the copy ctor and destructor (heavyweight class) @@ -219,7 +219,7 @@ INLINE int& operator >>=(int& a, const #endif -#ifdef _G_NO_NRV +#ifndef _G_USE_NRV INLINE Int operator - (const Int REF a) { Int r(a); r.negate(); return r; } diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el libg++-2.8.1.3-20000816/libg++/etc/benchmarks/Makefile.in libg++-2.8.1.3-20000914/libg++/etc/benchmarks/Makefile.in --- libg++-2.8.1.3-20000816/libg++/etc/benchmarks/Makefile.in Thu May 25 03:01:15 1995 +++ libg++-2.8.1.3-20000914/libg++/etc/benchmarks/Makefile.in Thu Sep 14 12:02:23 2000 @@ -9,7 +9,7 @@ prefix = /usr/local QUICK= -DQUICK #QUICK= -TEST_PROGS= builtin class virt no_nrv byval call convert call-var virt-var virt-call +TEST_PROGS= builtin class virt nrv byval call convert call-var virt-var virt-call #### package, host, target, and site dependent Makefile fragments come in here. ## @@ -28,8 +28,8 @@ check: $(TEST_PROGS) @./convert @echo "Using by-value, rather than by-reference calling conventions:" @./byval - @echo "Without using named return values:" - @./no_nrv + @echo "Using named return values:" + @./nrv @echo "Using calls instead of inline functions:" @./call @echo "Using calls, with -fthis-is-variable:" @@ -59,8 +59,8 @@ call-var: convert: $(CXX) $(C_FLAGS) -DCONVERT $(srcdir)/dhrystone.cc $(LIBS) -o $@ -no_nrv: - $(CXX) $(C_FLAGS) -D_G_NO_NRV $(srcdir)/dhrystone.cc $(LIBS) -o $@ +nrv: + $(CXX) $(C_FLAGS) -D_G_USE_NRV $(srcdir)/dhrystone.cc $(LIBS) -o $@ byval: $(CXX) $(C_FLAGS) -DBYVAL $(srcdir)/dhrystone.cc $(LIBS) -o $@ diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el libg++-2.8.1.3-20000816/libg++/src/BitSet.cc libg++-2.8.1.3-20000914/libg++/src/BitSet.cc --- libg++-2.8.1.3-20000816/libg++/src/BitSet.cc Thu Dec 17 15:34:11 1998 +++ libg++-2.8.1.3-20000914/libg++/src/BitSet.cc Thu Sep 14 12:02:23 2000 @@ -924,7 +924,7 @@ BitSet longtoBitSet(unsigned long i) return r; } -#if defined(__GNUG__) && !defined(_G_NO_NRV) +#if defined(__GNUG__) && defined(_G_USE_NRV) BitSet atoBitSet(const char* s, char f, char t, char star) return r { diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el libg++-2.8.1.3-20000816/libg++/src/BitString.cc libg++-2.8.1.3-20000914/libg++/src/BitString.cc --- libg++-2.8.1.3-20000816/libg++/src/BitString.cc Thu Sep 14 13:42:58 2000 +++ libg++-2.8.1.3-20000914/libg++/src/BitString.cc Thu Sep 14 12:02:23 2000 @@ -1258,12 +1258,12 @@ BitSubString BitString::after(const BitP return _substr(first, rep->len - first); } -#if defined(__GNUG__) && !defined(_G_NO_NRV) +#if defined(__GNUG__) && defined(_G_USE_NRV) #define RETURN(r) return #define RETURNS(r) return r; #define RETURN_OBJECT(TYPE, NAME) /* nothing */ #define USE_UNSIGNED 1 /* probably correct */ -#else /* _G_NO_NRV */ +#else /* !_G_USE_NRV */ #define RETURN(r) return r #define RETURNS(r) /* nothing */ #define RETURN_OBJECT(TYPE, NAME) TYPE NAME; diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el libg++-2.8.1.3-20000816/libg++/src/BitString.h libg++-2.8.1.3-20000914/libg++/src/BitString.h --- libg++-2.8.1.3-20000816/libg++/src/BitString.h Thu Sep 14 13:42:58 2000 +++ libg++-2.8.1.3-20000914/libg++/src/BitString.h Thu Sep 14 12:02:23 2000 @@ -499,7 +499,7 @@ inline void BitString::complement() ::complement(*this, *this); } -#if defined(__GNUG__) && !defined(_G_NO_NRV) +#if defined(__GNUG__) && defined(_G_USE_NRV) inline BitString operator & (const BitString& x, const BitString& y) return r { @@ -546,21 +546,21 @@ inline BitString operator ~ (const BitS complement(x, r); } -#else /* NO_NRV */ +#else /* !_G_USE_NRV */ inline BitString operator & (const BitString& x, const BitString& y) { - BitString r; and(x, y, r); return r; + BitString r; and_f(x, y, r); return r; } inline BitString operator | (const BitString& x, const BitString& y) { - BitString r; or(x, y, r); return r; + BitString r; or_f(x, y, r); return r; } inline BitString operator ^ (const BitString& x, const BitString& y) { - BitString r; xor(x, y, r); return r; + BitString r; xor_f(x, y, r); return r; } inline BitString operator << (const BitString& x, _G_int32_t y) diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el libg++-2.8.1.3-20000816/libg++/src/ChangeLog libg++-2.8.1.3-20000914/libg++/src/ChangeLog --- libg++-2.8.1.3-20000816/libg++/src/ChangeLog Thu Sep 14 13:42:54 2000 +++ libg++-2.8.1.3-20000914/libg++/src/ChangeLog Thu Sep 14 12:02:23 2000 @@ -1,3 +1,23 @@ +2000-09-07 Manfred Hollstein + + * BitString.h (operator &): Invoke and_f. + (operator |): Invoke or_f. + (operator ^): Invoke xor_f. + * Integer.h (operator &): Replace calls to "and" by calls to + "bitop". + (operator |): Replace calls to "or" by calls to "bitop". + + * BitSet.cc (_G_NO_NRV): Rename into _G_USE_NRV and revert logic + for tests. + * BitString.cc (_G_NO_NRV): Likewise. + * BitString.h (_G_NO_NRV): Likewise. + * Integer.cc (_G_NO_NRV): Likewise. + * Integer.h (_G_NO_NRV): Likewise. + * Rational.cc (_G_NO_NRV): Likewise. + * Rational.h (_G_NO_NRV): Likewise. + * String.cc (_G_NO_NRV): Likewise. + * String.h (_G_NO_NRV): Likewise. + 2000-03-12 Manfred Hollstein * Fix.h (Fix::Rep): Move definition into public context. diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el libg++-2.8.1.3-20000816/libg++/src/Integer.cc libg++-2.8.1.3-20000914/libg++/src/Integer.cc --- libg++-2.8.1.3-20000816/libg++/src/Integer.cc Thu Sep 14 13:42:58 2000 +++ libg++-2.8.1.3-20000914/libg++/src/Integer.cc Thu Sep 14 12:02:23 2000 @@ -1907,7 +1907,7 @@ IntRep* negate(const IntRep* src, IntRep return dest; } -#if defined(__GNUG__) && !defined(_G_NO_NRV) +#if defined(__GNUG__) && defined(_G_USE_NRV) Integer sqrt(const Integer& x) return r(x) { diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el libg++-2.8.1.3-20000816/libg++/src/Integer.h libg++-2.8.1.3-20000914/libg++/src/Integer.h --- libg++-2.8.1.3-20000816/libg++/src/Integer.h Thu Sep 14 13:42:58 2000 +++ libg++-2.8.1.3-20000914/libg++/src/Integer.h Thu Sep 14 12:02:23 2000 @@ -761,7 +761,7 @@ inline long lg(const Integer& x) // constructive operations -#if defined(__GNUG__) && !defined(_G_NO_NRV) +#if defined(__GNUG__) && defined(_G_USE_NRV) inline Integer operator + (const Integer& x, const Integer& y) return r { @@ -940,7 +940,7 @@ inline Integer gcd(const Integer& x, co r.rep = gcd(x.rep, y.rep); } -#else /* NO_NRV */ +#else /* !_G_USE_NRV */ inline Integer operator + (const Integer& x, const Integer& y) { @@ -994,32 +994,32 @@ inline Integer sqr(const Integer& x) inline Integer operator & (const Integer& x, const Integer& y) { - Integer r; and(x, y, r); return r; + Integer r; r.rep = bitop(x.rep, y.rep, r.rep, '&'); return r; } inline Integer operator & (const Integer& x, long y) { - Integer r; and(x, y, r); return r; + Integer r; r.rep = bitop(x.rep, y, r.rep, '&'); return r; } inline Integer operator & (long x, const Integer& y) { - Integer r; and(x, y, r); return r; + Integer r; r.rep = bitop(y.rep, x, r.rep, '&'); return r; } inline Integer operator | (const Integer& x, const Integer& y) { - Integer r; or(x, y, r); return r; + Integer r; r.rep = bitop(x.rep, y.rep, r.rep, '|'); return r; } inline Integer operator | (const Integer& x, long y) { - Integer r; or(x, y, r); return r; + Integer r; r.rep = bitop(x.rep, y, r.rep, '|'); return r; } inline Integer operator | (long x, const Integer& y) { - Integer r; or(x, y, r); return r; + Integer r; r.rep = bitop(y.rep, x, r.rep, '|'); return r; } inline Integer operator ^ (const Integer& x, const Integer& y) @@ -1119,7 +1119,7 @@ inline Integer gcd(const Integer& x, co Integer r; r.rep = gcd(x.rep, y.rep); return r; } -#endif /* NO_NRV */ +#endif /* !_G_USE_NRV */ inline Integer& Integer::operator %= (const Integer& y) { diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el libg++-2.8.1.3-20000816/libg++/src/Rational.cc libg++-2.8.1.3-20000914/libg++/src/Rational.cc --- libg++-2.8.1.3-20000816/libg++/src/Rational.cc Sat Jun 24 18:45:36 1995 +++ libg++-2.8.1.3-20000914/libg++/src/Rational.cc Thu Sep 14 12:02:23 2000 @@ -193,7 +193,7 @@ Rational pow(const Rational& x, const In return pow(x, yy); } -#if defined(__GNUG__) && !defined(_G_NO_NRV) +#if defined(__GNUG__) && defined(_G_USE_NRV) Rational operator - (const Rational& x) return r(x) { diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el libg++-2.8.1.3-20000816/libg++/src/Rational.h libg++-2.8.1.3-20000914/libg++/src/Rational.h --- libg++-2.8.1.3-20000816/libg++/src/Rational.h Sat Jun 24 18:45:37 1995 +++ libg++-2.8.1.3-20000914/libg++/src/Rational.h Thu Sep 14 12:02:23 2000 @@ -242,7 +242,7 @@ inline Rational operator >? (const Ratio } #endif -#if defined(__GNUG__) && !defined(_G_NO_NRV) +#if defined(__GNUG__) && defined(_G_USE_NRV) inline Rational operator + (const Rational& x, const Rational& y) return r { @@ -264,7 +264,7 @@ inline Rational operator / (const Ration div(x, y, r); } -#else /* NO_NRV */ +#else /* !_G_USE_NRV */ inline Rational operator + (const Rational& x, const Rational& y) { diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el libg++-2.8.1.3-20000816/libg++/src/String.cc libg++-2.8.1.3-20000914/libg++/src/String.cc --- libg++-2.8.1.3-20000816/libg++/src/String.cc Thu Dec 17 15:34:11 1998 +++ libg++-2.8.1.3-20000914/libg++/src/String.cc Thu Sep 14 12:02:23 2000 @@ -966,11 +966,11 @@ int split(const String& src, String resu } -#if defined(__GNUG__) && !defined(_G_NO_NRV) +#if defined(__GNUG__) && defined(_G_USE_NRV) #define RETURN(r) return #define RETURNS(r) return r; #define RETURN_OBJECT(TYPE, NAME) /* nothing */ -#else /* _G_NO_NRV */ +#else /* !_G_USE_NRV */ #define RETURN(r) return r #define RETURNS(r) /* nothing */ #define RETURN_OBJECT(TYPE, NAME) TYPE NAME; @@ -1078,7 +1078,7 @@ StrRep* Scapitalize(const StrRep* src, S return dest; } -#if defined(__GNUG__) && !defined(_G_NO_NRV) +#if defined(__GNUG__) && defined(_G_USE_NRV) String replicate(char c, int n) return w; { diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el libg++-2.8.1.3-20000816/libg++/src/String.h libg++-2.8.1.3-20000914/libg++/src/String.h --- libg++-2.8.1.3-20000816/libg++/src/String.h Sat Jun 24 18:45:38 1995 +++ libg++-2.8.1.3-20000914/libg++/src/String.h Thu Sep 14 12:02:23 2000 @@ -696,7 +696,7 @@ inline String& String:: operator +=(char // constructive concatenation -#if defined(__GNUG__) && !defined(_G_NO_NRV) +#if defined(__GNUG__) && defined(_G_USE_NRV) inline String operator + (const String& x, const String& y) return r; { @@ -768,7 +768,7 @@ inline String capitalize(const String& x r.rep = Scapitalize(x.rep, r.rep); } -#else /* NO_NRV */ +#else /* !_G_USE_NRV */ inline String operator + (const String& x, const String& y) {