Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005946OCamlOCaml otherlibspublic2013-03-12 18:242014-07-30 14:00
Reporterbvaugon 
Assigned Todoligez 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionsuspended 
PlatformOSOS Version
Product Version4.00.1 
Target Version4.02.0+devFixed in Version 
Summary0005946: CAMLprim taking (void) as argument
DescriptionSome C primitives of the OCaml otherlibs runtime are declared with "void" as parameters, and take the OCaml value () when they are called. It is not C-valid but works in practice with most C compilers.

I wrote a patch to fix it.
Steps To ReproduceTo search these invalid functions, run:

$ grep -RIni CAMLprim otherlibs | grep '(void)'
otherlibs/labltk/support/cltkEvent.c:25:CAMLprim value camltk_tk_mainloop(void)
otherlibs/win32graph/draw.c:62:CAMLprim value caml_gr_current_x(void)
otherlibs/win32graph/draw.c:67:CAMLprim value caml_gr_current_y(void)
otherlibs/win32graph/draw.c:316:CAMLprim value caml_gr_get_mousex(void)
otherlibs/win32graph/draw.c:324:CAMLprim value caml_gr_get_mousey(void)
otherlibs/win32graph/open.c:42:CAMLprim value caml_gr_clear_graph(void);
otherlibs/win32graph/open.c:271:CAMLprim value caml_gr_close_graph(void)
otherlibs/win32graph/open.c:280:CAMLprim value caml_gr_clear_graph(void)
otherlibs/win32graph/open.c:294:CAMLprim value caml_gr_size_x(void)
otherlibs/win32graph/open.c:300:CAMLprim value caml_gr_size_y(void)
otherlibs/win32graph/open.c:315:CAMLprim value caml_gr_synchronize(void)
otherlibs/win32graph/open.c:340:CAMLprim value caml_gr_sigio_handler(void)
Tagspatch
Attached Filesdiff file icon ocaml-4.00.1-CAMLprim-void.diff [^] (3,163 bytes) 2013-03-12 18:24 [Show Content]

- Relationships

-  Notes
(0011942)
doligez (administrator)
2014-07-30 14:00

for win32graph: patch applied in 4.02 (commit 15033)

for labltk: report transferred to ocamlcore (issue 1412: https://forge.ocamlcore.org/tracker/index.php?func=detail&aid=1412&group_id=343&atid=1351 [^] )

- Issue History
Date Modified Username Field Change
2013-03-12 18:24 bvaugon New Issue
2013-03-12 18:24 bvaugon File Added: ocaml-4.00.1-CAMLprim-void.diff
2013-03-17 17:15 gasche Assigned To => doligez
2013-03-17 17:15 gasche Status new => assigned
2013-07-12 09:43 doligez Target Version => 4.01.0+dev
2013-08-19 16:05 doligez Target Version 4.01.0+dev => 4.01.1+dev
2013-12-16 14:30 doligez Tag Attached: patch
2014-05-25 20:20 doligez Target Version 4.01.1+dev => 4.02.0+dev
2014-07-30 14:00 doligez Note Added: 0011942
2014-07-30 14:00 doligez Status assigned => resolved
2014-07-30 14:00 doligez Resolution open => suspended


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker