digitalmars.D - importC int128 support timeline and other problem
- Dakota (17/17) Aug 29 The problem list:
- Lance Bachmeier (4/7) Aug 30 Does your hardware support it? That message looks like the C
- Dakota (3/10) Aug 30 This error is report by dmd or ldc with importC, I guess it cause
- Lance Bachmeier (6/19) Aug 30 https://dlang.org/spec/importc.html#preprocessor
- Steven Schveighoffer (11/13) Aug 30 I responded in that message, I had filed a bug report on it a few
- Walter Bright (4/4) Aug 30 You're in luck! Phobos has an int128 type:
- Lance Bachmeier (4/8) Aug 30 Will that work with unsigned int128 (the problem here)? If so,
- Walter Bright (3/6) Aug 30 Oddly, std.int128 only does signed operations. core.int128 does both sig...
- Walter Bright (8/9) Aug 30 Thank you for taking the time to posting them. May I suggest that the le...
The problem list: [importC Error: unsigned __int128 not supported](https://forum.dlang.org/post/gszrquconihrheekkxes forum.dlang.org) [importC error: _Builtin_stddef ](https://forum.dlang.org/thread/gohvdcxmcgftglrmohjp forum.dlang.org) [inportC with postgres 16_4 on macOS error](https://forum.dlang.org/thread/lwndouyzgfojdpoxzyko forum.dlang.org) [no definition of struct `mach_vm_range](https://forum.dlang.org/post/tpebcqwzdqfkhnlkmbpd forum.dlang.org) [importC error: alignment value expected, not `sizeof`](https://forum.dlang.org/thread/yesaxwhyountswygbiua forum.dlang.org) [importC with struct name and function conflict](https://forum.dlang.org/thread/bmntorbovfaatfptukjp forum.dlang.org) the most important one is int128 support, I am not sure when it will be support or ever will be supported. or there will be workaround. If it takes more than half a year, I will give up.
Aug 29
On Friday, 30 August 2024 at 06:31:27 UTC, Dakota wrote:the most important one is int128 support, I am not sure when it will be support or ever will be supported. or there will be workaround.Does your hardware support it? That message looks like the C preprocessor telling you it's not supported on your machine. https://gcc.gnu.org/onlinedocs/gcc/_005f_005fint128.html
Aug 30
On Friday, 30 August 2024 at 08:54:54 UTC, Lance Bachmeier wrote:On Friday, 30 August 2024 at 06:31:27 UTC, Dakota wrote:This error is report by dmd or ldc with importC, I guess it cause by d can not handle int128 type.the most important one is int128 support, I am not sure when it will be support or ever will be supported. or there will be workaround.Does your hardware support it? That message looks like the C preprocessor telling you it's not supported on your machine. https://gcc.gnu.org/onlinedocs/gcc/_005f_005fint128.html
Aug 30
On Friday, 30 August 2024 at 10:38:23 UTC, Dakota wrote:On Friday, 30 August 2024 at 08:54:54 UTC, Lance Bachmeier wrote:https://dlang.org/spec/importc.html#preprocessor "ImportC does not have a preprocessor. It is designed to compile C files after they have been first run through the C preprocessor...If the C file has a .c extension, ImportC will run the preprocessor for it automatically."On Friday, 30 August 2024 at 06:31:27 UTC, Dakota wrote:This error is report by dmd or ldc with importC, I guess it cause by d can not handle int128 type.the most important one is int128 support, I am not sure when it will be support or ever will be supported. or there will be workaround.Does your hardware support it? That message looks like the C preprocessor telling you it's not supported on your machine. https://gcc.gnu.org/onlinedocs/gcc/_005f_005fint128.html
Aug 30
On Friday, 30 August 2024 at 06:31:27 UTC, Dakota wrote:[no definition of struct `mach_vm_range](https://forum.dlang.org/post/tpebcqwzdqfkhnlkmbpd forum.dlang.org)I responded in that message, I had filed a bug report on it a few days ago. This reminds me, I should actually mention the exact message so others find that same issue. It took me a while to boil down what the exact problem was. You should also file bug reports for all your issues if they aren't already in bugzilla. That's the only way they will get noticed and fixed. People have various different machines and C compilers, so Walter and whomever else is working on importC can't discover them all. -Steve
Aug 30
You're in luck! Phobos has an int128 type: https://dlang.org/phobos/std_int128.html The primitives are implemented in core.int128: https://dlang.org/phobos/core_int128.html
Aug 30
On Friday, 30 August 2024 at 19:58:23 UTC, Walter Bright wrote:You're in luck! Phobos has an int128 type: https://dlang.org/phobos/std_int128.html The primitives are implemented in core.int128: https://dlang.org/phobos/core_int128.htmlWill that work with unsigned int128 (the problem here)? If so, that could maybe go in here: https://github.com/dlang/dmd/blob/master/druntime/src/__importc_builtins.di
Aug 30
On 8/30/2024 2:14 PM, Lance Bachmeier wrote:Will that work with unsigned int128 (the problem here)? If so, that could maybe go in here: https://github.com/dlang/dmd/blob/master/druntime/src/__importc_builtins.diOddly, std.int128 only does signed operations. core.int128 does both signed and unsigned.
Aug 30
On 8/29/2024 11:31 PM, Dakota wrote:The problem list:Thank you for taking the time to posting them. May I suggest that the learn subgroup is only for people asking how to do things in D. The best way to report bugs is via our bug reporting system (!): https://issues.dlang.org/ which keeps track of issues until they get resolved, unlike the newsgroups where things scroll away and get forgotten. Remember to tag ImportC issues with the ImportC keyword!
Aug 30