         if (!cppClassMap.hasOwnProperty(s.cls))
             fail("Bad field annotation - unknown class: " + s.cls + " in " + s);
         var c = cppClassMap[s.cls];
+        var fieldname = s.name;
+        if (s.if_) fieldname += "!if!" + s.if_;
+        if (s.ifdef) fieldname += "!ifdef!" + s.ifdef;
+        if (s.ifndef) fieldname += "!ifndef!" + s.ifndef;
         if (isVariableLength(s)) {
             // FIXME: It would be good to loosen the following restriction up; it 
             // would be sufficient to decree that only one of the arrays can be 

// The cls attribute is implicitly present in the C++ source code and
// is inserted at the beginning of the attribute array by the code
// that constructs GCField instances.
class GCField 
{
    function GCField(tag, attr) {

            // were to have a trailing array as well then we'd run into this restriction.
            if (c.variable_length_field != null)
                fail("Arbitrary restriction: More than one variable length field on " + c);
            if (c.fieldMap.hasOwnProperty(fieldname))
                fail("Duplicate field name: " + s.name + "; canonically " + fieldname);
            c.variable_length_field = s;
        }
        else {
            if (c.fieldMap.hasOwnProperty(fieldname) || (c.variable_length_field != null && c.variable_length_field.name == fieldname))
                fail("Duplicate field name: " + s.name + "; canonically " + fieldname);
            c.fieldMap[fieldname] = s;
            c.fieldList.push(s);
        }
    }
