nsWebBrowserPersist.cpp creates internal compiler error in xlC 3.6.4

VERIFIED FIXED

Status

()

Core
Networking: File
--
major
VERIFIED FIXED
16 years ago
9 years ago

People

(Reporter: David Favor, Assigned: Jim Dunn)

Tracking

({qawanted})

Trunk
Other
AIX
qawanted
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
The line:

   msgId = aIsReadError ? NS_LITERAL_STRING("readError") :
                          NS_LITERAL_STRING("writeError");

creates an internal compiler error. I have tried several ways to rewrite
this line and am unsure if I am doing it correctly. Let me know how you
would rewrite this line.

Thanks.
(Assignee)

Comment 1

16 years ago
if (aIsReadError) {
    msgId = NS_LITERAL_STRING("readError");
} else {
  msgId = NS_LITERAL_STRING("writeError");
}

Comment 2

16 years ago
What is xlC?

The if/else should do the trick, but it sounds like the compiler has a problem
(with Unichar strings?) if it can't compile something like this.
(Assignee)

Comment 3

16 years ago
xlC is the c++ compiler on AIX.
Yes xlC has a problem but it is based on how
   msgId = aIsReadError ? NS_LITERAL_STRING("readError") :
                          NS_LITERAL_STRING("writeError");

and how temporary variables/registers are used and then 
assigned.

The fact that msgID = NS_LITERAL_STRING("readError")
works but the above doesn't indicates that it is not so much
an issue with Unichar strings but more on the code syntax
and how NS_LITERAL_STRING is defined.

Comment 4

16 years ago
CC some string gurus

Comment 5

16 years ago
does the if() version work? if so, we should just go with that. what type is msgId?

Comment 6

16 years ago
msgId is an nsAutoString:

http://lxr.mozilla.org/seamonkey/source/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp#873
(Assignee)

Comment 7

16 years ago
Created attachment 84311 [details] [diff] [review]
This patch works for me on xlC 3.6.4

Comment 8

16 years ago
Comment on attachment 84311 [details] [diff] [review]
This patch works for me on xlC 3.6.4

r=brade
Attachment #84311 - Flags: review+

Comment 9

16 years ago
Comment on attachment 84311 [details] [diff] [review]
This patch works for me on xlC 3.6.4

sr=alecf
Attachment #84311 - Flags: superreview+
(Assignee)

Comment 10

16 years ago
fix checked into trunk
Status: UNCONFIRMED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED

Comment 11

16 years ago
reporter: can you verify the fix?
Keywords: qawanted, verifyme
(Reporter)

Comment 12

16 years ago
I am no longer compiling mozilla, so am unable to verify the fix.
(Reporter)

Comment 13

16 years ago
You bet.
Status: RESOLVED → VERIFIED

Updated

9 years ago
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.