Bug 121999

Summary: [GCC] Fix build with gcc < 4.8.1, which does not have is_trivially_destructible
Product: WebKit Reporter: Gustavo Noronha (kov) <gns>
Component: New BugsAssignee: Gustavo Noronha (kov) <gns>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cmarcelo, commit-queue, jbriance, ossy, ryuan.choi
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 121930    
Attachments:
Description Flags
Patch
none
Patch none

Description Gustavo Noronha (kov) 2013-09-26 17:41:58 PDT
[GCC] Fix build with gcc < 4.8.1, which does not have is_trivially_destructible
Comment 1 Gustavo Noronha (kov) 2013-09-26 17:42:15 PDT
Created attachment 212775 [details]
Patch
Comment 2 Benjamin Poulain 2013-09-26 17:57:14 PDT
Comment on attachment 212775 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=212775&action=review

> Source/WTF/wtf/StdLibExtras.h:308
> +#if (defined(_MSC_VER) && _MSC_VER < 1700) || (COMPILER(GCC) && !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 8 && __GNUC_PATCHLEVEL__ >= 1))

Ins't that reimplementing GCC_VERSION_AT_LEAST?

I am pretty sure Clang also matches COMPILER(GCC).

> Source/WTF/wtf/StdLibExtras.h:310
>  // Work-around for Pre-C++11 syntax in MSVC 2010 and prior

You need to fix the comment as well.
Comment 3 Gustavo Noronha (kov) 2013-09-26 18:36:32 PDT
hah, I should have looked harder, I didn't know about GCC_VERSION_AT_LEAST, thanks, modified patch incoming in a bit, thanks!
Comment 4 Gustavo Noronha (kov) 2013-09-26 18:45:25 PDT
Created attachment 212782 [details]
Patch
Comment 5 Benjamin Poulain 2013-09-26 19:56:42 PDT
Comment on attachment 212782 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=212782&action=review

> Source/WTF/wtf/StdLibExtras.h:310
> +// Work-around for Pre-C++11 syntax in MSVC 2010 and prior as well as GCC < 4.8.1.

Please add a comma to split "and prior as well as".
Comment 6 Ryuan Choi 2013-09-27 00:47:48 PDT
Committed r156529: <http://trac.webkit.org/changeset/156529>
Comment 7 Ryuan Choi 2013-09-27 00:49:37 PDT
Comment on attachment 212782 [details]
Patch

Clearing flags.

I landed manually after followed comment in order to fix build break on EFL, GTK and Qt bot.

Thanks.
Comment 8 Csaba Osztrogon√°c 2013-09-27 00:55:00 PDT
*** Bug 122008 has been marked as a duplicate of this bug. ***
Comment 9 Csaba Osztrogon√°c 2013-10-10 09:29:04 PDT
Adding the original bug (which broke the build) to blocks list.