caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Florent Monnier <monnier.florent@gmail.com>
To: caml-list@inria.fr
Subject: [Caml-list] external function with arity > 5 and "noalloc"
Date: Wed, 21 Aug 2013 18:37:56 +0200	[thread overview]
Message-ID: <CAE1DttCqPe=4odArkPFpAK4zNX2_KEbEd02BLxAv-S1NzLqs5g@mail.gmail.com> (raw)

Hi,

I'm not sure if this behavior is a bug or not.
Here a given function defined in a stub:

cat > bind.ml <<EOF
external f :
  v1:int ->
  v2:int ->
  v3:int ->
  v4:int ->
  v5:int ->
  v6:int -> int
  = "bind_f"
    "bind_f_bc"
    "noalloc"
EOF

if compiles fine with all warnings on:
ocamlopt -c -w +A -warn-error +A bind.ml

if will also compile fine with:
  = "bind_f"
    "bind_f_bc"

if I put only:
  = "bind_f"

I get a compilation error, which is what I expected:

ocamlopt -c -w +A -warn-error +A bind.ml

File "bind.ml", line 2, characters 2-75:
Error: An external function with more than 5 arguments requires
  a second stub function for native-code compilation


But now if I write this way:
  = "bind_f"
    "noalloc"
then I get no compile error anymore.

I may be wrong again, but I guess this is not the expected behavior.

In case this is indeed a bug, maybe I've been through mantis list
without seeing it, but it seems not to be registered yet.

-- 
Regards

             reply	other threads:[~2013-08-21 16:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-21 16:37 Florent Monnier [this message]
2013-08-22  8:44 ` David Allsopp

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='CAE1DttCqPe=4odArkPFpAK4zNX2_KEbEd02BLxAv-S1NzLqs5g@mail.gmail.com' \
    --to=monnier.florent@gmail.com \
    --cc=caml-list@inria.fr \
    /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 NNTP newsgroup(s).