Commit df2ba612 by Mike Stump

++0x -> ++11.

From-SVN: r203939
parent 561400f0
// { dg-do run } // { dg-do run }
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
// Make sure -Wliteral-suffix is enabled by default and // Make sure -Wliteral-suffix is enabled by default and
// triggers as expected. // triggers as expected.
......
// { dg-options "-std=c++0x -Wzero-as-null-pointer-constant" } // { dg-options "-std=c++11 -Wzero-as-null-pointer-constant" }
struct A; struct A;
......
// { dg-options "-std=c++0x -pedantic" } // { dg-options "-std=c++11 -pedantic" }
const char* foo() const char* foo()
{ {
......
// PR c++/49042 // PR c++/49042
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
template <class T> template <class T>
class A class A
......
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
template<template<class> class TT> struct X { }; template<template<class> class TT> struct X { };
template<class> struct Y { }; template<class> struct Y { };
......
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
// These also represent tests for printing alias declarations and // These also represent tests for printing alias declarations and
// their instantiations. // their instantiations.
......
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
template <class T> using Ptr = T*; template <class T> using Ptr = T*;
Ptr<unsigned>; // { dg-error "does not declare anything" } Ptr<unsigned>; // { dg-error "does not declare anything" }
......
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
namespace N namespace N
{ {
......
// Origin: PR c++/51027 // Origin: PR c++/51027
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
using INT = int // { dg-error "expected|;|at end of input" } using INT = int // { dg-error "expected|;|at end of input" }
// Origin PR c++/51191 // Origin PR c++/51191
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
template< class T > template< class T >
class ClassTemplate {}; class ClassTemplate {};
......
// Origin: PR c++/51145 // Origin: PR c++/51145
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
struct A {}; struct A {};
......
// Origin PR c++/51194 // Origin PR c++/51194
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
template<class U, class V> //#1 template<class U, class V> //#1
struct foo {}; struct foo {};
......
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
template<class T> struct S0 {}; template<class T> struct S0 {};
template<class T> using AS0 = S0<T>; template<class T> using AS0 = S0<T>;
......
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
// Exercise some member alias templates ... // Exercise some member alias templates ...
......
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
// [temp.alias]/3: // [temp.alias]/3:
// The type-id in an alias template declaration shall not refer // The type-id in an alias template declaration shall not refer
......
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
// alias template of a partial specialization // alias template of a partial specialization
......
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
// Alias template of non-class types. // Alias template of non-class types.
......
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
// Add arguments to unbound template template parameter. // Add arguments to unbound template template parameter.
......
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
struct A { struct A {
template <class U> using C = U; template <class U> using C = U;
......
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
template <class T> template <class T>
struct A { struct A {
......
// Origin: PR c++/51032 // Origin: PR c++/51032
// { dg-skip-if "No stabs" { aarch64*-*-* mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* *-*-vxworks* } { "*" } { "" } } // { dg-skip-if "No stabs" { aarch64*-*-* mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* *-*-vxworks* } { "*" } { "" } }
// { dg-options "-std=c++0x -gstabs+" } // { dg-options "-std=c++11 -gstabs+" }
template <class C> template <class C>
struct A { struct A {
......
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
int main(void) int main(void)
{ {
static_assert(alignof(int) == __alignof(int), "alignof(int) does not equal __alignof(int)"); static_assert(alignof(int) == __alignof(int), "alignof(int) does not equal __alignof(int)");
......
// { dg-do compile } // { dg-do compile }
// { dg-options "-std=c++0x -pedantic" } // { dg-options "-std=c++11 -pedantic" }
int main(void) int main(void)
{ {
alignof(int); //ok with a type but not with an expression alignof(int); //ok with a type but not with an expression
......
// { dg-do compile } // { dg-do compile }
// { dg-options "-std=c++0x -pedantic" } // { dg-options "-std=c++11 -pedantic" }
int main(void) int main(void)
{ {
alignof(void (void)); // { dg-warning "function type" } alignof(void (void)); // { dg-warning "function type" }
......
// PR c++/51316 // PR c++/51316
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
int main() int main()
{ {
......
// Positive test for auto // Positive test for auto
// { dg-do run } // { dg-do run }
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
#include <typeinfo> #include <typeinfo>
extern "C" void abort(); extern "C" void abort();
......
// PR c++/38256 // PR c++/38256
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
template<int> struct A template<int> struct A
{ {
......
// PR c++/40306, c++/40307 // PR c++/40306, c++/40307
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
// { dg-do run } // { dg-do run }
template< typename T > template< typename T >
......
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
template< typename Fn > struct function; template< typename Fn > struct function;
......
// PR c++/40619 // PR c++/40619
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
template<typename U> struct X {}; template<typename U> struct X {};
......
// PR c++/42567 // PR c++/42567
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
template<typename B> template<typename B>
struct A { struct A {
......
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
void f() void f()
{ {
......
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
struct Explicit { struct Explicit {
Explicit() = default; // Line 2 Explicit() = default; // Line 2
......
// Positive test for auto // Positive test for auto
// { dg-do run } // { dg-do run }
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
#include <typeinfo> #include <typeinfo>
extern "C" void abort(); extern "C" void abort();
......
// Test for proper non-deduced context handling of the initializer // Test for proper non-deduced context handling of the initializer
// for an auto declaration/new. // for an auto declaration/new.
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
struct with_apply struct with_apply
{ {
......
// Origin PR c++/47208 // Origin PR c++/47208
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
constexpr auto list = { }; // { dg-error "deducing from brace-enclosed initializer list requires #include <initializer_list>" } constexpr auto list = { }; // { dg-error "deducing from brace-enclosed initializer list requires #include <initializer_list>" }
static const int l = list.size(); static const int l = list.size();
// PR c++/47999 // PR c++/47999
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
int& identity(int& i) int& identity(int& i)
{ {
......
// PR c++/46245 // PR c++/46245
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
template<auto f()->int> struct A { }; template<auto f()->int> struct A { };
// PR c++/48599 // PR c++/48599
// { dg-options "-std=c++0x -pedantic-errors" } // { dg-options "-std=c++11 -pedantic-errors" }
int v[1]; int v[1];
auto (*p)[1] = &v; // { dg-error "array of .auto" } auto (*p)[1] = &v; // { dg-error "array of .auto" }
// PR c++/42056 // PR c++/42056
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
template<int> struct A template<int> struct A
{ {
......
// PR c++/43321 // PR c++/43321
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
template <class T> template <class T>
void f(T t) void f(T t)
......
// PR c++/51404 // PR c++/51404
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
int i = auto().x; // { dg-error "invalid use of" } int i = auto().x; // { dg-error "invalid use of" }
// Testcase for deduction of std::initializer_list for auto. // Testcase for deduction of std::initializer_list for auto.
// { dg-do run } // { dg-do run }
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
#include <typeinfo> #include <typeinfo>
#include <initializer_list> #include <initializer_list>
......
// Testcase for non-dependent auto in templates // Testcase for non-dependent auto in templates
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
struct A struct A
{ {
......
// PR c++/37965 // PR c++/37965
// Negative test for auto // Negative test for auto
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
auto i = 6; auto i = 6;
auto j; // { dg-error "has no initializer" } auto j; // { dg-error "has no initializer" }
......
// PR c++/37962 // PR c++/37962
// Negative test for auto // Negative test for auto
// { dg-do compile } // { dg-do compile }
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
#include <typeinfo> #include <typeinfo>
#include <stdarg.h> #include <stdarg.h>
......
// { dg-options "--std=c++0x" } // { dg-options "--std=c++11" }
struct S{}; struct S{};
void f(S&&); void f(S&&);
......
// { dg-do compile } // { dg-do compile }
// { dg-options "-std=gnu++0x" } // { dg-options "-std=gnu++11" }
template<typename T> template<typename T>
struct list {}; struct list {};
......
// { dg-do compile } // { dg-do compile }
// { dg-options "-std=gnu++0x" } // { dg-options "-std=gnu++11" }
template<int i> class X { /* ... */ }; template<int i> class X { /* ... */ };
X< 1>2 > x1; // // { dg-error "numeric constant" } X< 1>2 > x1; // // { dg-error "numeric constant" }
......
// { dg-do compile } // { dg-do compile }
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
template<typename T> template<typename T>
struct vector { struct vector {
}; };
......
// { dg-options "--std=c++0x" } // { dg-options "--std=c++11" }
struct S struct S
{ {
S(); S();
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// Test cast from lvalue to rvalue // Test cast from lvalue to rvalue
// { dg-do compile } // { dg-do compile }
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
// { dg-skip-if "packed attribute missing for struct one" { "epiphany-*-*" } { "*" } { "" } } // { dg-skip-if "packed attribute missing for struct one" { "epiphany-*-*" } { "*" } { "" } }
template <bool> struct sa; template <bool> struct sa;
......
// { dg-options "--std=c++0x" } // { dg-options "--std=c++11" }
template<typename T, typename U> struct same_type; template<typename T, typename U> struct same_type;
template<typename T> struct same_type<T, T> {}; template<typename T> struct same_type<T, T> {};
......
// { dg-options "--std=c++0x" } // { dg-options "--std=c++11" }
template<typename T, typename U> struct same_type; template<typename T, typename U> struct same_type;
template<typename T> struct same_type<T, T> {}; template<typename T> struct same_type<T, T> {};
......
// PR c++/46336 // PR c++/46336
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
extern "C" { extern "C" {
enum A { }; enum A { };
......
// PR c++/46420 // PR c++/46420
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
template<typename> class vector { }; template<typename> class vector { };
struct A{}; struct A{};
......
// PR c++/47570 // PR c++/47570
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
unsigned int constexpr one() unsigned int constexpr one()
{ return 1; } { return 1; }
......
// PR c++/47969 // PR c++/47969
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
struct A struct A
{ {
......
// PR c++/48089 // PR c++/48089
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
// bang is ill-formed (diagnostic required) because its initializer is // bang is ill-formed (diagnostic required) because its initializer is
// non-constant, because it uses the value of an uninitialized object. // non-constant, because it uses the value of an uninitialized object.
......
// PR c++/49776 // PR c++/49776
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
struct s struct s
{ {
......
// PR c++/47301 // PR c++/47301
// { dg-options "-std=c++0x -fabi-version=1" } // { dg-options "-std=c++11 -fabi-version=1" }
struct A struct A
{ {
......
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
class base class base
{ {
......
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
template<class T> template<class T>
constexpr T do_get(T* x, int n) { constexpr T do_get(T* x, int n) {
......
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
template<class T> template<class T>
struct IsNegative { struct IsNegative {
......
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
constexpr bool is_negative(int x) { constexpr bool is_negative(int x) {
return x < 0; return x < 0;
......
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
constexpr const int do_last(const int* x, int n) { constexpr const int do_last(const int* x, int n) {
return x[n - 1]; return x[n - 1];
......
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
template<class T> template<class T>
constexpr T do_last(T* x, int n) { constexpr T do_last(T* x, int n) {
......
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
typedef decltype(sizeof(char)) size_type; typedef decltype(sizeof(char)) size_type;
......
// PR c++/49290 // PR c++/49290
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
typedef unsigned T; typedef unsigned T;
struct S struct S
......
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
template <const int I[2]> struct A { int ir[I[0]]; }; template <const int I[2]> struct A { int ir[I[0]]; };
extern constexpr int ar[2] = { 1, 2 }; extern constexpr int ar[2] = { 1, 2 };
......
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
// { dg-final { scan-assembler-not "static_initialization" } } // { dg-final { scan-assembler-not "static_initialization" } }
struct A struct A
......
// PR c++/46348 // PR c++/46348
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
template<__SIZE_TYPE__ _Nw> template<__SIZE_TYPE__ _Nw>
struct _Base struct _Base
......
// PR c++/48132 // PR c++/48132
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
struct C struct C
{ {
......
// PR c++/49924 // PR c++/49924
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
struct A { constexpr A() { } }; struct A { constexpr A() { } };
......
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
//A few constexpr's //A few constexpr's
constexpr int foo() { return __alignof__(int); } constexpr int foo() { return __alignof__(int); }
......
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
constexpr auto value = 0; constexpr auto value = 0;
// Test base/member class and static_assert with constexpr // Test base/member class and static_assert with constexpr
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
struct A { struct A {
int i; int i;
......
// PR c++/46293 // PR c++/46293
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
struct A struct A
{ {
......
// PR c++/46526 // PR c++/46526
// { dg-do run } // { dg-do run }
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
struct Base struct Base
{ {
......
// PR c++/46626 // PR c++/46626
// { dg-do run } // { dg-do run }
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
struct A struct A
{ {
......
// PR c++/46369 // PR c++/46369
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
struct A struct A
{ {
......
// PR c++/49136 // PR c++/49136
// { dg-do compile } // { dg-do compile }
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
struct day struct day
{ {
......
// PR c++/49136 // PR c++/49136
// { dg-do compile } // { dg-do compile }
// { dg-options "-std=c++0x" } // { dg-options "-std=c++11" }
struct S struct S
{ {
......
// PR c++/49813 // PR c++/49813
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
inline constexpr bool inline constexpr bool
isinf(long double __x) isinf(long double __x)
......
// PR c++/51433 // PR c++/51433
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
constexpr int f(); constexpr int f();
constexpr int g() { return f(); } constexpr int g() { return f(); }
......
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
struct A struct A
{ {
......
// Make sure C99 complex works with constexpr // Make sure C99 complex works with constexpr
// { dg-options -std=gnu++0x } // { dg-options -std=gnu++11 }
struct complex struct complex
{ {
......
// { dg-options "-std=c++0x -pedantic-errors" } // { dg-options "-std=c++11 -pedantic-errors" }
constexpr int f() constexpr int f()
{ {
......
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
// Core DR 948 // Core DR 948
constexpr int something() { return 3; } constexpr int something() { return 3; }
......
// PR c++/48909 // PR c++/48909
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
#define SA(X) static_assert((X),#X) #define SA(X) static_assert((X),#X)
......
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
struct A struct A
{ {
......
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
struct A struct A
{ {
......
// PR c++/46348 // PR c++/46348
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
struct A struct A
{ {
......
// PR c++/46873 // PR c++/46873
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
struct S struct S
{ {
......
// PR c++/46877 // PR c++/46877
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
struct new_allocator struct new_allocator
{ {
......
// PR c++/47041 // PR c++/47041
// { dg-options "-std=c++0x -fno-elide-constructors" } // { dg-options "-std=c++11 -fno-elide-constructors" }
struct S struct S
{ {
......
// PR c++/47199 // PR c++/47199
// { dg-options "-std=c++0x -fno-elide-constructors" } // { dg-options "-std=c++11 -fno-elide-constructors" }
template < int > struct S template < int > struct S
{ {
......
// PR c++/46466 // PR c++/46466
// { dg-options "-std=c++0x -fno-elide-constructors" } // { dg-options "-std=c++11 -fno-elide-constructors" }
struct S { bool b; }; struct S { bool b; };
constexpr S f() { return S{true}; } constexpr S f() { return S{true}; }
......
// PR c++/47774 // PR c++/47774
// { dg-options -std=c++0x } // { dg-options -std=c++11 }
struct A struct A
{ {
......
// { dg-do compile } // { dg-do compile }
// { dg-options "-std=gnu++0x" } // { dg-options "-std=gnu++11" }
// From N2235 // From N2235
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment