From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 51EEA385B510; Sat, 22 Jun 2024 21:32:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 51EEA385B510 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1719091950; bh=K3gZLtnxlzpOCdFMnhjVAUsWFQ8YRmQTvHepaURiODA=; h=From:To:Subject:Date:From; b=r59LIzDcvg/DZ99puJj7W2EoL0wtt5CCqeyOazMSKbS4lRcD3WXpDlfFu0Tf8tyhc jxD4xYzVnXmC/ewPKq10reomGtBVV2UTqJOrteIzuhIsvu1xpJPCLcjpM9c9SPujJb EweSPgXPhGHmYhdwYKcdkUA/beK1TClogRPTmf4w= From: "fchelnokov at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/115594] New: requires expression permits arrays of voids Date: Sat, 22 Jun 2024 21:32:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fchelnokov at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D115594 Bug ID: 115594 Summary: requires expression permits arrays of voids Product: gcc Version: 14.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fchelnokov at gmail dot com Target Milestone: --- This program ``` template concept C =3D requires(T t[2]) { t; }; static_assert(!C); ``` seems valid because arrays of voids are not allowed, and it is accepted by Clang and MSVC. But in GCC static_assert evaluates to opposite value. Online demo: https://gcc.godbolt.org/z/nM8Mj8qrb=