From ff2640e58c4f0dfdb71b1828295f5c186a9685da Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Tue, 8 Oct 2019 16:26:39 +0000 Subject: [PATCH] DR 685 - Integral promotion of enum ignores fixed underlying type. * g++.dg/cpp0x/scoped_enum9.C: New test. From-SVN: r276705 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/scoped_enum9.C | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/scoped_enum9.C 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); +} -- 2.30.2