From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DB8A83858D32; Sun, 31 Mar 2024 10:05:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB8A83858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711879543; bh=uSnkptIKkiOuJ3NrA2F4oCokwsD9QiC6b0R4zDZjI0o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kfLSVukQR1jh7YbdErh1rvm1sAgC86LPJ1514UP0izZgIiEVc9xVi147ceqVapWUS QsNpM9QMpBa2viebaRjfr3aJXlPRtQgoEvOQIJJPEn+FidRcY2NXV108McQlrVz4hn p5hPq/D86bNauuM8EjOvQuBQpkXkNEHtVx0AjwD0= From: "redi 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: Sun, 31 Mar 2024 10:05:42 +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: redi 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: 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 --- Comment #3 from Jonathan Wakely --- [dcl.array] says that for T[N] the value "N specifies the array bound, i.e., the number of elements in the array; N shall be greater than zero." So T[0] is not a valid array type. And std::is_array has never been t= rue for any traditional implementation based on partial specialization of class templates, only when switching to an intrinsic __is_array that fails to accurately give the same behaviour as the std::is_array trait. Since the purpose of the __is_array intrinsic is to optimize the std::is_ar= ray trait, it should have the same behaviour. For the optimization to change the behaviour of the trait seems like the tail wagging the dog.=