unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: (no subject)
Date: Tue, 03 Nov 2009 20:57:20 +0000	[thread overview]
Message-ID: <87ljin8gy7.fsf@ossau.uklinux.net> (raw)
In-Reply-To: <87hbtciouk.fsf@gnu.org> ("Ludovic Courtès"'s message of "Mon, 02 Nov 2009 22:44:19 +0100")

ludo@gnu.org (Ludovic Courtès) writes:

>      should be OK.  However, I’m slightly concerned about MSVC’s
>      __declspec: does it work if it sees:
>
>        __declspec(dllexport) extern SCM foo (SCM);
>        extern SCM foo (SCM);

I don't know for sure, but I know I've seen "function redeclared with
different linkage" warnings in the past, and this could well be one of
the situations that generates such warnings.

But what about using SCM_API instead of extern?  Wouldn't that always
generate the right code?  (At least for building guile itself.)

>      If it works, that probably means this point is moot.
>
>   2. The automatically added ‘extern’ declaration makes
>      ‘-Wmissing-prototypes’ useless, which is annoying.

I guess it depends if the primitives in question are designed to be used
only from Scheme, or also from other C files.  If they're only for
Scheme, it's a nice feature that SCM_DEFINE does everything needed and
the developer doesn't need a matching prototype.  If they're for other C
files, the missing prototype warning could be helpful.

Then again, the developer will get some kind of warning anyway when
trying to use the function from another file.  So I think the balance is
in favour of SCM_DEFINE including the prototype.

   Neil




  reply	other threads:[~2009-11-03 20:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-02  9:15 Merging ‘bdw-gc-static-alloc’ Ludovic Courtès
2009-10-02 16:26 ` Andy Wingo
2009-10-23  9:16   ` Ludovic Courtès
2009-10-23 12:57     ` Andy Wingo
2009-11-02 21:44       ` Ludovic Courtès
2009-11-03 20:57         ` Neil Jerram [this message]
2009-11-05 22:30           ` Ludovic Courtès
2009-11-08 22:21             ` (no subject) Neil Jerram
  -- strict thread matches above, loose matches on Subject: below --
2009-08-10 19:41 i guess we're frozen & stuff Andy Wingo
2009-08-11 11:34 ` Greg Troxel
2009-08-11 13:59   ` Ken Raeburn
2009-08-12 22:41     ` Andy Wingo
2009-09-16 19:00       ` Andy Wingo
2009-09-25 21:59         ` Ken Raeburn
2009-09-26 21:02           ` Ludovic Courtès
2009-09-28 17:22             ` Neil Jerram
2009-09-28 18:48               ` Ludovic Courtès
2009-09-28 22:42                 ` Neil Jerram
2009-09-28 23:21                   ` Bug #27457 (“Threads, mutexes, and critical sections”) Ludovic Courtès
2009-09-30 20:59                     ` (no subject) Neil Jerram
2009-10-01 17:21                       ` Bug #27457 (“Threads, mutexes, and critical sections”) Ludovic Courtès
2009-10-01 21:05                         ` (no subject) Neil Jerram
2009-10-01 19:45                       ` Bug #27457 (“Threads, mutexes, and critical sections”) Ken Raeburn
2009-10-01 20:44                         ` (no subject) Neil Jerram
2004-10-14 19:23 Tanisha Villalobos
2004-10-03 22:32 Karen Ferguson
2002-11-09  8:29 Dirk Herrmann
2002-11-09 20:42 ` Clinton Ebadi
2002-08-04 16:33 Han-Wen
2002-08-04 18:38 ` Rob Browning
2002-03-30 16:59 ±è°æÀÏ

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

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ljin8gy7.fsf@ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.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).