Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token.hpp fails to compile with GCC 13. #67

Open
junhaoliao opened this issue Dec 24, 2024 · 0 comments
Open

Token.hpp fails to compile with GCC 13. #67

junhaoliao opened this issue Dec 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@junhaoliao
Copy link
Member

junhaoliao commented Dec 24, 2024

Bug

[[nodiscard]] auto get_length() const -> uint32_t;
uint32_t m_start_pos{0};
uint32_t m_end_pos{0};
char const* m_buffer{nullptr};
uint32_t m_buffer_size{0};
uint32_t m_line{0};
std::vector<uint32_t> const* m_type_ids_ptr{nullptr};

contains multiple references to uint32_t; however, such references no longer exist in GCC 13 according to https://gcc.gnu.org/gcc-13/porting_to.html#:~:text=Header%20dependency%20changes

Header dependency changes
Some C++ Standard Library headers have been changed to no longer include other headers that were being used internally by the library. As such, C++ programs that used standard library components without including the right headers will no longer compile.

The following headers are used less widely in libstdc++ and may need to be included explicitly when compiling with GCC 13:

<string> (for std::string, std::to_string, std::stoi etc.)
<system_error> (for std::error_code, std::error_category, std::system_error).
<cstdint> (for std::int8_t, std::int32_t etc.)
<cstdio> (for std::printf, std::fopen etc.)
<cstdlib> (for std::strtol, std::malloc etc.)

log-surgeon version

081b20f

Environment

junhao@GIGABYTE:~/workspace/checkinstall$ gcc --version
gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
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.

junhao@GIGABYTE:~/workspace/checkinstall$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.1 LTS
Release:        24.04
Codename:       noble
junhao@GIGABYTE:~/workspace/checkinstall$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.1 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo

Reproduction steps

use gcc 13 to compile the file

@junhaoliao junhaoliao added the bug Something isn't working label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant