RESOLVED FIXED 216280
REGRESSION(r266681) [GTK] constexpr build failure in LTS/Debian with GCC 8
https://bugs.webkit.org/show_bug.cgi?id=216280
Summary REGRESSION(r266681) [GTK] constexpr build failure in LTS/Debian with GCC 8
Lauro Moura
Reported 2020-09-08 12:37:01 PDT
Error: [257/502] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/DerivedSources/WebCore/unified-sources/UnifiedSource-3c72abbe-54.cpp.o FAILED: Source/WebCore/CMakeFiles/WebCore.dir/__/__/DerivedSources/WebCore/unified-sources/UnifiedSource-3c72abbe-54.cpp.o <snip long include line> In file included from DerivedSources/ForwardingHeaders/wtf/StdLibExtras.h:32:0, from DerivedSources/ForwardingHeaders/wtf/FastMalloc.h:26, from ../../Source/WebCore/config.h:56, from ../../Source/WebCore/platform/text/TextCodecCJK.cpp:26, from DerivedSources/WebCore/unified-sources/UnifiedSource-3c72abbe-54.cpp:1: ../../Source/WebCore/platform/text/TextCodecSingleByte.cpp: In function ‘constexpr const SingleByteDecodeTable& WebCore::tableForDecoding(WebCore::TextCodecSingleByte::Encoding)’: DerivedSources/ForwardingHeaders/wtf/Assertions.h:587:56: error: call to non-constexpr function ‘void CRASH_WITH_INFO(...)’ #define RELEASE_ASSERT_NOT_REACHED(...) CRASH_WITH_INFO(__VA_ARGS__) ~~~~~~~~~~~~~~~^~~~~~~~~~~~~ ../../Source/WebCore/platform/text/TextCodecSingleByte.cpp:237:5: note: in expansion of macro ‘RELEASE_ASSERT_NOT_REACHED’ RELEASE_ASSERT_NOT_REACHED(); ^~~~~~~~~~~~~~~~~~~~~~~~~~ GCC 8 has some limitations checking non-constexpr expressions after return statements. Example: https://godbolt.org/z/dhPvaf Related GCC bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86678 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67371
Attachments
Patch (1.72 KB, patch)
2020-09-08 12:43 PDT, Lauro Moura
no flags
Patch (1.32 KB, patch)
2020-09-08 13:07 PDT, Alex Christensen
no flags
Patch (1.32 KB, patch)
2020-09-08 13:08 PDT, Alex Christensen
no flags
Lauro Moura
Comment 1 2020-09-08 12:43:41 PDT
Darin Adler
Comment 2 2020-09-08 12:52:14 PDT
Comment on attachment 408256 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=408256&action=review > Source/WebCore/platform/text/TextCodecSingleByte.cpp:248 > + default: > + RELEASE_ASSERT_NOT_REACHED(); I guess we can do this. But sadly this has a side effect of suppressing the compile-time warning if we forget to include one of the enumeration values here. Would be nice to find a solution that does not do that.
Alex Christensen
Comment 3 2020-09-08 12:56:24 PDT
Comment on attachment 408256 [details] Patch I'd prefer to just remove the constexpr from this function.
Alex Christensen
Comment 4 2020-09-08 12:56:31 PDT
Comment on attachment 408256 [details] Patch I'd prefer to just remove the constexpr from this function.
Darin Adler
Comment 5 2020-09-08 12:58:23 PDT
Don’t we need the constexpr to make this work as a template argument?
Alex Christensen
Comment 6 2020-09-08 13:05:57 PDT
Comment on attachment 408256 [details] Patch No, tableForDecoding isn't used as a template argument.
Alex Christensen
Comment 7 2020-09-08 13:07:22 PDT
Alex Christensen
Comment 8 2020-09-08 13:08:11 PDT
Alex Christensen
Comment 9 2020-09-08 14:05:51 PDT
Lauro, does this fix your build?
Lauro Moura
Comment 10 2020-09-08 14:10:40 PDT
(In reply to Alex Christensen from comment #9) > Lauro, does this fix your build? Could not test it direcly on the bot but indeed it should fix.
Alex Christensen
Comment 11 2020-09-08 14:10:53 PDT
Radar WebKit Bug Importer
Comment 12 2020-09-08 14:11:38 PDT
Note You need to log in before you can comment on or make changes to this bug.