Menu

#195 Build fails with gcc 4 on x86_64

closed-fixed
nobody
advcomp (13)
3
2013-03-01
2005-05-26
Anonymous
No

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.

Discussion

  • Matthias Saou

    Matthias Saou - 2005-05-27

    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

     
  • Andrea Mazzoleni

    • status: open --> closed
     
  • Andrea Mazzoleni

    Logged In: YES
    user_id=286916

    Fixed in version 1.15.

     
  • Andrea Mazzoleni

    • status: closed --> closed-fixed
     
  • Matthias Saou

    Matthias Saou - 2005-11-02

    Logged In: YES
    user_id=34811

    Thanks. I'll update the Fedora Extras package to 1.15.

     
  • Andrea Mazzoleni

    • priority: 5 --> 3
     

Log in to post a comment.