Closed
Bug 662969
Opened 13 years ago
Closed 13 years ago
Silence the clang warnings issued because of alignment requirements increase when compiling jsparse.h
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla7
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
Details
(Whiteboard: [fixed-in-tracemonkey])
Attachments
(1 file)
984 bytes,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
These warnings drive me nuts. We get thousands of them when compiling jsparse.h. In file included from /Users/ehsanakhgari/moz/tmp/js/src/jsatom.cpp:58: /Users/ehsanakhgari/moz/tmp/js/src/jsparse.h:654:16: warning: cast from 'char *' to 'JSParseNode *' increases required alignment from 1 to 8 [-Wcast-align] return (JSParseNode *)((char *)pn_tail - offsetof(JSParseNode, pn_next)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Assignee | ||
Comment 1•13 years ago
|
||
Comment 2•13 years ago
|
||
Comment on attachment 538143 [details] [diff] [review] Patch (v1) >- return (JSParseNode *)((char *)pn_tail - offsetof(JSParseNode, pn_next)); >+ return (JSParseNode *)(void *)((char *)pn_tail - offsetof(JSParseNode, pn_next)); More uintptr_t: >+ return (JSParseNode *)(uintptr_t(pn_tail) - offsetof(JSParseNode, pn_next)); (reinterpret_cast<> butts up against the JS line length limit in this case, hence why I wouldn't use it.)
Attachment #538143 -
Flags: review?(jwalden+bmo) → review+
Assignee | ||
Comment 3•13 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/f25adc3d6d65
Whiteboard: [fixed-in-tracemonkey]
Target Milestone: --- → mozilla7
Comment 4•13 years ago
|
||
cdleary-bot mozilla-central merge info: http://hg.mozilla.org/mozilla-central/rev/f25adc3d6d65
Updated•13 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•