[Issue 928] nested struct definition in unittest section of a templated class, hangs DMD

2009-10-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=928


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2009-10-13 
13:49:58 PDT ---
Fixed dmd 1.049

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 928] nested struct definition in unittest section of a templated class, hangs DMD

2009-08-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=928


Don clugd...@yahoo.com.au changed:

   What|Removed |Added

   Keywords||patch
 CC||clugd...@yahoo.com.au




--- Comment #2 from Don clugd...@yahoo.com.au  2009-08-12 11:29:31 PDT ---
Straightforward patch. This is just a copy-and-paste of the code for the other
recursive template expansion checks.
Patch against DMD 2.031.

Index: template.c
===
--- template.c(revision 194)
+++ template.c(working copy)
@@ -3592,7 +3592,27 @@

 if (sc-func || dosemantic3)
 {
+#if WINDOWS_SEH
+  __try
+  {
+#endif
+if (++nest  500)
+{
+global.gag = 0;// ensure error message gets printed
+error(recursive expansion);
+fatal();
+}
 semantic3(sc2);
+--nest;
+#if WINDOWS_SEH
+  }
+  __except (__ehfilter(GetExceptionInformation()))
+  {
+global.gag = 0;// ensure error message gets printed
+error(recursive expansion);
+fatal();
+  }
+#endif
 }

   Laftersemantic:

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---