| Summary: | REGRESSION(r287138) [GLIB] Build failure with GCC 8 and 9 in std::array to Span conversion | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Lauro Moura <lmoura> | ||||||
| Component: | WebKit Misc. | Assignee: | Carlos Alberto Lopez Perez <clopez> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | aboxhall, andresg_22, apinheiro, bugs-noreply, cfleizach, clopez, darin, dmazzoni, ews-watchlist, jcraig, jdiggs, rbuis, samuel_white, sam, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=234350 | ||||||||
| Attachments: |
|
||||||||
|
Description
Lauro Moura
2021-12-16 17:29:29 PST
GCC 8 also fails with the same error than GCC 9 (GCC 8 is still supported) The example builds fine with "-std=c++17" on GCC-10 but not on 9 and 10. And according to https://gcc.gnu.org/projects/cxx-status.html GCC 8 already has full support for C++-17 So maybe this is a bug on the compiler, hard to tell. Would be nice to find a workaround too. This info is maybe useful, Clang 6 fails with the same error (or very similar).
$ clang++-6.0 -std=c++17 span_gcc.cpp
span_gcc.cpp:211:10: error: no viable overloaded '='
span = arr;
~~~~ ^ ~~~
span_gcc.cpp:150:21: note: candidate function not viable: no known conversion from 'const std::array<int *, 3>' to 'const Span<const int *const, 18446744073709551615>' for 1st argument
constexpr Span& operator=(const Span&) noexcept = default;
^
1 error generated.
And clang++-7 builds it fine
Created attachment 447413 [details]
Patch
Committed r287173 (245343@main): <https://commits.webkit.org/245343@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 447413 [details]. |