Questions tagged [gdc]

The D Programming Language front-end for the GCC compiler. Allows the compilation of D source code using GCC. While it isn’t an official part of GCC, it is actively maintained.

59 questions
2
votes
1 answer

memcmp in DMD v.s GDC AND std.parallelism: parallel

I'm implementing a struct with a pointer to some manually managed memory. It all works great with DMD, but when I test it with GDC, it fails on the opEquals operator overload. I've narrowed it down to memcmp. In opEquals I compare the pointed to…
Ryan
  • 417
  • 2
  • 12
2
votes
1 answer

Can't catch exception thrown from Phobos in GDC

I wrote a small D program. When compiled with DMD, it works fine, but neither GDC nor LDC2 can catch exceptions thrown from Phobos (proven by GDB). How do I fix this? Example code: import std.process; void main(){ try { …
Demi
  • 3,535
  • 5
  • 29
  • 45
2
votes
2 answers

standard D types and GDC (LDC) specification

Where can I find specification about GDC (GNU D Compiler) and how to rewrite standard D types like uint etc.? For info: I'm interested in using D for kernels and other low level stuff. Thanks.
Ars
  • 23
  • 6
1
vote
0 answers

GCC generating corrupted dependency files

I've got a weird issue with compiling GCC that I can't seem to figure out. What I'm trying to compile: gcc v12.2.0 (via make bootstrap) What I'm compiling with: gcc v11.2.0 Configure command: ../configure --prefix=/usr --libdir=/usr/lib64…
Matt Cole
  • 2,552
  • 1
  • 13
  • 21
1
vote
2 answers

Do ldc and gdc support D language contracts?

This code with a contract: import std.stdio; int TestContract(int a) in { assert( a > 0); } do { return a + 1; } int main(string[] args) { auto a = 2; try { writeln(a," + 1 is ",TestContract(a)); a = -2; …
Scooter
  • 6,802
  • 8
  • 41
  • 64
1
vote
1 answer

order of method invocation mixed up

I'm trying to learn d so I started with hello world, and tried to expand a little on it. import std.stdio; import core.thread; void main(string[] args){ writeln("Hello World!"); Thread.sleep(dur!("seconds")(5)); writeln("Press enter key…
blipman17
  • 523
  • 3
  • 23
1
vote
1 answer

Cant compile D program using GDC

I'm trying to compile D program using GDC. I'm currently on Windows XP SP3 and i use the "Windows X86 32bit (i686-w64-mingw32)" package downloaded from here: http://gdcproject.org/downloads (the link at the bottom). So when I unpack the binaries…
luke1985
  • 2,281
  • 1
  • 21
  • 34
1
vote
2 answers

(dlang) How to link libcurl using gdc?

I tried to link libcurl to my program but the linker tells me some errors. I've checked that the option "-lcurl" is used.I've also checked that libcurl is installed correctly. The command I tried is: gdc myprogram.d -o myprogram -lcurl And the…
user3764269
1
vote
2 answers

GDC equivalent to dmd's -main option

Does the GNU D Compiler provide a flag similar to the -main flag of dmd? I've checked the options list for both GCC itself and gdmd (designed to take similar arguments to dmd, but use gdc instead), and couldn't find anything like it. If such a flag…
Koz Ross
  • 3,040
  • 2
  • 24
  • 44
1
vote
1 answer

Is there a directory where i can put a d file so that the compiler automatically includes it?

I am new to the D programming language, and would like to use ncurses in D. I have found a good D port of ncurses, but I want to be able to import it in any source file without writing: gdc ncurses.d Is there any way I can make it included…
1
vote
1 answer

How to perform an operation that requires 2 asynchronous tasks to be completed

I have 2 AFNetoworking operations fetching me data, and i have a method that requires both of them to be completed. I've read on the internet i could have an NSOperationQueue to make 1 operation dependent on another operation finishing. While this…
jfisk
  • 6,125
  • 20
  • 77
  • 113
1
vote
1 answer

Put multiple asynchronous calls in a queue

I have several asynchronous calls which I would combine in one call: -(void) loadA:(ArrayBlock)completion failure(FailureBlock):failure; -(void) loadB:(ArrayBlock)completion failure(FailureBlock):failure; -(void) loadC:(ArrayBlock)completion…
Besi
  • 22,579
  • 24
  • 131
  • 223
1
vote
1 answer

reading memory allocation results from Instruments

I am running a profiler on memory allocations on my iOS app and I am detecting that 8MB of memory are currently created and still lives in my app. Clearly there is something wrong. So I drilled down and here's the image that I can show you: Any…
adit
  • 32,574
  • 72
  • 229
  • 373
0
votes
1 answer

GCC, GDC, and LLVM and LDC compilers’ prefetch builtins - exact meaning of the locality parameter

In the description of the x86 prefetch instructions, I found the following explanation for the instructions’ hint number "Fetches the line of data from memory that contains the byte specified with the source operand to a location in the cache…
Cecil Ward
  • 597
  • 2
  • 13
0
votes
0 answers

In GCC inline asm, how do I allocate and reserve a register? (x86, GDC)

In GDC x86 in-line asm, I want to reserve a register that is going to be written to so that it does not clash with any other registers written to. (1) How should I do this? The code below works, so it appears, but I get the unpleasant feeling that…
Cecil Ward
  • 597
  • 2
  • 13