Csaba Raduly
2011-Jan-20 20:49 UTC
[LLVMdev] Dubious code in llvm/lib/MC/MachObjectWriter.cpp
In llvm/lib/MC/MachObjectWriter.cpp, there's assert(OS.tell() - Start == is64Bit() ? macho::Header64Size : macho::Header32Size); Shouldn't that be assert(OS.tell() - Start == (is64Bit() ? macho::Header64Size : macho::Header32Size)); MSVC emits a warning, and it doesn't seem right to compare a boolean with a difference of two integers. Csaba -- GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++ Life is complex, with real and imaginary parts. "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds "People disagree with me. I just ignore them." -- Linus Torvalds -------------- next part -------------- A non-text attachment was scrubbed... Name: macho.diff Type: application/octet-stream Size: 913 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110120/113b3a2f/attachment.obj>