[Issue 1696] New: for(;;) in CTFE segfaults compiler
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 28 00:00:04 PST 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1696
Summary: for(;;) in CTFE segfaults compiler
Product: D
Version: 1.023
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: clugdbug at yahoo.com.au
Seems it's not checking for an empty iteration clause.
Putting _anything_ in there, eg for(;;null) stops the segfault.
---------
int a()
{
bool b = false;
for (;;) {
if (b) return 0;
b = true;
}
}
const c = a();
--
More information about the Digitalmars-d-bugs
mailing list