Commit ecc1211d by Jason Merrill Committed by Jason Merrill

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
parent acf82af2
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) Mon Oct 12 01:22:53 PDT 1998 Jeff Law (law@cygnus.com)
* version.c: Bump for snapshot. * version.c: Bump for snapshot.
......
...@@ -3,6 +3,10 @@ CROSS_LIBGCC1 = libgcc1-asm.a ...@@ -3,6 +3,10 @@ CROSS_LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = i386/cygwin32.asm LIB1ASMSRC = i386/cygwin32.asm
LIB1ASMFUNCS = _chkstk 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 # cygwin32 always has a limits.h, but, depending upon how we are doing
# the build, it may not be installed yet. # the build, it may not be installed yet.
LIMITS_H_TEST = true LIMITS_H_TEST = true
......
1998-10-12 Jason Merrill <jason@yorick.cygnus.com> 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. * typeck2.c (my_friendly_abort): Add URL.
1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk> 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#ifndef __TYPEINFO__ #ifndef __TYPEINFO__
#define __TYPEINFO__ #define __TYPEINFO__
#pragma interface "typeinfo"
#include <exception> #include <exception>
extern "C++" { extern "C++" {
...@@ -32,22 +34,11 @@ public: ...@@ -32,22 +34,11 @@ public:
bool operator!= (const type_info& arg) const; 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:: inline bool type_info::
operator!= (const type_info& arg) const operator!= (const type_info& arg) const
{ {
return &arg != this; return !operator== (arg);
} }
#endif
class bad_cast : public exception { class bad_cast : public exception {
public: public:
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
// This exception does not however invalidate any other reasons why // This exception does not however invalidate any other reasons why
// the executable file might be covered by the GNU General Public License. // the executable file might be covered by the GNU General Public License.
#pragma implementation "typeinfo"
#include <stddef.h> #include <stddef.h>
#include "tinfo.h" #include "tinfo.h"
#include "new" // for placement new #include "new" // for placement new
...@@ -37,6 +39,23 @@ std::type_info:: ...@@ -37,6 +39,23 @@ std::type_info::
~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 extern "C" void
__rtti_class (void *addr, const char *name, __rtti_class (void *addr, const char *name,
const __class_type_info::base_info *bl, size_t bn) const __class_type_info::base_info *bl, size_t bn)
......
...@@ -49,20 +49,6 @@ type_info::before (const type_info &arg) const ...@@ -49,20 +49,6 @@ type_info::before (const type_info &arg) const
return fast_compare (name (), arg.name ()) < 0; 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. // type info for pointer type.
struct __pointer_type_info : public type_info { struct __pointer_type_info : public type_info {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment