<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div>This used to compiler:</div><div><br></div><div><font face="Andale Mono">:- pragma foreign_type("C", rsound, "MR_Integer", [can_pass_as_mercury_type]).</font></div><div><font face="Andale Mono">:- pragma foreign_type("C", rmusic, "MR_Integer", [can_pass_as_mercury_type]).</font></div><div><font face="Andale Mono">:- pragma foreign_type("C", rfont, "MR_Integer", [can_pass_as_mercury_type]).</font></div><div><font face="Andale Mono">:- pragma foreign_type("C", rtexture, "MR_Integer", [can_pass_as_mercury_type]).</font></div><div><font face="Andale Mono">:- pragma foreign_type("C", rshader, "MR_Integer", [can_pass_as_mercury_type]).</font></div><div><br></div><div>But having upgraded to 22.01.8 it ails with:</div><div><br></div><div><div><font face="Andale Mono">Mercury/cs/raylib.c:5997:25: error: incompatible pointer to integer conversion passing 'char *' to parameter of type 'MR_Word' (aka 'unsigned long') [-Wint-conversion]</font></div><div><font face="Andale Mono"> Files = MR_list_cons(MR_copy_string(dfl.paths[i]), Files);</font></div><div><font face="Andale Mono"> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</font></div><div><font face="Andale Mono">/usr/local/mercury-22.01.8/lib/mercury/inc/mercury_tags.h:115:5: note: expanded from macro 'MR_list_cons'</font></div><div><font face="Andale Mono"> MR_typed_list_cons( \</font></div><div><font face="Andale Mono"> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</font></div><div><font face="Andale Mono">/usr/local/mercury-22.01.8/lib/mercury/inc/mercury_tags.h:97:9: note: expanded from macro 'MR_typed_list_cons'</font></div><div><font face="Andale Mono"> MR_create2((ti_head), (head), (ti_tail), (tail))))</font></div><div><font face="Andale Mono"> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</font></div><div><font face="Andale Mono">/usr/local/mercury-22.01.8/lib/mercury/inc/mercury_heap.h:610:29: note: expanded from macro 'MR_create2'</font></div><div><font face="Andale Mono"> MR_create2_func((w1), (w2))</font></div><div><font face="Andale Mono"> ^</font></div><div><font face="Andale Mono">/usr/local/mercury-22.01.8/lib/mercury/inc/mercury_tags.h:44:61: note: expanded from macro 'MR_mkword'</font></div><div><font face="Andale Mono">#define MR_mkword(t, p) ((MR_Word *) ((char *) (p) + (t)))</font></div><div><font face="Andale Mono"> ^</font></div><div><font face="Andale Mono">/usr/local/mercury-22.01.8/lib/mercury/inc/mercury_heap.h:583:25: note: passing argument to parameter 'w1' here</font></div><div><font face="Andale Mono">MR_create2_func(MR_Word w1, MR_Word w2)</font></div><div><font face="Andale Mono"> ^</font></div><div><font face="Andale Mono">Mercury/cs/raylib.c:6644:25: error: incompatible pointer to integer conversion passing 'char *' to parameter of type 'MR_Word' (aka 'unsigned long') [-Wint-conversion]</font></div><div><font face="Andale Mono"> Files = MR_list_cons(MR_copy_string(dfl.paths[i]), Files);</font></div><div><font face="Andale Mono"> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</font></div><div><font face="Andale Mono">/usr/local/mercury-22.01.8/lib/mercury/inc/mercury_tags.h:115:5: note: expanded from macro 'MR_list_cons'</font></div><div><font face="Andale Mono"> MR_typed_list_cons( \</font></div><div><font face="Andale Mono"> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</font></div><div><font face="Andale Mono">/usr/local/mercury-22.01.8/lib/mercury/inc/mercury_tags.h:97:9: note: expanded from macro 'MR_typed_list_cons'</font></div><div><font face="Andale Mono"> MR_create2((ti_head), (head), (ti_tail), (tail))))</font></div><div><font face="Andale Mono"> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</font></div><div><font face="Andale Mono">/usr/local/mercury-22.01.8/lib/mercury/inc/mercury_heap.h:610:29: note: expanded from macro 'MR_create2'</font></div><div><font face="Andale Mono"> MR_create2_func((w1), (w2))</font></div><div><font face="Andale Mono"> ^</font></div><div><font face="Andale Mono">/usr/local/mercury-22.01.8/lib/mercury/inc/mercury_tags.h:44:61: note: expanded from macro 'MR_mkword'</font></div><div><font face="Andale Mono">#define MR_mkword(t, p) ((MR_Word *) ((char *) (p) + (t)))</font></div><div><font face="Andale Mono"> ^</font></div><div><font face="Andale Mono">/usr/local/mercury-22.01.8/lib/mercury/inc/mercury_heap.h:583:25: note: passing argument to parameter 'w1' here</font></div><div><font face="Andale Mono">MR_create2_func(MR_Word w1, MR_Word w2)</font></div><div><font face="Andale Mono"> ^</font></div><div><font face="Andale Mono">Mercury/cs/raylib.c:7123:16: error: incompatible pointer to integer conversion assigning to 'MR_Integer' (aka 'long') from 'void *' [-Wint-conversion]</font></div><div><font face="Andale Mono"> RMusic = p;</font></div><div><font face="Andale Mono"> ^ ~</font></div><div><font face="Andale Mono">Mercury/cs/raylib.c:7274:16: error: incompatible pointer to integer conversion assigning to 'MR_Integer' (aka 'long') from 'void *' [-Wint-conversion]</font></div><div><font face="Andale Mono"> RSound = p;</font></div><div><font face="Andale Mono"> ^ ~</font></div><div><font face="Andale Mono">Mercury/cs/raylib.c:7700:13: error: incompatible pointer to integer conversion assigning to 'MR_Integer' (aka 'long') from 'void *' [-Wint-conversion]</font></div><div><font face="Andale Mono"> Out = p;</font></div><div><font face="Andale Mono"> ^ ~</font></div><div><font face="Andale Mono">Mercury/cs/raylib.c:7999:13: error: incompatible pointer to integer conversion assigning to 'MR_Integer' (aka 'long') from 'void *' [-Wint-conversion]</font></div><div><font face="Andale Mono"> Out = p;</font></div><div><font face="Andale Mono"> ^ ~</font></div><div><font face="Andale Mono">6 errors generated.</font></div></div><div><br></div><div>So whats is the way to declare a pointer type?</div><div><br></div><div><br></div></body></html>