public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Pop <Dan.Pop@cern.ch>
To: linux-ia64@vger.kernel.org
Subject: RE: [Linux-ia64] Unaligned access in ia64
Date: Mon, 12 Nov 2001 23:50:37 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590698805478@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590698805472@msgid-missing>


On Mon, 12 Nov 2001, Pereira, D LailaX E wrote:

> My program still does not port properly gives the "unaligned access
> warnings" while running. Also, When I make the files, I also get the
> warnings of the following type::
> warning: cast from pointer to integer of different size
> This happens when I convert (void*) pointer to int i. 

You shouldn't do that, because this conversion is likely to result in
loss of information, since pointers are 64-bit on IA-64 Linux.

> The following warning is also displayed: 
> cast to pointer from integer of different size 
> 
> This happens when I convert int i to (void*) pointer . 
> for example::  function((void*)i);

This should not cause any problems, but I can't see its usefulness.

> How can these warnings be avoided? 

If you want to mix pointers and integers in this way, use long's
instead of int's.

Also, double check that all the functions returning pointers that your
program calls are properly declared, either explicitly or by the
inclusion of the appropriate headers. 

Dan



  parent reply	other threads:[~2001-11-12 23:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-12 16:24 [Linux-ia64] Unaligned access in ia64 Pereira, D LailaX E
2001-11-12 16:38 ` n0ano
2001-11-12 16:56 ` Pereira, D LailaX E
2001-11-12 17:16 ` n0ano
2001-11-12 23:50 ` Dan Pop [this message]
2001-11-13  0:00 ` Dan Pop

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-ia64-105590698805478@msgid-missing \
    --to=dan.pop@cern.ch \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox