Before filing a possible bug report I prefer to ask here, because my ideas are
often wrong.
This is a small D2 program:
nothrow void foo() {
// auto a = new int[5]; // not allowed here
int[int] aa;
for (int i; i < 100_000_000; i++)
aa[i] = i;
}
void main() {
foo();
}
Insi
bearophile Wrote:
> Before filing a possible bug report I prefer to ask here, because my ideas
> are often wrong.
> This is a small D2 program:
>
> nothrow void foo() {
> // auto a = new int[5]; // not allowed here
> int[int] aa;
> for (int i; i < 100_000_000; i++)
> aa[i] =
Daniel Murphy:
> Allocations are allowed inside nothrow functions. If I remember correctly,
> the reasons are that disallowing them would limit usefulness, and that
> OutOfMemoryError is not generally recoverable.<
OK. Then can you tell me why the following program produces:
test2.d(1): Error:
bearophile wrote:
Daniel Murphy:
Allocations are allowed inside nothrow functions. If I remember correctly, the
reasons are that disallowing them would limit usefulness, and that
OutOfMemoryError is not generally recoverable.<
OK. Then can you tell me why the following program produces:
tes
Don:
> That's clearly a bug.
Thank you for your answer Don.
http://d.puremagic.com/issues/show_bug.cgi?id=3864
(In future I will even start trying to fix them.)
Bye,
bearophile