Don <> changed:

           What    |Removed                     |Added
           Keywords|                            |patch

--- Comment #1 from Don <> 2010-04-20 01:33:24 PDT ---
mtype.c, TypeStruct::dotExp line 6645. Should not be able to declare a variable
in terms of itself. This can be detected via the 'inuse' member of the
VarDeclaration. Something I don't really like about this is that it introduces
a long-range coupling into the code (the 'inuse' member is not well documented,
and it's also used for a completely different purpose in toDecoBuffer()).

Note that this patch also fixes bug 4093, and various other kinds of recursive
definitions (the existing cases which don't ICE just loop until the stack
overflow probe catches them, generating a "recursive template definition" error


    if (v && !v->isDataseg())

        Expression *ei = v->getConstInitializer();
        if (ei)
        {   e = ei->copy();     // need to copy it if it's a StringExp
+            if (v->inuse)
+            {
+                v->error("recursive declaration");
+                return new ErrorExp();
+            }
            e = e->semantic(sc);
            return e;

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to