diff options
author | Jason Merrill <jason@gcc.gnu.org> | 2016-01-21 15:26:26 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2016-01-21 15:26:26 -0500 |
commit | 7f5b3f488fd80bf4c0c64cf51584d5495b011716 (patch) | |
tree | c48d6283d2e525db1dbc7343849afba0a3985229 /gcc | |
parent | 020491e63b0eaf2141f3ea9f65184551e94ecbad (diff) | |
download | gcc-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.C | 5 |
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" } |