mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-22 11:39:44 +08:00
a6863e2538
2000-10-10 Benjamin Kosnik <bkoz@purist.soma.redhat.com> * Makefile.am (LIBSUPCXX_INCLUDES): Adjust. * libsupc++/include: Remove * libsupc++/include/*: Move to ... * libsupc++: Here. * libsupc++/Makefile.am (glibcppinstall_HEADERS): Install headers. (glibcppinstalldir): New. * src/Makefile.am (c_base_headers): New. (c_shadow_headers): New (c_headers): New. (myinstallheaders): Correct install issues. * src/Makefile.in: Regenerate. * Makefile.am (CSHADOW_INCLUDES): Simplify. * Makefile.in: Regenerate. * acinclude.m4 (GLIBCPP_ENABLE_SHADOW): Add c_include_dir. * aclocal.m4: Regenerate. * mkcheck.in (SRC_DIR): Use it. * include/bits/std_stdexcept.h: And here. * include/bits/std_ios.h: Change std_exception.h to exception. * src/locale.cc: And here. * src/locale-inst.cc: And here. * include/bits/valarray_array.h: And here. * include/bits/stl_alloc.h: And here. * include/bits/stl_algobase.h: And here. * include/bits/pthread_allocimpl.h: And here. * include/bits/stl_construct.h: Change to std_new.h to new. * include/bits/locale_facets.h: Change std_typeinfo.h to typeinfo. * src/Makefile.am (INCLUDES): Add LIBSUPCXX_INCLUDES. (headers): Remove duplicated headers. (std_headers): And here. * src/Makefile.in: Regenerate. * libsupc++/Makefile.am (LIBSUPCXX_INCLUDES): Remove. * libsupc++/Makefile.in: Regenerate. * Makefile.am (LIBSUPCXX_INCLUDES): Add here. (AM_MAKEFLAGS): And here. * Makefile.in: Regenerate. * include/bits/std_typeinfo.h: Remove. * include/bits/std_new.h: Remove * include/bits/std_exception.h: Remove. * std/new: Remove. * std/typeinfo: Remove. * std/exception: Remove. * libio/_G_config.h (__need_ptrdiff_t): Add. * libsupc++/include/new: Change stddef.h to cstddef. * libsupc++/tinfo.h: Change limits.h to climits. * libsupc++/pure.cc: Comment out _GNU_LIBRARY_ bits, as this renders the file uncompilable. Add copyright. * include/c_std/bits/std_cstddef.h: Don't bring wchar_t into std namespace, as it is a fundamental type. From-SVN: r36833
91 lines
2.2 KiB
C++
91 lines
2.2 KiB
C++
/*
|
|
* Copyright (c) 1997
|
|
* Silicon Graphics Computer Systems, Inc.
|
|
*
|
|
* Permission to use, copy, modify, distribute and sell this software
|
|
* and its documentation for any purpose is hereby granted without fee,
|
|
* provided that the above copyright notice appear in all copies and
|
|
* that both that copyright notice and this permission notice appear
|
|
* in supporting documentation. Silicon Graphics makes no
|
|
* representations about the suitability of this software for any
|
|
* purpose. It is provided "as is" without express or implied warranty.
|
|
*/
|
|
|
|
#ifndef _CPP_STDEXCEPT
|
|
#define _CPP_STDEXCEPT 1
|
|
|
|
#include <exception>
|
|
|
|
#if defined(__STL_USE_EXCEPTIONS) || \
|
|
!(defined(_MIPS_SIM) && defined(_ABIO32) && _MIPS_SIM == _ABIO32)
|
|
|
|
#include <bits/stl_string_fwd.h>
|
|
|
|
__STL_BEGIN_NAMESPACE
|
|
|
|
class __Named_exception : public exception {
|
|
public:
|
|
__Named_exception(const string& __str);
|
|
virtual const char* what() const __STL_NOTHROW { return _M_name; }
|
|
|
|
private:
|
|
enum { _S_bufsize = 256 };
|
|
char _M_name[_S_bufsize];
|
|
};
|
|
|
|
class logic_error : public __Named_exception {
|
|
public:
|
|
logic_error(const string& __s) : __Named_exception(__s) {}
|
|
};
|
|
|
|
class runtime_error : public __Named_exception {
|
|
public:
|
|
runtime_error(const string& __s) : __Named_exception(__s) {}
|
|
};
|
|
|
|
class domain_error : public logic_error {
|
|
public:
|
|
domain_error(const string& __arg) : logic_error(__arg) {}
|
|
};
|
|
|
|
class invalid_argument : public logic_error {
|
|
public:
|
|
invalid_argument(const string& __arg) : logic_error(__arg) {}
|
|
};
|
|
|
|
class length_error : public logic_error {
|
|
public:
|
|
length_error(const string& __arg) : logic_error(__arg) {}
|
|
};
|
|
|
|
class out_of_range : public logic_error {
|
|
public:
|
|
out_of_range(const string& __arg) : logic_error(__arg) {}
|
|
};
|
|
|
|
class range_error : public runtime_error {
|
|
public:
|
|
range_error(const string& __arg) : runtime_error(__arg) {}
|
|
};
|
|
|
|
class overflow_error : public runtime_error {
|
|
public:
|
|
overflow_error(const string& __arg) : runtime_error(__arg) {}
|
|
};
|
|
|
|
class underflow_error : public runtime_error {
|
|
public:
|
|
underflow_error(const string& __arg) : runtime_error(__arg) {}
|
|
};
|
|
|
|
__STL_END_NAMESPACE
|
|
|
|
#endif /* Not o32, and no exceptions */
|
|
|
|
#endif /* _CPP_STDEXCEPT */
|
|
|
|
// Local Variables:
|
|
// mode:C++
|
|
// End:
|
|
|