Closed Bug 595708 Opened 9 years ago Closed 9 years ago

"nsDocument.cpp(4377) : error C2248: 'nsAString_internal::nsAString_internal' : cannot access protected member declared in class 'nsAString_internal'"

Categories

(Core :: DOM: Core & HTML, defect, blocker)

x86
Windows 2000
defect
Not set
blocker

Tracking

()

RESOLVED FIXED
mozilla2.0b7

People

(Reporter: sgautherie, Assigned: sgautherie)

References

Details

Attachments

(1 file)

(I hadn't tried to build locally for a long time...)

{
.../nsDocument.cpp(4377) : error C2248: 'nsAString_internal::nsAString_internal' : cannot access protected member declared in class 'nsAString_internal'
        ...\dist\include\nsTSubstring.h(612) : see declaration of 'nsAString_internal::nsAString_internal'
        ...\dist\include\nsTSubstring.h(86) : see declaration of 'nsAString_internal'

.../nsDocument.cpp(5816) : warning C4018: '<' : signed/unsigned mismatch
}

http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsDocument.cpp
4377   rv = CreateElem(needsLowercase ? lcTagName : aTagName, nsnull,
4378                   IsHTML() ? kNameSpaceID_XHTML : GetDefaultNamespaceID(),
4379                   PR_TRUE, aReturn);

Latest blame is to bug 566466...
I wonder which compiler gives you that error.
And what/where the error actually is.
(In reply to comment #1)

{
Platform SDK directory: [...]\Microsoft Platform SDK for Windows Server 2003 R2
Platform SDK version: 5
Setting environment for using Microsoft Visual Studio 2005 x86 tools.

  --with-windows-version=502
  --disable-ctypes
  --disable-ipc
  --disable-webm
  --enable-application=browser
}
(In reply to comment #1)

The error is triggered by |needsLowercase ? lcTagName : aTagName|.

If I use lcTagName or aTagName only then it compiles.
If I use |needsLowercase ? (const nsAString&) lcTagName : aTagName| then it compiles too...
status2.0: --- → ?
Serge, could you post a patch? And use C++ casting if possible.
Assignee: nobody → sgautherie.bz
Status: NEW → ASSIGNED
Attachment #474670 - Flags: review?(Olli.Pettay)
Attachment #474670 - Flags: review?(Olli.Pettay) → review+
Comment on attachment 474670 [details] [diff] [review]
(Av1) Add a |static_cast<const nsAString&>|, 1 s/PRInt32/PRUint32/
[Checked in: Comment 7]

"approval2.0=?":
Fix a compile error and a warning: no risk.
Attachment #474670 - Flags: approval2.0?
Attachment #474670 - Flags: approval2.0? → approval2.0+
Comment on attachment 474670 [details] [diff] [review]
(Av1) Add a |static_cast<const nsAString&>|, 1 s/PRInt32/PRUint32/
[Checked in: Comment 7]

http://hg.mozilla.org/mozilla-central/rev/5e71c3a0b5c1
Attachment #474670 - Attachment description: (Av1) Add a |static_cast<const nsAString&>|, 1 s/PRInt32/PRUint32/ → (Av1) Add a |static_cast<const nsAString&>|, 1 s/PRInt32/PRUint32/ [Checked in: Comment 7]
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status2.0: ? → ---
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b7
Duplicate of this bug: 588717
Blocks: 595756
Blocks: 605569
Depends on: 610936
No longer blocks: 605569
No longer blocks: 595756
Blocks: 622868
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.