bearophile wrote:
kai:
Any ideas? Am I somehow not hitting a vital compiler optimization?
DMD compiler doesn't perform many optimizations, especially on floating point
computations.
More precisely:
In terms of optimizations performed, DMD isn't too far behind gcc. But
it performs almost
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jérôme M. Berger wrote:
That depends. In C/C++, the default value for any global variable
is to have all bits set to 0 whatever that means for the actual data
type.
No it's not, it's always uninitialized.
Visual studio will initialise
div0 wrote:
Jérôme M. Berger wrote:
That depends. In C/C++, the default value for any global variable
is to have all bits set to 0 whatever that means for the actual data
type.
No it's not, it's always uninitialized.
According to the C89 standard and onwards it *must* be
maybe it could be even integrated in the dmd archive, just like the
windbg currently is...
Hello everyone,
I'm trying to create a function which awaits a C function as parameter... like
this:
void myfunction(void C function(uint, void*)) {
}
But... when I try to compile it, I get the follwing error:
found 'function' when expecting ')'.
Does anyone knwo what's wrong with my
useo6 Wrote:
Hello everyone,
I'm trying to create a function which awaits a C function as parameter...
like this:
void myfunction(void C function(uint, void*)) {
}
But... when I try to compile it, I get the follwing error:
found 'function' when expecting ')'.
Does anyone knwo
useo6 us...@start.bg wrote:
Hello everyone,
I'm trying to create a function which awaits a C function as
parameter... like this:
void myfunction(void C function(uint, void*)) {
}
But... when I try to compile it, I get the follwing error:
found 'function' when expecting ')'.
Does
Simen kjaeraas Wrote:
useo6 us...@start.bg wrote:
Hello everyone,
I'm trying to create a function which awaits a C function as
parameter... like this:
void myfunction(void C function(uint, void*)) {
}
But... when I try to compile it, I get the follwing error:
found
strtr wrote:
== Quote from bearophile (bearophileh...@lycos.com)'s article
But the bigger problem in your code is that you are performing operations on
NaNs (that's the default initalization of FP values in D), and operations on
NaNs
are usually quite slower.
I didn't know that. Is it the
Should I report these bugs?
(and how should I call this first one?)
module main;
//const S S1 = S(); // uncomment this to compile
struct S
{
float value;
static S opCall()
{
S s;
return s;
}
const S S2 = S();
}
void main(){}
--
main.d(4): Error: struct main.S no size yet for
strtr Wrote:
Should I report these bugs?
Yes, add them to bugzilla. The third one is especially cute.
(and how should I call this first one?)
Something simple like:
Forward reference error with struct opCall and const
Let's see how much time it takes to reach 5000 bugs :-)
Bye,
bearophile
== Quote from Don (nos...@nospam.com)'s article
strtr wrote:
== Quote from bearophile (bearophileh...@lycos.com)'s article
But the bigger problem in your code is that you are performing operations
on
NaNs (that's the default initalization of FP values in D), and operations
on NaNs
== Quote from bearophile (bearophileh...@lycos.com)'s article
strtr Wrote:
Should I report these bugs?
Yes, add them to bugzilla. The third one is especially cute.
Was kind of expecting you to correct me or point me to the corresponding
bugzillas ;D
(and how should I call this first one?)
Steven Schveighoffer wrote:
double [] foo = new double [cast(int)1e6];
foo[] = 0;
I've discovered that this is the equivalent of the last line above:
foo = 0;
I don't see it in the spec. Is that an old or an unintended feature?
Ali
Ali Çehreli acehr...@yahoo.com wrote:
Steven Schveighoffer wrote:
double [] foo = new double [cast(int)1e6];
foo[] = 0;
I've discovered that this is the equivalent of the last line above:
foo = 0;
I don't see it in the spec. Is that an old or an unintended feature?
Looks
Simen kjaeraas wrote:
Ali Çehreli acehr...@yahoo.com wrote:
Steven Schveighoffer wrote:
double [] foo = new double [cast(int)1e6];
foo[] = 0;
I've discovered that this is the equivalent of the last line above:
foo = 0;
I don't see it in the spec. Is that an old or an
Ali Ãehreli:
I don't see it in the spec. Is that an old or an unintended feature?
It's a compiler bug, don't use that bracket less syntax in your programs.
Don is fighting to fix such problems (and I have written several posts and bug
reports on that stuff).
Bye,
bearophile
17 matches
Mail list logo