From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E4C893858D38; Thu, 23 Jul 2020 20:27:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E4C893858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1595536053; bh=nPLuJQ2uX9dRAhKCAWRxCDk+Q4SMPovs1NgLKMdCIpg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TCWFcCyvyuedT1+lkr5hnl+FhonvoMgUAPEkqxMSGqxBVHVyO+LAeqCVBsaI0itvq 2oqqWPX6bGm/ZzdAsdOfI7vCwPrz49M0Q5wyShU/3p1tDvDXym9X4VGrAhhZ4q0Cap YoR1uovJ5HutThgTbmD64Mvp+asE1e0iNaLdJ1OU= From: "arthur.j.odwyer at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96213] GCC doesn't complain about ill-formed non-dependent template default argument Date: Thu, 23 Jul 2020 20:27:33 +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: 11.0 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: arthur.j.odwyer at gmail dot com 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: 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: Thu, 23 Jul 2020 20:27:34 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96213 --- Comment #2 from Arthur O'Dwyer --- Here's a similar situation I just ran into again, somehow! // https://godbolt.org/z/3TKG1z struct S {}; template void f() {} template void g() {} int main() { f(); // correctly errors out g(); // incorrectly accepted by GCC } GCC is happy to treat `S(I)` as well-formed when `I` is a template paramete= r. Obviously `decltype(S(I), void())` can't be anything because `S(I)` is ill-formed, so I'm not sure what GCC is doing to compile this.=