[Issue 928] nested struct definition in unittest section of a templated class, hangs DMD
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Aug 12 11:29:32 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=928
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
CC| |clugdbug at yahoo.com.au
--- Comment #2 from Don <clugdbug at 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: -------
More information about the Digitalmars-d-bugs
mailing list