From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7810) id 34E65384B12B; Mon, 13 Jun 2022 10:14:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 34E65384B12B Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Alex Coplan To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ARM/heads/morello)] cp: Allow conversion between enum classes and intcap X-Act-Checkin: gcc X-Git-Author: Alex Coplan X-Git-Refname: refs/vendors/ARM/heads/morello X-Git-Oldrev: 53e245a972259a371500222549d64d73a09f8c27 X-Git-Newrev: 7d43eaed4908450faa60e2f29d2a462498909a6e Message-Id: <20220613101406.34E65384B12B@sourceware.org> Date: Mon, 13 Jun 2022 10:14:06 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2022 10:14:06 -0000 https://gcc.gnu.org/g:7d43eaed4908450faa60e2f29d2a462498909a6e commit 7d43eaed4908450faa60e2f29d2a462498909a6e Author: Alex Coplan Date: Tue May 10 10:03:47 2022 +0100 cp: Allow conversion between enum classes and intcap Diff: --- gcc/cp/typeck.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 5bab85e412b..dc3fe39d941 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -7663,8 +7663,10 @@ build_static_cast_1 (location_t loc, tree type, tree expr, bool c_cast_p, types which are integral, floating, or enumeration types can be performed. */ if ((INTEGRAL_OR_ENUMERATION_TYPE_P (type) + || INTCAP_TYPE_P (type) || SCALAR_FLOAT_TYPE_P (type)) && (INTEGRAL_OR_ENUMERATION_TYPE_P (intype) + || INTCAP_TYPE_P (intype) || SCALAR_FLOAT_TYPE_P (intype))) { if (processing_template_decl)