2 Replies Latest reply: Jun 17, 2014 2:35 AM by Steve.Clamage-Oracle RSS

    Multiple Class Declarations in Namespace results in Solaris Studio C++ bug when 12.3 is used

    user522630

      Hi,

       

      When attempting to compile js/src/vm/ArgumentsObject.cpp using Solaris Studio 12.3, the following list of errors appears (might be similar to the issue described in https://community.oracle.com/message/11152085#11152085):

       

      "./../../dist/include/js/Value.h", line 1210: Error: Could not find a match for JS::Value::Value() needed in JS::NullValue().

      "./../../dist/include/js/Value.h", line 1218: Error: Could not find a match for JS::Value::Value() needed in JS::UndefinedValue().

      "./../../dist/include/js/Value.h", line 1226: Error: Could not find a match for JS::Value::Value() needed in JS::Int32Value(int).

      "./../../dist/include/js/Value.h", line 1234: Error: Could not find a match for JS::Value::Value() needed in JS::DoubleValue(double).

      "./../../dist/include/js/Value.h", line 1242: Error: Could not find a match for JS::Value::Value() needed in JS::StringValue(JSString*).

      "./../../dist/include/js/Value.h", line 1250: Error: Could not find a match for JS::Value::Value() needed in JS::BooleanValue(bool).

      "./../../dist/include/js/Value.h", line 1258: Error: Could not find a match for JS::Value::Value() needed in JS::ObjectValue(JSObject&).

      "./../../dist/include/js/Value.h", line 1266: Error: Could not find a match for JS::Value::Value() needed in JS::ObjectValueCrashOnTouch().

      "./../../dist/include/js/Value.h", line 1274: Error: Could not find a match for JS::Value::Value() needed in JS::MagicValue(JSWhyMagic).

      "./../../dist/include/js/Value.h", line 1282: Error: Could not find a match for JS::Value::Value() needed in JS::NumberValue(float).

      "./../../dist/include/js/Value.h", line 1290: Error: Could not find a match for JS::Value::Value() needed in JS::NumberValue(double).

      "./../../dist/include/js/Value.h", line 1328: Error: Could not find a match for JS::Value::Value() needed in JS::NumberValue(unsigned).

      "./../../dist/include/js/Value.h", line 1380: Error: Could not find a match for JS::Value::Value() needed in JS::ObjectOrNullValue(JSObject*).

      "./../../dist/include/js/Value.h", line 1388: Error: Could not find a match for JS::Value::Value() needed in JS::PrivateValue(void*).

      "./../../dist/include/js/Value.h", line 1396: Error: Could not find a match for JS::Value::Value() needed in JS::PrivateUint32Value(unsigned).

      "./../../dist/include/js/Value.h", line 1632: Error: Could not find a match for JS::Value::Value() needed in IMPL_TO_JSVAL(jsval_layout).

      "./../../dist/include/js/Value.h", line 1633: Error: data is not accessible from IMPL_TO_JSVAL(jsval_layout).

      "/export/home/cpe479/mozilla-esr24/js/src/jsprvtd.h", line 206: Error: Could not find JS::Value::Value() to initialize value.

      "/export/home/cpe479/mozilla-esr24/js/src/vm/ObjectImpl.h", line 1571: Error: Could not find a match for JS::Value::Value() needed in js::ObjectValue(js::ObjectImpl&).

      "/export/home/cpe479/mozilla-esr24/js/src/vm/Shape.h", line 476: Error: SlotInfo is not defined.

      "/export/home/cpe479/mozilla-esr24/js/src/vm/Shape.h", line 500: Error: SlotInfo is not defined.

      "./../../dist/include/js/HashTable.h", line 619: Error: storage class extern not allowed for a member.

      "./../../dist/include/js/HashTable.h", line 893:     Where: While specializing "js::detail::HashTableEntry".

      "./../../dist/include/js/HashTable.h", line 893:     Where: Specialized in js::detail::HashTable::SetOps, js::SystemAllocPolicy>.

      "./../../dist/include/js/HashTable.h", line 299:     Where: Specialized in js::HashSet.

      "/export/home/cpe479/mozilla-esr24/js/src/vm/Shape.h", line 555:     Where: Specialized in non-template code.

      "/export/home/cpe479/mozilla-esr24/js/src/vm/Shape.h", line 705: Error: SLOT_MASK is not defined.

      "/export/home/cpe479/mozilla-esr24/js/src/vm/Shape.h", line 720: Error: SLOT_MASK is not a member of js::Shape.

      "/export/home/cpe479/mozilla-esr24/js/src/vm/Shape.h", line 725: Error: FIXED_SLOTS_SHIFT is not defined.

       

      In the file Value.h, there were multiple declarations of class Value which looks like this:

       

      namespace JS { class Value; }

      .

      .

      .

      namespace JS

      {

        class Value

        {

           public:

             void setNull() { . . . }

           .

           .

           .

        }

      }

       

      There are also some other errors listed as well, but unfortunately I am unable to re-produce the other errors in codes, though this file compiles fine on gcc-4.8 and Visual Studio.

       

      So far, has the 12.4 Beta addressed this issue, or it is still work in progress? Meanwhile, what are the workarounds available for 12.3 on "Could not find" and "Could not find a match" errors? Kindly advise. Thanks.

       

      Regards,

      Brian