[Issue 5865] __dollar cannot be read at compile time

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 20 02:10:24 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5865


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch, rejects-valid
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2011-04-20 02:06:21 PDT ---
PATCH dsymbol.c, line 1181.

        if (!*pvar)             // if not already initialized
        {   /* Create variable v and set it to the value of $,
             * which will be a constant.
             */
            VarDeclaration *v = new VarDeclaration(loc, Type::tsize_t,
Id::dollar, NULL);

            if (ce->op == TOKvar)
            {   // if ce is const, get its initializer
-                ce = fromConstInitializer(WANTvalue, ce);
+                ce = fromConstInitializer(WANTvalue | WANTexpand, ce);
            }

            if (ce->op == TOKstring)
            {   /* It is for a string literal, so the
                 * length will be a const.
                 */

-- 
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