<div dir="ltr">On Wed, Sep 24, 2008 at 10:38 PM, John Reppy <span dir="ltr"><<a href="mailto:jhreppy@mac.com">jhreppy@mac.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Using a fresh version of mlton on Mac OS X, I'm getting messages of the form<br>
<br>
Warning: /Users/jhr/Work/ICFPContest08/sml3d/src/glut/glut.sml 413.28.<br>
Symbol 'glutCreateMenuCB' redeclared as external (previously public). This may cause linker errors.<br>
<br>
when the code at lines 412-413 is<br>
<br>
val exportCreateMenu = _export "glutCreateMenuCB" private cdecl : (int -> unit) -> unit;<br>
val glutCreateMenuCB = _address "glutCreateMenuCB" private : Ptr.t;</blockquote><div><br>That's strange. I copy and pasted those lines to a file (replacing Ptr with MLton.Pointer) and saw no warnings. Can you please provide a complete source file which causes these warnings?<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I've tried various other annotations instead of private, but the message is<br>
consistent. In fact, it turns out that one can put any identifier as an annoation and<br>
still get the same message. E.g.,<br>
<br>
val exportCreateMenu = _export "glutCreateMenuCB" bogus cdecl : (int -> unit) -> unit;<br>
val glutCreateMenuCB = _address "glutCreateMenuCB" bogus : Ptr.t;</blockquote><div><br>The default visibility is public for export and external for address. So that's not unexpected as bogus is invalid and didn't override the defaults. I assume you also got errors that 'bogus' was unrecognized in this case?<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I did not get this warning on the r6841 version on my windows box at work.<br>
</blockquote><div><br>This check did not exist in r6841.<br><br></div></div></div>