Bug 98015 - Check that __cplusplus is defined before comparing its value
Summary: Check that __cplusplus is defined before comparing its value
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Trivial
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-01 04:28 PDT by Alberto Garcia
Modified: 2012-10-01 05:28 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.29 KB, patch)
2012-10-01 04:31 PDT, Alberto Garcia
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alberto Garcia 2012-10-01 04:28:09 PDT
There's this condition in WTF/wtf/Compiler.h:

#if GCC_VERSION_AT_LEAST(4, 7, 0) && __cplusplus >= 201103L

If __cplusplus is not defined is interpreted as having the value 0,
but it produces a compilation warning with -Wundef.

This is the case with some API tests that are written in C (JSNode.c,
JSNodeList.c, minidom.c).
Comment 1 Alberto Garcia 2012-10-01 04:31:01 PDT
Created attachment 166449 [details]
Patch
Comment 2 Xan Lopez 2012-10-01 05:04:41 PDT
Comment on attachment 166449 [details]
Patch

LGTM.
Comment 3 WebKit Review Bot 2012-10-01 05:28:31 PDT
Comment on attachment 166449 [details]
Patch

Clearing flags on attachment: 166449

Committed r130039: <http://trac.webkit.org/changeset/130039>
Comment 4 WebKit Review Bot 2012-10-01 05:28:34 PDT
All reviewed patches have been landed.  Closing bug.