From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0665B3858C2F; Fri, 5 Aug 2022 20:31:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0665B3858C2F From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106520] 2+ index expressions in build_op_subscript are incorrectly interpreted as comma expression Date: Fri, 05 Aug 2022 20:31:32 +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: 12.1.0 X-Bugzilla-Keywords: accepts-invalid, diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW 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: everconfirmed keywords bug_status cf_reconfirmed_on 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2022 20:31:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106520 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Keywords| |accepts-invalid Status|UNCONFIRMED |NEW Last reconfirmed| |2022-08-05 --- Comment #1 from Andrew Pinski --- clang diagnostic is better: :15:4: error: no viable overloaded operator[] for type 'A' a[b, 2]; ~^~~~~ :4:8: note: candidate function not viable: no known conversion from= 'B' to 'unsigned int' for 1st argument void operator[](unsigned, unsigned); ^ :3:8: note: candidate function not viable: requires 1 argument, but= 2 were provided void operator[](unsigned); ^ Though it does not do the warning except for C++20.=