aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2016-01-21 15:26:26 -0500
committerJason Merrill <jason@gcc.gnu.org>2016-01-21 15:26:26 -0500
commit7f5b3f488fd80bf4c0c64cf51584d5495b011716 (patch)
treec48d6283d2e525db1dbc7343849afba0a3985229 /gcc
parent020491e63b0eaf2141f3ea9f65184551e94ecbad (diff)
downloadgcc-7f5b3f488fd80bf4c0c64cf51584d5495b011716.zip
gcc-7f5b3f488fd80bf4c0c64cf51584d5495b011716.tar.gz
gcc-7f5b3f488fd80bf4c0c64cf51584d5495b011716.tar.bz2
re PR c++/59281 (attribute((constructor)) accepts enum class as integer constant)
PR c++/59281 * g++.dg/ext/attr-constructor1.C: New. From-SVN: r232704
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/ext/attr-constructor1.C5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/attr-constructor1.C b/gcc/testsuite/g++.dg/ext/attr-constructor1.C
new file mode 100644
index 0000000..ed522d3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/attr-constructor1.C
@@ -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" }