This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "__throw_logic_error" abort, but print no error message out


2008/11/12 Bernd Roesch:
>
> But in libstdc++v3/src/functexcept.cc
>
>  void
> __throw_logic_error(const char*)
>  { std::abort(); }
>
> this call abort and there is no string print out, because abort get no
> Parameter as far i see.
>
> How can this work ?

It works by calling abort(), as intended.

If you take another look in functexcept.cc you'll see that when
__EXCEPTIONS is defined the following definition is used:

  void
  __throw_logic_error(const char* __s)
  { throw logic_error(_(__s)); }

This allows the library to call __throw_logic_error without caring
whether the target supports exceptions, or whether they have been
disabled with -fno-exceptions.  If exceptions are enabled
__throw_logic_error will throw std::logic_error, otherwise it will
call abort().

It seems that the 68k amigaos port does not support exceptions, or
your GCC was configured without support for exceptions.

Hope that helps,

Jonathan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]