<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>23120</bug_id>
          
          <creation_ts>2009-01-05 11:44:06 -0800</creation_ts>
          <short_desc>Turn on overloaded virtual functions warning in WebCore</short_desc>
          <delta_ts>2011-04-17 20:57:48 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>23352</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andersca</cc>
    
    <cc>darin</cc>
    
    <cc>sam</cc>
    
    <cc>zwarich</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>104459</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2009-01-05 11:44:06 -0800</bug_when>
    <thetext>-Woverloaded-virtual should help us avoid bugs like bug 23082.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104464</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2009-01-05 11:53:33 -0800</bug_when>
    <thetext>diff --git a/WebCore/Configurations/Base.xcconfig b/WebCore/Configurations/Base.xcconfig
index 803911a..9476735 100644
--- a/WebCore/Configurations/Base.xcconfig
+++ b/WebCore/Configurations/Base.xcconfig
@@ -16,6 +16,7 @@ GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
 GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
 GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
 GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
+GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
 LINKER_DISPLAYS_MANGLED_NAMES = YES;
 PREBINDING = NO;
 VALID_ARCHS = i386 ppc x86_64 ppc64;
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105932</commentid>
    <comment_count>2</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2009-01-15 11:37:29 -0800</bug_when>
    <thetext>The first thing we&apos;d need to do would be to change names in JavaScriptCore for the overloads where functions take either an Identifier or an integer. That probably affects 10 or so functions in JavaScriptCore and would be a simple enough change.

The naming I suggest is to use the word &quot;index&quot; in the names. So for &quot;hasProperty&quot; you could make the version that takes an integer be named &quot;hasIndexProperty&quot;.

In fact, I think turning this warning on for JavaScriptCore is a separate step and could almost deserve a separate bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105934</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2009-01-15 11:41:19 -0800</bug_when>
    <thetext>The first issue I hit in WebCore was:
    virtual void imageChanged(CachedImage*, const IntRect* = 0);
    virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) { }
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105935</commentid>
    <comment_count>4</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2009-01-15 11:43:18 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; The first issue I hit in WebCore was:
&gt;     virtual void imageChanged(CachedImage*, const IntRect* = 0);
&gt;     virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) { }

Seems another case where we can do a name change, but probably one that affects a lot fewer files.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>350476</commentid>
    <comment_count>5</comment_count>
    <who name="Cameron Zwarich (cpst)">zwarich</who>
    <bug_when>2011-02-13 16:08:31 -0800</bug_when>
    <thetext>I fixed the JSC issues for Clang (which enables this by default) in bug 53760. If anything, I would expect to Clang to be stricter than GCC. Here&apos;s a bug to turn the warning on in GCC:

Bug 54369 - Turn on -Woverloaded-virtual for GCC builds of JSC</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>350480</commentid>
    <comment_count>6</comment_count>
    <who name="Cameron Zwarich (cpst)">zwarich</who>
    <bug_when>2011-02-13 16:22:52 -0800</bug_when>
    <thetext>Actually, as I point out in bug 54369, the GCC warning has way too many false positives in Apple&apos;s GCC 4.2, and I don&apos;t think we could ever turn it on for JSC. The Clang warning is much saner.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>387510</commentid>
    <comment_count>7</comment_count>
    <who name="Cameron Zwarich (cpst)">zwarich</who>
    <bug_when>2011-04-17 20:57:48 -0700</bug_when>
    <thetext>I&apos;m just going to close this, because the GCC warning is broken and the sane version is on by default in Clang.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>