diff options
author | spaun2002 <spaun2002mobile@gmail.com> | 2021-05-01 01:21:42 -0700 |
---|---|---|
committer | spaun2002 <spaun2002mobile@gmail.com> | 2021-05-05 01:27:57 -0700 |
commit | 0cf01b55a6424f0b02b9ac7305b8c067a31c72e9 (patch) | |
tree | fb1a027c4bf1c90aee2656a41dcd61676bd9e660 /packages/duma | |
parent | 6b465e150d1a1a2001430af684a7e2f28eebc683 (diff) | |
download | crosstool-ng-0cf01b55a6424f0b02b9ac7305b8c067a31c72e9.tar.gz crosstool-ng-0cf01b55a6424f0b02b9ac7305b8c067a31c72e9.tar.bz2 crosstool-ng-0cf01b55a6424f0b02b9ac7305b8c067a31c72e9.zip |
Fix dynamic exception specifications in DUMA tests.
GCC11 now have -std=c++17 by default and c++17 does not allow dynamic
exception specifications.
Signed-off-by: Nik Konyuchenko <spaun2002mobile@gmail.com>
Diffstat (limited to 'packages/duma')
-rw-r--r-- | packages/duma/2_5_15/0003_cpp17_throw.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/packages/duma/2_5_15/0003_cpp17_throw.patch b/packages/duma/2_5_15/0003_cpp17_throw.patch new file mode 100644 index 00000000..d61bd495 --- /dev/null +++ b/packages/duma/2_5_15/0003_cpp17_throw.patch @@ -0,0 +1,69 @@ +--- a/testoperators.cpp 2009-03-17 16:04:43.000000000 -0700 ++++ b/testoperators.cpp 2021-05-01 01:15:25.385421628 -0700 +@@ -37,26 +37,26 @@ + { + public: + /* 1x : SINGLE OBJECT FORM - NO DEBUG INFORMATION */ +- void * operator new( DUMA_SIZE_T ) throw(std::bad_alloc); ++ void * operator new( DUMA_SIZE_T ) NEW_THROW_SPEC; + void * operator new( DUMA_SIZE_T , const std::nothrow_t & ) throw(); + void operator delete( void * ) throw(); + void operator delete( void * , const std::nothrow_t & ) throw(); + + /* 2x : ARRAY OBJECT FORM - NO DEBUG INFORMATION */ +- void * operator new[]( DUMA_SIZE_T ) throw(std::bad_alloc); ++ void * operator new[]( DUMA_SIZE_T ) NEW_THROW_SPEC; + void * operator new[]( DUMA_SIZE_T , const std::nothrow_t & ) throw(); + void operator delete[]( void * ) throw(); + void operator delete[]( void *, const std::nothrow_t & ) throw(); + + #ifndef DUMA_NO_LEAKDETECTION + /* 3x : SINGLE OBJECT FORM - WITH DEBUG INFORMATION */ +- void * operator new( DUMA_SIZE_T, const char *, int ) throw( std::bad_alloc ); ++ void * operator new( DUMA_SIZE_T, const char *, int ) NEW_THROW_SPEC; + void * operator new( DUMA_SIZE_T, const std::nothrow_t &, const char *, int ) throw(); + void operator delete( void *, const char *, int ) throw(); + void operator delete( void *, const std::nothrow_t &, const char *, int ) throw(); + + /* 4x : ARRAY OBJECT FORM - WITH DEBUG INFORMATION */ +- void * operator new[]( DUMA_SIZE_T, const char *, int ) throw( std::bad_alloc ); ++ void * operator new[]( DUMA_SIZE_T, const char *, int ) NEW_THROW_SPEC; + void * operator new[]( DUMA_SIZE_T, const std::nothrow_t &, const char *, int ) throw(); + void operator delete[]( void *, const char *, int ) throw(); + void operator delete[]( void *, const std::nothrow_t &, const char *, int ) throw(); +@@ -70,7 +70,7 @@ + /* 1x : SINGLE OBJECT FORM - NO DEBUG INFORMATION */ + + void * optest::operator new( DUMA_SIZE_T s ) +-throw(std::bad_alloc) ++NEW_THROW_SPEC + { + (void)s; + return ::new optest; +@@ -101,7 +101,7 @@ + + /* 2x : ARRAY OBJECT FORM - NO DEBUG INFORMATION */ + void * optest::operator new[]( DUMA_SIZE_T s ) +-throw(std::bad_alloc) ++NEW_THROW_SPEC + { + return ::new optest[ s / sizeof(optest) ]; // "s / sizeof()" not correct but works for this test + } +@@ -129,7 +129,7 @@ + + /* 3x : SINGLE OBJECT FORM - WITH DEBUG INFORMATION */ + void * optest::operator new( DUMA_SIZE_T s, const char * f, int l ) +-throw( std::bad_alloc ) ++NEW_THROW_SPEC + { + (void)s; + return ::new(f,l) optest; +@@ -157,7 +157,7 @@ + + /* 4x : ARRAY OBJECT FORM - WITH DEBUG INFORMATION */ + void * optest::operator new[]( DUMA_SIZE_T s, const char * f, int l ) +-throw( std::bad_alloc ) ++NEW_THROW_SPEC + { + return ::new(f,l) optest[s / sizeof(optest)]; // "s / sizeof()" not correct but works for this test + } |