digitalmars.D.bugs - Internal Error on void[] = void[]
- Lukas Pinkowski (23/23) Feb 26 2005 I use DMD 0.113 on Linux and the following snippet
- Jarrett Billingsley (4/5) Feb 26 2005 I'm not sure if it's valid to set or get the value of a void, but it
- Derek (6/33) Feb 26 2005 Well, ask yourself, are you copying bytes or copying voids (whatever the...
- Walter (1/1) Feb 27 2005 It isn't valid code, but it shouldn't crash the compiler.
- Thomas Kuehne (11/27) Mar 18 2005 -----BEGIN PGP SIGNED MESSAGE-----
I use DMD 0.113 on Linux and the following snippet
void Foo()
{
void[] bar;
void[] foo;
bar.length = 50;
foo.length = 50;
for(int i=0; i<50; i++)
{
foo[i] = bar[i];
}
}
gives me
Internal error: ../ztc/cod4.c 352
When you comment out
// foo[i] = bar[i]
It'll compile without errors. It gives me the same error, when casting to
void.
Now is this valid D? Or should I use ubyte[] or byte[] instead of void[]?
Greetings,
Lukas
Feb 26 2005
Now is this valid D? Or should I use ubyte[] or byte[] instead of void[]?I'm not sure if it's valid to set or get the value of a void, but it certainly shouldn't crash the compiler. You're probably better off using byte[] or ubyte[] instead, because honestly, what IS a void? ;)
Feb 26 2005
On Sat, 26 Feb 2005 17:57:52 +0100, Lukas Pinkowski wrote:
I use DMD 0.113 on Linux and the following snippet
void Foo()
{
void[] bar;
void[] foo;
bar.length = 50;
foo.length = 50;
for(int i=0; i<50; i++)
{
foo[i] = bar[i];
}
}
gives me
Internal error: ../ztc/cod4.c 352
When you comment out
// foo[i] = bar[i]
It'll compile without errors. It gives me the same error, when casting to
void.
Now is this valid D? Or should I use ubyte[] or byte[] instead of void[]?
Well, ask yourself, are you copying bytes or copying voids (whatever they
are)?
--
Derek
Melbourne, Australia
Feb 26 2005
It isn't valid code, but it shouldn't crash the compiler.
Feb 27 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Lukas Pinkowski schrieb am Sat, 26 Feb 2005 17:57:52 +0100:
I use DMD 0.113 on Linux and the following snippet
void Foo()
{
void[] bar;
void[] foo;
bar.length = 50;
foo.length = 50;
for(int i=0; i<50; i++)
{
foo[i] = bar[i];
}
}
gives me
Internal error: ../ztc/cod4.c 352
Added to DStress as
http://dstress.kuehne.cn/nocompile/bug_cod4_352_B.d
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFCOorU3w+/yD4P9tIRArTfAJ9vegfYIRnWHjCADEtQDOVdx+G7OwCeNHVx
wjDle57aEEqa+ThNlu0jSr0=
=5Mfu
-----END PGP SIGNATURE-----
Mar 18 2005









"Jarrett Billingsley" <kb3ctd2 yahoo.com> 