Closed Bug 120357 Opened 24 years ago Closed 24 years ago

AIX's xlC5 compiler can't compile nsBufferHandle.h

Categories

(Core :: XPCOM, defect)

Other
AIX
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: jdunn, Assigned: jdunn)

Details

Attachments

(1 file, 1 obsolete file)

dbaron's checkin for bug 114438 broke the xlC 5.x compiler while building string/src/nsPromiseFlatString.cpp I get the following compiler error (very similar to 119326) "../../dist/include/string/nsBufferHandle.h", line 399.26: 1540-0216 (S) An expression of type "nsSharedBufferHandle<unsigned short> *" cannot be converted to "nsSharedBufferHandleWithDestroy<unsigned short> *".
Attached patch fix that uses a temp variable (obsolete) — Splinter Review
Seriously, do we really need to support this compiler? Can't we just use the old one until they get the bugs out?
Also, out of curiosity, does autoconf lead us to use new-style or old-style casts on this compiler? If new-style (i.e., static_cast, reinterpret_cast, const_cast), does the problem go away if we switch it to old-style?
I took dbaron's suggestion and inside of configure.in where we check for reinterpret_cast (HAVE_CPP_NEW_CASTS) and if this was aix and we aren't using gcc, then make sure we don't set this and instead fall back on the old c-style casts (nscore.h)
Attachment #65276 - Attachment is obsolete: true
Since this is now an configure.in issue, I am hoping to get a r= from cls so that I can check this in for 0.9.8
Status: NEW → ASSIGNED
QA Contact: scc → jdunn
Target Milestone: --- → mozilla0.9.8
Comment on attachment 65296 [details] [diff] [review] fix to turn off STATIC_CAST on AIX until compiler is fixed r=cls
Attachment #65296 - Flags: review+
Comment on attachment 65296 [details] [diff] [review] fix to turn off STATIC_CAST on AIX until compiler is fixed a=dbaron for 0.9.8
Attachment #65296 - Flags: approval+
I removed the keyword. It turns out that this change causes all kinds of other problems. In switching to NS_STATIC_CAST, we now cast via a (void *) and that causes problems for the IBM 5.x compiler. I have submitted the original problem to IBM for their compiler team to look at. It is now my opinion that until several issues get resolved with xlC 5.x compiler, we can't support it (there are others as well). This is preventing us from getting a 5.x tinderbox up so, I don't see how without a tinderbox we can continue to move forward with this compiler. I am going to fall back and stick with xlC 3.6.4.
Keywords: mozilla0.9.8+
Target Milestone: mozilla0.9.8 → Future
It is not just with the AIX compiler ! This also happens in a crusty, Linux frege 2.2.14-1mdklinus #1 Tue Jan 4 21:39:25 CET 2000 i686 unknown gcc version 2.95.2 19991024 (release) c++ -o nsHTMLTableElement.o -c -DOSTYPE=\"Linux2.2\" -DOSARCH=\"Linux\" -DOJI -D_IMPL_NS_HTML -I../../../../dist/include/xpcom -I../../../../dist/include/string -I../../../../dist/include/gfx -I../../../../dist/include/layout -I../../../../dist/include/widget -I../../../../dist/include/dom -I../../../../dist/include/js -I../../../../dist/include/locale -I../../../../dist/include/unicharutil -I../../../../dist/include/webshell -I../../../../dist/include/htmlparser -I../../../../dist/include/necko -I../../../../dist/include/view -I../../../../dist/include/pref -I../../../../dist/include/docshell -I../../../../dist/include/xpconnect -I../../../../dist/include/xuldoc -I../../../../dist/include/caps -I../../../../dist/include/editor -I../../../../dist/include/gfx2 -I../../../../dist/include/imglib2 -I../../../../dist/include/mimetype -I../../../../dist/include/exthandler -I../../../../dist/include/uconv -I../../../../dist/include/content -I../../../../dist/include -I/usr/local/src/mozilla/dist/include/nspr -I./../../style/src -I./../../../base/src -I./../../base/src -I/usr/X11R6/include -fPIC -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -pedantic -Wno-long-long -pthread -pipe -DDEBUG -D_DEBUG -DDEBUG_bancroft -DTRACING -g -I/usr/X11R6/include -DMOZILLA_CLIENT -include ../../../../config-defs.h -Wp,-MD,.deps/nsHTMLTableElement.pp nsHTMLTableElement.cpp In file included from ../../../../dist/include/content/nsRuleNode.h:49, from nsHTMLTableElement.cpp:55: ../../../../dist/include/content/nsCSSDeclaration.h: In method `void nsCSSDeclaration::AddRef()': ../../../../dist/include/content/nsCSSDeclaration.h:625: warning: comparison is always true due to limited range of data type ../../../../dist/include/string/nsBufferHandle.h: In method `nsresult nsHTMLTableElement::SetDir(const nsAString &)': ../../../../dist/include/string/nsBufferHandle.h:399: Internal compiler error. ../../../../dist/include/string/nsBufferHandle.h:399: Please submit a full bug report. ../../../../dist/include/string/nsBufferHandle.h:399: See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions. make[5]: *** [nsHTMLTableElement.o] Error 1 make[5]: Leaving directory `/usr/local/src/mozilla/content/html/content/src' make[4]: *** [libs] Error 2 make[4]: Leaving directory `/usr/local/src/mozilla/content/html/content' make[3]: *** [libs] Error 2 make[3]: Leaving directory `/usr/local/src/mozilla/content/html' make[2]: *** [libs] Error 2 make[2]: Leaving directory `/usr/local/src/mozilla/content' make[1]: *** [tier_9] Error 2 make[1]: Leaving directory `/usr/local/src/mozilla' make: *** [default] Error 2
Attachment #65296 - Flags: approval+
This bug is fixed with APAR IY27632, which is packaged in the AIX VisualAge C++ Compiler May 2002 update. This also means that the workaround in Bug 119326 is no longer necessary.
fixed with xlC 5.0.2.4... closing
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: