RESOLVED FIXED 174463
Fix compiler warnings when building with GCC 7
https://bugs.webkit.org/show_bug.cgi?id=174463
Summary Fix compiler warnings when building with GCC 7
Michael Catanzaro
Reported 2017-07-13 10:10:08 PDT
[50/5861] Building C object Source/Thi...i/CMakeFiles/brotli.dir/dec/decode.c.o ../../Source/ThirdParty/brotli/dec/decode.c: In function ‘DecodeVarLenUint8’: ../../Source/ThirdParty/brotli/dec/decode.c:143:10: warning: this statement may fall through [-Wimplicit-fallthrough=] if (bits == 0) { ^ ../../Source/ThirdParty/brotli/dec/decode.c:149:5: note: here case BROTLI_STATE_DECODE_UINT8_SHORT: ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:160:14: warning: this statement may fall through [-Wimplicit-fallthrough=] *value = bits; ~~~~~~~^~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:163:5: note: here case BROTLI_STATE_DECODE_UINT8_LONG: ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c: In function ‘DecodeMetaBlockLength’: ../../Source/ThirdParty/brotli/dec/decode.c:196:38: warning: this statement may fall through [-Wimplicit-fallthrough=] s->substate_metablock_header = BROTLI_STATE_METABLOCK_HEADER_EMPTY; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:199:7: note: here case BROTLI_STATE_METABLOCK_HEADER_EMPTY: ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:207:38: warning: this statement may fall through [-Wimplicit-fallthrough=] s->substate_metablock_header = BROTLI_STATE_METABLOCK_HEADER_NIBBLES; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:210:7: note: here case BROTLI_STATE_METABLOCK_HEADER_NIBBLES: ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:221:38: warning: this statement may fall through [-Wimplicit-fallthrough=] s->substate_metablock_header = BROTLI_STATE_METABLOCK_HEADER_SIZE; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:224:7: note: here case BROTLI_STATE_METABLOCK_HEADER_SIZE: ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:236:38: warning: this statement may fall through [-Wimplicit-fallthrough=] s->substate_metablock_header = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ BROTLI_STATE_METABLOCK_HEADER_UNCOMPRESSED; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:240:7: note: here case BROTLI_STATE_METABLOCK_HEADER_UNCOMPRESSED: ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:258:38: warning: this statement may fall through [-Wimplicit-fallthrough=] s->substate_metablock_header = BROTLI_STATE_METABLOCK_HEADER_BYTES; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:261:7: note: here case BROTLI_STATE_METABLOCK_HEADER_BYTES: ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:270:38: warning: this statement may fall through [-Wimplicit-fallthrough=] s->substate_metablock_header = BROTLI_STATE_METABLOCK_HEADER_METADATA; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:273:7: note: here case BROTLI_STATE_METABLOCK_HEADER_METADATA: ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c: In function ‘ReadHuffmanCode’: ../../Source/ThirdParty/brotli/dec/decode.c:694:10: warning: this statement may fall through [-Wimplicit-fallthrough=] if (s->sub_loop_counter != 1) { ^ ../../Source/ThirdParty/brotli/dec/decode.c:706:5: note: here case BROTLI_STATE_HUFFMAN_SIMPLE_SIZE: ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:712:27: warning: this statement may fall through [-Wimplicit-fallthrough=] s->sub_loop_counter = 0; ~~~~~~~~~~~~~~~~~~~~^~~ ../../Source/ThirdParty/brotli/dec/decode.c:714:5: note: here case BROTLI_STATE_HUFFMAN_SIMPLE_READ: { ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:714:44: warning: this statement may fall through [-Wimplicit-fallthrough=] case BROTLI_STATE_HUFFMAN_SIMPLE_READ: { ^ ../../Source/ThirdParty/brotli/dec/decode.c:721:5: note: here case BROTLI_STATE_HUFFMAN_SIMPLE_BUILD: { ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:762:27: warning: this statement may fall through [-Wimplicit-fallthrough=] s->substate_huffman = BROTLI_STATE_HUFFMAN_LENGTH_SYMBOLS; ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:765:5: note: here case BROTLI_STATE_HUFFMAN_LENGTH_SYMBOLS: { ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c: In function ‘DecodeContextMap’: ../../Source/ThirdParty/brotli/dec/decode.c:937:31: warning: this statement may fall through [-Wimplicit-fallthrough=] s->substate_context_map = BROTLI_STATE_CONTEXT_MAP_READ_PREFIX; ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:939:5: note: here case BROTLI_STATE_CONTEXT_MAP_READ_PREFIX: { ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:939:48: warning: this statement may fall through [-Wimplicit-fallthrough=] case BROTLI_STATE_CONTEXT_MAP_READ_PREFIX: { ^ ../../Source/ThirdParty/brotli/dec/decode.c:957:5: note: here case BROTLI_STATE_CONTEXT_MAP_HUFFMAN: ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:962:31: warning: this statement may fall through [-Wimplicit-fallthrough=] s->substate_context_map = BROTLI_STATE_CONTEXT_MAP_DECODE; ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:964:5: note: here case BROTLI_STATE_CONTEXT_MAP_DECODE: { ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:964:43: warning: this statement may fall through [-Wimplicit-fallthrough=] case BROTLI_STATE_CONTEXT_MAP_DECODE: { ^ ../../Source/ThirdParty/brotli/dec/decode.c:1009:5: note: here case BROTLI_STATE_CONTEXT_MAP_TRANSFORM: { ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c: In function ‘CopyUncompressedBlockToOutput’: ../../Source/ThirdParty/brotli/dec/decode.c:1254:34: warning: this statement may fall through [-Wimplicit-fallthrough=] s->substate_uncompressed = BROTLI_STATE_UNCOMPRESSED_WRITE; ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:1257:7: note: here case BROTLI_STATE_UNCOMPRESSED_WRITE: { ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c: In function ‘BrotliDecompressStream’: ../../Source/ThirdParty/brotli/dec/decode.c:1952:18: warning: this statement may fall through [-Wimplicit-fallthrough=] s->state = BROTLI_STATE_METABLOCK_BEGIN; ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:1954:7: note: here case BROTLI_STATE_METABLOCK_BEGIN: ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:1957:18: warning: this statement may fall through [-Wimplicit-fallthrough=] s->state = BROTLI_STATE_METABLOCK_HEADER; ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:1959:7: note: here case BROTLI_STATE_METABLOCK_HEADER: ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:2032:18: warning: this statement may fall through [-Wimplicit-fallthrough=] s->state = BROTLI_STATE_HUFFMAN_CODE_1; ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:2034:7: note: here case BROTLI_STATE_HUFFMAN_CODE_1: { ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:2039:18: warning: this statement may fall through [-Wimplicit-fallthrough=] s->state = BROTLI_STATE_HUFFMAN_CODE_2; ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:2042:7: note: here case BROTLI_STATE_HUFFMAN_CODE_2: { ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:2047:18: warning: this statement may fall through [-Wimplicit-fallthrough=] s->state = BROTLI_STATE_HUFFMAN_CODE_3; ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:2050:7: note: here case BROTLI_STATE_HUFFMAN_CODE_3: { ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:2062:45: warning: this statement may fall through [-Wimplicit-fallthrough=] case BROTLI_STATE_METABLOCK_HEADER_2: { ^ ../../Source/ThirdParty/brotli/dec/decode.c:2085:7: note: here case BROTLI_STATE_CONTEXT_MODES: ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:2090:18: warning: this statement may fall through [-Wimplicit-fallthrough=] s->state = BROTLI_STATE_CONTEXT_MAP_1; ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:2092:7: note: here case BROTLI_STATE_CONTEXT_MAP_1: ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:2100:18: warning: this statement may fall through [-Wimplicit-fallthrough=] s->state = BROTLI_STATE_CONTEXT_MAP_2; ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:2102:7: note: here case BROTLI_STATE_CONTEXT_MAP_2: ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:2127:18: warning: this statement may fall through [-Wimplicit-fallthrough=] s->state = BROTLI_STATE_TREE_GROUP; ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:2129:7: note: here case BROTLI_STATE_TREE_GROUP: ^~~~ ../../Source/ThirdParty/brotli/dec/decode.c:2220:18: warning: this statement may fall through [-Wimplicit-fallthrough=] s->state = BROTLI_STATE_DONE; ~~~~~~~~~^~~~~~~~~~~~~~~~~~~ ../../Source/ThirdParty/brotli/dec/decode.c:2222:7: note: here case BROTLI_STATE_DONE: ^~~~ [466/5861] Building CXX object Source/.../B3LowerMacrosAfterOptimizations.cpp.o In file included from ../../Source/JavaScriptCore/b3/B3LowerMacrosAfterOptimizations.cpp:36:0: ../../Source/JavaScriptCore/b3/B3ConstPtrValue.h: In instantiation of ‘JSC::B3::ConstPtrValue::ConstPtrValue(JSC::B3::Origin, T*) [with T = float(float) throw ()]’: ../../Source/JavaScriptCore/b3/B3ProcedureInlines.h:38:49: required from ‘ValueType* JSC::B3::Procedure::add(Arguments ...) [with ValueType = JSC::B3::ConstPtrValue; Arguments = {JSC::B3::Origin, float (*)(float) throw ()}]’ ../../Source/JavaScriptCore/b3/B3InsertionSetInlines.h:38:12: required from ‘ValueType* JSC::B3::InsertionSet::insert(size_t, Arguments ...) [with ValueType = JSC::B3::ConstPtrValue; Arguments = {JSC::B3::Origin, float (*)(float) throw ()}; size_t = long unsigned int]’ ../../Source/JavaScriptCore/b3/B3LowerMacrosAfterOptimizations.cpp:99:100: required from here ../../Source/JavaScriptCore/b3/B3ConstPtrValue.h:56:5: warning: mangled name for ‘JSC::B3::ConstPtrValue::ConstPtrValue(JSC::B3::Origin, T*) [with T = float(float) throw ()]’ will change in C++17 because the exception specification is part of a function type [-Wnoexcept-type] ConstPtrValue(Origin origin, T* pointer) ^~~~~~~~~~~~~ ../../Source/JavaScriptCore/b3/B3ConstPtrValue.h:56:5: warning: mangled name for ‘JSC::B3::ConstPtrValue::ConstPtrValue(JSC::B3::Origin, T*) [with T = float(float) throw ()]’ will change in C++17 because the exception specification is part of a function type [-Wnoexcept-type] In file included from ../../Source/WTF/wtf/FastMalloc.h:26:0, from ../../Source/JavaScriptCore/config.h:31, from ../../Source/JavaScriptCore/b3/B3LowerMacrosAfterOptimizations.cpp:26: ../../Source/WTF/wtf/StdLibExtras.h:143:15: warning: mangled name for ‘ToType WTF::bitwise_cast(FromType) [with ToType = long int; FromType = float (*)(float) throw ()]’ will change in C++17 because the exception specification is part of a function type [-Wnoexcept-type] inline ToType bitwise_cast(FromType from) ^~~~~~~~~~~~ In file included from ../../Source/JavaScriptCore/b3/B3LowerMacrosAfterOptimizations.cpp:36:0: ../../Source/JavaScriptCore/b3/B3ConstPtrValue.h:56:5: warning: mangled name for ‘JSC::B3::ConstPtrValue::ConstPtrValue(JSC::B3::Origin, T*) [with T = float(float) throw ()]’ will change in C++17 because the exception specification is part of a function type [-Wnoexcept-type] ConstPtrValue(Origin origin, T* pointer) ^~~~~~~~~~~~~ In file included from ../../Source/JavaScriptCore/b3/B3BasicBlockInlines.h:31:0, from ../../Source/JavaScriptCore/b3/B3LowerMacrosAfterOptimizations.cpp:31: ../../Source/JavaScriptCore/b3/B3ProcedureInlines.h:36:12: warning: mangled name for ‘ValueType* JSC::B3::Procedure::add(Arguments ...) [with ValueType = JSC::B3::ConstPtrValue; Arguments = {JSC::B3::Origin, float (*)(float) throw ()}]’ will change in C++17 because the exception specification is part of a function type [-Wnoexcept-type] ValueType* Procedure::add(Arguments... arguments) ^~~~~~~~~ In file included from ../../Source/JavaScriptCore/b3/B3LowerMacrosAfterOptimizations.cpp:37:0: ../../Source/JavaScriptCore/b3/B3InsertionSetInlines.h:36:12: warning: mangled name for ‘ValueType* JSC::B3::InsertionSet::insert(size_t, Arguments ...) [with ValueType = JSC::B3::ConstPtrValue; Arguments = {JSC::B3::Origin, float (*)(float) throw ()}]’ will change in C++17 because the exception specification is part of a function type [-Wnoexcept-type] ValueType* InsertionSet::insert(size_t index, Arguments... arguments) ^~~~~~~~~~~~ [522/5861] Building CXX object Source/...ptCore.dir/bytecode/CallLinkInfo.cpp.o In file included from ../../Source/WTF/wtf/StdLibExtras.h:33:0, from ../../Source/WTF/wtf/FastMalloc.h:26, from ../../Source/JavaScriptCore/config.h:31, from ../../Source/JavaScriptCore/bytecode/CallLinkInfo.cpp:26: ../../Source/JavaScriptCore/bytecode/CallLinkInfo.cpp: In static member function ‘static JSC::CallLinkInfo::CallType JSC::CallLinkInfo::callTypeFor(JSC::OpcodeID)’: ../../Source/JavaScriptCore/bytecode/CallLinkInfo.cpp:54:48: warning: enum constant in boolean context [-Wint-in-bool-context] ASSERT(opcodeID == op_tail_call_varargs || op_tail_call_forward_arguments); ^ ../../Source/WTF/wtf/Assertions.h:296:11: note: in definition of macro ‘ASSERT’ if (!(assertion)) { \ ^~~~~~~~~ [735/5861] Building C object Source/Ja.../disassembler/udis86/udis86_decode.c.o ../../Source/JavaScriptCore/disassembler/udis86/udis86_decode.c: In function ‘decode_operand’: ../../Source/JavaScriptCore/disassembler/udis86/udis86_decode.c:751:18: warning: this statement may fall through [-Wimplicit-fallthrough=] u->br_far = 1; ~~~~~~~~~~~^~~ ../../Source/JavaScriptCore/disassembler/udis86/udis86_decode.c:753:5: note: here case OP_M: ^~~~ ../../Source/JavaScriptCore/disassembler/udis86/udis86_decode.c:754:10: warning: this statement may fall through [-Wimplicit-fallthrough=] if (MODRM_MOD(modrm(u)) == 3) { ^ ../../Source/JavaScriptCore/disassembler/udis86/udis86_decode.c:758:5: note: here case OP_E: ^~~~ ../../Source/JavaScriptCore/disassembler/udis86/udis86_decode.c:773:10: warning: this statement may fall through [-Wimplicit-fallthrough=] if (MODRM_MOD(modrm(u)) != 3) { ^ ../../Source/JavaScriptCore/disassembler/udis86/udis86_decode.c:777:5: note: here case OP_Q: ^~~~ ../../Source/JavaScriptCore/disassembler/udis86/udis86_decode.c:784:10: warning: this statement may fall through [-Wimplicit-fallthrough=] if (MODRM_MOD(modrm(u)) != 3) { ^ ../../Source/JavaScriptCore/disassembler/udis86/udis86_decode.c:788:5: note: here case OP_W: ^~~~ [978/5861] Building CXX object Source/...criptCore.dir/runtime/ConfigFile.cpp.o ../../Source/JavaScriptCore/runtime/ConfigFile.cpp: In lambda function: ../../Source/JavaScriptCore/runtime/ConfigFile.cpp:281:62: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] auto parseLogFile = [&](StatementNesting statementNesting) { ^ ../../Source/JavaScriptCore/runtime/ConfigFile.cpp:286:29: note: ‘snprintf’ output 2 or more bytes (assuming 4098) into a destination of size 4097 snprintf(logPathname, s_maxPathLength + 1, "%s/%s", m_configDirectory, filename); ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [2701/5861] Building CXX object Source.../css/CSSComputedStyleDeclaration.cpp.o ../../Source/WebCore/css/CSSComputedStyleDeclaration.cpp: In member function ‘WTF::RefPtr<WebCore::CSSValue> WebCore::ComputedStyleExtractor::propertyValue(WebCore::CSSPropertyID, WebCore::EUpdateLayout)’: ../../Source/WebCore/css/CSSComputedStyleDeclaration.cpp:3344:13: warning: this statement may fall through [-Wimplicit-fallthrough=] } ^ ../../Source/WebCore/css/CSSComputedStyleDeclaration.cpp:3345:9: note: here case CSSPropertyTextIndent: { ^~~~ [3172/5861] Building CXX object Source...s/WebCore.dir/html/ImageDocument.cpp.o ../../Source/WebCore/html/ImageDocument.cpp: In member function ‘void WebCore::ImageDocument::createDocumentStructure()’: ../../Source/WebCore/html/ImageDocument.cpp:226:103: warning: enum constant in boolean context [-Wint-in-bool-context] body->setInlineStyleProperty(CSSPropertyBackgroundColor, "white", CSSPrimitiveValue::CSS_IDENT); ^ [4595/5861] Building CXX object Source...ort.dir/testing/InternalSettings.cpp.o ../../Source/WebCore/testing/InternalSettings.cpp: In member function ‘WebCore::ExceptionOr<void> WebCore::InternalSettings::setShouldManageAudioSessionCategory(bool)’: ../../Source/WebCore/testing/InternalSettings.cpp:839:78: warning: unused parameter ‘should’ [-Wunused-parameter] ExceptionOr<void> InternalSettings::setShouldManageAudioSessionCategory(bool should) ^~~~~~ [5146/5861] Building CXX object Source...Platform/IPC/unix/ConnectionUnix.cpp.o ../../Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp: In member function ‘bool IPC::Connection::sendOutputMessage(IPC::UnixMessage&)’: ../../Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp:454:42: warning: this statement may fall through [-Wimplicit-fallthrough=] attachmentInfo[i].setSize(attachments[i].size()); ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ ../../Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp:456:13: note: here case Attachment::SocketType: ^~~~
Attachments
Patch (7.61 KB, patch)
2017-07-13 11:41 PDT, Michael Catanzaro
no flags
Patch (7.62 KB, patch)
2017-07-13 11:54 PDT, Michael Catanzaro
darin: review+
Carlos Alberto Lopez Perez
Comment 1 2017-07-13 10:24:40 PDT
This would fail to build on the Mac port as they pass both -Werror,-Wimplicit-fallthrough
Michael Catanzaro
Comment 2 2017-07-13 10:29:04 PDT
(In reply to Carlos Alberto Lopez Perez from comment #1) > This would fail to build on the Mac port as they pass both > -Werror,-Wimplicit-fallthrough I don't understand your comment. We need to build brotli with -Wno-implicit-fallthrough. Mac port does not build brotli at all.
Michael Catanzaro
Comment 3 2017-07-13 10:31:46 PDT
Ah, I see we do have some -Wimplicit-fallthrough warnings elsewhere. But clearly Mac port is not failing to build, so either their compiler somehow implements the warning differently, or maybe they don't use it for all files.
Michael Catanzaro
Comment 4 2017-07-13 11:41:40 PDT
Michael Catanzaro
Comment 5 2017-07-13 11:54:25 PDT
Darin Adler
Comment 6 2017-07-13 13:46:23 PDT
Comment on attachment 315366 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=315366&action=review This patch probably should not have [GTK] on it, since it’s not in platform-specific code even if it’s for the benefit of ports that can use gcc. > Source/cmake/OptionsCommon.cmake:78 > + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-noexcept-type") Is this working around a bug, or what?
Michael Catanzaro
Comment 7 2017-07-13 18:35:28 PDT
(In reply to Darin Adler from comment #6) > Comment on attachment 315366 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=315366&action=review > > This patch probably should not have [GTK] on it, since it’s not in > platform-specific code even if it’s for the benefit of ports that can use > gcc. Good point. > > Source/cmake/OptionsCommon.cmake:78 > > + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-noexcept-type") > > Is this working around a bug, or what? No, it's just a bad warning. Apparently noexcept is part of the function signature in C++17, so the mangled names of a bunch of functions will change between C++14 and C++17. That's a major ABI change. But these are not public API functions, so it doesn't matter. The only place that -Wnoexcept-type *might* be a useful warning is in the public C++ API headers, but those are slated for removal anyway. On the other hand, I see now that those functions use throw() rather than noexcept. I should probably modernize that in a follow-up patch.
Michael Catanzaro
Comment 8 2017-07-13 18:43:53 PDT
(In reply to Michael Catanzaro from comment #7) > > > Source/cmake/OptionsCommon.cmake:78 > > > + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-noexcept-type") > > > > Is this working around a bug, or what? > > No, it's just a bad warning. Er, actually those functions do not have noexcept specifiers at all. You're right, it is a GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80985 I'll add a comment about that to the patch.
Michael Catanzaro
Comment 9 2017-07-13 18:45:49 PDT
(In reply to Michael Catanzaro from comment #8) > Er, actually those functions do not have noexcept specifiers at all. You're > right, it is a GCC bug: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80985 Well, I guess the warning is working as designed, it's just assuming that we compile some of our C++ files with C++14 and some with C++17. Then the code would break. Fortunately, we don't do that.
Michael Catanzaro
Comment 10 2017-07-13 18:48:54 PDT
Loïc Yhuel
Comment 11 2017-07-14 00:17:27 PDT
Comment on attachment 315366 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=315366&action=review > Source/ThirdParty/brotli/CMakeLists.txt:21 > + ADD_TARGET_PROPERTIES(brotli COMPILE_FLAGS "-Wno-cast-align -Wno-implicit-fallthrough") This flag is only supported in gcc >= 7, so with older versions, as soon as there is another warning in the file, it would output : cc1plus: warning: unrecognized command line option ‘-Wno-implicit-fallthrough’
Michael Catanzaro
Comment 12 2017-07-14 08:30:49 PDT
(In reply to Loïc Yhuel from comment #11) > This flag is only supported in gcc >= 7, so with older versions, as soon as > there is another warning in the file, it would output : > cc1plus: warning: unrecognized command line option > ‘-Wno-implicit-fallthrough’ Oops, sorry. Will fix.
Note You need to log in before you can comment on or make changes to this bug.