You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build fails with gcc14: error: assignment to 'Objptr' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]#578
Open
barracuda156 opened this issue
Aug 9, 2024
· 4 comments
The first error is with an old MLton which is used for bootstrap, so we can only patch it locally. The second should be fixed here, perhaps:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_mlton/mlton/work/.tmp/fileRpMQu9.o \
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_mlton/mlton/work/.tmp/fileEQaoED.363.c
In file included from /opt/local/libexec/mlton-bootstrap/lib/mlton/include/c-chunk.h:216,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_mlton/mlton/work/.tmp/fileEQaoED.363.c:110:
/opt/local/libexec/mlton-bootstrap/lib/mlton/include/basis/coerce.h: In function 'Real32_castToWord32':
/opt/local/libexec/mlton-bootstrap/lib/mlton/include/basis/coerce.h:42:5: error: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
42 | memcpy(&y, &x, sizeof(t)); \
| ^~~~~~
/opt/local/libexec/mlton-bootstrap/lib/mlton/include/basis/coerce.h:46:1: note: in expansion of macro 'cast'
46 | cast(Real32, Word32)
| ^~~~
/opt/local/libexec/mlton-bootstrap/lib/mlton/include/basis/coerce.h:1:1: note: include '<string.h>' or provide a declaration of 'memcpy'
+++ |+#include <string.h>
1 |
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_mlton/mlton/work/.tmp/fileEQaoED.363.c: In function 'Chunk0':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_mlton/mlton/work/.tmp/fileEQaoED.363.c:27869:39: error: assignment to 'Objptr' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
27869 | O(Objptr, G(Objptr, 5277), 0) = 0x11;
| ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_mlton/mlton/work/.tmp/fileEQaoED.363.c:27874:39: error: assignment to 'Objptr' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
27874 | O(Objptr, G(Objptr, 5278), 0) = 0x9;
| ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_mlton/mlton/work/.tmp/fileEQaoED.363.c:27879:39: error: assignment to 'Objptr' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
27879 | O(Objptr, G(Objptr, 5279), 0) = 0x5;
| ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_mlton/mlton/work/.tmp/fileEQaoED.363.c:31807:39: error: assignment to 'Objptr' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
31807 | O(Objptr, G(Objptr, 5990), 0) = 0x81;
| ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_mlton/mlton/work/.tmp/fileEQaoED.363.c:31812:39: error: assignment to 'Objptr' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
31812 | O(Objptr, G(Objptr, 5991), 0) = 0x41;
| ^
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_mlton/mlton/work/.tmp/fileEQaoED.363.c:31817:39: error: assignment to 'Objptr' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
31817 | O(Objptr, G(Objptr, 5992), 0) = 0x21;
| ^
Compile and Assemble raised in 3.62 + 0.00 (0% GC)
MLton raised in 365.82 + 149.95 (29% GC)
The text was updated successfully, but these errors were encountered:
so there seem to be sufficient casts. I'm not precisely sure when those casts were introduced; there was a fair amount of refactoring of the RSSA and Machine IRs prior to the 20210117 release (which also includes the commit linked above).
What version of MLton is being used for the bootstrap?
If a newer version is required, perhaps the only non-painful way would be if you could host my bootstrap binary (I can build it against 10.5 or possibly 10.4 target). And then I can update the port to pick a new version for bootstrapping mlton.
The first error is with an old MLton which is used for bootstrap, so we can only patch it locally. The second should be fixed here, perhaps:
The text was updated successfully, but these errors were encountered: