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: [email protected]
Reporter: [email protected]
CC: [email protected],
[email protected],
[email protected],
[email protected], [email protected]
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._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs