Bug 52178 - Remove extraneous COMPILER(GCC) condition when checking GCC_VERSION_AT_LEAST()
Summary: Remove extraneous COMPILER(GCC) condition when checking GCC_VERSION_AT_LEAST()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-10 16:29 PST by Daniel Bates
Modified: 2011-01-10 16:52 PST (History)
0 users

See Also:


Attachments
Patch (2.94 KB, patch)
2011-01-10 16:41 PST, Daniel Bates
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2011-01-10 16:29:58 PST
Following up from Darin Adler's comment in bug #51866 <https://bugs.webkit.org/show_bug.cgi?id=51866#c16>, it is sufficient to test for GCC_VERSION_AT_LEAST() instead of COMPILER(GCC) && GCC_VERSION_AT_LEAST().
Comment 1 Daniel Bates 2011-01-10 16:41:26 PST
Created attachment 78470 [details]
Patch
Comment 2 Martin Robinson 2011-01-10 16:43:49 PST
Comment on attachment 78470 [details]
Patch

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

Looks good, but pleae double-check the wording in the ChangeLog.

> Source/JavaScriptCore/ChangeLog:11
> +        It is sufficient to test GCC_VERSION_AT_LEAST() instead of both COMPILER(GCC) and
> +        GCC_VERSION_AT_LEAST() as GCC_VERSION_AT_LEAST() is defined only when we are
> +        compiling with GCC (i.e. COMPILER(GCC) is true).
> +

Careful with this wording. My reading of this is that GCC_VERSION_AT_LEAST() is undefined when we aren't on GCC, but in actuality GCC_VERSION_AT_LEAST() is defined as 0.
Comment 3 Daniel Bates 2011-01-10 16:44:43 PST
(In reply to comment #2)
> (From update of attachment 78470 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=78470&action=review
> 
> Looks good, but pleae double-check the wording in the ChangeLog.
> 
> > Source/JavaScriptCore/ChangeLog:11
> > +        It is sufficient to test GCC_VERSION_AT_LEAST() instead of both COMPILER(GCC) and
> > +        GCC_VERSION_AT_LEAST() as GCC_VERSION_AT_LEAST() is defined only when we are
> > +        compiling with GCC (i.e. COMPILER(GCC) is true).
> > +
> 
> Careful with this wording. My reading of this is that GCC_VERSION_AT_LEAST() is undefined when we aren't on GCC, but in actuality GCC_VERSION_AT_LEAST() is defined as 0.

Will fix before landing.
Comment 4 Daniel Bates 2011-01-10 16:52:16 PST
Committed r75454: <http://trac.webkit.org/changeset/75454>