Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 803
News FAQ
Search Home


next up previous contents
Next: String conversion problems Up: Examples Previous: Library Return Types

Equivalence of pointers and ints

/opt/MIPSpro/bin/cc -I.. -I../../include -I../.. -I../../../include -g -64 -DSGI64 -KPIC -c ../../sv.c
cc-3187 cc: WARNING File = ../../sv.c, Line = 575
  A pointer is converted to a smaller integer.

        iv      = (IV)pv;
                  ^

cc-3187 cc: WARNING File = ../../sv.c, Line = 935
  A pointer is converted to a smaller integer.

          return (IV)SvRV(sv);
                 ^

Comments Inter-conversion of ints and pointer types, or pointer arithmetic using ints is not recommended. However, there are rare cases where it may be necessary, such as the transfer of addresses from C++ to Glish. It is proposed that the new type Size be used in this case to deal with (and flag) these very limited cases. In addition, in C code, (char*)NULL must be used in preference to (char*)0, where required. Some 64-bit compilers will not accept the latter.


next up previous contents
Next: String conversion problems Up: Examples Previous: Library Return Types   Contents
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2004-08-28