With dmd trunk trying to compile vibed after fixing several array
declarations from C style to D style I'm getting this error that
I do not understand:
---
Building vibe-d 0.7.21-rc.2 configuration "libevent", build type
debug.
Running dmd...
/home/mingo/dev/d/src/install/bin/../../../
On Monday, 28 July 2014 at 08:16:37 UTC, bearophile wrote:
Domingo Alvarez Duarte:
Based on a question about manually allocated structures with
payload I found that a solution proposed seems to work when
compiled with dmd but segfaults when compiled with gdc.
...
int size;
Hello !
Based on a question about manually allocated structures with
payload I found that a solution proposed seems to work when
compiled with dmd but segfaults when compiled with gdc.
So my question is: Is this a bug on dmd, gdc or a bad idiom ?
code to see the problem
import std.stdio
Hello again !
Anyone knows how to compile with gdc for different versions I
could not find how gdc implements it if it does ?
The proposed usage of "@property char[] buf()" although seems to
work when compiled with dmd, segfaults when compiled with gdc:
Code to test
import std.stdio;
i
On Sunday, 27 July 2014 at 12:49:01 UTC, Adam D. Ruppe wrote:
I would do it something like this:
struct test {
size_t size;
@property char[] buf() {
return (_buf.ptr)[0 .. size];
}
private char[0] _buf;
}
The buf property returns a slice that us
Hello !
I have the code bellow that I want to manually allocate to use in
runtime code, because I declared the payload "buf[1]" the
compiler complains about index out of bounds then I managed to do
this "*(&tmp.buf + tmp.used++) = c;" instead of
"tmp.buf[tmp.used++] = c;" as is done usually i
It seems that this only works for zip files with less than 65000
entries, zip64 that allow read more than that do not seem to be
implemented.
It seems that ti only works for zip files with less than 65000
entries, zip64 that allow read more than that do seem to be
implemented.
It seems to be a bug somewhere because tired of getting errors
with dmd 2.065 I switched to dmd 2.066 trunk and the error
vanished.
Thanks for all you answers, I think I found the problem.
The constant __FUNCTION__ was not a compiler reserved word at the
time MiniD/Croc was created and it was introduced later on dmd2,
it was clashing with it.
I renamed it to __MFUNCTUION__ and it compiles now, I'm getting
more errors of
Thank you so much !
That did exactly what I was looking for, but now why I'm getting
that error message ?
Any help is welcome ! Cheers !
The generated code seems to fine:
debug assert(t.stackIndex > t.stackBase, (printStack(t),
printCallStack(t), "fail."));
static if(!is(typeof(__FUNCT
Hello !
I'm trying to make MiniD/Croc work with dmd2 and I'm having a
problem with this code and I want to know how to dump the
generated code to understand what's happening.
How that can be done ?
debugmixin.d-mixin-15(15): Error: no identifier for declarator
char[]
-debugmixin.d
///
12 matches
Mail list logo