Bug 179750 - REGRESSION(r224887): GCC 5 build broken
Summary: REGRESSION(r224887): GCC 5 build broken
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: Other
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords: InRadar
Depends on:
Blocks: 178894
  Show dependency treegraph
 
Reported: 2017-11-15 16:54 PST by Michael Catanzaro
Modified: 2017-11-16 15:29 PST (History)
7 users (show)

See Also:


Attachments
Patch (5.29 KB, patch)
2017-11-15 17:12 PST, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2017-11-15 16:54:23 PST
r224887 avoids relying on implementation-defined behavior (multichar constants). We don't want to roll out that commit.

But it also breaks the build with GCC 5. We'd like to continue supporting GCC 5 in trunk for another half a year, as per https://trac.webkit.org/wiki/WebKitGTK/DependenciesPolicy.

This is actually pretty difficult and messy, but I think I have a solution that works for GCC 5 without sacrificing Jer's nice constexpr constructor when using newer compilers.
Comment 1 Michael Catanzaro 2017-11-15 17:12:13 PST
Created attachment 327037 [details]
Patch
Comment 2 Ms2ger (he/him; ⌚ UTC+1/+2) 2017-11-16 00:00:58 PST
Alternatively, would it be possible to add a no-argument constructor that initializes to zero? FourCC { 0 } would still be broken, but the alternative would be less ugly.
Comment 3 Carlos Alberto Lopez Perez 2017-11-16 06:23:06 PST
Comment on attachment 327037 [details]
Patch

Jer .. any opinion on this? I will r+ it tomorrow if there isn't concern about this patch.
Its a build fix, so it has a bit of urgency.
Comment 4 Michael Catanzaro 2017-11-16 07:25:10 PST
(In reply to Ms2ger from comment #2)
> Alternatively, would it be possible to add a no-argument constructor that
> initializes to zero? FourCC { 0 } would still be broken, but the alternative
> would be less ugly.

Seems like a good idea. Let's see what Jer thinks before I spend more time on this, though, because this was harder than it looks and I don't care to admit how much time I spent on it. :P
Comment 5 Jer Noble 2017-11-16 13:52:00 PST
Comment on attachment 327037 [details]
Patch

This looks fine.
Comment 6 Michael Catanzaro 2017-11-16 15:08:42 PST
(In reply to Ms2ger from comment #2)
> Alternatively, would it be possible to add a no-argument constructor that
> initializes to zero? FourCC { 0 } would still be broken, but the alternative
> would be less ugly.

Although it's ugly, I decided to stick with the current approach to avoid needing to define the no-argument constructor in the non-GCC 5 case. This way, when we delete the fallback code, we won't have the extra constructor left over.
Comment 7 WebKit Commit Bot 2017-11-16 15:28:03 PST
Comment on attachment 327037 [details]
Patch

Clearing flags on attachment: 327037

Committed r224937: <https://trac.webkit.org/changeset/224937>
Comment 8 WebKit Commit Bot 2017-11-16 15:28:05 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2017-11-16 15:29:30 PST
<rdar://problem/35600883>