From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50782 invoked by alias); 19 Jun 2018 00:07:46 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 50655 invoked by uid 89); 19 Jun 2018 00:07:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.3 required=5.0 tests=BAYES_50,KAM_LAZY_DOMAIN_SECURITY,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=deeplynested, deeply-nested, H*Ad:D*nz, H*f:sk:5B270A8 X-HELO: us2-ob3-2.mailhostbox.com Received: from us2-ob3-2.mailhostbox.com (HELO us2-ob3-2.mailhostbox.com) (208.91.198.232) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 19 Jun 2018 00:07:44 +0000 Received: from [192.168.1.64] (115-188-136-130-vdsl.bb.spark.co.nz [115.188.136.130]) (Authenticated sender: matt@soulstudios.co.nz) by us2.outbound.mailhostbox.com (Postfix) with ESMTPA id 99DD9CDC9A; Tue, 19 Jun 2018 00:07:41 +0000 (GMT) Subject: Re: Apparent deeply-nested missing error bug with gcc 7.3 To: Jonathan Wakely Cc: "gcc@gcc.gnu.org" References: <5B270A8F.4090802@soulstudios.co.nz> From: Soul Studios Message-ID: <824b3945-4b9a-6c65-40f8-2f0800b47ee8@soulstudios.co.nz> Date: Tue, 19 Jun 2018 00:31:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-CMAE-Score: 0 X-CMAE-Analysis: v=2.2 cv=fOdJ5dSe c=1 sm=1 tr=0 a=9G+dizW/icOyw6Ak0BVi5Q==:117 a=9G+dizW/icOyw6Ak0BVi5Q==:17 a=IkcTkHD0fZMA:10 a=vkRcAXDrynmC7ZRSck8A:9 a=QEXdDO2ut3YA:10 X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00202.txt.bz2 > > It's never called. > > I added a call to abort() to that function, and the tests all pass. So > the function is never used, so GCC never compiles it and doesn't > notice that the return type is invalid. That's allowed by the > standard. The compiler is not required to diagnose ill-formed code in > uninstantiated templates. > As I mentioned in the original message, it is called several times. Both MSVC and Clang pick up the error, but GCC does not. It's a bug.