From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92175 invoked by alias); 9 Oct 2017 00:26:15 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 92141 invoked by uid 89); 9 Oct 2017 00:26:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=H*Ad:U*ebotcazou, schwab X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Oct 2017 00:26:13 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1e1LtX-0000lG-Fz from joseph_myers@mentor.com ; Sun, 08 Oct 2017 17:26:07 -0700 Received: from digraph.polyomino.org.uk (137.202.0.87) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Mon, 9 Oct 2017 01:26:04 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.86_2) (envelope-from ) id 1e1LtQ-0004yR-Vi; Mon, 09 Oct 2017 00:26:01 +0000 Date: Mon, 09 Oct 2017 02:13:00 -0000 From: Joseph Myers To: Andreas Schwab CC: Eric Botcazou , Subject: Re: Restore functional DONT_USE_BUILTIN_SETJMP support In-Reply-To: <87k2057odr.fsf@linux-m68k.org> Message-ID: References: <2067154.q9SCchci8G@polaris> <87k2057odr.fsf@linux-m68k.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2017-10/txt/msg00454.txt.bz2 On Sun, 8 Oct 2017, Andreas Schwab wrote: > On Okt 08 2017, Eric Botcazou wrote: > > > * builtins.def (BUILT_IN_SETJMP): Declare as library builtin instead > > of GCC builtin if DONT_USE_BUILTIN_SETJMP is defined. > > This breaks gcc.dg/plugin/must-tail-call-2.c, gcc.dg/torture/pr81083.c > and gcc.dg/torture/pr82264.c: > > warning: conflicting types for built-in function 'setjmp' [-Wbuiltin-declaration-mismatch] It also breaks the glibc testsuite for AArch64 and IA64 (setjmp/check-installed-headers-cxx). https://sourceware.org/ml/libc-testresults/2017-q4/msg00057.html In file included from ../include/setjmp.h:2:0, from /tmp/cih_test_epu39R.cc:8: ../setjmp/setjmp.h:49:12: error: declaration of 'int setjmp(__jmp_buf_tag*)' conflicts with built-in declaration 'int setjmp(void*)' [-Werror=builtin-declaration-mismatch] extern int setjmp (jmp_buf __env) __THROWNL; ^~~~~~ cc1plus: all warnings being treated as errors That is, the C++ front end does not consider this built-in declaration compatible with 's declaration of setjmp (GCC of course does not know the exact type of jmp_buf in libc, so can't know the exact argument type for the library function, so when you use DEF_LIB_BUILTIN instead of DEF_GCC_BUILTIN you get this conflict; the C front end is apparently more lenient about this particular built-in type conflict). -- Joseph S. Myers joseph@codesourcery.com