Skip to content

Build fails with GCC 16 #214

Description

@sergiodj

Hi,

7zip is currently FTBFSing with GCC 16 on GNU/Linux:

2026/05/06 00:40:57 WARN In file included from ../../Archive/../Common/LimitedStreams.h:7,
2026/05/06 00:40:57 WARN                  from ../../Archive/CramfsHandler.cpp:16:
2026/05/06 00:40:57 WARN In member function 'virtual ULONG NCompress::NDeflate::NDecoder::CCoder::AddRef()',
2026/05/06 00:40:57 WARN     inlined from 'T* CMyComPtr<T>::operator=(T*) [with T = ICompressCoder]' at ../../Archive/../Common/../../Common/MyCom.h:27:16,
2026/05/06 00:40:57 WARN     inlined from 'LONG NArchive::NCramfs::CHandler::ReadBlock(UInt64, Byte*, size_t)' at ../../Archive/CramfsHandler.cpp:571:20:
2026/05/06 00:40:57 WARN ../../Archive/../Common/../../Common/MyCom.h:383:16: error: array subscript 'NCompress::NDeflate::NDecoder::CCoder[0]' is partly outside array bounds of 'unsigned char [40]' [-Werror=array-bounds=]
2026/05/06 00:40:57 WARN   383 |     { return ++_m_RefCount; } \
2026/05/06 00:40:57 WARN       |                ^~~~~~~~~~~
2026/05/06 00:40:57 WARN ../../Archive/../Compress/DeflateDecoder.h:49:3: note: in expansion of macro 'Z7_COM_ADDREF_RELEASE'
2026/05/06 00:40:57 WARN    49 |   Z7_COM_ADDREF_RELEASE
2026/05/06 00:40:57 WARN       |   ^~~~~~~~~~~~~~~~~~~~~
2026/05/06 00:40:57 WARN ../../Archive/CramfsHandler.cpp: In member function 'LONG NArchive::NCramfs::CHandler::ReadBlock(UInt64, Byte*, size_t)':
2026/05/06 00:40:57 WARN ../../Archive/CramfsHandler.cpp:570:57: note: object of size 40 allocated by 'operator new'
2026/05/06 00:40:57 WARN   570 |       _zlibDecoderSpec = new NCompress::NZlib::CDecoder();
2026/05/06 00:40:57 WARN       |                                                         ^
2026/05/06 00:40:57 WARN In member function 'virtual ULONG NCompress::NDeflate::NDecoder::CCoder::AddRef()',
2026/05/06 00:40:57 WARN     inlined from 'T* CMyComPtr<T>::operator=(T*) [with T = ICompressCoder]' at ../../Archive/../Common/../../Common/MyCom.h:27:16,
2026/05/06 00:40:57 WARN     inlined from 'LONG NArchive::NCramfs::CHandler::ReadBlock(UInt64, Byte*, size_t)' at ../../Archive/CramfsHandler.cpp:571:20:
2026/05/06 00:40:57 WARN ../../Archive/../Common/../../Common/MyCom.h:383:16: error: array subscript 'NCompress::NDeflate::NDecoder::CCoder[0]' is partly outside array bounds of 'unsigned char [40]' [-Werror=array-bounds=]
2026/05/06 00:40:57 WARN   383 |     { return ++_m_RefCount; } \
2026/05/06 00:40:57 WARN       |                ^~~~~~~~~~~
2026/05/06 00:40:57 WARN ../../Archive/../Compress/DeflateDecoder.h:49:3: note: in expansion of macro 'Z7_COM_ADDREF_RELEASE'
2026/05/06 00:40:57 WARN    49 |   Z7_COM_ADDREF_RELEASE
2026/05/06 00:40:57 WARN       |   ^~~~~~~~~~~~~~~~~~~~~
2026/05/06 00:40:57 WARN ../../Archive/CramfsHandler.cpp: In member function 'LONG NArchive::NCramfs::CHandler::ReadBlock(UInt64, Byte*, size_t)':
2026/05/06 00:40:57 WARN ../../Archive/CramfsHandler.cpp:570:57: note: object of size 40 allocated by 'operator new'
2026/05/06 00:40:57 WARN   570 |       _zlibDecoderSpec = new NCompress::NZlib::CDecoder();
2026/05/06 00:40:57 WARN       |                                                         ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions