Title: [154259] trunk/Source/WebCore
Revision
154259
Author
[email protected]
Date
2013-08-18 20:05:22 -0700 (Sun, 18 Aug 2013)

Log Message

WebCore fails to build with trunk clang: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register]
<http://webkit.org/b/119932>
<rdar://problem/14764085>

Reviewed by Darin Adler.

Add pragma statements to ignore -Wdeprecated-register warnings
in generated code.  Also ignore -Wunknown-pragmas so this
doesn't cause a build failure in older versions of clang.

* css/makeprop.pl:
(WebCore::findProperty): Remove register hints from parameters.
* css/makevalues.pl:
(WebCore::findValue): Ditto.
* platform/ColorData.gperf:
(WebCore::findColor): Ditto.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (154258 => 154259)


--- trunk/Source/WebCore/ChangeLog	2013-08-18 23:56:56 UTC (rev 154258)
+++ trunk/Source/WebCore/ChangeLog	2013-08-19 03:05:22 UTC (rev 154259)
@@ -1,3 +1,22 @@
+2013-08-18  David Kilzer  <[email protected]>
+
+        WebCore fails to build with trunk clang: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register]
+        <http://webkit.org/b/119932>
+        <rdar://problem/14764085>
+
+        Reviewed by Darin Adler.
+
+        Add pragma statements to ignore -Wdeprecated-register warnings
+        in generated code.  Also ignore -Wunknown-pragmas so this
+        doesn't cause a build failure in older versions of clang.
+
+        * css/makeprop.pl:
+        (WebCore::findProperty): Remove register hints from parameters.
+        * css/makevalues.pl:
+        (WebCore::findValue): Ditto.
+        * platform/ColorData.gperf:
+        (WebCore::findColor): Ditto.
+
 2013-08-18  Antti Koivisto  <[email protected]>
 
         <https://webkit.org/b/119987> Make Element::attach standalone function

Modified: trunk/Source/WebCore/css/makeprop.pl (154258 => 154259)


--- trunk/Source/WebCore/css/makeprop.pl	2013-08-18 23:56:56 UTC (rev 154258)
+++ trunk/Source/WebCore/css/makeprop.pl	2013-08-19 03:05:22 UTC (rev 154259)
@@ -74,6 +74,12 @@
 #include <wtf/text/AtomicString.h>
 #include <wtf/text/WTFString.h>
 
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored \"-Wunknown-pragmas\"
+#pragma clang diagnostic ignored \"-Wdeprecated-register\"
+#endif
+
 namespace WebCore {
 EOF
 
@@ -116,7 +122,7 @@
 
 print GPERF<< "EOF";
 %%
-const Property* findProperty(register const char* str, register unsigned int len)
+const Property* findProperty(const char* str, unsigned int len)
 {
     return CSSPropertyNamesHash::findPropertyImpl(str, len);
 }
@@ -177,6 +183,10 @@
 }
 
 } // namespace WebCore
+
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
 EOF
 
 open HEADER, ">CSSPropertyNames.h" || die "Could not open CSSPropertyNames.h for writing";

Modified: trunk/Source/WebCore/css/makevalues.pl (154258 => 154259)


--- trunk/Source/WebCore/css/makevalues.pl	2013-08-18 23:56:56 UTC (rev 154258)
+++ trunk/Source/WebCore/css/makevalues.pl	2013-08-19 03:05:22 UTC (rev 154259)
@@ -66,6 +66,12 @@
 #include \"HashTools.h\"
 #include <string.h>
 
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored \"-Wunknown-pragmas\"
+#pragma clang diagnostic ignored \"-Wdeprecated-register\"
+#endif
+
 namespace WebCore {
 %}
 %struct-type
@@ -102,7 +108,7 @@
     0
 };
 
-const Value* findValue(register const char* str, register unsigned int len)
+const Value* findValue(const char* str, unsigned int len)
 {
     return CSSValueKeywordsHash::findValueImpl(str, len);
 }
@@ -115,6 +121,10 @@
 }
 
 } // namespace WebCore
+
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
 EOF
 close GPERF;
 

Modified: trunk/Source/WebCore/platform/ColorData.gperf (154258 => 154259)


--- trunk/Source/WebCore/platform/ColorData.gperf	2013-08-18 23:56:56 UTC (rev 154258)
+++ trunk/Source/WebCore/platform/ColorData.gperf	2013-08-19 03:05:22 UTC (rev 154259)
@@ -2,6 +2,12 @@
 #include "HashTools.h"
 #include <string.h>
 
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunknown-pragmas"
+#pragma clang diagnostic ignored "-Wdeprecated-register"
+#endif
+
 namespace WebCore {
 %}
 %struct-type
@@ -167,9 +173,13 @@
 yellow, 0xffffff00
 yellowgreen, 0xff9acd32
 %%
-const struct NamedColor* findColor(register const char* str, register unsigned int len)
+const struct NamedColor* findColor(const char* str, unsigned int len)
 {
     return ColorDataHash::findColorImpl(str, len);
 }
 
 } // namespace WebCore
+
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to