Title: [294895] trunk/Source
- Revision
- 294895
- Author
- [email protected]
- Date
- 2022-05-26 13:45:57 -0700 (Thu, 26 May 2022)
Log Message
Build with -Wno-stringop-overflow when using GCC
https://bugs.webkit.org/show_bug.cgi?id=240596
Patch by Michael Catanzaro <[email protected]> on 2022-05-26
Reviewed by Adrian Perez de Castro.
Also, rearrange and simplify the warning flag code.
And remove suppression of -Wno-attributes, since GCC 8 is everywhere nowadays.
* Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
* Source/_javascript_Core/ftl/FTLOSRExit.cpp:
(JSC::FTL::OSRExitDescriptor::prepareOSRExitHandle):
* Source/WebCore/loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::end):
* Source/cmake/WebKitCompilerFlags.cmake:
Canonical link: https://commits.webkit.org/251018@main
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp (294894 => 294895)
--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp 2022-05-26 20:19:17 UTC (rev 294894)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp 2022-05-26 20:45:57 UTC (rev 294895)
@@ -20751,9 +20751,7 @@
ExitValue exitValue = exitValueForAvailability(arguments, map, availability);
if (exitValue.hasIndexInStackmapLocations())
exitValue.adjustStackmapLocationsIndexByOffset(offsetOfExitArgumentsInStackmapLocations);
-IGNORE_GCC_WARNINGS_BEGIN("stringop-overflow")
exitDescriptor->m_values[i] = exitValue;
-IGNORE_GCC_WARNINGS_END
}
for (auto heapPair : availabilityMap.m_heap) {
Modified: trunk/Source/_javascript_Core/ftl/FTLOSRExit.cpp (294894 => 294895)
--- trunk/Source/_javascript_Core/ftl/FTLOSRExit.cpp 2022-05-26 20:19:17 UTC (rev 294894)
+++ trunk/Source/_javascript_Core/ftl/FTLOSRExit.cpp 2022-05-26 20:45:57 UTC (rev 294895)
@@ -83,10 +83,8 @@
const StackmapGenerationParams& params, uint32_t dfgNodeIndex, unsigned offset)
{
FixedVector<B3::ValueRep> valueReps(params.size() - offset);
-IGNORE_GCC_WARNINGS_BEGIN("stringop-overflow")
for (unsigned i = offset, indexInValueReps = 0; i < params.size(); ++i, ++indexInValueReps)
valueReps[indexInValueReps] = params[i];
-IGNORE_GCC_WARNINGS_END
unsigned index = state.jitCode->m_osrExit.size();
state.jitCode->m_osrExit.append(OSRExit(this, exitKind, nodeOrigin.forExit, nodeOrigin.semantic, nodeOrigin.wasHoisted, dfgNodeIndex, WTFMove(valueReps)));
return adoptRef(*new OSRExitHandle(index, state.jitCode.get()));
Modified: trunk/Source/WebCore/loader/DocumentWriter.cpp (294894 => 294895)
--- trunk/Source/WebCore/loader/DocumentWriter.cpp 2022-05-26 20:19:17 UTC (rev 294894)
+++ trunk/Source/WebCore/loader/DocumentWriter.cpp 2022-05-26 20:45:57 UTC (rev 294895)
@@ -296,9 +296,7 @@
// http://bugs.webkit.org/show_bug.cgi?id=10854
// The frame's last ref may be removed and it can be deleted by checkCompleted(),
// so we'll add a protective refcount
-IGNORE_GCC_WARNINGS_BEGIN("stringop-overflow")
Ref<Frame> protect(*m_frame);
-IGNORE_GCC_WARNINGS_END
if (!m_parser)
return;
Modified: trunk/Source/cmake/WebKitCompilerFlags.cmake (294894 => 294895)
--- trunk/Source/cmake/WebKitCompilerFlags.cmake 2022-05-26 20:19:17 UTC (rev 294894)
+++ trunk/Source/cmake/WebKitCompilerFlags.cmake 2022-05-26 20:45:57 UTC (rev 294895)
@@ -131,37 +131,29 @@
WEBKIT_PREPEND_GLOBAL_CXX_FLAGS(-Wno-noexcept-type)
- # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80947
- if (${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS "8.0" AND NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- WEBKIT_PREPEND_GLOBAL_CXX_FLAGS(-Wno-attributes)
- endif ()
+ # These GCC warnings produce too many false positives to be useful. We'll
+ # rely on developers who build with Clang to notice these warnings.
+ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ # https://bugs.webkit.org/show_bug.cgi?id=167643#c13
+ WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-expansion-to-defined)
- # Since GCC 11, these warnings produce too many false positives to be useful. We'll rely on
- # developers who build with Clang to notice these warnings.
- if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL "11.0")
+ # https://bugs.webkit.org/show_bug.cgi?id=228601
WEBKIT_PREPEND_GLOBAL_CXX_FLAGS(-Wno-array-bounds)
WEBKIT_PREPEND_GLOBAL_CXX_FLAGS(-Wno-nonnull)
- endif ()
- # This triggers warnings in wtf/Packed.h, a header that is included in many places. It does not
- # respect ignore warning pragmas and we cannot easily suppress it for all affected files.
- # https://bugs.webkit.org/show_bug.cgi?id=226557
- if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL "11.0")
+ # https://bugs.webkit.org/show_bug.cgi?id=240596
+ WEBKIT_PREPEND_GLOBAL_CXX_FLAGS(-Wno-stringop-overflow)
+
+ # This triggers warnings in wtf/Packed.h, a header that is included in many places. It does not
+ # respect ignore warning pragmas and we cannot easily suppress it for all affected files.
+ # https://bugs.webkit.org/show_bug.cgi?id=226557
WEBKIT_PREPEND_GLOBAL_CXX_FLAGS(-Wno-stringop-overread)
- endif ()
- # -Wodr trips over our bindings integrity feature when LTO is enabled.
- # https://bugs.webkit.org/show_bug.cgi?id=229867
- if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ # -Wodr trips over our bindings integrity feature when LTO is enabled.
+ # https://bugs.webkit.org/show_bug.cgi?id=229867
WEBKIT_PREPEND_GLOBAL_CXX_FLAGS(-Wno-odr)
endif ()
- # -Wexpansion-to-defined produces false positives with GCC but not Clang
- # https://bugs.webkit.org/show_bug.cgi?id=167643#c13
- if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
- WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-expansion-to-defined)
- endif ()
-
# Force SSE2 fp on x86 builds.
if (WTF_CPU_X86 AND NOT CMAKE_CROSSCOMPILING)
WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-msse2 -mfpmath=sse)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes