Build fails with gcc 4 on x86_64
Brought to you by:
amadvance
The advancecomp 1.14 (latest) build fails on x86_64
with gcc 4 :
[...]
g++ -DHAVE_CONFIG_H -I. -I. -I. -O2 -g -pipe
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m64 -mtune=nocona
-DUSE_ERROR_SILENT -DUSE_COMPRESS -c -o CRC.o `test -f
'7z/CRC.cc' || echo './'`7z/CRC.cc
7z/CRC.cc: In member function 'void CCRC::Update(const
void*, UINT32)':
7z/CRC.cc:90: error: cast from 'const BYTE*' to
'UINT_PTR' loses precision
make[1]: *** [CRC.o] Error 1
Seems like a typical type mismatch that wasn't making
the build fail with gcc 3.x.
Logged In: NO
Suggested patch :
http://cvs.fedora.redhat.com/viewcvs/devel/advancecomp/advancecomp-64bit.patch?root=extras&rev=1.1&view=markup
Logged In: YES
user_id=34811
Or, another (cleaner) suggested fix :
A much better approach would be to use c99/stdint.h types,
instead.
i.e.
#include <stdint.h>
typedef uint16_t WORD;
typedef uint32_t DWORD;
typedef uintptr_t UINT_PTR;
Ralf
Logged In: YES
user_id=286916
Fixed in version 1.15.
Logged In: YES
user_id=34811
Thanks. I'll update the Fedora Extras package to 1.15.