unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#15739: Doesn't support clang as well as it could.
@ 2013-10-27 19:53 Matt Sicker
  2013-11-28 19:35 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Matt Sicker @ 2013-10-27 19:53 UTC (permalink / raw)
  To: 15739

[-- Attachment #1: Type: text/plain, Size: 551 bytes --]

There are plenty of macros that only check for GNU GCC and don't bother
checking support from other popular compilers. For example, in
libguile/__scm.h, the macros SCM_NORETURN, SCM_UNUSED, SCM_EXPECT, and many
more, all only check for GCC support. Most (if not all) of these language
extensions are supported by Clang, and usually using the same exact syntax!

I'll submit a patch that adds Clang support to these macros. See <
http://clang.llvm.org/docs/LanguageExtensions.html> for the documentation
about this.

-- 
Matt Sicker <boards@gmail.com>

[-- Attachment #2: Type: text/html, Size: 773 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#15739: Doesn't support clang as well as it could.
  2013-10-27 22:10 bug#15741: Patch for bug #15739 Matt Sicker
@ 2013-11-01 22:00 ` Mark H Weaver
  0 siblings, 0 replies; 5+ messages in thread
From: Mark H Weaver @ 2013-11-01 22:00 UTC (permalink / raw)
  To: Matt Sicker; +Cc: 15739-done

Hi Matt,

Matt Sicker <boards@gmail.com> writes:
> I noticed that clang reports to be GCC version 4.2, so most of what I
> thought might be wrong wasn't. Therefore, the patch was far easier and
> smaller than I expected. This isn't too high a priority, but it does
> add support for clang where the code would normally check for GCC
> 4.3+. Clang even supports C++ static_assert supposedly, so there's a
> check for that as well.
>
> -- 
> Matt Sicker <boards@gmail.com> 
>
>
> From 2b02509f53a247784b4bb0be96061e46b53b0c4e Mon Sep 17 00:00:00 2001
> From: Matt Sicker <boards@gmail.com>
> Date: Sun, 27 Oct 2013 16:54:06 -0500
> Subject: [PATCH] Updated a couple compiler checks to support clang.
>
> * lib/poll.c [__clang__]: Same functionality as GCC 4.3+ for ignoring
>   the (nfd < 0) tests.
> * lib/verify.h [__has_feature(c_static_assert)]: Enables
>   _GL_HAVE__STATIC_ASSERT when clang feature is available for C.
> * lib/verify.h [__has_feature(cxx_static_assert)]: Enables
> * _GL_HAVE_STATIC_ASSERT when clang feature is available for C++.

Both of these files are part of gnulib.  As a matter of policy, we do
not change those files in our repository.  Instead we update from
gnulib's repository from time to time.

Can you please send this problem report and patch to
<bug-gnulib@gnu.org> ?

I'm closing this bug, since there's nothing for us to do in Guile.  If
you find any clang-related problems in Guile itself, please let us know.

     Thanks,
       Mark





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#15739: Doesn't support clang as well as it could.
  2013-10-27 19:53 bug#15739: Doesn't support clang as well as it could Matt Sicker
@ 2013-11-28 19:35 ` Ludovic Courtès
  2013-12-01  1:30   ` Matt Sicker
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2013-11-28 19:35 UTC (permalink / raw)
  To: Matt Sicker; +Cc: 15739

Hi,

Matt Sicker <boards@gmail.com> skribis:

> There are plenty of macros that only check for GNU GCC and don't bother
> checking support from other popular compilers. For example, in
> libguile/__scm.h, the macros SCM_NORETURN, SCM_UNUSED, SCM_EXPECT, and many
> more, all only check for GCC support. Most (if not all) of these language
> extensions are supported by Clang, and usually using the same exact syntax!

Doesn’t Clang still define __GNUC__?  If it does, then it has to behave
like GCC, and thus nothing Clang-specific needs to be added.

Ludo’.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#15739: Doesn't support clang as well as it could.
  2013-11-28 19:35 ` Ludovic Courtès
@ 2013-12-01  1:30   ` Matt Sicker
  2013-12-01 22:09     ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Matt Sicker @ 2013-12-01  1:30 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 15739

[-- Attachment #1: Type: text/plain, Size: 296 bytes --]

On 28 November 2013 13:35, Ludovic Courtès <ludo@gnu.org> wrote:
>
> Doesn’t Clang still define __GNUC__?  If it does, then it has to behave
> like GCC, and thus nothing Clang-specific needs to be added.
>

Yeah, turns out it's a different issue.

-- 
Matt Sicker <boards@gmail.com>

[-- Attachment #2: Type: text/html, Size: 757 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#15739: Doesn't support clang as well as it could.
  2013-12-01  1:30   ` Matt Sicker
@ 2013-12-01 22:09     ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2013-12-01 22:09 UTC (permalink / raw)
  To: Matt Sicker; +Cc: 15739-done

Matt Sicker <boards@gmail.com> skribis:

> On 28 November 2013 13:35, Ludovic Courtès <ludo@gnu.org> wrote:
>>
>> Doesn’t Clang still define __GNUC__?  If it does, then it has to behave
>> like GCC, and thus nothing Clang-specific needs to be added.
>>
>
> Yeah, turns out it's a different issue.

Thanks for letting us know.  I’m closing the bug now.

Ludo’.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-01 22:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-27 19:53 bug#15739: Doesn't support clang as well as it could Matt Sicker
2013-11-28 19:35 ` Ludovic Courtès
2013-12-01  1:30   ` Matt Sicker
2013-12-01 22:09     ` Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2013-10-27 22:10 bug#15741: Patch for bug #15739 Matt Sicker
2013-11-01 22:00 ` bug#15739: Doesn't support clang as well as it could Mark H Weaver

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).