Re: gdc 12.1: undefined references when linking separately compiled files

2022-05-30 Thread Johan via Digitalmars-d-learn
On Saturday, 28 May 2022 at 22:23:34 UTC, kdevel wrote: On Saturday, 28 May 2022 at 15:10:25 UTC, Steven Schveighoffer wrote: [...] Is this specific to gdc, or does it happen for other compilers as well? The former. Please check the dlang versions of all compilers. The template emission sc

Execute the Shell command and continue executing the algorithm

2022-05-30 Thread Alexander Zhirov via Digitalmars-d-learn
I want to run a command in the background during the execution of the algorithm, and without waiting for its actual execution, because it is "infinite", while continuing the execution of the algorithm and then, knowing the ID of the previously launched command, kill the process. So far I have d

Re: Compiler switch for integer comparison/promotion to catch a simple error

2022-05-30 Thread bauss via Digitalmars-d-learn
On Sunday, 29 May 2022 at 01:35:23 UTC, frame wrote: Is there a compiler switch to catch this kind of error? ```d ulong v = 1; writeln(v > -1); ``` IMHO the compiler should bail a warning if it sees a logic comparison between signed and unsigned / different integer sizes. There is 50% chance

Re: Execute the Shell command and continue executing the algorithm

2022-05-30 Thread Ali Çehreli via Digitalmars-d-learn
On 5/30/22 04:18, Alexander Zhirov wrote: > I want to run a command in the background The closest is spawnShell: import std.stdio; import std.process; import core.thread; void main() { auto pid = spawnShell(`(sleep 1 & echo SLEEP >> log)`); Thread.sleep(5.seconds); kill(pid); write

Re: Execute the Shell command and continue executing the algorithm

2022-05-30 Thread Krzysztof Jajeśnica via Digitalmars-d-learn
On Monday, 30 May 2022 at 11:18:42 UTC, Alexander Zhirov wrote: I want to run a command in the background during the execution of the algorithm, and without waiting for its actual execution, because it is "infinite", while continuing the execution of the algorithm and then, knowing the ID of th

Re: Compiler switch for integer comparison/promotion to catch a simple error

2022-05-30 Thread frame via Digitalmars-d-learn
On Monday, 30 May 2022 at 13:15:12 UTC, bauss wrote: Good luck convincing Walter that this is a mistake :) Well, I'm not talking about this is a mistake, just a C-thing I think. I wouldn't even ask him about that since it's in the spec. If I could I would just clone a DMD build, disable out

Re: Compiler switch for integer comparison/promotion to catch a simple error

2022-05-30 Thread matheus via Digitalmars-d-learn
On Monday, 30 May 2022 at 13:15:12 UTC, bauss wrote: Good luck convincing Walter that this is a mistake :) I don't think this is a matter of convincing or changing the behavior, I think that a flag for this case (If not exist) should be added as a warning. A language where some people use t

Re: Compiler switch for integer comparison/promotion to catch a simple error

2022-05-30 Thread Dom Disc via Digitalmars-d-learn
On Sunday, 29 May 2022 at 01:35:23 UTC, frame wrote: Is there a compiler switch to catch this kind of error? ```d ulong v = 1; writeln(v > -1); ``` IMHO the compiler should bail a warning if it sees a logic comparison between signed and unsigned / different integer sizes. There is 50% chance