From: Jason Merrill Date: Thu, 21 Jan 2016 20:26:26 +0000 (-0500) Subject: re PR c++/59281 (attribute((constructor)) accepts enum class as integer constant) X-Git-Tag: basepoints/gcc-7~1408 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f5b3f488fd80bf4c0c64cf51584d5495b011716;p=thirdparty%2Fgcc.git 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 --- 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 000000000000..ed522d3d551a --- /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" }