aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2018-12-15 09:07:38 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2018-12-15 09:07:38 +0000
commit1039d00c597ece034f51a66d085fa80f1f11d9e2 (patch)
treec6d0a9f9ff6ad1c4a868f8af6bfe1c20b3f41b96 /gcc/testsuite/g++.dg
parent590f447b7027c218a11df8434569135abf450747 (diff)
downloadgcc-1039d00c597ece034f51a66d085fa80f1f11d9e2.zip
gcc-1039d00c597ece034f51a66d085fa80f1f11d9e2.tar.gz
gcc-1039d00c597ece034f51a66d085fa80f1f11d9e2.tar.bz2
re PR c++/84644 (internal compiler error: in warn_misplaced_attr_for_class_type, at cp/decl.c:4718)
/cp 2018-12-15 Paolo Carlini <paolo.carlini@oracle.com> PR c++/84644 * decl.c (check_tag_decl): A decltype with no declarator doesn't declare anything. /testsuite 2018-12-15 Paolo Carlini <paolo.carlini@oracle.com> PR c++/84644 * g++.dg/cpp0x/decltype68.C: New. * g++.dg/cpp0x/decltype-33838.C: Adjust. * g++.dg/template/spec32.C: Likewise. * g++.dg/template/ttp22.C: Likewise. From-SVN: r267165
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype-33838.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype68.C7
-rw-r--r--gcc/testsuite/g++.dg/template/spec32.C2
-rw-r--r--gcc/testsuite/g++.dg/template/ttp22.C2
4 files changed, 10 insertions, 3 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-33838.C b/gcc/testsuite/g++.dg/cpp0x/decltype-33838.C
index effe08d..43888da 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype-33838.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype-33838.C
@@ -2,5 +2,5 @@
// PR c++/33838
template<typename T> struct A
{
- __decltype (T* foo()); // { dg-error "expected|no arguments|accept" }
+ __decltype (T* foo()); // { dg-error "expected|no arguments|declaration" }
};
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype68.C b/gcc/testsuite/g++.dg/cpp0x/decltype68.C
new file mode 100644
index 0000000..58740c1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype68.C
@@ -0,0 +1,7 @@
+// PR c++/84644
+// { dg-do compile { target c++11 } }
+
+template<int a>
+struct b {
+ decltype(a) __attribute__((break)); // { dg-error "declaration does not declare anything" }
+};
diff --git a/gcc/testsuite/g++.dg/template/spec32.C b/gcc/testsuite/g++.dg/template/spec32.C
index 6ef172b..7cb3f40 100644
--- a/gcc/testsuite/g++.dg/template/spec32.C
+++ b/gcc/testsuite/g++.dg/template/spec32.C
@@ -2,5 +2,5 @@
struct A
{
- template<template<int> class B> struct B<0>; // { dg-error "name of class shadows" }
+ template<template<int> class B> struct B<0>; // { dg-error "declaration does not declare anything" }
};
diff --git a/gcc/testsuite/g++.dg/template/ttp22.C b/gcc/testsuite/g++.dg/template/ttp22.C
index 08eaa30..64aaf74 100644
--- a/gcc/testsuite/g++.dg/template/ttp22.C
+++ b/gcc/testsuite/g++.dg/template/ttp22.C
@@ -2,7 +2,7 @@
// { dg-do compile }
template<template<int> class A>
-class A<0>; // { dg-error "shadows template template parameter" }
+class A<0>; // { dg-error "declaration does not declare anything" }
template<template<int> class B>
class B<0> {}; // { dg-error "shadows template template parameter" }