114 JS_STATIC_ASSERT(sizeof(JSValueType) == 1); So the compiler did not make enum JSValueType as a char.
Perhaps you should try gcc 4.3. Ginn On Feb 7, 2011, at 6:02 AM, alan pae wrote: > And having an issue. > > Using gcc 3.4.3 which was installed by using pkg install developer/gcc-3 > > The error is: > > g++ -o jsanalyze.o -c -DOSTYPE=\"SunOS5\" -DOSARCH=SunOS -DEXPORT_JS_API > -D__STDC_LIMIT_MACROS -DJS_HAS_CTYPES -DDLL_PREFIX=\"lib\" > -DDLL_SUFFIX=\".so\" -Ictypes/libffi/include -I. > -I/build/mozilla-central/js/src -I. -I./../../dist/include > -I./../../dist/include/nsprpub > -I/build/mozilla-central/obj-debug/dist/include/nspr > -I/build/mozilla-central/js/src -I/build/mozilla-central/js/src/assembler > -I/build/mozilla-central/js/src/yarr -fPIC -I/opt/gcc/include -O2 -fno-rtti > -fno-exceptions -pedantic -Wno-long-long -I/opt/gcc/include -O2 > -fno-strict-aliasing -pthreads -pipe -DDEBUG -D_DEBUG -DTRACING -g > -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1 -I/opt/gcc/include > -O2 -DMOZILLA_CLIENT -include ./js-confdefs.h -MD -MF .deps/jsanalyze.pp > /build/mozilla-central/js/src/jsanalyze.cpp > In file included from /build/mozilla-central/js/src/jspubtd.h:47, > from /build/mozilla-central/js/src/jsprvtd.h:57, > from /build/mozilla-central/js/src/jscntxt.h:55, > from /build/mozilla-central/js/src/jsanalyze.h:45, > from /build/mozilla-central/js/src/jsanalyze.cpp:40: > /build/mozilla-central/js/src/jsval.h:114: error: size of array `arg' is > negative > In file included from /build/mozilla-central/js/src/jsobj.h:56, > from /build/mozilla-central/js/src/jsstr.h:56, > from /build/mozilla-central/js/src/jsatom.h:52, > from /build/mozilla-central/js/src/jscntxt.h:59, > from /build/mozilla-central/js/src/jsanalyze.h:45, > from /build/mozilla-central/js/src/jsanalyze.cpp:40: > /build/mozilla-central/js/src/jsvalue.h: In member function `void > js::Value::staticAssertions()': > /build/mozilla-central/js/src/jsvalue.h:737: error: size of array `arg' is > negative > /build/mozilla-central/js/src/jsvalue.h: At global scope: > /build/mozilla-central/js/src/jsvalue.h:1067: warning: invalid access to > non-static data member `js::PropertyDescriptor::obj' of NULL object > /build/mozilla-central/js/src/jsvalue.h:1067: warning: (perhaps the > `offsetof' macro was used incorrectly) > /build/mozilla-central/js/src/jsvalue.h:1068: warning: invalid access to > non-static data member `js::PropertyDescriptor::attrs' of NULL object > /build/mozilla-central/js/src/jsvalue.h:1068: warning: (perhaps the > `offsetof' macro was used incorrectly) > /build/mozilla-central/js/src/jsvalue.h:1069: warning: invalid access to > non-static data member `js::PropertyDescriptor::getter' of NULL object > /build/mozilla-central/js/src/jsvalue.h:1069: warning: (perhaps the > `offsetof' macro was used incorrectly) > /build/mozilla-central/js/src/jsvalue.h:1070: warning: invalid access to > non-static data member `js::PropertyDescriptor::setter' of NULL object > /build/mozilla-central/js/src/jsvalue.h:1070: warning: (perhaps the > `offsetof' macro was used incorrectly) > /build/mozilla-central/js/src/jsvalue.h:1071: warning: invalid access to > non-static data member `js::PropertyDescriptor::value' of NULL object > /build/mozilla-central/js/src/jsvalue.h:1071: warning: (perhaps the > `offsetof' macro was used incorrectly) > /build/mozilla-central/js/src/jsvalue.h:1072: warning: invalid access to > non-static data member `js::PropertyDescriptor::shortid' of NULL object > /build/mozilla-central/js/src/jsvalue.h:1072: warning: (perhaps the > `offsetof' macro was used incorrectly) > In file included from /build/mozilla-central/js/src/jsatom.h:52, > from /build/mozilla-central/js/src/jscntxt.h:59, > from /build/mozilla-central/js/src/jsanalyze.h:45, > from /build/mozilla-central/js/src/jsanalyze.cpp:40: > /build/mozilla-central/js/src/jsstr.h:427: warning: converting of negative > value `-0x00000000000000001' to `uint8' > /build/mozilla-central/js/src/jsstr.h: In static member function `static void > JSShortString::staticAsserts()': > /build/mozilla-central/js/src/jsstr.h:570: warning: invalid access to > non-static data member `JSShortString::mDummy' of NULL object > /build/mozilla-central/js/src/jsstr.h:570: warning: (perhaps the `offsetof' > macro was used incorrectly) > In file included from /build/mozilla-central/js/src/jscntxt.h:62, > from /build/mozilla-central/js/src/jsanalyze.h:45, > from /build/mozilla-central/js/src/jsanalyze.cpp:40: > /build/mozilla-central/js/src/jsfun.h: In static member function `static > uintN JSFunction::offsetOfNativeOrScript()': > /build/mozilla-central/js/src/jsfun.h:230: warning: invalid access to > non-static data member `JSFunction::u' of NULL object > /build/mozilla-central/js/src/jsfun.h:230: warning: (perhaps the `offsetof' > macro was used incorrectly) > In file included from /build/mozilla-central/js/src/jscntxt.h:66, > from /build/mozilla-central/js/src/jsanalyze.h:45, > from /build/mozilla-central/js/src/jsanalyze.cpp:40: > /build/mozilla-central/js/src/jsinterp.h: In static member function `static > size_t JSStackFrame::offsetOfFlags()': > /build/mozilla-central/js/src/jsinterp.h:723: warning: invalid access to > non-static data member `JSStackFrame::flags_' of NULL object > /build/mozilla-central/js/src/jsinterp.h:723: warning: (perhaps the > `offsetof' macro was used incorrectly) > /build/mozilla-central/js/src/jsinterp.h: In static member function `static > size_t JSStackFrame::offsetOfExec()': > /build/mozilla-central/js/src/jsinterp.h:727: warning: invalid access to > non-static data member `JSStackFrame::exec' of NULL object > /build/mozilla-central/js/src/jsinterp.h:727: warning: (perhaps the > `offsetof' macro was used incorrectly) > /build/mozilla-central/js/src/jsinterp.h: In static member function `static > size_t JSStackFrame::offsetOfScopeChain()': > /build/mozilla-central/js/src/jsinterp.h:735: warning: invalid access to > non-static data member `JSStackFrame::scopeChain_' of NULL object > /build/mozilla-central/js/src/jsinterp.h:735: warning: (perhaps the > `offsetof' macro was used incorrectly) > /build/mozilla-central/js/src/jsinterp.h: In static member function `static > size_t JSStackFrame::offsetOfPrev()': > /build/mozilla-central/js/src/jsinterp.h:744: warning: invalid access to > non-static data member `JSStackFrame::prev_' of NULL object > /build/mozilla-central/js/src/jsinterp.h:744: warning: (perhaps the > `offsetof' macro was used incorrectly) > /build/mozilla-central/js/src/jsinterp.h: In static member function `static > size_t JSStackFrame::offsetOfReturnValue()': > /build/mozilla-central/js/src/jsinterp.h:748: warning: invalid access to > non-static data member `JSStackFrame::rval_' of NULL object > /build/mozilla-central/js/src/jsinterp.h:748: warning: (perhaps the > `offsetof' macro was used incorrectly) > /build/mozilla-central/js/src/jsinterp.h: In static member function `static > ptrdiff_t JSStackFrame::offsetOfncode()': > /build/mozilla-central/js/src/jsinterp.h:752: warning: invalid access to > non-static data member `JSStackFrame::ncode_' of NULL object > /build/mozilla-central/js/src/jsinterp.h:752: warning: (perhaps the > `offsetof' macro was used incorrectly) > /build/mozilla-central/js/src/jsinterp.h: In member function `void > JSStackFrame::staticAsserts()': > /build/mozilla-central/js/src/jsinterp.h:778: warning: invalid access to > non-static data member `JSStackFrame::rval_' of NULL object > /build/mozilla-central/js/src/jsinterp.h:778: warning: (perhaps the > `offsetof' macro was used incorrectly) > In file included from /build/mozilla-central/js/src/jsanalyze.h:45, > from /build/mozilla-central/js/src/jsanalyze.cpp:40: > /build/mozilla-central/js/src/jscntxt.h: In function `JSAtom** > FrameAtomBase(JSContext*, JSStackFrame*)': > /build/mozilla-central/js/src/jscntxt.h:2183: warning: invalid access to > non-static data member `JSAtomState::emptyAtom' of NULL object > /build/mozilla-central/js/src/jscntxt.h:2183: warning: (perhaps the > `offsetof' macro was used incorrectly) > /build/mozilla-central/js/src/jscntxt.h: In function `JSContext* > js_ContextFromLinkField(JSCList*)': > /build/mozilla-central/js/src/jscntxt.h:2966: warning: invalid access to > non-static data member `JSContext::link' of NULL object > /build/mozilla-central/js/src/jscntxt.h:2966: warning: (perhaps the > `offsetof' macro was used incorrectly) > gmake[4]: *** [jsanalyze.o] Error 1 > gmake[4]: Leaving directory `/build/mozilla-central/obj-debug/js/src' > > Any ideas? > > thanks in advance, > alan > -- > This message posted from opensolaris.org > _______________________________________________ > desktop-discuss mailing list > desktop-discuss@opensolaris.org
_______________________________________________ desktop-discuss mailing list desktop-discuss@opensolaris.org