From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.bugs Subject: bug#15807: guile-2.0.9 doesn't handle Apple clang < 5 or llvm.org clang < 3.3 properly Date: Mon, 04 Nov 2013 22:00:36 -0500 Message-ID: <87iow7mu23.fsf@netris.org> References: <20131105005136.GA25087@bromo.med.uc.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1383620593 18616 80.91.229.3 (5 Nov 2013 03:03:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Nov 2013 03:03:13 +0000 (UTC) Cc: 15807@debbugs.gnu.org To: Jack Howarth Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Nov 05 04:03:17 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VdWvE-0001a4-Ut for guile-bugs@m.gmane.org; Tue, 05 Nov 2013 04:03:17 +0100 Original-Received: from localhost ([::1]:53001 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdWvE-0001fM-FC for guile-bugs@m.gmane.org; Mon, 04 Nov 2013 22:03:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdWv6-0001fG-GJ for bug-guile@gnu.org; Mon, 04 Nov 2013 22:03:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdWv0-0000lm-Un for bug-guile@gnu.org; Mon, 04 Nov 2013 22:03:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49092) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdWv0-0000lg-RD for bug-guile@gnu.org; Mon, 04 Nov 2013 22:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VdWv0-0001Ak-Cr for bug-guile@gnu.org; Mon, 04 Nov 2013 22:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 05 Nov 2013 03:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15807 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 15807-submit@debbugs.gnu.org id=B15807.13836205364451 (code B ref 15807); Tue, 05 Nov 2013 03:03:02 +0000 Original-Received: (at 15807) by debbugs.gnu.org; 5 Nov 2013 03:02:16 +0000 Original-Received: from localhost ([127.0.0.1]:34878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VdWuG-00019i-2U for submit@debbugs.gnu.org; Mon, 04 Nov 2013 22:02:16 -0500 Original-Received: from world.peace.net ([96.39.62.75]:34034 ident=hope6) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VdWuD-00019c-S5 for 15807@debbugs.gnu.org; Mon, 04 Nov 2013 22:02:14 -0500 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1VdWu6-0002IT-UD; Mon, 04 Nov 2013 22:02:07 -0500 In-Reply-To: <20131105005136.GA25087@bromo.med.uc.edu> (Jack Howarth's message of "Mon, 4 Nov 2013 19:51:36 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7335 Archived-At: Jack Howarth writes: > The guile 2.0.9 sources incorrectly assumes that sll clang compilers support > the noreturn attribute which was only added in llvm.org clang 3.3 and Apple clang 5.0. > In fink, we have fixed this with the following patch... > > --- guile-2.0.9/libguile/__scm.h.orig 2013-11-01 22:57:06.000000000 -0400 > +++ guile-2.0.9/libguile/__scm.h 2013-11-01 23:07:03.000000000 -0400 > @@ -76,7 +76,10 @@ > * Examples: > * 1) int foo (char arg) SCM_NORETURN; > */ > -#ifdef __GNUC__ > + > +#if (defined(__apple_build_version__) && (__clang_major__ < 5)) || ((__clang_major__ < 3) && (__clang_minor__ < 3)) The logic of these comparisons is incorrect. Presumably you wanted the test to be true for clang < 3.3. However, it will be false for clang versions 3.2 and 2.3. Anyway, I don't want to include this complex version comparison logic into __scm.h. If we need to add something, it should be via an autoconf test. > +#define SCM_NORETURN > +#elif defined(__GNUC__) > #define SCM_NORETURN __attribute__ ((noreturn)) > #else > #define SCM_NORETURN So clang is pretending to be GCC (by defining __GNUC__), and then breaks if we use the noreturn attribute which has been supported in GCC since version 2.5 (released in 1993) ? If so, I consider that a bug in clang. For now, I've changed "__attribute__ ((noreturn))" to "__attribute__ ((__noreturn__))", on the theory that the actual problem here is that 'noreturn' is being defined to _Noreturn by stdnoreturn.h. Can you please try it and see if it fixes the problem? Just because clang doesn't support the ((noreturn)) attribute doesn't mean that it necessarily aborts compilation if it sees it. Please let us know how it goes. Thanks, Mark