[Webkit-unassigned] [Bug 59261] New: Compile error with GCC 4.6.0, tries to assign unsigned& to bitfield

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 22 17:36:12 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=59261

           Summary: Compile error with GCC 4.6.0, tries to assign
                    unsigned& to bitfield
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: xan.lopez at gmail.com


When compiling JSC with GCC 4.6.0:

  CXX    Source/JavaScriptCore/API/libJavaScriptCore_la-JSBase.lo
In file included from ../../Source/JavaScriptCore/runtime/ScopeChain.h:25:0,
                 from ../../Source/JavaScriptCore/runtime/JSObject.h:35,
                 from ../../Source/JavaScriptCore/runtime/JSArray.h:24,
                 from ../../Source/JavaScriptCore/runtime/JSGlobalObject.h:25,
                 from ../../Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.h:29,
                 from ../../Source/JavaScriptCore/runtime/JSFunction.h:27,
                 from ../../Source/JavaScriptCore/runtime/Executable.h:30,
                 from ../../Source/JavaScriptCore/bytecode/EvalCodeCache.h:32,
                 from ../../Source/JavaScriptCore/bytecode/CodeBlock.h:33,
                 from ../../Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:33,
                 from ../../Source/JavaScriptCore/jsc.cpp:25:
../../Source/JavaScriptCore/runtime/Structure.h: In static member function ‘static JSC::StructureTransitionTable::Hash::Key JSC::StructureTransitionTable::keyForWeakGCMapFinalizer(void*, JSC::Structure*)’:
../../Source/JavaScriptCore/runtime/Structure.h:301:94: error: cannot bind bitfield ‘structure->JSC::Structure::m_attributesInPrevious’ to ‘unsigned int&’

the reason for this is explained in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45253, but basically comes down to GCC not being able to fully figure the type of the parameter and defaulting to 'unsigned&', which cannot be assigned to a bitfield. As this seems to be technically correct, and GCC is already doing it, the workaround suggested in the upstream bug report is to use unary '+' to force a proper type detection. The attached patch does this.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list