Skip to content

7z.so fails to compile with gcc 11.x #36

@maxirmx

Description

@maxirmx
../../Archive/NtfsHandler.cpp: In member function 'LONG
NArchive::Ntfs::CDatabase::Open()':
../../Archive/NtfsHandler.cpp:1283:71: error: cannot convert 'std::nullptr_t' to
'UInt32' {aka 'unsigned int'}
1283 |     if (!mftRec.Parse(ByteBuf, Header.SectorSizeLog, numSectorsInRec,
NULL, 0))
|                                                                      
^~~~
      |                                                                       |
|                                                                      
std::nullptr_t
../../Archive/NtfsHandler.cpp:1069:75: note:   initializing argument 4 of 'bool
NArchive::Ntfs::CMftRec::Parse(Byte*, int, UInt32, UInt32,
CObjectVector<NArchive::Ntfs::CAttr>*)'
1069 | bool CMftRec::Parse(Byte *p, int sectorSizeLog, UInt32 numSectors,
UInt32 recNumber,
|                                                                   
~~~~~~~^~~~~~~~~
make[5]: *** [../../../../makefile.rules:359: NtfsHandler.o] Error 1
make[4]: *** [makefile:74: 7zso] Error 2

I believe this happens because gcc 11.x GCC 11 default to ISO C++17 for its C++ front-end while earlier versions default to GNU C++ 14

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