blob: 5a87b7ce7d2118ae196538d93cc0fa863521bbbf (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// PR c++/22508
// ICE on invalid operator new
// Origin: Flash Sheridan <flash@pobox.com>
// { dg-do compile }
struct A
{
void* operator new(__SIZE_TYPE__) throw(X); // { dg-error "expected|type" }
}; // { dg-error "dynamic exception specification" "" { target c++17 } .-1 }
// { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } .-2 }
A* p = new A;
|