D28094: [ELF] - Implemented support for R_386_PC8/R_386_8 relocations.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 26 00:51:51 PST 2017


>================
>Comment at: lld/trunk/ELF/Target.cpp:518
>+  if (Type == R_386_8 || Type == R_386_PC8) {
>+    *Loc = (uint8_t)Val;
>+    return;
>----------------
>Do you need a cast?

I think we want it.

Otherwise with clang's -Weverything/-Wconversion it should give something like
"warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long') to 'uint8_t' (aka 'unsigned char') [-Wconversion]"

George.





More information about the llvm-commits mailing list