caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] external function with arity > 5 and "noalloc"
@ 2013-08-21 16:37 Florent Monnier
  2013-08-22  8:44 ` David Allsopp
  0 siblings, 1 reply; 2+ messages in thread
From: Florent Monnier @ 2013-08-21 16:37 UTC (permalink / raw)
  To: caml-list

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

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

end of thread, other threads:[~2013-08-22  8:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-21 16:37 [Caml-list] external function with arity > 5 and "noalloc" Florent Monnier
2013-08-22  8:44 ` David Allsopp

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