From: mpolacek Date: Tue, 8 Oct 2019 16:26:39 +0000 (+0000) Subject: DR 685 - Integral promotion of enum ignores fixed underlying type. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d47f46931d036353d4042a6f11732fb26be086bd;p=thirdparty%2Fgcc.git DR 685 - Integral promotion of enum ignores fixed underlying type. * g++.dg/cpp0x/scoped_enum9.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276705 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 895c06f8ed40..f3da169e2fe8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-08 Marek Polacek + + DR 685 - Integral promotion of enum ignores fixed underlying type. + * g++.dg/cpp0x/scoped_enum9.C: New test. + 2019-10-08 Martin Sebor PR tetsuite/92025 diff --git a/gcc/testsuite/g++.dg/cpp0x/scoped_enum9.C b/gcc/testsuite/g++.dg/cpp0x/scoped_enum9.C new file mode 100644 index 000000000000..f38f26dc35b0 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/scoped_enum9.C @@ -0,0 +1,11 @@ +// DR 685 - Integral promotion of enumeration ignores fixed underlying type. +// { dg-do compile { target c++11 } } + +enum E: long { e }; + +void f(int); +int f(long); + +void g() { + int k = f(e); +}