All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jes Sorensen <jes@linuxcare.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] integer -> pointer question
Date: Tue, 01 Aug 2000 00:49:20 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590678205260@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590678205250@msgid-missing>

>>>>> "Michael" = Michael Madore <mmadore@turbolinux.com> writes:

>> Hi Michael
>> 
>> Storing integers in void pointers without a cast is simply broken
>> and nobody should do that or to be more precise you cannot expect
>> void * to be the same size as int.
>> 
>> Basically the correct solution is to LART the programmer of the bad
>> code.
>> 
>> Jes

Michael> The code does perform the cast, but since the upper four
Michael> bytes of the pointer will be meaningless, it's spits out a
Michael> warning.

Good point, what they really should be doing is to use long instead of
void * then - you know that long = sizeof(void *) but you shouldn't
get the error for that.

Jes



      parent reply	other threads:[~2000-08-01  0:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-31 22:22 [Linux-ia64] integer -> pointer question Michael Madore
2000-07-31 22:34 ` Jes Sorensen
2000-07-31 23:03 ` Dan Pop
2000-07-31 23:14 ` Michael Madore
2000-07-31 23:16 ` Michael Madore
2000-07-31 23:20 ` Dan Pop
2000-07-31 23:21 ` David Mosberger
2000-08-01  0:49 ` Jes Sorensen [this message]

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-105590678205260@msgid-missing \
    --to=jes@linuxcare.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.