[Webkit-unassigned] [Bug 24099] New: ARM Compiler Warnings in pcre_exec.cpp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 23 11:35:00 PST 2009


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

           Summary: ARM Compiler Warnings in pcre_exec.cpp
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Other
        OS/Version: Other
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: carol.szabo at nokia.com
                CC: laszlo.1.gombos at nokia.com


When compiling pcre_exec.cpp the ARM Compiler issues the following warnings:
"../JavaScriptCore/pcre/pcre_exec.cpp", line 1823: Warning:  #546-D: transfer
of control bypasses initialization of:
            variable "othercase" (declared at line 1189)
          case 28: goto RRETURN_28;
                   ^
"../JavaScriptCore/pcre/pcre_exec.cpp", line 1824: Warning:  #546-D: transfer
of control bypasses initialization of:
            variable "othercase" (declared at line 1189)
          case 29: goto RRETURN_29;
This is due to the fact that the variable "othercase" declared, defined and
initialized in line 1189 goes out of scope 
and back in scope for non GCC compilers, that is when
USE_COMPUTED_GOTO_FOR_MATCH_RECURSION is not defined.
In this case execution branches out from line 1203 during expansion of the
RECURSIVE_MATCH MACRO to line 1823 where othercase is
out of scope un then execution is resumed at line 1204 when the variable is in
scope but not initialized.
Most recent compilers do not pick this up as an error (like GCC does when used
with relevant flags), but the practice of by-passing
declaration of local variables via goto or case statements is not very portable
and is confusing. 
These warnings and potential gcc errors can be easily eliminated by moving the
declaration of 
"othercase" to function scope, which has no adverse effects.
Patch will follow.


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



More information about the webkit-unassigned mailing list