]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/59281 (attribute((constructor)) accepts enum class as integer constant)
authorJason Merrill <jason@gcc.gnu.org>
Thu, 21 Jan 2016 20:26:26 +0000 (15:26 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 21 Jan 2016 20:26:26 +0000 (15:26 -0500)
PR c++/59281
* g++.dg/ext/attr-constructor1.C: New.

From-SVN: r232704

gcc/testsuite/g++.dg/ext/attr-constructor1.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/ext/attr-constructor1.C b/gcc/testsuite/g++.dg/ext/attr-constructor1.C
new file mode 100644 (file)
index 0000000..ed522d3
--- /dev/null
@@ -0,0 +1,5 @@
+// PR c++/59281
+// { dg-do compile { target c++11 } }
+
+enum class E : int { prio = 666 };
+void f (int) __attribute__((constructor(E::prio))); // { dg-error "integer" }