aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@redhat.com>2012-10-10 10:24:50 +0000
committerDodji Seketeli <dodji@gcc.gnu.org>2012-10-10 12:24:50 +0200
commitd072812eb51d021d887430459b60a5b627eae7f3 (patch)
tree0a54832ae19de1be2f0e1b368cfaa2c6e22445a1
parentd32350e7a5eb5d31aaa1643dbc9db569fbc59b49 (diff)
downloadgcc-d072812eb51d021d887430459b60a5b627eae7f3.zip
gcc-d072812eb51d021d887430459b60a5b627eae7f3.tar.gz
gcc-d072812eb51d021d887430459b60a5b627eae7f3.tar.bz2
Update g++.dg/cpp0x/gen-attrs-{8,36,37}.C as c++11 attributes to types are ignored
The current implementation of C++11 attributes forbids them from being applied to a type unless the type is being declared. I forgot to adjust g++.dg/cpp0x/gen-attrs-{8,36,37}.C that was being run only on ia32. Fixed thus, tested on i386-unknown-linux-gnu and x86_64-unknown-linux-gnu against trunk. gcc/testsuite/ * g++.dg/cpp0x/gen-attrs-8.C: Update the test to reflect the fact that c++11 attributes to types are ignored for now. * g++.dg/cpp0x/gen-attrs-36.C: Likewise. * g++.dg/cpp0x/gen-attrs-37.C: Likewise From-SVN: r192300
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-36.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-37.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-8.C2
4 files changed, 17 insertions, 6 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index fabb749..debe420 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2012-10-10 Dodji Seketeli <dodji@redhat.com>
+
+ * g++.dg/cpp0x/gen-attrs-8.C: Update the test to reflect the fact
+ that c++11 attributes to types are ignored for now.
+ * g++.dg/cpp0x/gen-attrs-36.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-37.C: Likewise
+
2012-10-10 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53741
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-36.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-36.C
index 2665188..0a28354 100644
--- a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-36.C
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-36.C
@@ -2,20 +2,22 @@
// { dg-options "-std=c++11 -pedantic" }
// { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } }
+// c++11 attributes that apply to types are ignored for now
+
class T;
class L { };
class P : public L
{
- typedef void (T::* [[gnu::__stdcall__]] F2) (L*); // { dg-warning "only applies to function types" }
- typedef void (T::*F) (L*) [[gnu::__stdcall__]];
+ typedef void (T::* [[gnu::__stdcall__]] F2) (L*); // { dg-warning "ignored" }
+ typedef void (T::*F) (L*) [[gnu::__stdcall__]]; // { dg-warning "ignored" }
void f(bool aAdd);
};
class T
{
public:
- virtual void A(L *listener) [[gnu::__stdcall__]] = 0;
- virtual void R(L *listener) [[gnu::__stdcall__]] = 0;
+ virtual void A(L *listener) [[gnu::__stdcall__]] = 0; // { dg-warning "ignored" }
+ virtual void R(L *listener) [[gnu::__stdcall__]] = 0; // { dg-warning "ignored" }
};
void P::f(bool aAdd)
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-37.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-37.C
index 15d69e8..9b76942 100644
--- a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-37.C
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-37.C
@@ -2,12 +2,14 @@
// { dg-options "-std=c++11 -pedantic" }
// { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } }
+// c++11 attributes that apply to types are ignored for now
+
struct S {
int x;
S(const S &s) {}
};
-S getS() [[gnu::__stdcall__]];
+S getS() [[gnu::__stdcall__]]; // { dg-warning "ignored" }
void test()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-8.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-8.C
index a842b53..aa1491a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-8.C
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-8.C
@@ -2,5 +2,5 @@
// { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } }
extern int * ([[gnu::stdcall]] *fooPtr)( void); // { dg-error "expected" }
-int * [[gnu::stdcall]] myFn01( void) { return 0; }// { dg-warning "attribute only applies to function types" }
+int * [[gnu::stdcall]] myFn01( void) { return 0; }// { dg-warning "ignored" }