diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-10-12 02:14:03 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-10-11 22:14:03 -0400 |
commit | ecc1211d56c8428eac06b76916dbc8d3a6456fed (patch) | |
tree | f7e79f132a1f5fa1a9f90732456954ead751b633 /gcc | |
parent | acf82af24fb759dfa802691dcba994a68c1f62c1 (diff) | |
download | gcc-ecc1211d56c8428eac06b76916dbc8d3a6456fed.zip gcc-ecc1211d56c8428eac06b76916dbc8d3a6456fed.tar.gz gcc-ecc1211d56c8428eac06b76916dbc8d3a6456fed.tar.bz2 |
t-cygwin32 (TARGET_LIBGCC2_CFLAGS): Define.
* i386/t-cygwin32 (TARGET_LIBGCC2_CFLAGS): Define.
(cp) * inc/typeinfo: Add #pragma interface.
(operator!=): Just call operator==.
* tinfo.cc: Add #pragma implementation.
(operator==): Move from inc/typeinfo and tinfo2.cc.
Check __COMMON_UNRELIABLE instead of _WIN32.
From-SVN: r23004
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/i386/t-cygwin32 | 4 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/inc/typeinfo | 15 | ||||
-rw-r--r-- | gcc/cp/tinfo.cc | 19 | ||||
-rw-r--r-- | gcc/cp/tinfo2.cc | 14 |
6 files changed, 36 insertions, 26 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0d2e775..ef57f79 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Mon Oct 12 02:03:25 1998 Jason Merrill <jason@yorick.cygnus.com> + + * i386/t-cygwin32 (TARGET_LIBGCC2_CFLAGS): Define. + Mon Oct 12 01:22:53 PDT 1998 Jeff Law (law@cygnus.com) * version.c: Bump for snapshot. diff --git a/gcc/config/i386/t-cygwin32 b/gcc/config/i386/t-cygwin32 index 20bc980..42eb7d7 100644 --- a/gcc/config/i386/t-cygwin32 +++ b/gcc/config/i386/t-cygwin32 @@ -3,6 +3,10 @@ CROSS_LIBGCC1 = libgcc1-asm.a LIB1ASMSRC = i386/cygwin32.asm LIB1ASMFUNCS = _chkstk +# We can't rely on common symbols being shared between translation units +# under Windows. +TARGET_LIBGCC2_CFLAGS = -D__COMMON_UNRELIABLE + # cygwin32 always has a limits.h, but, depending upon how we are doing # the build, it may not be installed yet. LIMITS_H_TEST = true diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index cfeb8e5..14abce9 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,11 @@ 1998-10-12 Jason Merrill <jason@yorick.cygnus.com> + * inc/typeinfo: Add #pragma interface. + (operator!=): Just call operator==. + * tinfo.cc: Add #pragma implementation. + (operator==): Move from inc/typeinfo and tinfo2.cc. + Check __COMMON_UNRELIABLE instead of _WIN32. + * typeck2.c (my_friendly_abort): Add URL. 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk> diff --git a/gcc/cp/inc/typeinfo b/gcc/cp/inc/typeinfo index cf3b521..6c8ea05 100644 --- a/gcc/cp/inc/typeinfo +++ b/gcc/cp/inc/typeinfo @@ -4,6 +4,8 @@ #ifndef __TYPEINFO__ #define __TYPEINFO__ +#pragma interface "typeinfo" + #include <exception> extern "C++" { @@ -32,22 +34,11 @@ public: bool operator!= (const type_info& arg) const; }; -// We can't rely on common symbols being shared between translation units -// under Windows. Sigh. - -#ifndef _WIN32 -inline bool type_info:: -operator== (const type_info& arg) const -{ - return &arg == this; -} - inline bool type_info:: operator!= (const type_info& arg) const { - return &arg != this; + return !operator== (arg); } -#endif class bad_cast : public exception { public: diff --git a/gcc/cp/tinfo.cc b/gcc/cp/tinfo.cc index 4b68fd1..2096a51 100644 --- a/gcc/cp/tinfo.cc +++ b/gcc/cp/tinfo.cc @@ -25,6 +25,8 @@ // This exception does not however invalidate any other reasons why // the executable file might be covered by the GNU General Public License. +#pragma implementation "typeinfo" + #include <stddef.h> #include "tinfo.h" #include "new" // for placement new @@ -37,6 +39,23 @@ std::type_info:: ~type_info () { } +#ifndef __COMMON_UNRELIABLE +bool type_info:: +operator== (const type_info& arg) const +{ + return &arg == this; +} +#else +// We can't rely on common symbols being shared between translation units +// under Windows. Sigh. + +bool type_info:: +operator== (const type_info& arg) const +{ + return fast_compare (name (), arg.name ()) == 0; +} +#endif + extern "C" void __rtti_class (void *addr, const char *name, const __class_type_info::base_info *bl, size_t bn) diff --git a/gcc/cp/tinfo2.cc b/gcc/cp/tinfo2.cc index b797cc3..c19cf60 100644 --- a/gcc/cp/tinfo2.cc +++ b/gcc/cp/tinfo2.cc @@ -49,20 +49,6 @@ type_info::before (const type_info &arg) const return fast_compare (name (), arg.name ()) < 0; } -#ifdef _WIN32 -bool type_info:: -operator== (const type_info& arg) const -{ - return fast_compare (name (), arg.name ()) == 0; -} - -bool type_info:: -operator!= (const type_info& arg) const -{ - return fast_compare (name (), arg.name ()) != 0; -} -#endif - // type info for pointer type. struct __pointer_type_info : public type_info { |