From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 924CE3858D28; Fri, 29 Mar 2024 15:56:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 924CE3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711727796; bh=1clfsAwz130yFyMFYe+WJL/vUmHzgHqLldWa0B2p6W4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=j+qCqTMLUtj4BZjtqoeQqtXg4KSHRhWwX4isz3AQOL6tZgIi7rNGhkrlC7sh0nfu1 iMTaGSiFAQrShWKF0RIHcUB6NlFskspdM+epRDygbtxidarI2287oQCFGIBGMM0yY1 0XbE5Ai7xywE4ktsWAMidMaMFYXHQRLUaqg84img= From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114479] [14 Regression] std::is_array_v changed from false to true in GCC 14 Date: Fri, 29 Mar 2024 15:56:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114479 Marek Polacek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mpolacek at gcc dot gnu.org --- Comment #2 from Marek Polacek --- I think the patch is simply --- a/gcc/cp/semantics.cc +++ b/gcc/cp/semantics.cc @@ -12439,7 +12439,9 @@ trait_expr_value (cp_trait_kind kind, tree type1, t= ree type2) return CP_AGGREGATE_TYPE_P (type1); case CPTK_IS_ARRAY: - return type_code1 =3D=3D ARRAY_TYPE; + return (type_code1 =3D=3D ARRAY_TYPE + /* ??? We don't want to report T[0] as being an array type. */ + && !(TYPE_SIZE (type1) && integer_zerop (TYPE_SIZE (type1)))); case CPTK_IS_ASSIGNABLE: return is_xible (MODIFY_EXPR, type1, type2); but are we *sure* that we don't want to treat int[0] as an array type? It's not clear to me that https://github.com/llvm/llvm-project/pull/86652 reache= d a consensus.=