Bug 129683 - Web Inspector: build: InspectorJSTypeBuilders.h breaks strict-aliasing rules
Summary: Web Inspector: build: InspectorJSTypeBuilders.h breaks strict-aliasing rules
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 129799
  Show dependency treegraph
 
Reported: 2014-03-04 07:14 PST by Patrick Welche
Modified: 2014-03-06 05:36 PST (History)
2 users (show)

See Also:


Attachments
Sticking plaster to fix build (614 bytes, patch)
2014-03-06 05:27 PST, Patrick Welche
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Welche 2014-03-04 07:14:52 PST
./DerivedSources/JavaScriptCore/InspectorJSTypeBuilders.h:116:66: warning: deref
erencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing
]
             return *reinterpret_cast<RefPtr<Location>*>(&m_result);


It looks as though that header is careful about trying to only cast compatible objects.

Need some unions or a sprinkling of -fno-strict-aliasing ?

This is using the recent webkitgtk-2.3.91 tarball.
Comment 1 Patrick Welche 2014-03-06 05:27:36 PST
Created attachment 225981 [details]
Sticking plaster to fix build

This patch gets webkitgtk-2.3.91 building a bit further. Given that the type punning seems intentional, maybe a more legal way of doing it involving unions should be sought. Suggest applying said patch, and leaving bug open.