This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: What am I missing?
- From: "Andrew Bell" <andrew dot bell dot ia at gmail dot com>
- To: JJ <jj3666 at yahoo dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 1 Jul 2008 13:08:04 -0500
- Subject: Re: What am I missing?
- References: <486A7022.6030906@yahoo.com>
JJ,
Looks like you moved from a 32 bit OS to a 64 bit os.
On Tue, Jul 1, 2008 at 12:57 PM, JJ <jj3666@yahoo.com> wrote:
> -----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-----
>
>
--
Andrew Bell
andrew.bell.ia@gmail.com