From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 65A033858D1E; Sat, 13 Jan 2024 12:40:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 65A033858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705149648; bh=AZWC6CzFfVUXUOPwVfdKJCKic4Y+26hRGR5E98wDRgk=; h=From:To:Subject:Date:From; b=wsyX6/YKszcu3kxytE1lxnxyrK04CbC4sDMAaZz/EvByMHE3SpMNMXzP104BDvrTT c008Rtr+p2uzU+B9xjVCCGCSO8PkzKQZFvQshBuqlnfy9qjsYSFdrNe7201FWH8KxW L7tyVf2KSqe6VGxoG9chCEu9o/1Ffu6oI4KV4lFk= From: "jlame646 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113375] New: GCC accepts invalid program involving template keyword when used without a template arg list Date: Sat, 13 Jan 2024 12:40:48 +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: jlame646 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=3D113375 Bug ID: 113375 Summary: GCC accepts invalid program involving template keyword when used without a template arg list Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jlame646 at gmail dot com Target Milestone: --- The following invalid program(as per [temp.name#6]) compiles with gcc and clang. https://godbolt.org/z/Yrj94haa4 ``` template struct C { template void func(U) { } }; int main() { C c;=20=20 c.template func(5); //this is invalid as per current wording gcc and cl= ang accepts but msvc rejects=20=20=20=20=20 //c.template func<>(5); //valid as per current wording. All compilers accepts this } ```=