* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git] / gcc / testsuite / g++.dg / init / new25.C
blob3abd2f7aba01e8ed0048673ff6b18f86023fb6e3
1 // PR c++/31988
2 #include <new>
4 class C
6 public:
7   void* operator new(std::size_t = 32) throw (std::bad_alloc); // { dg-error "first parameter" }
8                                                                // { dg-error "dynamic exception specification" "" { target c++17 } .-1 }
9                                                                // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } .-2 }
10   void* operator new[](std::size_t = 32) throw (std::bad_alloc); // { dg-error "first parameter" }
11                                                                  // { dg-error "dynamic exception specification" "" { target c++17 } .-1 }
12                                                                  // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } .-2 }
13   void* operator new(std::size_t = 32, const std::nothrow_t&) throw(); // { dg-error "first parameter" }
14   void* operator new[](std::size_t = 32, const std::nothrow_t&) throw(); // { dg-error "first parameter" }
17 class D
19 public:
20   void* operator new(std::size_t,
21                      const std::nothrow_t& = std::nothrow_t()) throw();
22   void* operator new[](std::size_t,
23                        const std::nothrow_t& = std::nothrow_t()) throw();
26 class E
28 public:
29   void* operator new(std::size_t = 0,
30                      const std::nothrow_t& = std::nothrow_t()) throw(); // { dg-error "first parameter" }
31   void* operator new[](std::size_t = 0,
32                        const std::nothrow_t& = std::nothrow_t()) throw(); // { dg-error "first parameter" }