Bug 128301

Summary: Misused PLATFORM(MIDDLE_ENDIAN) and PLATFORM(BIG_ENDIAN)
Product: WebKit Reporter: Tamas Gergely <tgergely.u-szeged>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cmarcelo, commit-queue, dbates, ossy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch none

Description Tamas Gergely 2014-02-06 02:50:09 PST
MIDDLE_ENDIAN and BIG_ENDIAN are CPU attributes and not platform. They should be used with CPU() macro, and not with PLATFORM().
Comment 1 Tamas Gergely 2014-02-06 02:51:53 PST
Created attachment 223320 [details]
patch
Comment 2 Daniel Bates 2014-06-17 14:59:41 PDT
Comment on attachment 223320 [details]
patch

r=me

Is there any way we can prevent this? From briefly searching, GCC has option -Wundef to warn about undefined identifiers. Would enabling it lead to many false positives?
Comment 3 WebKit Commit Bot 2014-06-17 15:35:54 PDT
Comment on attachment 223320 [details]
patch

Clearing flags on attachment: 223320

Committed r170081: <http://trac.webkit.org/changeset/170081>
Comment 4 WebKit Commit Bot 2014-06-17 15:35:57 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Csaba Osztrogonác 2014-06-18 00:00:05 PDT
(In reply to comment #2)
> (From update of attachment 223320 [details])
> r=me
> 
> Is there any way we can prevent this? From briefly searching, GCC has option -Wundef to warn about undefined identifiers. Would enabling it lead to many false positives?

-Wundef is used by EFL port, but it doesn't help similar issues,
because PLATFORM macro has the following definition:

#define PLATFORM(WTF_FEATURE) (defined WTF_PLATFORM_##WTF_FEATURE  && WTF_PLATFORM_##WTF_FEATURE)