-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
// { dg-require-cstdint "" }
-// Copyright (C) 2008, 2009 Free Software Foundation
+// Copyright (C) 2008-2024 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
void
test01()
{
- std::ratio<INTMAX_MAX, INTMAX_MAX> r1;
- std::ratio<-INTMAX_MAX, INTMAX_MAX> r2;
+ std::ratio<INTMAX_MAX, INTMAX_MAX> r1 __attribute__((unused));
+ std::ratio<-INTMAX_MAX, INTMAX_MAX> r2 __attribute__((unused));
}
void
test02()
{
- std::ratio<INTMAX_MIN, 1> r1;
+ std::ratio<INTMAX_MIN, 1> r1 __attribute__((unused)); // { dg-error "required from here" }
}
void
test03()
{
- std::ratio<1, INTMAX_MIN> r1;
+ std::ratio<1, INTMAX_MIN> r1 __attribute__((unused)); // { dg-error "required from here" }
}
void
test04()
{
- std::ratio<1,0> r1;
+ std::ratio<1,0> r1 __attribute__((unused)); // { dg-error "required from here" }
}
-// { dg-error "instantiated from here" "" { target *-*-* } 34 }
-// { dg-error "instantiated from here" "" { target *-*-* } 40 }
-// { dg-error "instantiated from here" "" { target *-*-* } 46 }
-// { dg-error "denominator cannot be zero" "" { target *-*-* } 153 }
-// { dg-error "out of range" "" { target *-*-* } 154 }
-// { dg-excess-errors "In instantiation of" }
+// { dg-error "denominator cannot be zero" "" { target *-*-* } 0 }
+// { dg-error "out of range" "" { target *-*-* } 0 }
+// { dg-error "overflow in constant expression" "" { target *-*-* } 0 }
+// { dg-prune-output "not a member" }