nsWebBrowserPersist.cpp creates internal compiler error in xlC 3.6.4

VERIFIED FIXED

Status

()

--
major
VERIFIED FIXED
17 years ago
11 years ago

People

(Reporter: david, Assigned: jdunn)

Tracking

({qawanted})

Trunk
Other
AIX
qawanted
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

17 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

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

Comment 2

17 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

17 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

17 years ago
CC some string gurus

Comment 5

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

Comment 7

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

Comment 8

17 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

17 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

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

Comment 11

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

Comment 12

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

Comment 13

17 years ago
You bet.
Status: RESOLVED → VERIFIED
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.