// PR c++/53371
// { dg-do compile { target c++11 } }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
struct Abs
{
// { dg-do compile { target c++11 } }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
constexpr int may_throw(bool decide) {
return decide ? 42 : throw -1; // { dg-error "throw" }
// PR c++/89785
// { dg-do compile { target c++14 } }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
constexpr int
foo (int x)
// { dg-do compile { target c++14 } }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
constexpr void f1() {
if (false)
// pr c++/79393
// { dg-do compile { target c++14 } }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
struct A
{
// PR c++/99895
// { dg-do compile { target c++20 } }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
struct fixed_string {
consteval int size(int n) const {
// { dg-do compile }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// { dg-options "-std=c++2a" }
consteval int bar (int i) { if (i != 1) throw 1; return 0; } // { dg-error "is not a constant expression" }
// { dg-do compile { target c++20 } }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
consteval int bar (int i) { if (i != 1) throw 1; return 0; } // { dg-error "is not a constant expression" }
// { dg-do compile }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// { dg-options "-std=c++2a" }
consteval int bar (int i) { if (i != 1) throw 1; return 0; } // { dg-error "is not a constant expression" }
// P0892R2
// { dg-do compile }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// { dg-options "-std=c++2a" }
constexpr int fn0 () { return 0; }
// P0892R2
// { dg-do compile }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// { dg-options "-std=c++2a" }
int foo() { return 42; }
// P0892R2
// { dg-do compile }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// { dg-options "-std=c++2a" }
constexpr int fn0 () { return 0; }
// PR c++/88482
// { dg-do compile }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
extern "C" void __cxa_throw (void *, void *, void (*) (void *));
extern "C" float __cxa_get_exception_ptr (void *) throw (); // { dg-message "previous declaration" }
// PR c++/88482
// { dg-do compile }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
extern "C" void __cxa_throw (float, void *, void (*) (void *)); // { dg-message "previous declaration" }
extern "C" void *__cxa_get_exception_ptr (void *) throw ();
// PR c++/88482
// { dg-do compile }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
float __cxa_throw; // { dg-message "previous declaration" }
extern "C" void *__cxa_get_exception_ptr (void *);
// PR c++/88482
// { dg-do compile }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
extern "C" void __cxa_throw (void *, void *, void (*) (void *));
int __cxa_get_exception_ptr; // { dg-message "previous declaration" }
// PR c++/88482
// { dg-do compile }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
extern "C" int __cxa_throw (void *, void *, void (*) (void *)); // { dg-message "previous declaration" }
extern "C" void *__cxa_get_exception_ptr (void *) throw ();
// PR c++/109172
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
+
class Demo
{
~Demo();
// { dg-do compile }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
void start (void);
void
// PR c++/81073
// { dg-options "" }
// { dg-do compile { target c++11 } }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
struct test { const int *addr; };
// PR c++/29318
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// { dg-options "" }
#include <typeinfo>
// PR c++/34158
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
+
typedef __SIZE_TYPE__ size_t;
extern "C" void* malloc (size_t);
extern "C" void free (void *);
// PR c++/33492
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// { dg-options "" }
void foo()
// PR c++/42038
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
+
extern int __cxa_begin_catch; // { dg-message "previous declaration" }
void f(void)
// PR c++/31952
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
+
void
f0()
{
// PR c++/31952
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
+
int
f0 (int bar) // { dg-message "previously" }
try
// FIXME the TS says atomic_noexcept calls abort, not terminate.
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// { dg-options "-fgnu-tm" }
void f()
/* { dg-do assemble } */
+/* Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'. */
class A {};
class B {};
// { dg-do compile }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// { dg-options "-fopenmp" }
// { dg-require-effective-target fopenmp }
// { dg-do compile }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
void
a (int b)
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// { dg-options "-Wcatch-value=1" }
struct A { virtual ~A() {} };
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// { dg-options "-Wcatch-value=2" }
struct A { virtual ~A() {} };
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// { dg-options "-Wcatch-value=3" }
struct A { virtual ~A() {} };
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// { dg-options "-Wcatch-value=3" }
struct A { virtual ~A() {} };
// PR c++/97675
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
+
struct Base { };
struct Child : Base { };
int main() {
// PR c++/81660
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
+
void bar (int);
void
/* PR middle-end/88232 - Please implement -Winfinite-recursion
{ dg-do compile }
+ Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
{ dg-options "-Wall -Winfinite-recursion" } */
typedef __SIZE_TYPE__ size_t;
// PR c++/107310
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
+
struct f
{
~f();
// Compile with -g to verify the warning deals properly with debug
// statements.
// { dg-do compile }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// { dg-options "-O2 -Wstringop-truncation -g" }
extern "C" char* strncpy (char*, const char*, __SIZE_TYPE__);
// In C++98 mode this gets a -Wc++11-compat warning, in C++11 mode a
// -Wterminate warning.
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// { dg-options "-Wall" }
struct A
// { dg-do assemble }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
//
// Copyright (C) 1999 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 6 Jun 1999 <nathan@acm.org>
// { dg-do assemble }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// Test that we notice unfortunate handler ordering.
struct A { };
// { dg-do assemble }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// Copyright (C) 1999, 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 11 Apr 1999 <nathan@acm.org>
// { dg-do assemble }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
+
struct A
{
A();
// { dg-do assemble }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// Submitted by Sebastian Ritterbusch <uabp@rz.uni-karlsruhe.de>
// { dg-do assemble }
+// Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
// { dg-options "-W -pedantic -ansi" }
// Copyright (C) 1999, 2000 Free Software Foundation, Inc.