From: Joseph Myers <joseph@codesourcery.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Eric Botcazou <ebotcazou@adacore.com>, <gcc-patches@gcc.gnu.org>
Subject: Re: Restore functional DONT_USE_BUILTIN_SETJMP support
Date: Mon, 09 Oct 2017 02:13:00 -0000 [thread overview]
Message-ID: <alpine.DEB.2.20.1710090022550.30602@digraph.polyomino.org.uk> (raw)
In-Reply-To: <87k2057odr.fsf@linux-m68k.org>
On Sun, 8 Oct 2017, Andreas Schwab wrote:
> On Okt 08 2017, Eric Botcazou <ebotcazou@adacore.com> 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 <setjmp.h>'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
next prev parent reply other threads:[~2017-10-09 0:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-08 10:57 Eric Botcazou
2017-10-08 14:18 ` Andreas Schwab
2017-10-09 2:13 ` Joseph Myers [this message]
2017-10-08 16:38 ` Andreas Schwab
2017-10-08 20:52 ` Eric Botcazou
2017-10-09 22:56 ` Eric Botcazou
2017-10-10 8:44 Dominique d'Humières
2017-10-10 10:34 ` Eric Botcazou
2017-10-10 10:57 ` Dominique d'Humières
2017-10-10 11:59 ` Eric Botcazou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1710090022550.30602@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).