From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5F4983858D38; Wed, 10 Jan 2024 11:36:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F4983858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704886572; bh=xUVDMgeOaLVd3I3i/3BniRA9aSL1CI+hvt20oniIzT8=; h=From:To:Subject:Date:From; b=beTkh1os1oVj8iYo0gxvlOy6zQ5ie5Y/muCy17q2XdGOW96b32pJv1KPcd1Hpkhxl cVKJC1VubGFWywRZLl/+QSHOJuL9q4nmwHnSDIekrikSIGmdeqrkRkNJXqD+anwNnm KDiufFAgj2jotXYBPbUF2Dgvq5eCQT+jp9cSbfxI= From: "cooky.ykooc922 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113307] New: fails to diagnose an explicit object parameter to be a function parameter pack Date: Wed, 10 Jan 2024 11:36:11 +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.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cooky.ykooc922 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=3D113307 Bug ID: 113307 Summary: fails to diagnose an explicit object parameter to be a function parameter pack Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: cooky.ykooc922 at gmail dot com Target Milestone: --- With the recent support of explicit parameter object functions, the compiler fails to diagnose the aforementioned function to be a function parameter pa= ck.=20 struct A { void f(this A); // bug: no error // correct behavior: must be error template void g(this Args&&...); template void h(this A, Args&&...); }; Clang and MSVC seem to reject the code snippet above which is valid accordi= ng to the standard https://eel.is/c++draft/dcl.fct: "An explicit object parameter shall not be a function parameter pack ([temp.variadic])." godbolt link:=20 https://godbolt.org/z/Es6Mzba59=