libelfin icon indicating copy to clipboard operation
libelfin copied to clipboard

build failure with LLVM 10

Open doko42 opened this issue 4 years ago • 2 comments

fails with LLVM 10, works with LLVM 9:

$ cat x.cpp #include <elf/elf++.hh> int main(int argc, char *argv[]) { return 0; }

$ clang++ -std=c++11 -I/usr/include/libelfin -c x.cpp In file included from x.cpp:1: In file included from /usr/include/libelfin/elf/elf++.hh:9: /usr/include/libelfin/elf/data.hh:558:22: error: cannot assign to non-static data member within const member function 'set_binding' info = (info & 0xF) | ((unsigned char)v << 4); ~~~~ ^ /usr/include/libelfin/elf/data.hh:556:14: note: member function 'elf::Sym<elf::Elf64, Order>::set_binding' is declared const here void set_binding(stb v) const ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.

doko42 avatar Mar 11 '20 08:03 doko42

diff --git a/elf/data.hh b/elf/data.hh
index 8085577..d7e9fb4 100644
--- a/elf/data.hh
+++ b/elf/data.hh
@@ -560,7 +560,7 @@ struct Sym<Elf64, Order>
                 return (stb)(info >> 4);
         }
 
-        void set_binding(stb v) const
+        void set_binding(stb v)
         {
                 info = (info & 0xF) | ((unsigned char)v << 4);
         }

nevun avatar Jun 10 '20 13:06 nevun

Hi. Any hope to have a new release with this fix in place before Christmas?

petterreinholdtsen avatar Sep 06 '20 06:09 petterreinholdtsen