From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F33A53858C31; Fri, 1 Mar 2024 18:49:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F33A53858C31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709318945; bh=eKeEswN8z5PLuxQCZY2JYx9WMg9DbYKt8Ca78+rVoRo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cugDe/cyh3/+uHkSqd6DbICknyeL2lLmMmK+RpdT6aNgcAUeQNW7cuira0ZG1fq89 ocuxkFuR5eKhlxyXD+JCnm5Gurk2aaFmshDKRqqOXDi0RXGlb1Y03QMFH8UrDbOjV4 QhiG8ZgyawO6olfsilkSZoTb5OQbKXPMVGD8ihHI= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114165] &scalar+1 and array+1 rejected as template parameters Date: Fri, 01 Mar 2024 18:49:04 +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: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org 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: 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=3D114165 --- Comment #2 from Andrew Pinski --- Reduced testcase: ``` template void withP() {} int array[2]; int main() { withP(); withP(); } ``` GCC and MSVC both reject `array+1` . All three accept `&array[1]` though in C++20+.=