Closed Bug 598058 Opened 14 years ago Closed 11 years ago

[JM] MSVC warning C4355: 'this' : used in base member initializer list

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sayrer, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [build_warning])

e:/builds/moz2_slave/tracemonkey-win32-nightly/build/js/src/methodjit/Compiler.cpp(88) : warning C4355: 'this' : used in base member initializer list

e:/builds/moz2_slave/tracemonkey-win32-nightly/build/js/src/methodjit/FrameState.cpp(50) : warning C4355: 'this' : used in base member initializer list

The FrameState warning can be fixed by initializing 'reifier' in the ::init method rather than the initializer list. I'm not sure how to fix the Compiler problem.
One way to silence this is:

  class A : B {
    A *thisInConstructor() const { return this; }
    A : B(thisInConstructor()) {}
  };
Whiteboard: [build_warning]
Blocks: buildwarning
There is a macro in the IPC library that can be used to silence these warnings in a convenient way. See bug 736895.
The Compiler.cpp line was:
  stubcc(cx, *this, frame, script)

This was fixed in https://hg.mozilla.org/mozilla-central/rev/5c77882891f7


The FrameState.cpp line was:
  : cx(cx), script(script), masm(masm), entries(NULL), reifier(cx, *this),

This was fixed in Bug 601066.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.