This is the mail archive of the gcc-bugs@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]

[Bug c++/58525] New: __cxa_throw_bad_array_new_length is generated with -fno-exceptions


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58525

            Bug ID: 58525
           Summary: __cxa_throw_bad_array_new_length is generated with
                    -fno-exceptions
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aivchenk at gmail dot com

When I compile the following code (modified version of
g++.dg/cpp0x/bad_array_new1.C without try/catch):

// { dg-options -std=c++11 }
// { dg-do run }

#include <new>

void * f(int i)
{
  return new int[i];
}

int main()
{
      f(-1);
}

with -fno-exceptions option, I still get the call to
__cxa_throw_bad_array_new_length:

> nm ./bad_array_new1.o | grep cxa
    U __cxa_throw_bad_array_new_length


The same goes for __cxa_throw_bad_array_length


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