www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Internal error: ..\ztc\cgcs.c 353

reply bobef <bobef_member pathlink.com> writes:
I was experimenting with arrays.. this is what i get on compiling

Internal error: ..\ztc\cgcs.c 353

this code

import std.stdio;

void main()
{
char[] s="bobef";
delete s[1..3];
writef(s~"\n");
}
Jan 28 2005
next sibling parent reply pragma <pragma_member pathlink.com> writes:
In article <ctel5g$109l$1 digitaldaemon.com>, bobef says...
I was experimenting with arrays.. this is what i get on compiling

Internal error: ..\ztc\cgcs.c 353

this code

import std.stdio;

void main()
{
char[] s="bobef";
delete s[1..3];
writef(s~"\n");
}

No offense intended to Walter, but that has got to be some kind of record for the fewest number of bytes needed to kill the compiler. (well at least in the past two years anyway) Nice work! - EricAnderton at yahoo
Jan 28 2005
next sibling parent zwang <nehzgnaw gmail.com> writes:
pragma wrote:
 In article <ctel5g$109l$1 digitaldaemon.com>, bobef says...
 
I was experimenting with arrays.. this is what i get on compiling

Internal error: ..\ztc\cgcs.c 353

this code

import std.stdio;

void main()
{
char[] s="bobef";
delete s[1..3];
writef(s~"\n");
}

No offense intended to Walter, but that has got to be some kind of record for the fewest number of bytes needed to kill the compiler. (well at least in the past two years anyway) Nice work! - EricAnderton at yahoo

Here goes a shorter dmd killer :) class C{this(){super();}}
Jan 29 2005
prev sibling parent =?ISO-8859-1?Q?Thomas_K=FChne?= <thomas-dloop kuehne.THISISSPAM.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

zwang wrote:
| pragma wrote:
|
|> In article <ctel5g$109l$1 digitaldaemon.com>, bobef says...
|>
|>> I was experimenting with arrays.. this is what i get on compiling
|>>
|>> Internal error: ..\ztc\cgcs.c 353

- -> nntp://news.digitalmars.com/digitalmars.D.bugs

[snip]

| Here's a one-liner version :)
| void main(char[][]a){delete a[0..0];}

Zwang, I've added your ultra short version to DStress
http://dstress.kuehne.cn/nocompile/bug_cgcs_353_B.d

Thomas



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFB+0133w+/yD4P9tIRAq6dAKCsC2JCyosgFI4wVLjyb9CKUuG2cwCgvqtf
lQjWthFX4cA2LYKvya7Re3M=
=gQKd
-----END PGP SIGNATURE-----
Jan 29 2005
prev sibling parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
bobef wrote:

 I was experimenting with arrays.. this is what i get on compiling
 
 Internal error: ..\ztc\cgcs.c 353

No compiler errors with GDC, then again the code is invalid :
 this code
 
 import std.stdio;
 
 void main()
 {
 char[] s="bobef";
 delete s[1..3];
 writef(s~"\n");
 }

Wonder why are you trying to "delete" a char[] ? Removing entries with delete only works with AA. import std.stdio; void main() { char[] s="bobef"; s = s[0..1] ~ s[3..s.length]; writefln(s); } Should output what I think you meant ? There is no slice delete syntax (yet) --anders
Jan 29 2005