Re: Static Array with negative index results in a strange error-message

2018-04-23 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/23/18 11:09 AM, Dgame wrote: It's really fun playing around: char[int.max - 1] c; results in Internal error: dmd/backend/cgcod.c 634 with DMD 2.079. Guess I or somebody else should report this. Yes, this is an ICE (Internal compiler error). Those should ALWAYS be reported. -Steve

Re: Static Array with negative index results in a strange error-message

2018-04-23 Thread Dgame via Digitalmars-d-learn
It's really fun playing around: char[int.max - 1] c; results in Internal error: dmd/backend/cgcod.c 634 with DMD 2.079. Guess I or somebody else should report this.

Re: Static Array with negative index results in a strange error-message

2018-04-23 Thread Dgame via Digitalmars-d-learn
On Monday, 23 April 2018 at 13:48:07 UTC, Steven Schveighoffer wrote: On 4/23/18 9:32 AM, Dgame wrote: char[-1] c; results in Error: char[18446744073709551615LU] size 1 * 18446744073709551615 exceeds 0x7fff size limit for static array Should we fix that? A negative index should be IMO

Re: Static Array with negative index results in a strange error-message

2018-04-23 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/23/18 9:32 AM, Dgame wrote: char[-1] c; results in Error: char[18446744073709551615LU] size 1 * 18446744073709551615 exceeds 0x7fff size limit for static array Should we fix that? A negative index should be IMO detected sooner/with a cleaner error message. Hm.. at least it's dete

Static Array with negative index results in a strange error-message

2018-04-23 Thread Dgame via Digitalmars-d-learn
char[-1] c; results in Error: char[18446744073709551615LU] size 1 * 18446744073709551615 exceeds 0x7fff size limit for static array Should we fix that? A negative index should be IMO detected sooner/with a cleaner error message.