[llvm-bugs] [Bug 42360] New: MachOReader breaks strict-aliasing rules
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jun 21 22:57:56 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42360
Bug ID: 42360
Summary: MachOReader breaks strict-aliasing rules
Product: tools
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: llvm-objcopy/strip
Assignee: unassignedbugs at nondot.org
Reporter: nuta at seiya.me
CC: alexander.v.shaposhnikov at gmail.com,
jake.h.ehrlich at gmail.com,
jh7370.2008 at my.bristol.ac.uk,
llvm-bugs at lists.llvm.org, rupprecht at google.com
According to Denis Bakhvalov [1], gcc warns a string-aliasing violation in
MachOReader:
llvm/tools/llvm-objcopy/MachO/MachOReader.cpp:124:46: required from here
llvm/tools/llvm-objcopy/MachO/MachOReader.cpp:104:19: warning: dereferencing
type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
I managed to reproduce the problem but in my environment (gcc 7.4.0 and 5.5.0
on Linux) gcc doesn't print such a warning.
Could someone else try this?
[1]:
https://github.com/llvm-mirror/llvm/commit/d3ca385e82dede1994405586086a7938dad6d5b7#commitcomment-34037779
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190622/04c76ea5/attachment.html>
More information about the llvm-bugs
mailing list