What am I missing?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

When compiling my code on Ubuntu 8.04 with g++ 4.2.x my compile is clean.  When I compile the same code on
Fedora7 with 4.1.x or 4.2.x I receive a lot of errors like the following... Is there a lib or something
missing to handle these errors?

c.cpp:902: error: cast from ?const char*? to ?int? loses precision
c.cpp:904: error: cast from ?double*? to ?int? loses precision
c.cpp:907: error: cast from ?const char*? to ?int? loses precision
c.cpp:909: error: cast from ?double*? to ?int? loses precision

const char* number_type_ptr = "N";

int equals_operator( int ltype, binary_pair* lset, int rtype, binary_pair* rset,
  double*& result, op_checker* checker, double checker_arg2 )
{
  int             wrk_value = 1;
  double*           lresult;
  double*           rresult;
  int        lcount = 0, rcount = 0;
  double     lckarg = 0.0, rckarg = 0.0;
  op_checker*      lchecker = NULL;
  op_checker*      rchecker = NULL;
  int                     i;

  if( ltype == (int) number_type_ptr ) {   //line 902
    lcount = 0;
    rckarg = (int) ( lresult = (double*) lset );  //line 904
    rchecker = equals_check;
  }
  if( rtype == (int) number_type_ptr ) {   //line 907
    rcount = 0;
    lckarg = (int) ( rresult = (double*) rset );  //line 909
    lchecker = equals_check;
  }

Thanks in advance for assistance.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIanAiqFwmN5yaqkwRAkjUAKCwSAEbt/BAbuMlIsEkzNfjbuho+wCfc7Qn
8Y48A+/4XrcAiwfpIQ37YSk=
=+pb7
-----END PGP SIGNATURE-----


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux