From: Marek Polacek Date: Tue, 8 Oct 2019 16:26:39 +0000 (+0000) Subject: DR 685 - Integral promotion of enum ignores fixed underlying type. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ff2640e58c4f0dfdb71b1828295f5c186a9685da;p=gcc.git DR 685 - Integral promotion of enum ignores fixed underlying type. * g++.dg/cpp0x/scoped_enum9.C: New test. From-SVN: r276705 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 895c06f8ed4..f3da169e2fe 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 00000000000..f38f26dc35b --- /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); +}