Closed Bug 479699 Opened 17 years ago Closed 17 years ago

Sun Studio build bustage in LIR.h

Categories

(Core :: JavaScript Engine, defect)

x86
SunOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 474757

People

(Reporter: jag+mozilla, Unassigned)

Details

Attachments

(1 file)

Building deps for /export/home/x86slave/xslave/mozilla-1.9.1-solaris-x86/build/js/src/jsapi.cpp using Sun Studio CC /bin/CC -o jsapi.o -c -xldscope=hidden -DAVMPLUS_IA32 -DAVMPLUS_UNIX -DFEATURE_NANOJIT -DJS_TRACER -DOSTYPE=\"SunOS5\" -DOSARCH=SunOS -DEXPORT_JS_API -DJS_USE_SAFE_ARENA -I/export/home/x86slave/xslave/mozilla-1.9.1-solaris-x86/build/js/src -I. -I./../../dist/include -I./../../dist/include/js -I/export/home/x86slave/xslave/mozilla-1.9.1-solaris-x86/build/obj-firefox/dist/include/nspr -I/sdk/include -I/export/home/x86slave/xslave/mozilla-1.9.1-solaris-x86/build/js/src -KPIC -xlibmieee -xbuiltin=%all -features=tmplife -norunpath -mt -DNDEBUG -DTRIMMED -xO4 -DMOZILLA_CLIENT -D_MOZILLA_CONFIG_H_ -DSOLARIS=1 -DNSCAP_DISABLE_DEBUG_PTR_TYPES=1 -DD_INO=d_ino -DSTDC_HEADERS=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_SIGINFO_T=1 -DJS_HAVE_STDINT_H=1 -DJS_BYTES_PER_WORD=4 -DJS_BITS_PER_WORD_LOG2=5 -DJS_ALIGN_OF_POINTER=4 -DJS_BYTES_PER_DOUBLE=8 -DHAVE_INT16_T=1 -DHAVE_INT32_T=1 -DHAVE_INT64_T=1 -DHAVE_UINT=1 -DHAVE_UINT_T=1 -DHAVE_UINT16_T=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_BYTEORDER_H=1 -DHAVE_GETOPT_H=1 -DHAVE_MEMORY_H=1 -DHAVE_UNISTD_H=1 -DHAVE_NL_TYPES_H=1 -DHAVE_MALLOC_H=1 -D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-DCPP_THROW_NEW=throw\(\) -DMOZ_DLL_SUFFIX=\".so\" -DXP_UNIX=1 -DUNIX_ASYNC_DNS=1 -DJS_THREADSAFE=1 /export/home/x86slave/xslave/mozilla-1.9.1-solaris-x86/build/js/src/jsapi.cpp "/export/home/x86slave/xslave/mozilla-1.9.1-solaris-x86/build/js/src/nanojit/avmplus.h", line 100: Warning: The variable x has not yet been assigned a value. NEXT ERROR "/export/home/x86slave/xslave/mozilla-1.9.1-solaris-x86/build/js/src/nanojit/LIR.h", line 190: Error: "," expected instead of "disp". "/export/home/x86slave/xslave/mozilla-1.9.1-solaris-x86/build/js/src/nanojit/LIR.h", line 191: Error: Use ";" to terminate declarations. "/export/home/x86slave/xslave/mozilla-1.9.1-solaris-x86/build/js/src/nanojit/LIR.h", line 208: Error: "," expected instead of "imm24". "/export/home/x86slave/xslave/mozilla-1.9.1-solaris-x86/build/js/src/nanojit/LIR.h", line 216: Error: "," expected instead of "imm16". In bug 468484 a change was made from using |signed int| to |signed int32_t| for __SUNPRO_C and __SUNPRO_CC. This won't compile, either due to int32_t being a typedef (and signed must be followed by a type name, not a typedef), or due to int32_t being something like |#define int32_t signed int|, resulting in |signed signed int|. I guess it's the former, though. I'm thinking something like this as a fix: // Sun Studio requires explicitly declaring signed int bit-field #if defined(__SUNPRO_C) || defined(__SUNPRO_CC) typedef signed int _signed_int32_t #else typedef int32_t _signed_int32_t #endif struct sti_type { LOpcode code:8; _signed_int32_t disp:8; uint32_t oprnd_1:8; uint32_t oprnd_2:8; };
What's up with all the tabs in that file, anyway?
The indentation is really messy. We will fix it once all the merging with Adobe's code base is done. _signed_int32_t seems a really weird naming. How about bitfield_t. CCing Ed. Please get review from him. I am ok with whatever Ed likes.
int32_t is by definition signed in C99; does the nanojit definition differ? There shouldn't be a need to mark int32_t as signed at all.
This is already fixed in mozilla-central. It just did not get the approval for 1.9.1.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Jeff, on my box, int32_t is a typedef of "int", it is signed. But we have to explicitly say "signed" for signed bitfield, otherwise it is implementation-defined. It is C90 6.5.2.1, C99 6.7.2.1.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: