Closed 25077667 closed 1 year ago
Hi, it will be not a problem to generate a new release. I'm wondering what kind of warnings do you get with 3.11. What compilation options do you use?
@serge1 TL;DR: Using GCC 13.2.1 Enabling all compilation warnings, including non-standard ones, and treating these warnings as errors.
➜ build git:(Release_3.11) gcc --version;cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja -DCMAKE_CXX_FLAGS="-Wall -Wextra -Werror -pedantic" gcc (GCC) 13.2.1 20230801 Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-- The C compiler identification is GNU 13.2.1 -- The CXX compiler identification is GNU 13.2.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done (0.3s) -- Generating done (0.0s) -- Build files have been written to: /tmp/ELFIO/build ➜ build git:(Release_3.11)
and it shows:
/usr/bin/c++ -I/tmp/ELFIO -Wall -Wextra -Werror -pedantic -O3 -DNDEBUG -std=gnu++14 -MD -MT examples/elfdump/CMakeFiles/elfdump.dir/elfdump.cpp.o -MF examples/elfdump/CMakeFiles/elfdump.dir/elfdump.cpp.o.d -o examples/elfdump/CMakeFiles/elfdump.dir/elfdump.cpp.o -c /tmp/ELFIO/examples/elfdump/elfdump.cpp
In file included from /tmp/ELFIO/elfio/elfio.hpp:40,
from /tmp/ELFIO/elfio/elfio_dump.hpp:31,
from /tmp/ELFIO/examples/elfdump/elfdump.cpp:31:
/tmp/ELFIO/elfio/elfio_section.hpp: In instantiation of ‘bool ELFIO::section_impl<T>::load(std::istream&, std::streampos, bool) [with T = ELFIO::Elf32_Shdr; std::istream = std::basic_istream<char>; std::streampos = std::fpos<__mbstate_t>]’:
/tmp/ELFIO/elfio/elfio_section.hpp:220:10: required from here
/tmp/ELFIO/elfio/elfio_section.hpp:226:17: error: missing initializer for member ‘ELFIO::Elf32_Shdr::sh_type’ [-Werror=missing-field-initializers]
226 | header = { 0 };
| ~~~~~~~~^~~~~~~
/tmp/ELFIO/elfio/elfio_section.hpp:226:17: error: missing initializer for member ‘ELFIO::Elf32_Shdr::sh_flags’ [-Werror=missing-field-initializers]
/tmp/ELFIO/elfio/elfio_section.hpp:226:17: error: missing initializer for member ‘ELFIO::Elf32_Shdr::sh_addr’ [-Werror=missing-field-initializers]
/tmp/ELFIO/elfio/elfio_section.hpp:226:17: error: missing initializer for member ‘ELFIO::Elf32_Shdr::sh_offset’ [-Werror=missing-field-initializers]
/tmp/ELFIO/elfio/elfio_section.hpp:226:17: error: missing initializer for member ‘ELFIO::Elf32_Shdr::sh_size’ [-Werror=missing-field-initializers]
/tmp/ELFIO/elfio/elfio_section.hpp:226:17: error: missing initializer for member ‘ELFIO::Elf32_Shdr::sh_link’ [-Werror=missing-field-initializers]
/tmp/ELFIO/elfio/elfio_section.hpp:226:17: error: missing initializer for member ‘ELFIO::Elf32_Shdr::sh_info’ [-Werror=missing-field-initializers]
/tmp/ELFIO/elfio/elfio_section.hpp:226:17: error: missing initializer for member ‘ELFIO::Elf32_Shdr::sh_addralign’ [-Werror=missing-field-initializers]
/tmp/ELFIO/elfio/elfio_section.hpp:226:17: error: missing initializer for member ‘ELFIO::Elf32_Shdr::sh_entsize’ [-Werror=missing-field-initializers]
/tmp/ELFIO/elfio/elfio_section.hpp: In instantiation of ‘bool ELFIO::section_impl<T>::load(std::istream&, std::streampos, bool) [with T = ELFIO::Elf64_Shdr; std::istream = std::basic_istream<char>; std::streampos = std::fpos<__mbstate_t>]’:
/tmp/ELFIO/elfio/elfio_section.hpp:220:10: required from here
/tmp/ELFIO/elfio/elfio_section.hpp:226:17: error: missing initializer for member ‘ELFIO::Elf64_Shdr::sh_type’ [-Werror=missing-field-initializers]
/tmp/ELFIO/elfio/elfio_section.hpp:226:17: error: missing initializer for member ‘ELFIO::Elf64_Shdr::sh_flags’ [-Werror=missing-field-initializers]
/tmp/ELFIO/elfio/elfio_section.hpp:226:17: error: missing initializer for member ‘ELFIO::Elf64_Shdr::sh_addr’ [-Werror=missing-field-initializers]
/tmp/ELFIO/elfio/elfio_section.hpp:226:17: error: missing initializer for member ‘ELFIO::Elf64_Shdr::sh_offset’ [-Werror=missing-field-initializers]
/tmp/ELFIO/elfio/elfio_section.hpp:226:17: error: missing initializer for member ‘ELFIO::Elf64_Shdr::sh_size’ [-Werror=missing-field-initializers]
/tmp/ELFIO/elfio/elfio_section.hpp:226:17: error: missing initializer for member ‘ELFIO::Elf64_Shdr::sh_link’ [-Werror=missing-field-initializers]
/tmp/ELFIO/elfio/elfio_section.hpp:226:17: error: missing initializer for member ‘ELFIO::Elf64_Shdr::sh_info’ [-Werror=missing-field-initializers]
/tmp/ELFIO/elfio/elfio_section.hpp:226:17: error: missing initializer for member ‘ELFIO::Elf64_Shdr::sh_addralign’ [-Werror=missing-field-initializers]
/tmp/ELFIO/elfio/elfio_section.hpp:226:17: error: missing initializer for member ‘ELFIO::Elf64_Shdr::sh_entsize’ [-Werror=missing-field-initializers]
@serge1 May I inquire about the challenges you're currently facing? I would be glad to assist you by submitting a pull request to your repository to help address these issues.
@serge1 Hello, is there any progress?
Hi, I'll try to make a new release at this weekend
The new release is available at https://github.com/serge1/ELFIO/releases/tag/Release_3.12
Hello,
I'm currently utilizing your impressive repository and have found it to be quite useful.
I've been using the latest release, "Release_3.11," and I've noticed that it generates a significant number of compilation warnings when paired with gcc 13.2.1. However, I've found that the main branch, which can be found at https://github.com/serge1/ELFIO/commit/8ae6cec5d60495822ecd57d736f66149da9b1830, works perfectly fine for me.
I'm curious if you have plans to create a new version based on the changes made in https://github.com/serge1/ELFIO/commit/8ae6cec5d60495822ecd57d736f66149da9b1830? This would be greatly appreciated.